Subject: Re: bug#42240: Interpretation of 'size' Property in Fontconfig Pattern Strings

From: Robert Pluim <[email-masked]>
Date: Thu, 16 Jul 2020 17:03:35 +0200

>>>>> On Tue, 07 Jul 2020 13:25:15 +0200, Sebastian Miele <[email-masked]> said:

    Sebastian> GNU Emacs 27.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20)
    Sebastian> of 2020-06-28

    Sebastian> According to 'man 5 fonts-conf' the Fontconfig property 'size' is a
    Sebastian> double and represents the point size. The property 'pixelsize', too, is
    Sebastian> a double and represents the pixel size.

Is this a build with or without Cairo? (you snipped the part of the
bug report that would have told us)

    Sebastian> In

    Sebastian>   FC_DEBUG=1 emacs -Q --font=:family=Hack:size=11

    Sebastian> the 'size=11' is interpreted as 'pixelsize=11'.

    Sebastian>   fc-match :family=Hack:size=11 size pixelsize

    Sebastian> does interpret it as point size.

    Sebastian> Apart from that both

    Sebastian>   emacs -Q --font=:family=Hack:size=11.1

    Sebastian> and

    Sebastian>   emacs -Q --font=:family=Hack:pixelsize=11.1

    Sebastian> both yield the same error: "invalid font property: (:size . 11\.1)",
    Sebastian> although according to fontconfig the pixel size is a double, too.
    Sebastian> However, fractional pixel sizes may not make sense for Emacs at all. I
    Sebastian> do not know.

    Sebastian> The following does work as expected:

    Sebastian>   emacs -Q --font=Hack-11.1