Incorrect fontconfig font substitution when no lang html attribute set
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
People
(Reporter: hanabishi, Unassigned)
Details
Attachments
(4 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:124.0) Gecko/20100101 Firefox/124.0
Steps to reproduce:
When no lang attribute set for html document (or for element individually), FF performs wrong fontconfig font substitution.
But I found a weird connection. Seems like when the lang attribute is undefined or empty string, FF puts the LANG env variable value there. But this is a mistake, as its typical value is something like "en_US.UTF-8", which is seemingly not a valid language tag for fontconfig.
This is actually can be easily tested. If you run FF with "LANG=en" env variable set, it works as intended, as if lang="en" html attribute was set. But this is obviously wrong value for LANG env variable by all means.
| Reporter | ||
Comment 1•2 years ago
|
||
| Reporter | ||
Comment 2•2 years ago
|
||
| Reporter | ||
Comment 3•2 years ago
|
||
| Reporter | ||
Comment 4•2 years ago
|
||
| Reporter | ||
Comment 5•2 years ago
|
||
Attached screenshots and test html documents.
| Reporter | ||
Comment 6•2 years ago
|
||
In addition why "LANG=en" env variable is wrong. FF actually fallbacks to 'C' locale in this case. But still substitutes the original value for html lang attribute.
$ LANG=en firefox
[34091, Main Thread] WARNING: Locale not supported by C library.
Using the fallback 'C' locale.: 'glib warning', file /usr/src/debug/firefox/firefox-124.0.2/toolkit/xre/nsSigHandlers.cpp:187
(firefox:34091): Gtk-WARNING **: 14:24:18.498: Locale not supported by C library.
Using the fallback 'C' locale.
Comment 7•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Layout: Text and Fonts' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•2 years ago
|
Description
•