Re: FcPatternGet always gives font weight of '0'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


I found the origin of the problem.

It's in XftFontOpenName function I use to generate an XftFont structure that contains an FcPattern.

FC_WEIGHT property of this FcPattern has type double instead of integer.

If I use:


fcValue has type FcTypeDouble , and its value fcValue.u.d is 200,000 , that matches expected integer value for "bold" !

So it's not a fontconfig problem, it's an Xft one !

Thanks for reading


Le 11/09/2019 à 01:35, Lawrence D'Oliveiro a écrit :
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.
Fontconfig mailing list
Fontconfig mailing list

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux