4 * Copyright (c) Tuomo Valkonen 1999-2007.
6 * Ion is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or
9 * (at your option) any later version.
15 #include <ioncore/common.h>
16 #include <ioncore/gr.h>
24 #define DE_RESET_FONT_EXTENTS(FNTE) \
25 {(FNTE)->max_height=0; (FNTE)->max_width=0; (FNTE)->baseline=0;}
31 XFontStruct *fontstruct;
35 extern bool de_load_font_for_style(DEStyle *style, const char *fontname);
36 extern bool de_set_font_for_style(DEStyle *style, DEFont *font);
37 extern DEFont *de_load_font(const char *fontname);
38 extern void de_free_font(DEFont *font);
40 extern void debrush_draw_string(DEBrush *brush, int x, int y,
41 const char *str, int len, bool needfill);
42 extern void debrush_do_draw_string(DEBrush *brush, int x, int y,
43 const char *str, int len, bool needfill,
44 DEColourGroup *colours);
45 extern void debrush_do_draw_string_default(DEBrush *brush, int x, int y,
46 const char *str, int len,
48 DEColourGroup *colours);
50 extern void debrush_get_font_extents(DEBrush *brush, GrFontExtents *fnte);
52 extern uint debrush_get_text_width(DEBrush *brush, const char *text, uint len);
54 extern uint defont_get_text_width(DEFont *font, const char *text, uint len);
55 extern void defont_get_font_extents(DEFont *font, GrFontExtents *fnte);
57 #endif /* ION_DE_FONT_H */