[cairo-bugs] [Bug 23981] New: cairo doesn't respect TrueType gasp tables (and fonts look ugly as a result)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Sep 16 20:07:54 PDT 2009


http://bugs.freedesktop.org/show_bug.cgi?id=23981

           Summary: cairo doesn't respect TrueType gasp tables (and fonts
                    look ugly as a result)
           Product: cairo
           Version: 1.9.3
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: freetype font backend
        AssignedTo: david at freetype.org
        ReportedBy: nmiell at comcast.net
         QAContact: cairo-bugs at cairographics.org


TrueType fonts have a table called 'gasp' (Grid-fitting And Scan-conversion
Procedure) which contains a list of font size ranges and some attributes that
control how they should be rendered.

One such attribute is whether or not glyphs at specific sizes should be
antialiased.

FreeType does not automatically apply the settings from the gasp table, instead
the FreeType user must query the gasp table using FT_Get_Gasp() and then alter
their behavior based on that result.

If this is not done, some fonts will be misrendered.

One such font is Verdana Bold. The hinting programs in Verdana Bold assume that
sizes 9-16 will not be antialiased (as specified in the gasp table), thus when
they query the global antialiasing boolean while being run on size 9-16 glyphs,
the resulting hinting is incorrect and the K, N, V and W glyphs (among others)
are misrendered.

See http://www.freetype.org/freetype2/docs/reference/ft2-gasp_table.html for
more information. (Note that the gasp table also controls whether or not the
bytecode should be interpreted at all, which probably also results in rendering
errors, but I haven't noticed any.)


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the cairo-bugs mailing list