Replaced GTK3 palette font styling with CSS-compliant properties derived from PangoFontDescription, avoiding the deprecated Pango font: syntax in generated CSS.

Added a GTK3-only helper to translate Pango font fields into font-family, font-size, font-style, font-weight, font-variant, and font-stretch CSS declarations while preserving GTK2 behavior under #if !HAVE_GTK3.
Reused the GTK3 font CSS helper in the main UI font styling path to eliminate remaining Pango font: shorthand usage that triggers GTK3 theme parsing warnings.
Exposed the GTK3 font CSS helper in gtkutil so callers can emit CSS-compliant font properties consistently.
This commit is contained in:
2026-01-31 16:37:15 -07:00
parent d8a8e6ce73
commit 8abc95205a
4 changed files with 159 additions and 18 deletions

View File

@@ -53,6 +53,7 @@ gboolean gtkutil_tray_icon_supported (GtkWindow *window);
#if HAVE_GTK3
void gtkutil_apply_palette (GtkWidget *widget, const GdkRGBA *bg, const GdkRGBA *fg,
const PangoFontDescription *font_desc);
void gtkutil_append_font_css (GString *css, const PangoFontDescription *font_desc);
#else
void gtkutil_apply_palette (GtkWidget *widget, const GdkColor *bg, const GdkColor *fg,
const PangoFontDescription *font_desc);