mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-27 03:42:49 +00:00
Release old hb_font when changing font size
This commit is contained in:
parent
5007a82ea6
commit
729395c887
1 changed files with 1 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue