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

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

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

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

In

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

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

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

does interpret it as point size.

Apart from that both

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

and

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

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

The following does work as expected:

  emacs -Q --font=Hack-11.1