1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-27 10:12:24 +00:00

GTK: fixes to the previous font fallback patch.

I'd forgotten that I'd already chosen a default client-side font, for
NOT_X_WINDOWS builds. I should have made the two defaults match! Now
both default font names are defined in the header file.
This commit is contained in:
Simon Tatham 2025-01-10 08:15:11 +00:00
parent b088d77d58
commit 7f4cccde2a
2 changed files with 15 additions and 5 deletions

View File

@ -394,12 +394,22 @@ void setup_fd_socket(Socket *s, int infd, int outfd, int inerrfd);
void fd_socket_set_psb_prefix(Socket *s, const char *prefix);
/*
* Default font setting, which can vary depending on NOT_X_WINDOWS.
* Default font settings. We have a default font for each of
* client-side and server-side, so that we can use one of each as a
* 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.
*/
#define DEFAULT_GTK_CLIENT_FONT "client:Monospace 12"
#define DEFAULT_GTK_SERVER_FONT "server:fixed"
#ifdef NOT_X_WINDOWS
#define DEFAULT_GTK_FONT "client:Monospace 12"
#define DEFAULT_GTK_FONT DEFAULT_GTK_CLIENT_FONT
#else
#define DEFAULT_GTK_FONT "server:fixed"
#define DEFAULT_GTK_FONT DEFAULT_GTK_SERVER_FONT
#endif
/*

View File

@ -5361,8 +5361,8 @@ void new_session_window(Conf *conf, const char *geometry_string)
goto fonts_ok;
static const char *const fallbacks[] = {
"client:Monospace 10",
"server:fixed",
DEFAULT_GTK_CLIENT_FONT,
DEFAULT_GTK_SERVER_FONT,
};
for (size_t i = 0; i < lenof(fallbacks); i++) {
Conf *fallback_conf = conf_new();