Notable differences in text rendering on macOS between Firefox and Chrome/Safari
Categories
(Core :: Graphics: Text, defect, P3)
Tracking
()
People
(Reporter: 5silentrain, Unassigned)
Details
Attachments
(16 files)
|
640.07 KB,
image/png
|
Details | |
|
534.09 KB,
image/png
|
Details | |
|
535.85 KB,
image/png
|
Details | |
|
518.22 KB,
image/png
|
Details | |
|
448.66 KB,
image/png
|
Details | |
|
405.26 KB,
image/png
|
Details | |
|
891.72 KB,
image/png
|
Details | |
|
910.76 KB,
image/png
|
Details | |
|
913.13 KB,
image/png
|
Details | |
|
15.85 KB,
image/png
|
Details | |
|
16.23 KB,
image/png
|
Details | |
|
16.16 KB,
image/png
|
Details | |
|
185.12 KB,
image/png
|
Details | |
|
176.34 KB,
image/png
|
Details | |
|
182.55 KB,
image/png
|
Details | |
|
684.93 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:107.0) Gecko/20100101 Firefox/107.0
Steps to reproduce:
Open any YouTube video. For example this: https://www.youtube.com/watch?v=VGG5NtLrTrE
Right click on the video and select "Stats for nerds". The text will be noticeably bolder than in Chrome and Safari.
Firefox: https://i.imgur.com/ktqz2V7.png
Chrome: https://i.imgur.com/wyJ2M9L.png
Safari: https://i.imgur.com/0PM2kTg.png
This is noticeable elsewhere on YouTube as well. For example, if you click on the gear with video settings.
Firefox: https://i.imgur.com/oiKLnIL.png
Chrome: https://i.imgur.com/2DmHA7u.png
Safari: https://i.imgur.com/Jmdw7Ap.png
Open the site: https://html5test.com
On this site, on the contrary, the text in Firefox looks thinner than in Chrome and Safari.
Firefox: https://i.imgur.com/2AWH3WA.png
Chrome: https://i.imgur.com/jUqg1wL.png
Safari: https://i.imgur.com/JWE6rEf.png
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Comment 1•3 years ago
|
||
| Reporter | ||
Comment 2•3 years ago
|
||
| Reporter | ||
Comment 3•3 years ago
|
||
| Reporter | ||
Comment 4•3 years ago
|
||
| Reporter | ||
Comment 5•3 years ago
|
||
| Reporter | ||
Comment 6•3 years ago
|
||
| Reporter | ||
Comment 7•3 years ago
|
||
| Reporter | ||
Comment 8•3 years ago
|
||
| Reporter | ||
Comment 9•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Comment 10•3 years ago
|
||
It looks to me like the difference here is basically that youtube uses -webkit-font-smoothing: antialiased, which isn't supported in Firefox.
Modifying the CSS to remove that (or changing it to -webkit-font-smoothing: initial to get the default behavior) makes the text look significantly heavier, similar to Firefox.
And adding -moz-osx-font-smoothing: grayscale would make the Firefox rendering more like Safari.
| Reporter | ||
Comment 11•3 years ago
|
||
The problem is observed not only on YouTube, but also on the website https://html5test.com. I posted screenshots above. There is no such bug in Chrome and Safari.
Comment 12•3 years ago
|
||
In the case of https://html5test.com, the issue is that Firefox shows that text ("The HTML5 test score....") with a lighter font than Safari or Chrome, right? This is an entirely different situation from the youtube case (where the Firefox text looks heavier, due to the smoothing mode).
It appears to be a bug in those browsers, not a bug in Firefox. The site's CSS here has:
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", "Lucida Grande", sans-serif;
font-weight: 200;
(specified in main.css for the <html> element).
The trouble with this is that "HelveticaNeue-Light" and "Helvetica Neue Light" are not font family names; they are the PostScript name and Full font name respectively of an individual face of the Helvetica Neue family. So in the font-family list, they should be ignored as not matching the family name of an available font. So the first font family named here that is actually available on macOS is "Helvetica Neue", and the requested font weight is 200.
This combination, font-family: "Helvetica Neue"; font-weight: 200;, actually maps to the Thin face of Helvetica Neue, not the Light face (which has weight 300). So that's what Firefox uses. It is also what Safari and Chrome use if you remove the (incorrect) "HelveticaNeue-Light" and "Helvetica Neue Light" names from the font-family list.
Given that the site apparently wants to use the Light face of Helvetica Neue, it should have specified font-weight: 300, not 200. Then the Firefox rendering would match what the other browsers are (incorrectly) producing due to their use of the (erroneous) font-family names.
A reduced example like:
data:text/html,<div style="font-family: HelveticaNeue-Light, serif">This should be the default <b>serif</b> font
demonstrates the incorrect behavior in Safari and Chrome.
Comment 13•3 years ago
|
||
In https://bugs.webkit.org/show_bug.cgi?id=7709#c6, Myles acknowledges that the WebKit behavior of honoring PostScript names in the font-family is contrary to the spec, but it sounds like they're unwilling to fix this.
For Blink, see https://bugs.chromium.org/p/chromium/issues/detail?id=641861#c19. (A brief test suggests that Blink doesn't have this bug on Windows, but it does still show wrong behavior on macOS.)
| Reporter | ||
Comment 14•3 years ago
|
||
I also noticed a long time ago how strange the copyright sign is displayed in Firefox 👀 Link (at the end of the video description): https://www.youtube.com/watch?v=XTqauYTg3k8
Firefox: https://i.imgur.com/vkiHL5h.png
Chrome: https://i.imgur.com/rIKlGHZ.png
Safari: https://i.imgur.com/q1GLc9r.png
The same problem with the display of the copyright sign is in Windows.
| Reporter | ||
Comment 15•3 years ago
|
||
| Reporter | ||
Comment 16•3 years ago
|
||
| Reporter | ||
Comment 17•3 years ago
|
||
Comment 18•3 years ago
•
|
||
That character isn't the standard copyright sign © (Unicode: U+00A9 COPYRIGHT SIGN); instead, they've used ⓒ (U+24D2 CIRCLED LATIN SMALL LETTER C) from the Enclosed Alphanumerics block. That's not supported by most Western fonts; it's mainly found in large CJK fonts and a few specialized technical fonts.
The youtube content is styled with font-family: "Roboto","Arial",sans-serif;, but neither Roboto nor Arial includes U+24D2, so you get whatever fallback the browser finds for it, and that is likely to vary among different browsers and platforms.
| Reporter | ||
Comment 19•3 years ago
|
||
Maybe in this case you should follow Chrome and Safari? 🤔 So that there are no differences between the three main web browsers on the market.
| Reporter | ||
Comment 20•3 years ago
|
||
Another notable difference in text/character rendering between Firefox and Chrome/Safari (musical note symbol): https://www.youtube.com/watch?v=QheozRjkklQ
Firefox: https://i.imgur.com/QINsQt3.png
Chrome: https://i.imgur.com/qbGDJqg.png
Safari: https://i.imgur.com/DAWfjFb.png
As you can see from the screenshots above, Chrome and Safari render text/characters in the same way, unlike Firefox.
| Reporter | ||
Comment 21•3 years ago
|
||
| Reporter | ||
Comment 22•3 years ago
|
||
| Reporter | ||
Comment 23•3 years ago
|
||
| Reporter | ||
Comment 24•3 years ago
|
||
Even on the preview of the video itself, you can clearly see that the musical note symbol is different from what Firefox renders.
Screenshot: https://i.imgur.com/UNeMQnR.png
| Reporter | ||
Comment 25•3 years ago
|
||
Comment 26•3 years ago
|
||
This is another case of different fallback fonts being used. It looks like that is the Unicode symbol BEAMED SIXTEENTH NOTES (U+266C) from the Miscellaneous Symbols block. As that character isn't supported by the YouTube font, fallback happens. Firefox is defaulting to the Apple Symbols font here, whereas Safari and Chrome are picking the character from a Japanese font. I don't see any particular reason why a Japanese font should be chosen, though -- the content isn't tagged with lang=ja or anything like that -- so using Apple Symbols seems pretty reasonable.
There's no expectation that symbols will look the same in all fonts, or that browsers will always use the same fonts for arbitrary characters when no suitable font is specified in the CSS.
| Reporter | ||
Comment 27•3 years ago
|
||
Maybe Google and Apple chose the character from the Japanese font because it looks better? 🤔
| Reporter | ||
Comment 28•2 years ago
|
||
It looks to me like the difference here is basically that youtube uses -webkit-font-smoothing: antialiased, which isn't supported in Firefox.
Modifying the CSS to remove that (or changing it to -webkit-font-smoothing: initial to get the default behavior) makes the text look significantly heavier, similar to Firefox.
And adding -moz-osx-font-smoothing: grayscale would make the Firefox rendering more like Safari.
It's funny, but in the latest dev version (128.0b4), the text on YouTube in Firefox seems to have become as thin as in Chrome and Safari 😲 I hope this is a feature and not a bug 🤭 I wonder if something has changed on YouTube or if I was right after all and Firefox has finally learned how to correctly render text under macOS 🤔 Developers, please leave everything as it is 🙏
Screenshots:
Firefox 127.0: https://i.imgur.com/ITufa9e.png
Firefox Dev 128.0b4: https://i.imgur.com/wV4WlDa.png
Chrome Dev 128.0.6535.2: https://i.imgur.com/1DC2JKm.png
Safari 17.5: https://i.imgur.com/Tsn3WiK.png
Comment 29•2 years ago
|
||
(In reply to 5silentrain from comment #28)
It looks to me like the difference here is basically that youtube uses -webkit-font-smoothing: antialiased, which isn't supported in Firefox.
Modifying the CSS to remove that (or changing it to -webkit-font-smoothing: initial to get the default behavior) makes the text look significantly heavier, similar to Firefox.
And adding -moz-osx-font-smoothing: grayscale would make the Firefox rendering more like Safari.It's funny, but in the latest dev version (128.0b4), the text on YouTube in Firefox seems to have become as thin as in Chrome and Safari 😲 I hope this is a feature and not a bug 🤭
That'll be the result of bug 1670993, which landed for Firefox 128 a couple of weeks ago.
Description
•