[Fontconfig] Why is the default weight FC_WEIGHT_MEDIUM?

Raimund Steger rs at mytum.de
Sat Oct 26 03:34:04 PDT 2013

Akira TAGOH wrote:
> Hi,
> That sounds reasonable to me so that the normal weight is also default in CSS.
> Does anyone else have any objection about this change? one concern is

I wondered about this too once (and subsequently adjusted my config), so 
I think changing it is a sensible thing to do.
As most fonts are not available with weights 100 *and* 80 anyway it 
should not affect a lot of people.

> if there are anyone who are relying on current behavior, this change
> will breaks it despite you get a fix.

I don't think there is a lot of potential for trouble here. The change 
will only apply after target="pattern" rules, so if users have set 
defaults in the pattern before, this will not be affected. Also, generic 
matches will not be affected because they typically land on fallbacks 
from the 'family' property and 'weight' has lower priority.
So it's mainly about fonts that are available in 80 and 100, and chances 
are that people using them see the current behavior as a bug, too...


> On Fri, Oct 25, 2013 at 12:42 AM, John Flatness <john at zerocrates.org> wrote:
>> I was recently trying to run down a quirk in font selection, and stumbled
>> upon Fontconfig's pattern defaults. In particular, the one that was causing
>> my issue and surprise was the default for weight, which is defined as
>> FC_WEIGHT_MEDIUM, or 100.
>> This default seems to have been the same from the initial commit, and that
>> time there were only defined constants for light (then defined as zero),
>> medium, demi-bold, bold, and black weights.
>> By now, should the default weight not be FC_WEIGHT_NORMAL or
>> FC_WEIGHT_REGULAR, both of which are defined as 80? The specific context I
>> noticed this in was a font family that ships both regular and medium
>> weights, and without additional specification, fontconfig selects the
>> surprisingly-heavy medium weight.
>> I'm aware I can provide my own configuration to handle my specific case, but
>> I'm surprised that the default here is actually heavier than the "regular"
>> and "normal" weight. I imagine there's some consideration here that I'm
>> simply not aware of, but I can't think of what that might be.
>> --
>> John Flatness
>> (P.S.: I tried to send this message earlier, and it seemed to get eaten
>> somewhere along the line. Apologies if this is a duplicate for anyone.)
>> _______________________________________________
>> Fontconfig mailing list
>> Fontconfig at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/fontconfig

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 mailing list