mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-05-04 06:46:48 -04:00
config: apply fontconfig rules if user didn’t set an explicit font size
If the user didn’t explicitly set the font size (e.g. font=monospace,
instead of font=monospace:size=12), our initial attempt to read the
FC_SIZE and FC_PIXEL_SIZE attributes will fail, and we used to
fallback to setting the size to 8pt.
Change this slightly, so that when we fail to read the FC_*_SIZE
attributes, apply the fontconfig rules, but *without expanding*
them (i.e. without calling FcDefaultSubstitute()).
Then try reading FC_*_SIZE again.
If that too fails, _then_ set size to 8pt. This allows us to pick up
rules that set a default {pixel}size:
<fontconfig>
<match>
<edit name="pixelsize" mode="append"><double>14</double></edit>
</fontconfig>
Closes #1287
This commit is contained in:
parent
9da1b1cec3
commit
9f3ce9236f
2 changed files with 38 additions and 6 deletions
|
|
@ -81,10 +81,14 @@
|
|||
* DPI is now forced to 96 when found to be unreasonably high.
|
||||
* Set default log level to warning ([#1215][1215]).
|
||||
* Default `grapheme-width-method` from `wcswidth` to `double-width`.
|
||||
* When determining initial font size, do FontConfig config
|
||||
substitution if the user-provided font pattern has no {pixel}size
|
||||
option ([#1287][1287]).
|
||||
|
||||
[1166]: https://codeberg.org/dnkl/foot/issues/1166
|
||||
[1179]: https://codeberg.org/dnkl/foot/issues/1179
|
||||
[1215]: https://codeberg.org/dnkl/foot/pulls/1215
|
||||
[1287]: https://codeberg.org/dnkl/foot/issues/1287
|
||||
|
||||
|
||||
### Deprecated
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue