# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1611710866 0 # Node ID 5f1677cc32e9ea6d5bb5c2feead0c6876b51df03 # Parent 7cd64f66f1ccac961759f4e24fb433541276bf8c GTK3: Switch back to Pango syntax for older GTK versions. The GTK 3.19 change notes indicate every widget was converted to CSS. So enabling CSS support for 3.20 or higher... may need further testing to be sure about the version support. diff -r 7cd64f66f1cc -r 5f1677cc32e9 gtk3/dw.c --- a/gtk3/dw.c Tue Jan 26 11:02:43 2021 +0000 +++ b/gtk3/dw.c Wed Jan 27 01:27:46 2021 +0000 @@ -2687,7 +2687,7 @@ free(oldfont); } -/* Convert DW style font to CSS syntax: +/* Convert DW style font to CSS syntax (or Pango for older versions): * font: font-style font-variant font-weight font-size/line-height font-family */ char *_convert_font(const char *font) @@ -2697,18 +2697,24 @@ if(font) { char *name = strchr(font, '.'); +#if GTK_CHECK_VERSION(3,20,0) char *Italic = strstr(font, " Italic"); char *Bold = strstr(font, " Bold"); +#endif /* Detect Dynamic Windows style font name... * Format: ##.Fontname - * and convert to a Pango name + * and convert to CSS or Pango syntax */ if(name && (name++) && isdigit(*font)) { int size = atoi(font); - newfont = g_strdup_printf("%s normal %s %dpx %s", Italic ? "italic " : "normal", +#if GTK_CHECK_VERSION(3,20,0) + newfont = g_strdup_printf("%s normal %s %dpx \"%s\"", Italic ? "italic " : "normal", Bold ? "bold " : "normal", size, name); +#else + newfont = g_strdup_printf("%s %d", name, size); +#endif } } return newfont;