]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Don't use "server:fixed" as the default font without X.
authorSimon Tatham <anakin@pobox.com>
Mon, 31 Aug 2015 12:24:09 +0000 (13:24 +0100)
committerSimon Tatham <anakin@pobox.com>
Mon, 31 Aug 2015 12:24:09 +0000 (13:24 +0100)
If we're not supporting server-side fonts, it's utterly silly to set
one as the default! Instead, we use Pango's guarantee that some
reasonably sensible monospaced font will be made available under the
name "Monospace", and use that at a reasonable default size of 12pt.

unix/gtkfont.c
unix/gtkwin.c
unix/unix.h

index 1a9860ab0eee5c14216365d7c7daed9d9055fcac..82c0dafaf7d942b6c6ee668de30ee7b841d35381 100644 (file)
@@ -3392,7 +3392,7 @@ void unifontsel_set_name(unifontsel *fontsel, const char *fontname)
      * Provide a default if given an empty or null font name.
      */
     if (!fontname || !*fontname)
-       fontname = "server:fixed";
+       fontname = DEFAULT_GTK_FONT;
 
     /*
      * Call the canonify_fontname function.
index 69535c36308da3f1a0324ebcf1868d0cd2f3897d..3c0ac10dd65c508030b0ed43c013180af797196b 100644 (file)
@@ -184,7 +184,7 @@ void connection_fatal(void *frontend, const char *p, ...)
 FontSpec *platform_default_fontspec(const char *name)
 {
     if (!strcmp(name, "Font"))
-       return fontspec_new("server:fixed");
+       return fontspec_new(DEFAULT_GTK_FONT);
     else
         return fontspec_new("");
 }
index 90922451797a9f41491cdee5be1282c8177a10fd..36bf02bb8b5c9c24381782f21f56495e49fe620c 100644 (file)
@@ -210,4 +210,13 @@ extern Backend serial_backend;
  */
 int so_peercred(int fd, int *pid, int *uid, int *gid);
 
+/*
+ * Default font setting, which can vary depending on NOT_X_WINDOWS.
+ */
+#ifdef NOT_X_WINDOWS
+#define DEFAULT_GTK_FONT "client:Monospace 12"
+#else
+#define DEFAULT_GTK_FONT "server:fixed"
+#endif
+
 #endif