2 * Navit, a modular navigation system.
3 * Copyright (C) 2005-2011 Navit Team
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
19 struct font_freetype_font;
20 struct font_freetype_glyph;
22 struct font_freetype_methods {
23 struct font_freetype_font *(*font_new) (struct graphics_priv * gr,
25 graphics_font_methods *
26 meth, char *font, int size,
28 void (*get_text_bbox) (struct graphics_priv * gr,
29 struct font_freetype_font * font,
30 char *text, int dx, int dy,
31 struct point * ret, int estimate);
32 struct font_freetype_text *(*text_new) (char *text,
33 struct font_freetype_font *
34 font, int dx, int dy);
35 void (*text_destroy) (struct font_freetype_text * text);
36 int (*get_shadow) (struct font_freetype_glyph * glyph,
37 unsigned char *data, int depth, int stride, struct color *fg, struct color *tr);
38 int (*get_glyph) (struct font_freetype_glyph * glyph,
39 unsigned char *data, int depth, int stride,
40 struct color * fg, struct color * bg, struct color *tr);
43 struct font_freetype_glyph {
44 int x, y, w, h, dx, dy;
45 unsigned char *pixmap;
48 struct font_freetype_text {
54 struct font_freetype_glyph *glyph[0];