New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support default font_features from fontconfig #3174
Conversation
I'll do a pass on the docs when I get the validation of the implementation 📝 For reference: cat ~/.config/fontconfig/fonts.conf <?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>monospace</family>
<prefer>
<family>Fira Code</family>
</prefer>
</alias>
<match target="font">
<test name="family">
<string>Fira Code</string>
</test>
<edit name="fontfeatures" mode="append">
<string>ss01</string>
</edit>
</match>
</fontconfig> |
Looks generally fine with a quick glance over. Add the docs in config_data.py and I will review in detail. |
Actually there is a bug in |
Feel free to send a separate PR to fix it or wait and I will get around |
Also, what's the bug, as far as I know, patter_as_dict doesnt get any non-scalar values currently. |
I just fixed it for font_features. As for the others I don't know if they are lists or not and I could not find a reliable source of information for this. Here FC_FONT_FEATURES is defined as a String... I've seen references to fonts being able to be part of multiple families somewhere (sorry lost the reference) and despite |
} \ | ||
if (PyDict_SetItemString(ans, #name, l) != 0) { Py_CLEAR(l); Py_CLEAR(ans); return NULL; } \ | ||
Py_CLEAR(l); \ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please doublecheck that one @kovidgoyal, I tried to make sure I've cleaned up properly but I might have missed something.
As discussed here: #2248