GNU bug report logs - #17792
24.3; hintstyle specified via fontconfig is ignored by Emacs

Previous Next

Package: emacs;

Reported by: yynyygy <at> gmail.com

Date: Tue, 17 Jun 2014 03:10:02 UTC

Severity: normal

Found in version 24.3

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: James Cloos <cloos <at> jhcloos.com>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: 17792 <at> debbugs.gnu.org
Subject: bug#17792: 24.3; hintstyle spewcified via fontconfig is ignored by Emacs
Date: Tue, 24 Jun 2014 18:01:52 -0400
>>>>> "JD" == Jan Djärv <jan.h.d <at> swipnet.se> writes:

JD> I don't know if cairo itself reads fonts.conf and/or X resources,
JD> but I suspect it does.

No.  It uses the fontconfig api.

This bug is a side effect of using xft to render fonts.  LibXft has a
routine which edits the font pattern before passing on to libfontconfig;
it adds pattern elements for each of:

  antialias autohint dpi embolden hinting hintstyle lcdfilter
  maxglyphmemory maxunreffonts minspace render rgba scale

based on what it finds in the X Resources.

It always adds a pattern entry for each of those, with a default value
if it doesn't find an explicit X resource.

Fontconfig is written to allow applications to override the default
values specified in/via fonts.conf, on the reasonable theories that users
should be able to tell apps to override them, and that some applications
SHOULD avoid things like hinting, and therefore need a way to do that.

By forcing its own set of defaults, xft blocks any ability to set those
via the xml.

Fixing this will either require changing libxft to avoid adding pattern
elements for which explicit X Resources do not exist, or changing Emacs
to use fontconfig, freetype and XRENDER directly, rather than via xft.

Handa-san's original code supported an fc: prefix for fonts, which was
defined to do the above, but the xft: won out.

-JimC
-- 
James Cloos <cloos <at> jhcloos.com>         OpenPGP: 0x997A9F17ED7DAEA6




This bug report was last modified 4 years and 343 days ago.

Previous Next


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