[Fontconfig] FcPatternGet always gives font weight of '0'

Lawrence D'Oliveiro ldo at geek-central.gen.nz
Tue Sep 10 23:35:05 UTC 2019


On Tue, 10 Sep 2019 14:36:48 +0200, Lucien Gentis wrote:

> So I tried to replace "Liberation Sans:style=Bold Italic" by
> "Liberation Sans:weight=bold:slant=italic" in my C program, but under
> Debian 10 , I still get:
> 
> font family : Liberation Sans
> font weight : 0
> font slant : 100
> 
> Family and slant are OK, only weight is false.
> 
> Same program under Linux Ubuntu 18.04 gives :
> 
> font family : Liberation Sans
> font weight : 200
> font slant : 100

There was a version of Fontconfig that stopped recognizing “bold” as a
value for the “weight” property for a while. I run Debian Unstable, and
as I recall this did get fixed, but it looks like the previous version
was left in Stable for version 10.

As a workaround, try “weight=200” in your pattern.


More information about the Fontconfig mailing list