Fontconfig match ignored for fonts that are not installed on the system
Categories
(Core :: Layout: Text and Fonts, defect, P3)
Tracking
()
People
(Reporter: andrei, Unassigned)
Details
Attachments
(1 file)
14.46 KB,
application/x-gtar
|
Details |
Updated•8 years ago
|
Updated•8 years ago
|
I do agree it is not a firefox* problem, but when I see firefox -headless --safe-mode with strace stuck in infinite loop of waiting for FUTEXes and rescanning over and over the same dir to see if same fonts exists (-CreateProfile is buggy, no?), then I beg to differ.
The solution could be : for each fc-match test if font exists before loading it.
PS font-family FiraGO in your CSS for bugzilla prevents me from having my dyslexic font appearing, and it is not covered in the issue I opened
- Since I opened a bug in fontconfig
https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/264
Comment 4•3 years ago
|
||
It would be great if someone could have a look at this. Firefox is still ignoring my fontconfig matches.
E.g. data:text/html,<body style="font-family: Montserrat">test is shown in Noto Serif Regular, but I would expect Noto Sans Regular since:
estan@edison:$ fc-match Montserrat$
NotoSans-Regular.ttf: "Noto Sans" "Regular"
estan@edison:
Using FF 96 on Ubuntu 20.04.
Comment 5•3 years ago
|
||
(In reply to Elvis Stansvik from comment #4)
It would be great if someone could have a look at this. Firefox is still ignoring my fontconfig matches.
E.g. data:text/html,<body style="font-family: Montserrat">test is shown in Noto Serif Regular, but I would expect Noto Sans Regular since:
estan@edison:
$ fc-match Montserrat$
NotoSans-Regular.ttf: "Noto Sans" "Regular"
estan@edison:Using FF 96 on Ubuntu 20.04.
Is there some kind of fontconfig rule (alias?) that explicitly says "Montserrat" should be replaced with "Noto Sans", or is that simply the default you're getting in response to an unrecognized font name?
(What does fc-match SomeOtherRandomUnknownName
return? Also "Noto Sans"?)
In general, if the CSS has simply font-family: Monserrat
(without any generic fallback specified), and Montserrat is not available, I'd expect the browser's default generic to be used, which is normally serif
. So I suspect that's what you're seeing, and you could reconfigure it to sans-serif
if desired using the Firefox preferences.
Comment 6•3 years ago
|
||
Ah true, that is what my fontconfig falls back to if nothing else matches. I just thought that Firefox would adhere to that behavior as well, but I see now that it makes more sense it would have its own fallback to what you configure in preferences.
Updated•3 years ago
|
Description
•