Why is Droid Sans always the top priority fonts in unstable branch?

I have edited the /etc/fonts/conf.d/65-nonlatin.conf to make Noto Sans CJK TC the first priority fonts for Chinese, it worked without problem, but now it forces me to use Droid Sans by default, I have to delete ttf-droid to make my setting work.

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
    <its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
  </its:rules>

  <description>Set preferable fonts for non-Latin</description>
	<alias>
		<family>serif</family>
		<prefer>
			<family>Artsounk</family> <!-- armenian -->
			<family>BPG UTF8 M</family> <!-- georgian -->
			<family>Kinnari</family> <!-- thai -->
			<family>Norasi</family> <!-- thai -->
			<family>Frank Ruehl</family> <!-- hebrew -->
			<family>Dror</family>  <!-- hebrew -->
			<family>JG LaoTimes</family>  <!-- lao -->
			<family>Saysettha Unicode</family>  <!-- lao -->
			<family>Pigiarniq</family> <!-- canadian syllabics -->
			<family>B Davat</family> <!-- arabic (fa) -->
			<family>B Compset</family>  <!-- arabic (fa) -->
			<family>Kacst-Qr</family> <!-- arabic (ar) -->
			<family>Urdu Nastaliq Unicode</family> <!-- arabic (ur) -->
			<family>Raghindi</family> <!-- devanagari -->
			<family>Mukti Narrow</family> <!-- bengali -->
			<family>malayalam</family> <!-- malayalam -->
			<family>Sampige</family> <!-- kannada -->
			<family>padmaa</family> <!-- gujarati -->
			<family>Hapax Berbère</family> <!-- tifinagh -->
			<family>MS Mincho</family> <!-- han (ja) -->
			<family>Noto Serif CJK TC</family> <!-- cjk -->
			<family>SimSun</family> <!-- han (zh-cn,zh-tw) -->
			<family>PMingLiu</family> <!-- han (zh-tw) -->
			<family>WenQuanYi Zen Hei</family> <!-- han (zh-cn,zh-tw) -->
			<family>WenQuanYi Bitmap Song</family> <!-- han (zh-cn,zh-tw) -->
			<family>AR PL ShanHeiSun Uni</family> <!-- han (ja,zh-cn,zh-tw) -->
			<family>AR PL New Sung</family> <!-- han (zh-cn,zh-tw) -->
			<family>ZYSong18030</family> <!-- han (zh-cn,zh-tw) -->
			<family>HanyiSong</family> <!-- han (zh-cn,zh-tw) -->
			<family>MgOpen Canonica</family>
			<family>Sazanami Mincho</family>
			<family>IPAMonaMincho</family>
			<family>IPAMincho</family>
			<family>Kochi Mincho</family>
			<family>AR PL SungtiL GB</family>
			<family>AR PL Mingti2L Big5</family>
 			<family>AR PL Zenkai Uni</family>
			<family>MS 明朝</family>
 			<family>ZYSong18030</family>
			<family>NanumMyeongjo</family> <!-- hangul (ko) -->
			<family>UnBatang</family> <!-- hangul (ko) -->
			<family>Baekmuk Batang</family> <!-- hangul (ko) -->
 			<family>KacstQura</family>
 			<family>Frank Ruehl CLM</family>
			<family>Lohit Bengali</family>
 			<family>Lohit Gujarati</family>
 			<family>Lohit Hindi</family>
			<family>Lohit Marathi</family>
			<family>Lohit Maithili</family>
			<family>Lohit Kashmiri</family>
			<family>Lohit Konkani</family>
			<family>Lohit Nepali</family>
			<family>Lohit Sindhi</family>
 			<family>Lohit Punjabi</family>
 			<family>Lohit Tamil</family>
			<family>Meera</family>
			<family>Lohit Malayalam</family>
 			<family>Lohit Kannada</family>
 			<family>Lohit Telugu</family>
 			<family>Lohit Oriya</family>
 			<family>LKLUG</family>
		</prefer>
	</alias>
	<alias>
		<family>sans-serif</family>
		<prefer>
			<family>Nachlieli</family> <!-- hebrew -->
			<family>Lucida Sans Unicode</family>
			<family>Yudit Unicode</family>
			<family>Kerkis</family> <!-- greek -->
			<family>ArmNet Helvetica</family> <!-- armenian -->
			<family>Artsounk</family> <!-- armenian -->
			<family>BPG UTF8 M</family> <!-- georgian -->
			<family>Waree</family> <!-- thai -->
			<family>Loma</family> <!-- thai -->
			<family>Garuda</family> <!-- thai -->
			<family>Umpush</family> <!-- thai -->
			<family>Saysettha Unicode</family> <!-- lao? -->
			<family>JG Lao Old Arial</family> <!-- lao -->
			<family>GF Zemen Unicode</family> <!-- ethiopic -->
			<family>Pigiarniq</family> <!-- canadian syllabics -->
			<family>B Davat</family> <!-- arabic (fa) -->
			<family>B Compset</family> <!-- arabic (fa) -->
			<family>Kacst-Qr</family> <!-- arabic (ar) -->
			<family>Urdu Nastaliq Unicode</family> <!-- arabic (ur) -->
			<family>Raghindi</family> <!-- devanagari -->
			<family>Mukti Narrow</family> <!-- bengali -->
			<family>malayalam</family> <!-- malayalam -->
			<family>Sampige</family> <!-- kannada -->
			<family>padmaa</family> <!-- gujarati -->
			<family>Hapax Berbère</family> <!-- tifinagh -->
			<family>MS Gothic</family> <!-- han (ja) -->
			<family>UmePlus P Gothic</family> <!-- han (ja) -->
			<family>Noto Sans CJK TC</family> <!-- cjk -->
			<family>Microsoft YaHei</family> <!-- han (zh-cn,zh-tw) -->
			<family>Microsoft JhengHei</family> <!-- han (zh-tw) -->
			<family>WenQuanYi Zen Hei</family> <!-- han (zh-cn,zh-tw) -->
			<family>WenQuanYi Bitmap Song</family> <!-- han (zh-cn,zh-tw) -->
			<family>AR PL ShanHeiSun Uni</family> <!--han (ja,zh-cn,zh-tw) -->
			<family>AR PL New Sung</family> <!-- han (zh-cn,zh-tw) -->
			<family>MgOpen Modata</family>
			<family>VL Gothic</family>
			<family>IPAMonaGothic</family>
			<family>IPAGothic</family>
			<family>Sazanami Gothic</family>
			<family>Kochi Gothic</family>
			<family>AR PL KaitiM GB</family>
			<family>AR PL KaitiM Big5</family>
 			<family>AR PL ShanHeiSun Uni</family>
 			<family>AR PL SungtiL GB</family>
 			<family>AR PL Mingti2L Big5</family>
			<family>MS ゴシック</family>
			<family>ZYSong18030</family> <!-- han (zh-cn,zh-tw) -->
			<family>TSCu_Paranar</family> <!-- tamil -->
			<family>NanumGothic</family> <!-- hangul (ko) -->
			<family>UnDotum</family> <!-- hangul (ko) -->
			<family>Baekmuk Dotum</family> <!-- hangul (ko) -->
 			<family>Baekmuk Gulim</family> <!-- hangul (ko) -->
 			<family>KacstQura</family>
			<family>Lohit Bengali</family>
 			<family>Lohit Gujarati</family>
 			<family>Lohit Hindi</family>
			<family>Lohit Marathi</family>
			<family>Lohit Maithili</family>
			<family>Lohit Kashmiri</family>
			<family>Lohit Konkani</family>
			<family>Lohit Nepali</family>
			<family>Lohit Sindhi</family>
 			<family>Lohit Punjabi</family>
 			<family>Lohit Tamil</family>
			<family>Meera</family>
 			<family>Lohit Malayalam</family>
 			<family>Lohit Kannada</family>
 			<family>Lohit Telugu</family>
 			<family>Lohit Oriya</family>
 			<family>LKLUG</family>
		</prefer>
	</alias>
	<alias>
		<family>monospace</family>
		<prefer>
			<family>Miriam Mono</family> <!-- hebrew -->
			<family>VL Gothic</family>
			<family>IPAMonaGothic</family>
			<family>IPAGothic</family>
			<family>Sazanami Gothic</family>
			<family>Kochi Gothic</family>
			<family>AR PL KaitiM GB</family>
			<family>MS Gothic</family> <!-- han (ja) -->
			<family>UmePlus Gothic</family> <!-- han (ja) -->
			<family>Noto Sans Mono CJK TC</family> <!-- cjk-->
			<family>NSimSun</family> <!-- han (zh-cn,zh-tw) -->
			<family>MingLiu</family> <!-- han (zh-tw) -->
			<family>AR PL ShanHeiSun Uni</family> <!-- han (ja,zh-cn,zh-tw) -->
			<family>AR PL New Sung Mono</family> <!-- han (zh-cn,zh-tw) -->
			<family>HanyiSong</family> <!-- han (zh-cn) -->
			<family>AR PL SungtiL GB</family>
			<family>AR PL Mingti2L Big5</family>
			<family>ZYSong18030</family> <!-- han (zh-cn,zh-tw) -->
			<family>NanumGothicCoding</family> <!-- hangul (ko) -->
			<family>NanumGothic</family> <!-- hangul (ko) -->
			<family>UnDotum</family> <!-- hangul (ko) -->
			<family>Baekmuk Dotum</family> <!-- hangul (ko) -->
			<family>Baekmuk Gulim</family> <!-- hangul (ko) -->
			<family>TlwgTypo</family> <!-- thai -->
			<family>TlwgTypist</family> <!-- thai -->
			<family>TlwgTypewriter</family> <!-- thai -->
			<family>TlwgMono</family> <!-- thai -->
			<family>Hasida</family> <!-- hebrew -->
			<family>Mitra Mono</family> <!-- bengali -->
			<family>GF Zemen Unicode</family> <!-- ethiopic -->
			<family>Hapax Berbère</family> <!-- tifinagh -->
			<family>Lohit Bengali</family>
			<family>Lohit Gujarati</family>
			<family>Lohit Hindi</family>
			<family>Lohit Marathi</family>
			<family>Lohit Maithili</family>
			<family>Lohit Kashmiri</family>
			<family>Lohit Konkani</family>
			<family>Lohit Nepali</family>
			<family>Lohit Sindhi</family>
			<family>Lohit Punjabi</family>
			<family>Lohit Tamil</family>
			<family>Meera</family>
			<family>Lohit Malayalam</family>
			<family>Lohit Kannada</family>
			<family>Lohit Telugu</family>
			<family>Lohit Oriya</family>
			<family>LKLUG</family>
		</prefer>
	</alias>
