mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-10 14:14:48 +02:00
Release old hb_font when changing font size
This commit is contained in:
@@ -144,6 +144,7 @@ apply_size(Face *self, float point_sz, float dpi) {
|
||||
if (face == NULL) { PyErr_SetString(PyExc_ValueError, "Failed to create hb_face"); return false; }
|
||||
CGFontRelease(cg_font);
|
||||
unsigned int upem = hb_face_get_upem(face);
|
||||
if (self->harfbuzz_font) hb_font_destroy(self->harfbuzz_font);
|
||||
self->harfbuzz_font = hb_font_create(face);
|
||||
hb_face_destroy(face);
|
||||
hb_font_set_scale(self->harfbuzz_font, upem, upem);
|
||||
|
||||
Reference in New Issue
Block a user