问:Linux下Chrome标题栏中文乱码


在使用Linux的时候你会遇到一些奇奇怪怪的问题,不过,你会在解决这些问题的过程当中就不知不觉都学到很多东西

比如说最近我把系统的一些包更新后,发现Chrome浏览器的标题栏的中文部分全部为乱码,但FireFox就没有这个问题

\

网上有人给出这个问题的解决是通过修改文件/etc/fonts/conf.d/49-sansserif.conf倒数第四行为自己喜欢的字体就行了,如我的改为ubuntu

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
  If the font still has no generic name, add sans-serif
 -->
	<match target="pattern">
		<test qual="all" name="family" compare="not_eq">
			<string>sans-serif</string>
		</test>
		<test qual="all" name="family" compare="not_eq">
			<string>serif</string>
		</test>
		<test qual="all" name="family" compare="not_eq">
			<string>monospace</string>
		</test>
		<edit name="family" mode="append_last">
			<string>ubuntu</string>
		</edit>
	</match>
</fontconfig>
但原理是什么呢?这是一个问题!!!

相关内容