[Fontconfig] Finding a font but without fallback
pierremarc at oep-h.com
Fri Apr 25 14:13:48 PDT 2008
Vous (Sairus Patel) avez écrit :
> I haven't seen a response yet.
> Is querying for fonts without fallback not possible, or is it that
> folks don't know (or is the answer so obvious you have refrained from
> replying :^)?
> Any response, including a "I always want fallback to happen, so I
> don't know the answer" appreciated. Feel free to email me privately as
I’m just a user but from http://fontconfig.org/fontconfig-user.html , I can
"Fontconfig performs matching by measuring the distance from a provided
pattern to all of the available fonts in the system. The closest matching
font is selected. This ensures that a font will always be returned, but
doesn't ensure that it is anything like the requested pattern."
I don’t know if it applies for all methods, but I would say yes. And thus "no"
for your question.
> At 4/15/2008 02:51 PM, Sairus Patel wrote:
> >I'd like to ask FontConfig to find a font but *not* do font fallback
> >if a precise match isn't found.
My idea would be, rather than no result to a request, to access the computed
distance. So one could quickly evaluate if the font is close enough from
what’s the desired functionality or not. By the way, the term "fallback" is
not really good because returning the best font available is not the same as
returning a default font.
I want to repeat I don’t know Fontconfig very well & I can be completely wrong
here! But I’m still interested in the discussion because I had the same
question and finally opted for a private management.
Bien à vous
More information about the Fontconfig