I tried your font changing solution to alter the font for my gtk3
application. I was unable to change the font by putting gtk-font-name
in settings.ini regardless of where I put that file or the value of the
environment variable XDG_CONFIG_HOME... or the actual font name. I
found this to be true on both MAC OS X (Yosemite 1010, Gtk3 and Gtkmm3
built with jhbuild) and on my Linux Ubuntu box.
I can change the font for specific widgets, as I mentioned previously,
using the override_font method of Gtk::Widget in Gtkmm.
This is not an actual problem for me as I like the fonts that I am
getting. But I just thought that I would mention that there is still
some magic going on that I, for one, do not understand.
jim... Jim Charlton
On 15-02-25 10:35 PM, Roger Davis wrote:
So I finally have my problem fully solved for now, and here is a
summary of the pertinent points. Beware that some of this may only
apply to the MacPorts install of gtk3, I have no experience with any
other type of gtk3 install on MacOS.
(1) I had to set my XDG_CONFIG_HOME environment variable to a
directory of my own creation containing the file gtk-3.0/settings.ini.
The contents of the latter are
gtk-application-prefer-dark-theme = false
gtk-theme-name = Adwaita
gtk-icon-theme-name = Adwaita
gtk-font-name = Cantarell 12
Use the gtk-font-name to specify a font name and size of your choice,
but the named font must be MacOS-managed, not X11/fontconfig-managed!
Meaning, if you were to open up the MacOS FontBook app you should see
it listed there.
You may be able to set XDG_CONFIG_HOME to any gtk3-installed theme
directory, e.g., /opt/local/share/themes/HighContrast, but whatever
font is being used by that theme (or by default) must be similarly
(2) If you want to use a font that is not already managed by MacOS
(e.g., Cantarell or any other gtk-ish font not already available in
native MacOS), you must install it in one of two ways. You can use
FontBook as recommended by many web sources, but I could not find any
way to install my fonts in that manner so as to be visible to all
userIDs. To do the latter I had to manually use the Finder to drag the
desired .ttf file(s) into /Library/Fonts. See
http://support.apple.com/en-us/HT201722 for more information.
(3 -- Free Bonus!) Unless you are using a direct gtk-on-Quartz
implementation (in which case, please tell me if that's working well
and, if so, how you made it so), you will very likely be using the
XQuartz X11 server. I have been having intermittent problems with
XQuartz startup when invoking various X11 clients, the problem being
that occasionally X11 windows are mapped to the display in an
unmanaged state (meaning without the MacOS window titlebar and its
close/iconify/etc. buttons and with no way to move the window anywhere
else on the display). This does not happen often but it's far from
rare. When it does happen, it takes XQuartz a *very* long time to
start (tens of seconds). This problem has been reported by other users
but I have never seen any clear fix, and I have seen one fix that did
not work for me at all (changing a Mission Control setting). In my
case (and probably all the others), the quartz-wm window manager
either died or was just never started. Fortunately for me at least,
however, I have so far been able to fix this problem just by manually
(re?)starting the window manager with
% quartz-wm &
May my luck continue and yours be as good, because this is a truly
I hope others find these tips helpful, and thanks again to the list
members who helped me grope my way to these solutions!
gtk-app-devel-list mailing list
gtk-app-devel-list mailing list