]> git.eshelyaron.com Git - emacs.git/commit
Use gsettings font rendering entries for pgtk builds
authorPieter van Prooijen <pieter.van.prooijen@teloden.nl>
Sun, 8 May 2022 14:27:38 +0000 (16:27 +0200)
committerPo Lu <luangruo@yahoo.com>
Fri, 13 May 2022 12:52:02 +0000 (20:52 +0800)
commit526e9758de7d163ce3b25fde69a4e122ce9c3742
tree94ef87a41be88f91f76bdeaae27e5cf8eed9c26d
parent784a3bde24be0637646ad0bf22f695c84b8e3e05
Use gsettings font rendering entries for pgtk builds

If present, apply the gsettings font hinting and antialiasing
entries when creating a font in cairo.  Do this at
initialization and when the entries change, re-rendering the
frames.

* src/ftcrfont.c (ftcrfont_open): Use the font_options derived
from gsettings when opening a font.
(ftcrfont_cached_font_ok): Report a cached font as invalid if
its font options differ from the current options inside
gsettings.
* src/xsettings.c (apply_gsettings_font_hinting)
(apply_gsettings_font_alias, apply_gsettings_font_rgba_order):
Convert the settings from GSettings to the cairo_font_options_t
object.
(init_gsettings, something_changed_gsettingsCB): Invoke the
apply functions if the relevant settings changed.
(store_font_options_changed): Store an event to re-render the
fonts.
(xsetting_get_font_options)
* src/xsettings.h (xsettings_get_font_options): New function.
src/ftcrfont.c
src/xsettings.c
src/xsettings.h