GNU bug report logs - #36028
26.2; Some faces are ignoring rendering settings in fontconfig pattern

Previous Next

Package: emacs;

Reported by: Tetsumi <tetsumi <at> protonmail.com>

Date: Fri, 31 May 2019 14:38:01 UTC

Severity: normal

Found in version 26.2

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36028 in the body.
You can then email your comments to 36028 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#36028; Package emacs. (Fri, 31 May 2019 14:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tetsumi <tetsumi <at> protonmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 31 May 2019 14:38:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tetsumi <tetsumi <at> protonmail.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 26.2; Some faces are ignoring rendering settings in fontconfig pattern
Date: Fri, 31 May 2019 13:32:46 +0000
[Message part 1 (text/plain, inline)]
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.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36028; Package emacs. (Tue, 04 Jun 2019 18:04:01 GMT) Full text and rfc822 format available.

Message #8 received at 36028 <at> debbugs.gnu.org (full text, mbox):

From: Tetsumi <tetsumi <at> protonmail.com>
To: "36028 <at> debbugs.gnu.org" <36028 <at> debbugs.gnu.org>
Subject: A native module
Date: Tue, 04 Jun 2019 17:45:10 +0000
[Message part 1 (text/plain, inline)]
To overcome this problem i made a native module to configure Xft from emacs:
https://bitbucket.org/Tetsumi/emacs-xft-config/src/master/

Here a demo (webm video): https://webm.red/3Mr9.webm

Please consider adding two procedures in emacs's xftfont.c to set/get the default pattern of Xft, that would give the user total control on font settings.

To get the current default pattern of Xft:

   FcPattern *pat = FcPatternCreate(); // create an empty Font-Config pattern.
   XftDefaultSubstitute(XDisplay, XScreen, pat); // add current defaults for any options not already present in pat. This also add the current defaults from Font-Config
   FcChar8 *ps = FcNameUnparse(pat); // convert pattern to string
   FcPatternDestroy(pat); // free pat.

The set a new default pattern:

   FcPattern *pat = FcNameParse(buf); // create a Font-Config pattern from a string (eg: ":antialias=false;pixelsize=48")
   XftDefaultSubstitute(XDisplay, XScreen, pat); // see above
   XftDefaultSet(XDisplay, pat); // set pat as the new default pattern
// don't destroy pat! xft takes care ot that.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36028; Package emacs. (Tue, 04 Jun 2019 18:32:01 GMT) Full text and rfc822 format available.

Message #11 received at 36028 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tetsumi <tetsumi <at> protonmail.com>
Cc: 36028 <at> debbugs.gnu.org
Subject: Re: bug#36028: A native module
Date: Tue, 04 Jun 2019 21:31:23 +0300
> Date: Tue, 04 Jun 2019 17:45:10 +0000
> From: Tetsumi <tetsumi <at> protonmail.com>
> 
> To overcome this problem i made a native module to configure Xft from emacs:
> https://bitbucket.org/Tetsumi/emacs-xft-config/src/master/
> 
> Here a demo (webm video): https://webm.red/3Mr9.webm
> 
> Please consider adding two procedures in emacs's xftfont.c to set/get the default pattern of Xft, that would
> give the user total control on font settings.

Thanks.  However, I wonder whether we should invest too much effort in
developing for Xft, as I understand it isn't in active development,
see https://cgit.freedesktop.org/xorg/lib/libXft/.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36028; Package emacs. (Tue, 22 Jun 2021 14:23:02 GMT) Full text and rfc822 format available.

Message #14 received at 36028 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 36028 <at> debbugs.gnu.org, Tetsumi <tetsumi <at> protonmail.com>
Subject: Re: bug#36028: 26.2; Some faces are ignoring rendering settings in
 fontconfig pattern
Date: Tue, 22 Jun 2021 16:21:51 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> Thanks.  However, I wonder whether we should invest too much effort in
> developing for Xft, as I understand it isn't in active development,
> see https://cgit.freedesktop.org/xorg/lib/libXft/.

This was two years ago, and while there does seem to have been some Xft
commits since then, it seems pretty lethargic.

So I think the conclusion here is that we probably don't want to expand
upon Emacs Xft capabilities in-core, so I'm closing this bug report.
But packaging this up as an ELPA package might be useful for somebody.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 36028 <at> debbugs.gnu.org and Tetsumi <tetsumi <at> protonmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 22 Jun 2021 14:23:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 21 Jul 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 336 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.