Navit SVN

/work/compile/navit/src/navit/font/freetype/font_freetype.h

00001 
00019 struct font_freetype_font;
00020 struct font_freetype_glyph;
00021 
00022 struct font_freetype_methods {
00023         struct font_freetype_font *(*font_new) (struct graphics_priv * gr,
00024                                                 struct
00025                                                 graphics_font_methods *
00026                                                 meth, char *font, int size,
00027                                                 int flags);
00028         void (*get_text_bbox) (struct graphics_priv * gr,
00029                                struct font_freetype_font * font,
00030                                char *text, int dx, int dy,
00031                                struct point * ret, int estimate);
00032         struct font_freetype_text *(*text_new) (char *text,
00033                                                 struct font_freetype_font *
00034                                                 font, int dx, int dy);
00035         void (*text_destroy) (struct font_freetype_text * text);
00036         int (*get_shadow) (struct font_freetype_glyph * glyph,
00037                            unsigned char *data, int depth, int stride, struct color *fg, struct color *tr);
00038         int (*get_glyph) (struct font_freetype_glyph * glyph,
00039                            unsigned char *data, int depth, int stride,
00040                            struct color * fg, struct color * bg, struct color *tr);
00041 };
00042 
00043 struct font_freetype_glyph {
00044         int x, y, w, h, dx, dy;
00045         unsigned char *pixmap;
00046 };
00047 
00048 struct font_freetype_text {
00049         int x1, y1;
00050         int x2, y2;
00051         int x3, y3;
00052         int x4, y4;
00053         int glyph_count;
00054         struct font_freetype_glyph *glyph[0];
00055 };