Thanks, Jim, your hint on setting XDG_CONFIG_HOME led me to a bunch of
other useful info on the web that I have been slogging through all morning
now. I have had some success but am still far from the finish line.
On my Mac, if I set XDG_CONFIG_HOME to
/opt/local/share/themes/HighContrast, which is where MacPorts dumped the
HighContrast theme, and which contains a gtk-3.0 subdirectory with the
files gtk.css, gtk.gresource and settings.ini, my app successfully loads
the HighContrast theme, although I still have the same font problems
within my GtkTextView windows.
Similarly, I can make my own settings.ini file in ~/gtksettings/gtk-3.0,
set XDG_CONFIG_HOME to ~/gtksettings, and my app processes that file, but
again with the same font issues. That file contains a line of the form
gtk-font-name = fontname fontsize
gtk-font-name = Sans 10
and I can tweak the fontsize value and successfully get the altered font
size in my app. However, absolutely nothing that I do to the fontname
results in the use of a different font. In fact,
gtk-font-name = FontConfusion 10
still loads exactly the same font!
So, I am now convinced this is some kind of font installation or
configuration problem. I am guessing that my MacOS gtk3 can't find any
fonts whatsoever except for this exceptionally unintelligent fallback font
it seems to be using. Does anyone know where gtk3 is looking for its
fonts? I've spent quite a while looking for font files on my CentOS 7
system where I'm not having font problems, and actually can't find many
there anywhere! Can anyone give me a reference to some decent
documentation on where gtk3 font management that describes how to name
fonts with the gtk-font-name property and how that name is associated
with an actual font file? I sure have not been able to find any on my own!
I found (eventually) that I could do the same on the Mac if I set the
environment variable XDG_CONFIG_HOME=/path/to/theme/gtk-3.0/ (I am not
sure where your themes are installed using MacPorts. Perhaps
/usr/share/themes/Ambiance or whatever). prior to executing the program.
The selected (and perhaps edited) theme is then used over the embedded
default. If memory serves me correctly... I was able to copy themes from
Linux to the Mac and use them.
jim... JIm Charlton
gtk-app-devel-list mailing list