开发者

Capital "S" suddenly appears indented in Windows browsers - why?

开发者 https://www.devze.com 2023-03-20 20:57 出处:网络
We haven\'t found anything anywhere so far about that very strange effect. For some time (don\'t know since when exactly), the capital S letter renders in Windows browsers like it\'s been moved by on

We haven't found anything anywhere so far about that very strange effect.

For some time (don't know since when exactly), the capital S letter renders in Windows browsers like it's been moved by one or two pixels to the right. This happens on many browsers, not just on my system, so our customer wants it repaired. It's not a question about local Windows configuration but about browser rendering.

Capital "S" suddenly appears indented in Windows browsers - why?

It can be seen here: http://www.holcimfoundation.org/T154/holcim_awards.htm

Here are some facts:

  • On Mac, Linux, Android and Windows with ClearType switched off the effect doesn't occur
  • If zoomed in (CTRL+ on Firefox), the effect gets smaller and then disappears
  • It doesn't happen on every website, just a few - I believe I've seen this elsewhere too (but didn't keep the URLs)

We believe that this is a bug in the Windows font rendering engine. Does anyone have any id开发者_运维问答ea why this happens? Or what kind of workaround we could use?


On Mac, Linux, Android and Windows with ClearType switched off the effect doesn't

I'm not much of a ClearType wizard on Mac, Linux or Android but in Windows you can tune it.

If zoomed in (CTRL+ on Firefox), the effect gets smaller and then disappears

To me this indicates that the text path is being rendered correctly but at 100% with so few pixels to work with the "mapping" is wrong. Do you have a problem with this at 72pt?

We believe that this is a bug in the Windows font rendering engine

Do you have a reference rendering to compare this bug to? For all intents are purposes it could be by design, or your ClearType could be misconfigured.

EDIT:

I looked at this using the "Inspect Element" feature of Chrome. It seems you are trying to do too much with only 10 pixels of character real estate.

Observe the style and the rendering before:

Capital "S" suddenly appears indented in Windows browsers - why?

Now take bold off:

Capital "S" suddenly appears indented in Windows browsers - why?

Looks like it's not a bug, ClearType is doing the best it can with only 10 pixels.

0

精彩评论

暂无评论...
验证码 换一张
取 消