Created attachment 598507 [details]
Droid Sans font italic looks strange
bug 724231 comment 5 spin off
first bad nightly: 2012-02-16-03-12-31
m-i build changeset:
last good revision is 392319d8c1fa
first bad revision is d32d00967753
Created attachment 598508 [details]
These fonts look really strange:
Lucida Sans Unicode
Microsoft Sans Serif
There seem to be two issues here. One is that glyph positioning/spacing is poor in cases where synthetic italics are used; I'm guessing this happens because we handle pixel-rounding differently somewhere when a transform is in effect. I can reproduce this here, and will try to pin it down more specifically.
The second (and very puzzling) issue is that your screenshots show incorrect subpixel antialiasing of the synthetic-italic glyphs. If you zoom in and look at the images, you can see that in these cases, the reddish and blueish fringes are on the opposite sides of the glyphs from all the rest of the (non-synth-italic) text. That mismatch means that in addition to the glyph spacing being uneven, the glyph shapes themselves look awfully rough on your system. However, I can _not_ reproduce this issue here; the subpixel AA remains correct for me.
Please post the Graphics section from about:support, so we can see if that offers any clues about why you're seeing different antialiasing behavior.
Adapter DescriptionMobile Intel(R) 4 Series Express Chipset Family
Adapter RAM Unknown
Adapter Drivers igdumdx32 igd10umd32
Driver Version 126.96.36.1992
Driver Date 2-11-2011
Direct2D Enabled false
DirectWrite Enabled false (6.1.7601.17563)
ClearType ParametersGamma: 2200 Pixel Structure: BGR ClearType Level: 0 Enhanced Contrast: 50
WebGL Renderer Google Inc. -- ANGLE (Mobile Intel(R) 4 Series Express Chipset Family) -- OpenGL ES 2.0 (ANGLE 188.8.131.523)
GPU Accelerated Windows 1/1 Direct3D 9
Note: I also use gdipp https://code.google.com/p/gdipp/
Could you please try disabling gdipp, and see if that affects the rendering at all? I don't expect it to make any difference to the poor glyph spacing, but I'm curious about the reversed subpixel antialiasing of the synthetic-italic glyphs, as I have not yet been able to reproduce that on my system.
Created attachment 598522 [details]
(In reply to Jonathan Kew (:jfkthame) from comment #4)
> Could you please try disabling gdipp, and see if that affects the rendering
> at all? I don't expect it to make any difference to the poor glyph spacing,
> but I'm curious about the reversed subpixel antialiasing of the
> synthetic-italic glyphs, as I have not yet been able to reproduce that on my
gdipp disabled, ss using attachment 598508 [details]
Aha - in this screenshot, you're no longer getting reversed subpixel AA on the italicized glyphs. So it looks like that may be a gdipp bug, and you might want to report it there.
The spacing issue is of course still present; that's a problem with our handling of glyph metrics and transformations.
Created attachment 600635 [details]
Italic texts in some places aren't currently rendered
This bug is confirmed using Mactype (font rendering software like gdipp) starting from the same build as the reporter.
(In reply to Kemcy BEST from comment #7)
> Created attachment 600635 [details]
> Italic texts in some places aren't currently rendered
> This bug is confirmed using Mactype (font rendering software like gdipp)
> starting from the same build as the reporter.
This screenshot does not show the same issue (incorrect subpixel order used when rendering the synthetic-italic text) as the gdipp example, but it does look as though it's using a font rasterization codepath that doesn't handle hinting. I'd guess that Mactype sees that there's a skew transform in the context, and decides it can't handle glyph hinting in this situation.
Probably, both gdipp and Mactype suffer from problems when they're asked to render text that's undergoing a transform. I think that's a deficiency in those components.
As noted in comment 6, I believe there's also a glyph spacing problem that we need to try and fix, but I don't think we can fix the poor glyph rendering you're seeing with these third-party renderers.
Copy from Mactype author http://code.google.com/p/mactype/issues/detail?id=4 :
"actually, this is on firefox side.
Mozilla team strangely use GDI transformation to simulate italic font, not using native GDI italic font directly, while all the other browsers use the native one. Mozilla explain this as it was caused by a resource leak bug. This is ridiculous that only firefox has such a fun problem and they blame to the GDI architecture.
since it is real hard to support GDI distortion (GDI Zooming and tensile is already supported), mactype and gdipp won't be able render these "italic" font in the future."
Created attachment 627145 [details]
Italic font glitch with gdi++
I have the same issue using GDI++ font rasteriser on WinXP x86 / Firefox 13.0b
This is very annoying for me the text cannot be read at all.
Since all was perfect before, this is necessarily a regress inside Firefox...
You're seeing completely garbled glyph positioning in some cases, which is different from the (relatively minor) positioning problems in previous screenshots.
What does GDI++ make of an example such as this?
data:text/html,<div style="margin:100px;-moz-transform:rotate(-5deg)">this is a test for transformed content
BTW, there's a patch in bug 754452 that should work around these problems for many of the common cases, at least; once that gets reviewed and landed, the issues should be pretty rare.
Created attachment 638715 [details]
italic fonts look pretty good now
I believe that patch in bug 754452 fix the problem.
It avoids the problem for the majority of cases; there will still be certain examples where it can occur, but they should be rare.
I'm still curious how the example in comment #11 renders with GDI++ active; does the transform there cause glyph-rendering problems?
Created attachment 638735 [details]
text transform render with GDI++
GDI++ download from http://free.flop.jp/gdi++/src/gdi0959.zip
Wow. That's _really_ broken! Might be worth reporting to the GDI++ project.
Nothing can do from firefox side to fix the issue in GDI++ so Antwan you can uninstall GDI++ and use the other software (Mactype http://code.google.com/p/mactype is the best) at least until the issue is fixed in GDI++.