根据 .fonts.conf 中的语言强制字体大小

Sig*_*Ben 10 xorg fonts x11 fontconfig

我可以通过.fonts.conf在我的用户目录中编辑(或编辑 global /etc/fonts/fonts.conf)来指定用于在 X 中显示特定语言的默认字体系列。但是,我无法以相同的方式强制使用特定的字体大小。

例如,以下强制在 Linux Libertine 中显示俄语:

<fontconfig>
    <match>
        <test name="lang">
            <string>rus</string>
        </test>
         <edit mode="prepend" name="family">
            <string>Linux Libertine</string>
        </edit>
    </match>
</fontconfig>
Run Code Online (Sandbox Code Playgroud)

我曾尝试添加以下 XML 标记,但它不起作用:

         <edit mode="assign" name="size">
             <int>18</int>
         </edit>
Run Code Online (Sandbox Code Playgroud)

poi*_*ige 11

您可以尝试重新使用这个我的代码片段,它通过给定的因素增加指定字体的字体大小

<!--
    Scaling a chosen font with Fontconfig.
    By poige, 2008.
-->
<match target="font">
    <test name="family">
        <string>Liberation Sans</string>
    </test>
    <edit name="pixelsize" mode="assign">
        <times><name>pixelsize</name>, <double>1.1</double></times>
    </edit>
</match>
Run Code Online (Sandbox Code Playgroud)