mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-06 01:05:48 +02:00
MacOS Intel: Fix a crash in the choose-fonts kitten when displaying previews of variable fonts
Looks like a bug in Py_BuildValue for s# values on that platform. Workaround by constructing the string directly and passing to to Py_BuildValue. Fixes #7734
This commit is contained in:
@@ -79,6 +79,8 @@ Detailed list of changes
|
||||
|
||||
- Allow specifying that the :opt:`cursor shape for unfocused windows <cursor_shape_unfocused>` should remain unchanged (:pull:`7728`)
|
||||
|
||||
- MacOS Intel: Fix a crash in the choose-fonts kitten when displaying previews of variable fonts (:iss:`7734`)
|
||||
|
||||
0.36.0 [2024-08-17]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -325,8 +325,8 @@ read_fvar_font_table(const uint8_t *table, size_t table_len, PyObject *name_look
|
||||
const double minimum = next32, def = next32, maximum = next32;
|
||||
p = (uint16_t*)(pos + 16);
|
||||
int32_t flags = next, strid = next;
|
||||
PyObject *axis = Py_BuildValue("{sd sd sd ss# sO sN}",
|
||||
"minimum", minimum, "maximum", maximum, "default", def, "tag", pos, 4,
|
||||
PyObject *axis = Py_BuildValue("{sd sd sd sN sO sN}",
|
||||
"minimum", minimum, "maximum", maximum, "default", def, "tag", PyUnicode_FromStringAndSize((const char*)pos, 4),
|
||||
"hidden", (flags & 1) ? Py_True : Py_False, "strid", get_best_name(name_lookup_table, strid)
|
||||
); if (!axis) return NULL;
|
||||
PyTuple_SET_ITEM(axes, i, axis);
|
||||
|
||||
Reference in New Issue
Block a user