mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-10 13:04:03 +03:00
Fix #1428
This commit is contained in:
parent
5adf7c2a3a
commit
719a9a5b64
@ -281,12 +281,11 @@ int
|
||||
get_glyph_width(PyObject *s, glyph_index g) {
|
||||
Face *self = (Face*)s;
|
||||
if (!load_glyph(self, g, FT_LOAD_DEFAULT)) { PyErr_Print(); return false; }
|
||||
FT_Bitmap *bitmap = &self->face->glyph->bitmap;
|
||||
#define M self->face->glyph->metrics
|
||||
#define B self->face->glyph->bitmap
|
||||
/* printf("glyph: %u bitmap.width: %d bitmap.rows: %d horiAdvance: %ld horiBearingX: %ld horiBearingY: %ld vertBearingX: %ld vertBearingY: %ld vertAdvance: %ld width: %ld height: %ld\n", */
|
||||
/* g, B.width, B.rows, M.horiAdvance, M.horiBearingX, M.horiBearingY, M.vertBearingX, M.vertBearingY, M.vertAdvance, M.width, M.height); */
|
||||
return bitmap->width;
|
||||
return B.width ? B.width : (M.width / 64);
|
||||
#undef M
|
||||
#undef B
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user