</fontconfig>

No one knows what's going on?
Why does ttf-droid take over my Noto Sans CJK TC?

I don't quite understand how font preference works either. But you do not have to uninstall droid font entirely. I solved by removing some symlinks in /etc/fonts/conf.d/.

1 Like

But, will it come back if there is a new update for ttf-droid?
Is it the fault of Manjaro/Arch or the font itself?

It is probably how Arch is choosing to package this font now. To avoid any more trouble in future, this user font setting seems to work (tested working correct fallback font even after reinstall ttf-droid).

[Edit: I was seeing Latin characters in some places using my Korean font with a simple config, so I modified the Latin fallback template (/etc/fonts/conf.avail/60-latin.conf) for my user config, putting NanumGothic at the end of each font family.]

Create file
~/.config/fontconfig/fonts.conf

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
    <its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
  </its:rules>

  <description>Set preferable fonts for Latin</description>
	<alias>
		<family>serif</family>
		<prefer>
			<family>Bitstream Vera Serif</family>
			<family>DejaVu Serif</family>
			<family>Times New Roman</family>
			<family>Thorndale AMT</family>
			<family>Luxi Serif</family>
			<family>Nimbus Roman No9 L</family>
			<family>Nimbus Roman</family>
			<family>Times</family>
			<family>NanumGothic</family> <!-- Your preferred CJK font here -->
		</prefer>
	</alias>
	<alias>
		<family>sans-serif</family>
		<prefer>
			<family>Bitstream Vera Sans</family>
			<family>DejaVu Sans</family>
			<family>Verdana</family>
			<family>Arial</family>
			<family>Albany AMT</family>
			<family>Luxi Sans</family>
			<family>Nimbus Sans L</family>
			<family>Nimbus Sans</family>
			<family>Helvetica</family>
			<family>Lucida Sans Unicode</family>
			<family>BPG Glaho International</family> <!-- lat,cyr,arab,geor -->
			<family>Tahoma</family> <!-- lat,cyr,greek,heb,arab,thai -->
			<family>NanumGothic</family> <!-- Your preferred CJK font here -->
		</prefer>
	</alias>
	<alias>
		<family>monospace</family>
		<prefer>
			<family>Bitstream Vera Sans Mono</family>
			<family>DejaVu Sans Mono</family>
			<family>Inconsolata</family>
			<family>Andale Mono</family>
			<family>Courier New</family>
			<family>Cumberland AMT</family>
			<family>Luxi Mono</family>
			<family>Nimbus Mono L</family>
			<family>Nimbus Mono</family>
			<family>Nimbus Mono PS</family>
			<family>Courier</family>
			<family>NanumGothic</family> <!-- Your preferred CJK font here -->
		</prefer>
	</alias>
