FS#65528 - [noto-fonts-emoji] Using font as fallback for Noto family break regular numbers and spaces rendering
Attached to Project:
Arch Linux
Opened by Raphael Bialon (rbialon) - Monday, 17 February 2020, 13:02 GMT
Last edited by Antonio Rojas (arojas) - Wednesday, 25 March 2020, 14:16 GMT
Opened by Raphael Bialon (rbialon) - Monday, 17 February 2020, 13:02 GMT
Last edited by Antonio Rojas (arojas) - Wednesday, 25 March 2020, 14:16 GMT
|
Details
Description:
When having only extra/noto-fonts-emoji installed, but not extra/noto-fonts, noto-fonts-emoji will be used as a fallback as introduced in https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/noto-fonts-emoji&id=b4b9b38c2c304824b6ea3dd069bdca179b316712 . This breaks website rendering in Firefox, for example, as can be seen here https://imgur.com/a/Eo8KfBu because "Noto Emoji" is now matched for "Noto Sans": $ fc-match "Noto Sans" NotoColorEmoji.ttf: "Noto Color Emoji" "Regular" Google Chrome and Chromium seem to ship with their own Noto fonts, as websites are still rendered correctly. While noto-fonts-emoji renders alphabetic characters correctly still, it uses Emoji Numbers and apparently different whitespace than regular Noto fonts. Additional info: * Introduced in Version: 20191016-3 * Introduced in commit b4b9b38c2c304824b6ea3dd069bdca179b316712 * Screenshot of broken website https://imgur.com/a/Eo8KfBu Steps to reproduce: * Install noto-fonts-emoji, but not noto-fonts * Visit https://gitlab.com/gitlab-org/gitlab/issues in Firefox (73.0) |
This task depends upon
font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Droid Sans,Helvetica Neue,sans-serif;
See https://imgur.com/a/AJOIXCP
And here it is without noto-fonts installed: https://pastebin.com/kpVwJfgR
Noto Color Emoji appears only on line 199 (of 212):
$ fc-list ':charset=31' | grep -in noto
199:/usr/share/fonts/noto/NotoColorEmoji.ttf: Noto Color Emoji:style=Regular
I have the following noto packages installed: noto-fonts, noto-fonts-cjk, noto-fonts-emoji
They use the font string "Helvetica,Arial,Noto Sans,Ubuntu,sans-serif".
@jomority has the issue with noto-fonts and noto-fonts-emoji installed.
I couldn't replicate the issue with noto-fonts either installed or not installed.
¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯
@rbialon see if the outputs of fc-match 'serif', fc-match 'sans-serif', fc-match 'emoji', fc-match 'monospace', fc-match 'system-ui' are all what you expect them to be
@jomority are you sure the bug exists in 20191016-3 and not only in 20191016-2?
However, I'm not sure anymore if it's the packages fault.
The font-family property specified by the CSS is:
> "Helvetica, Arial, Noto Sans, Ubuntu",sans-serif
If I change it to
> "Helvetica", "Arial", "Noto Sans", "Ubuntu",sans-serif
in the inspector, everything works as expected.
I don't know if this is the fault of Qwant, Firefox or this package. Maybe someone with more knowledge of fontconfig can tell me if I should report this as a bug to Qwant.
The output of fc-match is what I would expect it to be:
$ fc-match serif
DejaVuSerif.ttf: "DejaVu Serif" "Book"
$ fc-match sans-serif
DejaVuSans.ttf: "DejaVu Sans" "Book"
$ fc-match emoji
NotoColorEmoji.ttf: "Noto Color Emoji" "Regular"
$ fc-match monospace
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
$ fc-match system-ui
DejaVuSans.ttf: "DejaVu Sans" "Book"
@jomority The behavior shown with Qwant is them not complying to the CSS standard by surrounding multiple font names with quotes https://www.w3.org/TR/2018/REC-css-fonts-3-20180920/#propdef-font-family
Why the quoted list of fonts would match Noto Emoji, I have no idea, as fc-match lists some other font for it:
$ fc-match "Helvetica, Arial, Noto Sans, Ubuntu"
NimbusSans-Regular.otf: "Nimbus Sans" "Regular"
$ fc-match '"Helvetica, Arial, Noto Sans, Ubuntu"'
arial.ttf: "Arial" "Standard"
@jomority could you post an fc-match of "Helvetica, Arial, Noto Sans, Ubuntu" like @rbialon did?
As for the GitLab issue, I tried uninstalling as many fonts as I could using pacman -Rddns. Still couldn't replicate your issue. Maybe try using this file that I use https://github.com/chandradeepdey/arch-config/blob/master/etc/fonts/local.conf and run fc-cache. If it does work, don't ask me how though. A week ago I believed I demystified fontconfig. Today I believe fontconfig is pure black magic.
$ fc-match "Helvetica, Arial, Noto Sans, Ubuntu"
NimbusSans-Regular.otf: "Nimbus Sans" "Regular"
$ fc-match '"Helvetica, Arial, Noto Sans, Ubuntu"'
LiberationSans-Regular.ttf: "Liberation Sans" "Regular"
Maybe Firefox does something special with fontconfig. As your said: it's black magic :D
Also, I submitted a bug report to Qwant for the invalid CSS.