From ab65b9b2fb8a1e9447c74ed25774f4d0e67c8462 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 9 Sep 2018 09:46:19 +0530 Subject: [PATCH] Do not convert bitmaps when loading a glyph to access its metrics --- kitty/freetype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/freetype.c b/kitty/freetype.c index 95964cd9e..a0aca4a13 100644 --- a/kitty/freetype.c +++ b/kitty/freetype.c @@ -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; } // 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_New(&bitmap);