[cairo-bugs] [Bug 20255] New: cairo_scaled_font_glyph_extents breaks with invalid glyph id

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Feb 22 12:47:16 PST 2009


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

           Summary: cairo_scaled_font_glyph_extents breaks with invalid
                    glyph id
           Product: cairo
           Version: 1.8.6
          Platform: All
        OS/Version: Windows (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: win32 backend
        AssignedTo: cairo-bugs at cairographics.org
        ReportedBy: elmar.braun at sh-p.de
         QAContact: cairo-bugs at cairographics.org


Using cairo_scaled_font_glyph_extents to get the extents for non-existing
glyphs puts a cairo_scaled_font_t permanently into an unusable state. This did
not happen in Cairo 1.6.

The attached test case requests three glyph extents: first for the character
'a', then for a non-existing glyph, then again for the character 'a'. In Cairo
1.6, unlike Cairo 1.8, the third cairo_scaled_font_glyph_extents returns the
same result as the first.

This is the output for the attached testcase with Cairo 1.6.4:

x/y advance for char 'a' -> glyph '0x44': 5.000000/0.000000
status of cairo_scaled_font_t: success
x/y advance for '0xffff': 0.000000/0.000000
status of cairo_scaled_font_t: success
x/y advance for char 'a' -> glyph '0x44': 5.000000/0.000000

This is the output for the attached testcase with Cairo 1.8.6:

x/y advance for char 'a' -> glyph '0x44': 5.000000/0.000000
status of cairo_scaled_font_t: success
x/y advance for non-existing glyph '0xffff': 0.000000/0.000000
status of cairo_scaled_font_t: out of memory
x/y advance for char 'a' -> glyph '0x44': 0.000000/0.000000


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


More information about the cairo-bugs mailing list