<!--
  Fantasy faces
 -->
 	<alias>
		<family>fantasy</family>
		<prefer>
			<family>Impact</family>
			<family>Copperplate Gothic Std</family>
			<family>Cooper Std</family>
			<family>Bauhaus Std</family>
		</prefer>
	</alias>
<!--
  Cursive faces
  -->
	<alias>
		<family>cursive</family>
		<prefer>
			<family>ITC Zapf Chancery Std</family>
			<family>Zapfino</family>
			<family>Comic Sans MS</family>
		</prefer>
	</alias>

</fontconfig>

https://wiki.archlinux.org/index.php/Fonts#Fallback_font_order_with_X11

But I am not so sure how good this workaround is because I assume everything in /etc/fonts/conf.d is being ignored now. There are a lot of font rules in there. If droid is creating this much problem for CJK fonts, then there might be problems in other places we do not know about. So I am inclined to go back to my 1st solution of removing the droid symlinks. This will probably have to be solved upstream by people who understand how font ordering (should) work. Because a universal font should not take precedence over regional fonts.

Also, changing the droid symlinks from 60/65 to 66 also seems to work. This won't solve the problem of future updates, but this is probably how it should have been packaged (with a higher number).

1 Like

Seems after enabling the config this happened. Can you contact the maintainer at Arch to discuss your findings? We can always package overlay packages. Also give me a list of the config folder on your end.

Seems if you search for it you find several issues with preactivating configuration files. Like that one from Debian.

Seems all is related to this upstream todo.

I moved it now to 70/75 to see if that makes it better.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.