]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - unix/gtkfont.c
A bunch of further warning fixes in the Windows code.
[PuTTY.git] / unix / gtkfont.c
index 172475e702be39d901509367b1b36a30f6d5fd77..9b655e4436345331206ba58010c15d12d491785f 100644 (file)
@@ -352,8 +352,8 @@ static int x11_font_width(XFontStruct *xfs, int sixteen_bit)
     }
 }
 
-static const XCharStruct *x11_char_struct(XFontStruct *xfs,
-                                          int byte1, int byte2)
+static const XCharStruct *x11_char_struct(
+    XFontStruct *xfs, unsigned char byte1, unsigned char byte2)
 {
     int index;
 
@@ -403,7 +403,8 @@ static const XCharStruct *x11_char_struct(XFontStruct *xfs,
     return &xfs->per_char[index];
 }
 
-static int x11_font_has_glyph(XFontStruct *xfs, int byte1, int byte2)
+static int x11_font_has_glyph(
+    XFontStruct *xfs, unsigned char byte1, unsigned char byte2)
 {
     /*
      * Not to be confused with x11font_has_glyph, which is a method of
@@ -1259,8 +1260,13 @@ static char *x11font_size_increment(unifont *font, int increment)
 
 #undef FLIPPED_SIZE
 
-        if (xlfd_best)
-            returned_name = xlfd_recompose(xlfd_best);
+        if (xlfd_best) {
+            char *bare_returned_name = xlfd_recompose(xlfd_best);
+            returned_name = dupcat(
+                xfont->u.vt->prefix, ":", bare_returned_name,
+                (const char *)NULL);
+            sfree(bare_returned_name);
+        }
 
         XFreeFontNames(fontnames);
         sfree(xlfd);
@@ -2015,7 +2021,8 @@ static char *pangofont_size_increment(unifont *font, int increment)
     } else {
         pango_font_description_set_size(desc, size);
         newname = pango_font_description_to_string(desc);
-        retname = dupstr(newname);
+        retname = dupcat(pfont->u.vt->prefix, ":",
+                         newname, (const char *)NULL);
         g_free(newname);
     }