X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fgtkfont.c;h=9b655e4436345331206ba58010c15d12d491785f;hb=095072fa46b2d7b8beafaddb2f873d2f500a1e10;hp=172475e702be39d901509367b1b36a30f6d5fd77;hpb=1a51771720f8263e138e67ba68b97549361ed340;p=PuTTY.git diff --git a/unix/gtkfont.c b/unix/gtkfont.c index 172475e7..9b655e44 100644 --- a/unix/gtkfont.c +++ b/unix/gtkfont.c @@ -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); }