Open Bug 708162 Opened 13 years ago Updated 2 years ago

inconsistent rendering of text with very small font size (<0.5px)

Categories

(Core :: Graphics, defect)

defect

Tracking

()

People

(Reporter: jtd, Unassigned)

References

Details

Attachments

(1 file)

This is a follow-on to bug 670072 and bug 693143.  The original bug was a complaint by users that text with a very small font size was still rendering on the screen.  Essentially authors want text with a font size < 0.5px to never show up and have not affect layout.  This is somewhat dubious usage (display: none would be better) but I do think we should be displaying consistently across platform/os choices.  Behavior at small sizes is distinct from whether a given backend supports fractional sizes (GDI doesn't, OSX/DirectWrite do) and I think all platforms should behave the same way in this case.

The patch for 670072 simply rounded the font size in the GDI case but wasn't sufficiently tested and resulted in the top crasher, bug 693143.  Our handling of size = 0 within thebes and cairo font code is somewhat spotty.  In some cases we explicitly set the lower bound on font size to 1.0 (e.g. the font-size-adjust case and the DirectWrite backend case).  There are also assertions in various places that will fail if in the size == 0.  Within cairo code, the codepaths differ for the size == 0 case depending on font type, so at the very least we need more tests to flush out these codepaths (see bug 693143, comment 29).

One option to consider is trying to offload the handling of zero-sized fonts to the layout code, so that we don't waste resources when all that's needed is essentially a shunt, there's no need was time wandering through font code when nothing is going to be displayed in the end.
Should render evenly across with no tiny font rendering artifacts when displayed at default zoom level.
Testcase results:

IE9/Win, Chrome17/Win, Chrome17/OSX render correctly
FF8/Win, FF8/OSX, Safari5/OSX render incorrectly (lines shifted or tiny rendering artifacts)
FF trunk renders correctly for me with D2D.
Assignee: jd.bugzilla → nobody
See Also: → 848809
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: