4 * Copyright (c) Tuomo Valkonen 1999-2006.
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,
43 extern void debrush_do_draw_string(DEBrush *brush, int x, int y,
44 const char *str, int len, bool needfill,
45 DEColourGroup *colours);
46 extern void debrush_do_draw_string_default(DEBrush *brush, int x, int y,
47 const char *str, int len,
49 DEColourGroup *colours);
51 extern void debrush_get_font_extents(DEBrush *brush, GrFontExtents *fnte);
53 extern uint debrush_get_text_width(DEBrush *brush, const char *text, uint len);
55 extern uint defont_get_text_width(DEFont *font, const char *text, uint len);
56 extern void defont_get_font_extents(DEFont *font, GrFontExtents *fnte);
58 #endif /* ION_DE_FONT_H */