Comment 113 for bug 502610

Revision history for this message
In , Akiro (akiro) wrote :

Created attachment 32959
sample config for fallback with the separate files

(In reply to comment #95)
> (In reply to comment #94)
> > How is it bad? and how is it useful without the fonts?
>
> I think the meaning of "fallback" is that when something does not exist,
> something else fill in the place. That is EXACTLY what fontconfig is designed
> for: when a font is not installed, some other designated font will be used as
> alternative.
>
> > that looks like you missed the point.
> > the certain config files should be provided by the font upstream.
>
> I agree, but that does not justify why "font preference orders" should be
> provided by the font itself. In fact, fontconfig has been doing this job since
> day 1, and it is doing ok. The only thing is to refine it.

You are misunderstanding the point then. I'm not saying that the order should be provided by the font upstream. providing the separate rule by font upstream should be easier to change the order by distro or the users with the prefix priority say. as I said to you on Red Hat Bugzilla too, thus all of the fontconfig config files shouldn't contains any other font names in it. Since this is a kinda preference, the order should just leave to the distro or the users. that's why I think having the minimal sets of the rule in fontconfig upstream should be sufficient.

>
> > it's the above point and what Fedora is trying. the unnecessary
> > built-in rules are worse than nothing.
> >
>
> how are these rules unnecessary? tell me.
>

My objection to get rid of these (65-nonlatin.conf and similar for your proposed rules) files in upstream because they:

- prevents to have different order with additional rules.

- which mixing up several fontnames in one file requires the certain knowledges and skills to modify it for users.

- plus, need to modify two files to change the order at least. 65-nonlatin.conf (or similar) and the prefix priority in separate config file from the font package.

I want to just update the prefix priority in the config filename to change the order. it would works enough without 65-nonlatin.conf say, and easy enough.
Aside from that, speaking of the fallback, I did in vlgotnic-{,p}-fonts in Fedora to behave some fallback with separate files for Japanese like sans-serif->VL PGothic->VL Gothic.

% ls /etc/fonts/conf.d/*vlgothic*
/etc/fonts/conf.d/65-vlgothic-pgothic.conf@ /etc/fonts/conf.d/66-vlgothic-gothic.conf@

See the attached files for the details of the config files.