diff --git a/kitty/core_text.m b/kitty/core_text.m index 471432018..81a88c363 100644 --- a/kitty/core_text.m +++ b/kitty/core_text.m @@ -1108,9 +1108,8 @@ static CTFontRef nerd_font(CGFloat sz) { const unsigned char *path = NULL; Py_ssize_t sz; if (!PyArg_ParseTuple(args, "s#", &path, &sz)) return NULL; RAII_CoreFoundation(CFURLRef, url, CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, path, sz, false)); - RAII_CoreFoundation(CFArrayRef, descriptors, CTFontManagerCreateFontDescriptorsFromURL(url)); - CTFontManagerEnableFontDescriptors(descriptors, true); - Py_RETURN_TRUE; + if (CTFontManagerRegisterFontsForURL(url, kCTFontManagerScopeProcess, NULL)) Py_RETURN_TRUE; + Py_RETURN_FALSE; } static PyMethodDef module_methods[] = {