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.

Full log


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)]

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

Previous Next


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