[Fontconfig] Exposing match level
rs at mytum.de
Sat May 9 03:35:42 PDT 2015
On 05/08/15 20:29, Behdad Esfahbod wrote:
> Hi all,
> I'm sure most of you who have been around know that it's been a very common
> request to want to know whether fontconfig found a match for a request or just
> fallbacks. I've been thinking about this a lot recently, and like to make
> sure we fix it this time.
This sounds interesting. The recent discussion about LilyPond reminded
me that while fontconfig does have FcFontList(3) and FcFontSetList(3) to
query fonts without any scoring at all,
(1) this is normally not exposed by higher-level libraries;
(2) this doesn't sort regular variants near the top (obviously), so
FcFontMatch(3) has to be called at some point anyway;
hence improving FcFontMatch(3) and FcFontSort(3) might indeed be worthwhile.
At the moment, whether a configuration rule uses prepend_first v.
prepend v. append v. append_last might carry a meaning of 'approximate'
v. 'fallback' when a human reader examines the config, but not to the
matching engine where everything is only a position in the property
list. The 'fallback' boundary somewhere in that list is one purely of
As long as the original documented purpose of the binding value in terms
of fonts-conf(5) (that 'lang' could overrule 'family' in the match if
the user explicitly stated the former, i. e. one of prioritizing
property A over property B) is kept unchanged I think yes, it is
possible to factor that meaning into the value.
To state it more explicitly, it is probably not a good idea to introduce
strong family bindings into a pattern that didn't originally have them,
by means of alias rules, only because we now think of binding as "how
close is family A to family B". Such alias rules, where they specify
binding="same" now, could only specify something like "same-or-lower" in
the future -- correct me if I'm wrong.
Worringer Str 31 Duesseldorf 40211 DE home: <rs at mytum.de>
+49-179-2981632 icq 16845346 work: <rs at interface-ag.de>
More information about the Fontconfig