X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fgtkfont.h;h=71060205e034cfd095d02a6b1472679ff754efd2;hb=095072fa46b2d7b8beafaddb2f873d2f500a1e10;hp=b56640c5b7bdefc976729a9e9f9751fc3ca3c2c5;hpb=f750a185873eba65f0fbb95dce204b0941f3cc25;p=PuTTY.git diff --git a/unix/gtkfont.h b/unix/gtkfont.h index b56640c5..71060205 100644 --- a/unix/gtkfont.h +++ b/unix/gtkfont.h @@ -29,6 +29,23 @@ #define DRAW_TEXT_CAIRO #endif +#if GTK_CHECK_VERSION(3,0,0) || defined GDK_DISABLE_DEPRECATED +/* + * Where the facility is available, we prefer to render text on to a + * persistent server-side pixmap, and redraw windows by simply + * blitting rectangles of that pixmap into them as needed. This is + * better for performance since we avoid expensive font rendering + * calls where possible, and it's particularly good over a non-local X + * connection because the response to an expose event can now be a + * very simple rectangle-copy operation rather than a lot of fiddly + * drawing or bitmap transfer. + * + * However, GTK is deprecating the use of server-side pixmaps, so we + * have to disable this mode under some circumstances. + */ +#define NO_BACKING_PIXMAPS +#endif + /* * Exports from gtkfont.c. */ @@ -119,6 +136,15 @@ void unifont_destroy(unifont *font); void unifont_draw_text(unifont_drawctx *ctx, unifont *font, int x, int y, const wchar_t *string, int len, int wide, int bold, int cellwidth); +/* Same as unifont_draw_text, but expects 'string' to contain one + * normal char plus combining chars, and overdraws them all in the + * same character cell. */ +void unifont_draw_combining(unifont_drawctx *ctx, unifont *font, + int x, int y, const wchar_t *string, int len, + int wide, int bold, int cellwidth); +/* Return a name that will select a bigger/smaller font than this one, + * or NULL if no such name is available. */ +char *unifont_size_increment(unifont *font, int increment); /* * This function behaves exactly like the low-level unifont_create,