From: Tetsumi <tetsumi@protonmail.com>
To: "36028@debbugs.gnu.org" <36028@debbugs.gnu.org>
Subject: bug#36028: A native module
Date: Tue, 04 Jun 2019 17:45:10 +0000 [thread overview]
Message-ID: <ITTbY7w6c8IBAYvXXYAzNtC_u9vXzW0beJL6WAOgZkaUveluc9Q_lLX7WBUkKoN1x0MNyrxpL2s0TsyB_zfeqI6jWXNijOMspHYxQEtKTyc=@protonmail.com> (raw)
In-Reply-To: <L4ZQK7EcdZVZA1igjuxCgi1eq4rBGmS7ungdZdZfmfaOCXlIySK3EDyVGXchTRQglKy2CWj0p-bXDDVOcGDePD86dbCAv6ESkY2-W6kKeao=@protonmail.com>
[-- Attachment #1: Type: text/plain, Size: 1077 bytes --]
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.
[-- Attachment #2: Type: text/html, Size: 1545 bytes --]
next prev parent reply other threads:[~2019-06-04 17:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-31 13:32 bug#36028: 26.2; Some faces are ignoring rendering settings in fontconfig pattern Tetsumi
2019-06-04 17:45 ` Tetsumi [this message]
2019-06-04 18:31 ` bug#36028: A native module Eli Zaretskii
2021-06-22 14:21 ` bug#36028: 26.2; Some faces are ignoring rendering settings in fontconfig pattern Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='ITTbY7w6c8IBAYvXXYAzNtC_u9vXzW0beJL6WAOgZkaUveluc9Q_lLX7WBUkKoN1x0MNyrxpL2s0TsyB_zfeqI6jWXNijOMspHYxQEtKTyc=@protonmail.com' \
--to=tetsumi@protonmail.com \
--cc=36028@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).