Subject: bug#36028: 26.2; Some faces are ignoring rendering settings in fontconfig pattern

From: Tetsumi <[email-masked]>
Date: Fri, 31 May 2019 13:32:46 +0000

Hi,

Some faces like 'bold, 'italic, or 'bold-italic are ignoring font rendering settings
when setting a font through a font-config pattern.

For example,

    (set-frame-font "Ubuntu Mono-12:antialias=true:lcdfilter=lcddefault" t nil)

The settings antialias and lcdfilter have no effect on the aforementioned faces.
Another more explicit example,

    ; alternating between these two lines turns on/off aliasing for the default face
    (set-face-font 'default "Ubuntu Mono-12:antialias=true:lcdfilter=lcddefault")
    (set-face-font 'default "Ubuntu Mono-12:antialias=false:lcdfilter=lcdnone")

    ; alternating between these two lines has no effect at all.
    (set-face-font 'bold "Ubuntu Mono-12:bold:antialias=true:lcdfilter=lcddefault")
    (set-face-font 'bold "Ubuntu Mono-12:bold:antialias=false:lcdfilter=lcdnone")

It shall be noted that Xresources settings (eg: Xft.antialias) are not ignored by the
aforementioned faces.