1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00
putty-source/unix/gtkfont.h
Simon Tatham debbee0fe4 Implemented a Pango back end. GTK 2 PuTTY can now switch seamlessly
back and forth between X fonts and Pango fonts, provided you're
willing to type in the names of the former by hand.

[originally from svn r7937]
2008-03-22 18:11:17 +00:00

47 lines
1.3 KiB
C

/*
* Header file for gtkfont.c. Has to be separate from unix.h
* because it depends on GTK data types, hence can't be included
* from cross-platform code (which doesn't go near GTK).
*/
#ifndef PUTTY_GTKFONT_H
#define PUTTY_GTKFONT_H
/*
* Exports from gtkfont.c.
*/
struct unifont_vtable; /* contents internal to gtkfont.c */
typedef struct unifont {
const struct unifont_vtable *vt;
/*
* `Non-static data members' of the `class', accessible to
* external code.
*/
/*
* public_charset is the charset used when the user asks for
* `Use font encoding'.
*
* real_charset is the charset used when translating text into
* a form suitable for sending to unifont_draw_text().
*
* They can differ. For example, public_charset might be
* CS_ISO8859_1 while real_charset is CS_ISO8859_1_X11.
*/
int public_charset, real_charset;
/*
* Font dimensions needed by clients.
*/
int width, height, ascent, descent;
} unifont;
unifont *unifont_create(GtkWidget *widget, char *name, int wide, int bold,
int shadowoffset, int shadowalways);
void unifont_destroy(unifont *font);
void unifont_draw_text(GdkDrawable *target, GdkGC *gc, unifont *font,
int x, int y, const char *string, int len,
int wide, int bold, int cellwidth);
#endif /* PUTTY_GTKFONT_H */