我在 Arch Linux,Deepin 桌面。我使用Noto Serif作为我的标准字体,但我不喜欢它的阿拉伯字符。所以我的目标是为阿拉伯字符使用另一种字体。
这是我尝试过的。我创建了一个新的配置文件,/etc/fonts/conf.d/
内容如下:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="pattern">
<test name="lang" compare="contains">
<string>ar</string>
</test>
<test qual="any" name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Naskh Arabic</string>
</edit>
</match>
<match target="pattern">
<test name="lang" compare="contains">
<string>ar</string>
</test>
<test qual="any" name="family">
<string>serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Naskh Arabic</string>
</edit>
</match>
</fontconfig>
Run Code Online (Sandbox Code Playgroud)
我接着跑fc-cache -r
。但这不起作用,相同的字体仍在使用中,并且像以前一样运行fc-match
返回NotoSerif-Regular.ttf: "Noto Serif" "Regular"
。
我正在编写一些与声音相关的 python 程序,所以我使用了使用 PortAudio 库的 SoundDevice python 模块。我在使用 deepin 桌面的 arch linux 上。
如果我只是打开计算机并打印可用的设备,我会得到:
0 HDA Intel PCH: ALC887-VD Analog (hw:0,0), ALSA (2 in, 2 out)
1 HDA Intel PCH: ALC887-VD Digital (hw:0,1), ALSA (0 in, 2 out)
2 HDA Intel PCH: ALC887-VD Alt Analog (hw:0,2), ALSA (2 in, 0 out)
3 HDA ATI HDMI: 0 (hw:1,3), ALSA (0 in, 8 out)
4 sysdefault, ALSA (128 in, 128 out)
5 front, ALSA (0 in, 2 out)
6 surround40, ALSA (0 …
Run Code Online (Sandbox Code Playgroud)