You are not logged in.
Whenever I install the noto-fonts package via pacman, the "monospace" alias gets configured wrong to a regular font instead of a mono-spaced font.
The problem shows whenever I load a website using monospace fonts, where they are displayed as a normal sans-serif. A bigger problem shows when I load a web editor which expects the font to be monospace while it actually is not fixed sized, where the cursor does not match with the text. Similar thing also happens when I open a gtk-based terminal emulator instead of xterm, in which case the font does not match the space (kind of hard to explain in words).
You can check that the noto-fonts package has a problem as follows.
1. Make a clean Arch installation.
2. (sudo) pacman -S xorg xorg-drivers
3. (sudo) pacman -S noto-fonts noto-fonts-cjk noto-fonts-emoji
4. fc-match monospace
5. The above will output: NotoSans-Recular.ttc "Noto Sans" "Regular"
6. (sudo) pacman -S ttf-dejavu
7. fc-match monospace
8. The above will output: DejavuSansMono.ttf: "DejaVu Sans Mono" "Book"
You can see number 5 is clearly wrong. When you install noto-fonts, the monospace alias is aliased to a variable width "Sans" font, unlike ttf-dejavu which handles the alias as expected to a "Mono"-spaced font.
(Writing the following in a later edit) seth has pointed out that:
a) Noto (unlike eg. the Droid family) does not come with an fontconfig snippet that aliases its Mono variant with the "monospace" and
b) fontconfigs 45-latin.conf doesn't cover Noto (unlike several other well known monospace fonts)
The result is that you have no font that matches "monospace" before installing dejavu - file a bug against either noto or fonctconfig to provide aliases (or help yourself and add them)
Last edited by xiver77 (2017-03-14 05:18:17)
Offline
I've not had problems like this. Can you post the output of the following when the wrong font is used:
fc-match monospace
Also, if there are times when the font is working properly, the output of the above command again would be useful for comparison.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
[root@mypc gl]# fc-match monospace
NotoSansCJK-Regular.ttc: "Noto Sans CJK JP" "Regular"
So it's wrong, because my monospace fonts should be dejavu sans mono (for english) and Noto Sans Mono CJK JP (for CJK fonts).
My locale is zh_CN.UTF-8, I doubt any locales other than English will find wrong mono space fonts. Don't know how to fix it though.
Offline
I have a file "/etc/fonts/conf.d/51-font-alias.conf" where I configure "monospace", "sans-serif" and "serif". You can make a list of fonts that will be searched for missing characters. I think what you asked for would look like this:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>monospace</family>
<prefer>
<family>DejaVu Sans Mono</family>
<family>Noto Sans CJK JP</family>
</prefer>
</alias>
</fontconfig>
Offline
Yes, it works, thank you.
Offline
Sorry for my late response, but I found an exact way to reproduce this probable bug.
1. Make a clean Arch installation.
2. (sudo) pacman -S xorg xorg-drivers
3. (sudo) pacman -S noto-fonts noto-fonts-cjk noto-fonts-emoji
4. fc-match monospace
5. The above will output: NotoSans-Recular.ttc "Noto Sans" "Regular"
6. (sudo) pacman -S ttf-dejavu
7. fc-match monospace
8. The above will output: DejavuSansMono.ttf: "DejaVu Sans Mono" "Book"
You can see number 5 is clearly wrong. I think something may be wrong with the noto fonts package.
Offline
And what, exactly, did you expect it to find in #5?
Offline
And what, exactly, did you expect it to find in #5?
I'm not sure if I really need to explain further, but as you requested, the noto-fonts package installs serif, sans-serif, and monospace variants of Google Noto fonts. The same applies for the ttf-dejavu package. When you install noto-fonts, the monospace alias is aliased to a variable width "Sans" font, unlike ttf-dejavu which handles the alias as expected to a "Mono"-spaced font. Thus the expected output of #5 should contain "NotoMono".
Last edited by xiver77 (2017-03-13 14:30:19)
Offline
The reason is that
a) Noto (unlike eg. the Droid family) does not come with an fontconfig snippet that aliases its Mono variant with the "monospace" and
b) fontconfigs 45-latin.conf doesn't cover Noto (unlike several other well known monospace fonts)
The result is that you have no font that matches "monospace" before installing dejavu - file a bug against either noto or fonctconfig to provide aliases (or help yourself and add them)
Reading that from the OP is close to impossible, so you might want to clarify the issue in your initial post.
Offline
Is the follow from your first post no longer true?
Whenever I install a font package via pacman, such as noto-fonts, ttf-dejavu, ttf-droid etc., the "monospace" alias gets configured wrong to a regular font instead of a mono-spaced font.
You are not suggesting that installing ttf-dejavu works fine - and I'd guess ttf-droid, and most "etc." do as well. The problem seems to be only with noto fonts for which the solution options are as Seth describes.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline