You are not logged in.

#1 2024-03-17 04:03:02

aleck099
Member
Registered: 2019-07-25
Posts: 3

How to put a font in lowest priority

I recently installed some new fonts for showing characters on https://en.wikipedia.org/wiki/CJK_Unifi … xtension_B
I put them into /usr/local/share/fonts/WindowsFonts
They are simsun.ttc and simsunb.ttf
But after running

fc-cache --force

They become the default font for common CJK characters. They have higher priority than my previous default fonts now
I want them to be fallback fonts, so they should only be used when other fonts fail.
I read https://wiki.archlinux.org/title/font_c … ting_fonts and put those below into /etc/fonts/local.conf:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<!-- /etc/fonts/fonts.conf file to configure system font access -->
<fontconfig>

<selectfont>
    <rejectfont>
        <pattern>
            <patelt name="family" >
                <string>SimSun</string>
            </patelt>
        </pattern>
    </rejectfont>

    <rejectfont>
        <pattern>
            <patelt name="family" >
                <string>NSimSun</string>
            </patelt>
        </pattern>
    </rejectfont>

    <rejectfont>
        <pattern>
            <patelt name="family" >
                <string>SimSun-ExtB</string>
            </patelt>
        </pattern>
    </rejectfont>
</selectfont>

</fontconfig>

But doing so will completely disable the two new fonts, not putting them as fallback.
How to give them the lowest priority?

Last edited by aleck099 (2024-03-18 02:07:49)

Offline

#2 2024-03-17 08:25:31

seth
Member
Registered: 2012-09-03
Posts: 51,696

Re: How to put a font in lowest priority

Please use [code][/code] tags. Edit your post in this regard.

Increase the priority of your desired font instead.
https://wiki.archlinux.org/title/Font_c … es#Chinese

Is this an xy-problem?
https://wiki.archlinux.org/title/Font_c … on/Chinese simply maps the SimSun fonts to Adobe Han

Offline

#3 2024-03-18 02:22:00

aleck099
Member
Registered: 2019-07-25
Posts: 3

Re: How to put a font in lowest priority

Offline

#4 2024-03-18 07:55:22

seth
Member
Registered: 2012-09-03
Posts: 51,696

Re: How to put a font in lowest priority

\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB