| 227 | } |
| 228 | |
| 229 | bool loadGlyph(Shape &output, FontHandle *font, GlyphIndex glyphIndex, FontCoordinateScaling coordinateScaling, double *outAdvance) { |
| 230 | if (!font) |
| 231 | return false; |
| 232 | FT_Error error = FT_Load_Glyph(font->face, glyphIndex.getIndex(), FT_LOAD_DEFAULT/*FT_LOAD_NO_SCALE MyGUI modification*/); |
| 233 | if (error) |
| 234 | return false; |
| 235 | double scale = getFontCoordinateScale(font->face, coordinateScaling); |
| 236 | if (outAdvance) |
| 237 | *outAdvance = scale*font->face->glyph->advance.x; |
| 238 | return !readFreetypeOutline(output, &font->face->glyph->outline, scale); |
| 239 | } |
| 240 | |
| 241 | bool loadGlyph(Shape &output, FontHandle *font, unicode_t unicode, FontCoordinateScaling coordinateScaling, double *outAdvance) { |
| 242 | return loadGlyph(output, font, GlyphIndex(FT_Get_Char_Index(font->face, unicode)), coordinateScaling, outAdvance); |
no test coverage detected