[Fontconfig] Firefox & Typeface Selection

Jorge Fábregas jorge.fabregas at gmail.com
Wed Apr 16 09:27:02 PDT 2014


On 04/16/2014 11:30 AM, Raimund Steger wrote:
> What does
> 
>    FC_DEBUG=1 fc-match "Helvetica Neue, Helvetica, Arial, sans-serif"
> 
> give you? (It is unlikely that Firefox executes several distinct 
> FcFontMatch calls as in your example)

Here's the output:

http://fpaste.org/94721/64044139/

Great.  I didn't know you could specify the pattern to fc-match.

> The above command prints the full pattern (with the family names you 
> gave) after config substitution (i. e. after fontconfig executes all 
> "pattern" rules that occur in your configuration files), as well as the 
> font that gets the best score. Maybe the substituted pattern already 
> tells you why Nimbus Sans L is used with higher precedence on your 
> machine. I would guess that Deja Vu Sans is only used as "default" 
> fallback, hence it has not a very prominent position in the substituted 
> pattern.

Ok, so that's what fontconfig returned:  Nimbus Sans L.  I tried it
again with the same pattern, but with the typefaces in different order
("sans-serif" being first) and it returned "DejaVu Sans".  For a moment
I thought it didn't care about the order of the pattern presented.   I
guess I need to learn how the scoring system works :)


Thanks a lot Raimund !

-- 
Jorge


More information about the Fontconfig mailing list