mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-23 07:35:28 +00:00
Linux: Dont fail on systems with fonts that have non-UTF-8 names. Fixes #1281
This commit is contained in:
parent
89be7a031d
commit
4273cb35bf
1 changed files with 2 additions and 1 deletions
|
|
@ -24,11 +24,12 @@ pyspacing(int val) {
|
|||
#undef S
|
||||
}
|
||||
|
||||
|
||||
static inline PyObject*
|
||||
pattern_as_dict(FcPattern *pat) {
|
||||
PyObject *ans = PyDict_New();
|
||||
if (ans == NULL) return NULL;
|
||||
#define PS(x) PyUnicode_FromString((char*)x)
|
||||
#define PS(x) PyUnicode_Decode((const char*)x, strlen((const char*)x), "UTF-8", "replace")
|
||||
#define G(type, get, which, conv, name) { \
|
||||
type out; PyObject *p; \
|
||||
if (get(pat, which, 0, &out) == FcResultMatch) { \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue