[Fontconfig] How can I set priority according to style in same font family name?

Deokjin Kim deokjin81.kim at samsung.com
Mon Jun 18 19:20:59 PDT 2012


Hello all,

I can set priority among different font family name using configuration file(under /etc/fonts/conf.avail).
However, I can't set priority according to style in same font family name.
Assume I have font files which have 3 styles(regular, meidum, bold), and family name is same(Time).
    TimeBold.ttf, TimeMedium.ttf, and TimeRegular.ttf.
I want to get a below result when I execute "fc-match -a".
...
TimeRegular.ttf
TimeMedium.ttf
TimeBold.ttf

But actual result is below.
...
TimeBold.ttf
TimeMedium.ttf
TimeRegular.ttf

When I check score of 3 font files, they have same score.
So their priority is determined by lexicographic order. (i.e. B > M > R.)
When I rename 3 font files, (For example, TimeARegular.ttf, TimeBMedium.ttf, TimeCBold.ttf)
I can get expected result.

Is there better solution?

Best Regards,
Deokjin Kim


More information about the Fontconfig mailing list