[cairo] Error Loading FreeType Glyphs

Bobby Salazar bobby8934 at inbox.com
Sat Oct 18 17:06:27 PDT 2008


Hello,

I am seeing a weird error using Cairo to render some text. It is sort of out of the blue, as I have been using pretty much the same code to render text for a very long time now. But all of a sudden I am seeing a condition where, depending on the width and height of the surface I render to, some characters disappear because FreeType returns an error. So drag-resizing a window causes the text to lose characters and gain them again with no obvious clues why.

I have tracked this down to the call to _cairo_ft_scaled_glyph_init() where it calls FT_Load_Glyph() to load, in this case, the letter 'g'. FT_Load_Glyph() returns error 36 (which is FT_Err_Invalid_Size_Handle).

One other thing I have noticed is that when I maximize the window, the rendered text actually shrinks in size even though I pass the same height to create the scaled font. This also seems to be completely random, some window sizes give correct looking text and some give text that looks slightly shrunk.

After several hours of debugging I do not feel I am any closer to figuring out why this is happening. When I drag a window larger, I can have it at one size and see the letter 'g' characters appear, then drag it a few pixels larger and those characters fail to load, and then drag the window a few pixels larger and they come back again. So what gives? Has anyone seen a problem like this before?

Any help is appreciated!

____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at http://www.inbox.com/earth


More information about the cairo mailing list