freedayman / freetype-gl

Automatically exported from code.google.com/p/freetype-gl
Other
0 stars 0 forks source link

texture_font_get_glyph may create multiple glyphs of char code -1 #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Working base r108

Each call of texture_font_get_glyph with char code -1 will create a new glyph. 

Because the check of loaded glyphs :

        if( (glyph->charcode == charcode) &&
            (glyph->outline_type == self->outline_type) &&
            (glyph->outline_thickness == self->outline_thickness) )

compare not only charcode but outline_type and outline_thickness. But the 
creation of the glyph of char code -1 dose not initialize outline_type and 
outline_thickness. 

Original issue reported on code.google.com by wangyong...@gmail.com on 29 Jan 2012 at 4:13

GoogleCodeExporter commented 9 years ago
Thanks, I've committed a fix that discard outline type/thickness for glyph -1.

Nicolas

Original comment by Nicolas.Rougier@gmail.com on 6 Feb 2012 at 7:27