mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-27 10:12:24 +00:00
GTK: switch the default to client-side fonts.
"server:fixed" was a good default when GTK1 was common and non-X11 environments were rare. Now it's the other way round - Wayland is very common and the GTK1 configuration of PuTTY is legacy - so it's time to make the default GTK font a client-side one. Of course, anyone with an existing saved session (including Default Settings) won't be affected by this change; it only helps new users without an existing ~/.putty at all. That's why we _also_ need the fallbacks introduced by the previous couple of commits. But we can at least start making it sensible for new users. (I considered keeping the #if, and switching it round so that it tests GTK_CHECK_VERSION(2,0,0) rather than NOT_X_WINDOWS, i.e. selects the client-side default whenever client-side fonts _are_ available, instead of only when server-side fonts _aren't_. That way, in GTK1 builds, the Conf default font would _still_ be "server:fixed". But I think this is firstly too marginal to worry about, and secondly, it's more futureproof to make the default the same everywhere: if anyone still stuck on a GTK1 environment later manages to update it, then their saved settings are less likely to have had a legacy thing written into them. And the GTK1 build will still run out of the box because of the last-ditch fallback mechanism I've just added.)
This commit is contained in:
parent
7f4cccde2a
commit
6155365076
@ -399,18 +399,18 @@ void fd_socket_set_psb_prefix(Socket *s, const char *prefix);
|
||||
* fallback, and we also have a single overall default which goes into
|
||||
* Conf to populate the initial state of Default Settings.
|
||||
*
|
||||
* The overall default varies depending on NOT_X_WINDOWS: if X is
|
||||
* available then the default is xterm's traditional "fixed", but if
|
||||
* it's not, so that only client-side fonts can be used at all, we
|
||||
* switch to a client-side default.
|
||||
* In the past, this default varied with NOT_X_WINDOWS. But these days
|
||||
* non-X11 environments like Wayland with only client-side fonts are
|
||||
* common, and even an X11-capable _build_ of PuTTY is quite likely to
|
||||
* find out at run time that X11 and its bitmap fonts aren't
|
||||
* available. Also, a fixed-size bitmap font doesn't play nicely with
|
||||
* high-DPI displays. And the GTK1 build of PuTTY, which can _only_
|
||||
* handle server-side fonts, is legacy. So the default font is
|
||||
* unconditionally the client-side one.
|
||||
*/
|
||||
#define DEFAULT_GTK_CLIENT_FONT "client:Monospace 12"
|
||||
#define DEFAULT_GTK_SERVER_FONT "server:fixed"
|
||||
#ifdef NOT_X_WINDOWS
|
||||
#define DEFAULT_GTK_FONT DEFAULT_GTK_CLIENT_FONT
|
||||
#else
|
||||
#define DEFAULT_GTK_FONT DEFAULT_GTK_SERVER_FONT
|
||||
#endif
|
||||
|
||||
/*
|
||||
* pty.c.
|
||||
|
Loading…
Reference in New Issue
Block a user