text rendered with Noto-Sans gives bad spacing and gives numbers a weird font on Arch linux without Noto-Sans installed
Categories
(Core :: Layout: Text and Fonts, defect, P5)
Tracking
()
People
(Reporter: jaap.aarts1, Unassigned)
References
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0
Steps to reproduce:
visit gitlab.com
Actual results:
All the spacing between words was completely off.
See https://gitlab.com/gitlab-org/gitlab/issues/206546 for original bug reported on gitlab (including image).
This issue is worked-around by installing Noto-Sans so I assume this is easy to reproduce in an Arch linux VM.
Expected results:
There should have been normal spacing between the words
Updated•6 years ago
|
Comment 1•6 years ago
|
||
I tried gitlab.com in an Arch VM but did not see this issue. I suspect it's dependent on the particular font packages that are installed - besides the Noto fonts, which I did try removing from my VM.
To diagnose what's happening, it would be helpful to use the Inspector (right-click on the "problem" text and choose Inspect Element, then choose the Fonts panel) to see exactly what fonts Firefox says it is using for that text. My guess is that some other font package, probably connected to an emoji font, has set up font linking/aliasing such that when it sees Noto Sans in the request, it inserts an emoji font into the list, and that's what is being used to render all the spaces.
| Reporter | ||
Comment 2•6 years ago
|
||
Your guess might be 100% correct, I do have the "Noto Color Emoji" font installed and that is showing up as one of the fonts displayed. When hovering over "Noto Color Emoji" it does indeed highlight all the incorrect spacings.
If you want to install the emoji font here you go: sudo pacman -S noto-fonts-emoji
I might have some weird setup with fonts since getting emoji fonts to work is stupidly difficult for some reason (not included by default on arch), but I hope this is enough for now.
PS If you are not signed into gitlab, gitlab.com redirects to about.gitlab.com which does not the noto-font. Just please use the issue i linked as an example.
And for just a dead simple example without any weird things going on: <html style="font-family: "Noto Sans";"><body>test test</body></html> where the space is really big. (fun fact this lists Cantarell as a font but it isnt used and also isnt listed in "all fonts used". Should this be another bug-report?)
Comment 3•6 years ago
|
||
I still haven't managed to reproduce this locally, but that might well be because my Arch Linux VM came as a KDE-based environment (from osboxes.org) and may have an entirely different configuration to whatever you're running.
I suspect this is similar to another Arch Linux font-selection issue reported recently in bug 1614628 (where, interestingly, Cantarell also shows up - it's apparently mapped from "system-ui" in some configuration, at least). My guess is still that there's something quirky about the fontconfig setup on Arch, or about some of the font packages, and that's leading to these issues, but I don't know precisely - and every installation may be different, making it hard to reproduce and diagnose in more detail.
If there's a ready-made Arch Linux VM image where these issues reproduce, we may be able to figure out what's happening, but installing the OS entirely from scratch is pretty time-consuming and it's impossible to know whether we'd be duplicating any given user's configuration closely enough to reproduce the same behavior.
| Reporter | ||
Comment 4•6 years ago
|
||
I got a working virtualbox image with this reproducible. Its setup so that you can login with the pssw: osboxes.org and just start Firefox via gnome. Going to any gitlab.org page (besides about.gitlab.com) causes the issue. You know an easy way to upload 7 GiB files?
If not you can reproduce it by downloading the osboxes image.
$ sudo pacman -S archlinux-keyring
$ sudo pacman -Syu
$ sudo pacman -S noto-fonts-emoji
$ sudo pacman -S firefox
And then following this to install gnome: https://www.hiroom2.com/2017/10/07/archlinux-20171001-gnome-en/
That should create an image that is able to reproduce this issue, I did some extra steps but in the end they ware not needed.
Comment 5•6 years ago
|
||
I tried to follow the steps in comment 4, but I'm hitting an error running sudo pacman -Syu: several packages report an error that signature from "Levente Polyak (anthraxx) <levente@leventepolyak.net>" is unknown trust, and the entire upgrade process fails.
I also tried to proceed with installing noto-fonts-emoji and firefox without having completed pacman -Syu, but the firefox package failed similarly, as several of its dependencies are signed with that same unknown signature.
Comment 6•6 years ago
|
||
Huh, strange - I re-ran sudo pacman -S archlinux-keyring, although it had apparently completed OK the first time - it seems to have made some changes, and now the Levente Polyak-signed packages are accepted. OK, I'll try and go further....
Comment 7•6 years ago
|
||
So the problem here is caused by the configuration in /etc/fonts/conf.avail/66-noto-color-emoji.conf, which includes:
<!--
Set Noto Color Emoji as fallback for Noto family
-->
<fontconfig>
<match>
<test name="family" compare="contains"><string>Noto </string></test>
<edit name="family" mode="append" binding="same">
<string>Noto Color Emoji</string>
</edit>
</match>
</fontconfig>
On the gitlab page mentioned, the CSS has:
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}
Given the fontconfig rule above, this is effectively edited to become:
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Noto Color Emoji", Ubuntu, Cantarell, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
because Noto Color Emoji is appended after any family name that contains the string "Noto ".
So if no font matching "Segoe UI", "Roboto", or "Noto Sans" is present, this means the color emoji font will be the first available font found from the font-family list, and therefore gets used for any characters it supports -- including <space> and numbers.
In summary, then, the configuration of the Noto Color Emoji package is such that it's unwise to install it without also installing Noto Sans.
| Reporter | ||
Comment 8•6 years ago
|
||
Thank you! I did not notice this myself, I have tried working with linux fonts but have torn my hair out many many times.
This was indeed an issue by the packager of the font and has since been fixed to exclude a certain range of Unicode characters.
I am sorry for wrongly thinking this was Firefox's fault, Chrome didn't have the same issue so that's how I got to this conclusion.
The same /etc/fonts/conf.avail/66-noto-color-emoji.conf:
<fontconfig>
<match target="scan">
<test name="family"><string>Noto Color Emoji</string></test>
<edit name="charset" mode="assign">
<minus>
<name>charset</name>
<charset><range>
<int>0x0000</int>
<int>0x00FF</int>
</range></charset>
</minus>
</edit>
</match>
<match>
<test name="family" compare="contains"><string>Noto </string></test>
<edit name="family" mode="append" binding="same">
<string>Noto Color Emoji</string>
</edit>
</match>
</fontconfig>
| Reporter | ||
Updated•6 years ago
|
Description
•