* bug#36028: 26.2; Some faces are ignoring rendering settings in fontconfig pattern
@ 2019-05-31 13:32 Tetsumi
2019-06-04 17:45 ` bug#36028: A native module Tetsumi
0 siblings, 1 reply; 4+ messages in thread
From: Tetsumi @ 2019-05-31 13:32 UTC (permalink / raw)
To: 36028
[-- Attachment #1: Type: text/plain, Size: 936 bytes --]
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.
[-- Attachment #2: Type: text/html, Size: 1355 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#36028: A native module
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
2019-06-04 18:31 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Tetsumi @ 2019-06-04 17:45 UTC (permalink / raw)
To: 36028@debbugs.gnu.org
[-- 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 --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#36028: A native module
2019-06-04 17:45 ` bug#36028: A native module Tetsumi
@ 2019-06-04 18:31 ` Eli Zaretskii
2021-06-22 14:21 ` bug#36028: 26.2; Some faces are ignoring rendering settings in fontconfig pattern Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2019-06-04 18:31 UTC (permalink / raw)
To: Tetsumi; +Cc: 36028
> Date: Tue, 04 Jun 2019 17:45:10 +0000
> From: Tetsumi <tetsumi@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/.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#36028: 26.2; Some faces are ignoring rendering settings in fontconfig pattern
2019-06-04 18:31 ` Eli Zaretskii
@ 2021-06-22 14:21 ` Lars Ingebrigtsen
0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-06-22 14:21 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 36028, Tetsumi
Eli Zaretskii <eliz@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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-22 14:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-31 13:32 bug#36028: 26.2; Some faces are ignoring rendering settings in fontconfig pattern Tetsumi
2019-06-04 17:45 ` bug#36028: A native module Tetsumi
2019-06-04 18:31 ` Eli Zaretskii
2021-06-22 14:21 ` bug#36028: 26.2; Some faces are ignoring rendering settings in fontconfig pattern Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.