www.sydney.au.emb-japan.go.jp - Does not respect default font setting
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox119 | --- | fixed |
People
(Reporter: rbucata, Assigned: jfkthame)
References
()
Details
Attachments
(1 file)
From github: https://github.com/webcompat/web-bugs/issues/126416.
<!-- @browser: Firefox 116.0 -->
<!-- @ua_header: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0 -->
<!-- @reported_with: unknown -->
<!-- @public_url: https://github.com/webcompat/web-bugs/issues/126416 -->URL: https://www.sydney.au.emb-japan.go.jp/itprtop_en/index.html
Browser / Version: Firefox 116.0
Operating System: Windows 10
Tested Another Browser: Yes EdgeProblem type: Something else
Description: Does not respect default font setting, wrong and seemingly random font is displayed
Steps to Reproduce:
Windows Server 2016 (1607), this PC has many foreign TrueType font installed for graphical designing propose, for example: MJNgai PRC, 九叠篆, etc.
OS is using Segoe UI as default font, Firefox is using Times New Roman as default.
When visiting this site, or any site that has something like body {font-family: "";} in CSS, although not instantly after page is loaded, but after a few moment browsing the page, font for most text will suddenly change from default font (Times New Roman for Firefox in this case) to a non-default font, in this case, MJNgai PRC.
If MJNgai PRC is uninstalled from the OS, it will select other seemingly random font to use, for example, 九叠篆, make the whole site unreadable.
Click "Restore default font settings" in Windows Control Panel will temporarily solve the problem but it comes back few moments later.
Using F12 Developer Tools to manually change {font-family: "";} to something like {font-family: Meiryo, sans-serif;} can fix the page (temporarily, of course).
Microsoft Edge (Chromium) works fine, won't load these strange fonts and will respect the default font setting (in this case, the default font in Edge is set to Segoe UI).
<details>
<summary>View the screenshot</summary>
<img alt="Screenshot" src="https://webcompat.com/uploads/2023/8/7ae970e8-03c7-4bb3-ab00-bdbd7f04b688.jpeg">
</details><details>
<summary>Browser Configuration</summary>
<ul>
<li>None</li>
</ul>
</details>From webcompat.com with ❤️
Change performed by the Move to Bugzilla add-on.
Reporter | ||
Comment 1•2 years ago
|
||
The issue was reported via the webcompat.com reporter. Since the report received states that the issue reproduces on multiple pages, we have moved the issue accordingly. Please feel free to move the issue to the relevant Project and Component.
Reporter | ||
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 2•2 years ago
|
||
Weird.... I can confirm I'm seeing an unexpected "default" font (in my case, it happens to be another Latin font) being used on the page mentioned, where font-family: ""
is specified on the <body> element. This only seems to happen when an empty string (""
) is specified; as soon as I change it to something non-empty, even just a space (" "
), the expected default font (Times New Roman) is used.
Not seeing this on macOS; it may be specific to the Windows font backend.
(FWIW, setting font-family: ""
seems a strange thing for a site to do; if they don't want to name specific fonts, they should probably specify a CSS generic such as serif
or sans-serif
or system-ui
. But still, this does seem like buggy behavior in Firefox, whereby ""
is incorrectly selecting some real font.)
Assignee | ||
Comment 3•2 years ago
|
||
OK, it turns out that at least on my Windows machine, I had a font file present that does in fact have an empty family name. Such a font doesn't show up as "installed" in Windows (e.g. in the Settings app's list of fonts), but it does make its way into Firefox's list of available fonts, and so becomes accessible via CSS.
I suspect this is what's happening for the reporter, as well: they have a font file (or files) with an empty family name in c:\windows\fonts, and so those font(s) are what gets used by font-family: ""
.
The most likely origin of such anomalous font resources -- given that no-one really expects an empty string to be a useful font name -- is probably that some sites/authors deliberately strip naming information out of webfont resources, as a form of "copy protection" (or at least discouragement), so that if someone downloads the resource and installs it locally, it won't be usable.
I think we should simply discard fonts with no family name from the list; they're not expected to be usable as installed fonts. (The original intent of making such resources would be to load them with @font-face, where a family name is provided separately.)
Assignee | ||
Comment 4•2 years ago
|
||
Updated•2 years ago
|
Comment 6•2 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•