Do not convert bitmaps when loading a glyph to access its metrics

This commit is contained in:
Kovid Goyal 2018-09-09 09:46:19 +05:30
parent f7a621f89f
commit ab65b9b2fb
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -234,7 +234,7 @@ load_glyph(Face *self, int glyph_index, int load_type) {
if (error) { set_freetype_error("Failed to load glyph, with error:", error); return false; } if (error) { set_freetype_error("Failed to load glyph, with error:", error); return false; }
// Embedded bitmap glyph? // Embedded bitmap glyph?
if(self->face->glyph->bitmap.pixel_mode == FT_PIXEL_MODE_MONO) { if (self->face->glyph->bitmap.pixel_mode == FT_PIXEL_MODE_MONO && load_type != FT_LOAD_DEFAULT) {
FT_Bitmap bitmap; FT_Bitmap bitmap;
FT_Bitmap_New(&bitmap); FT_Bitmap_New(&bitmap);