4 * Copyright (c) Tuomo Valkonen 1999-2009.
6 * See the included file LICENSE for details.
12 #include <ioncore/common.h>
13 #include <ioncore/gr.h>
21 #define DE_RESET_FONT_EXTENTS(FNTE) \
22 {(FNTE)->max_height=0; (FNTE)->max_width=0; (FNTE)->baseline=0;}
28 XFontStruct
*fontstruct
;
32 extern bool de_load_font_for_style(DEStyle
*style
, const char *fontname
);
33 extern bool de_set_font_for_style(DEStyle
*style
, DEFont
*font
);
34 extern DEFont
*de_load_font(const char *fontname
);
35 extern void de_free_font(DEFont
*font
);
37 extern void debrush_draw_string(DEBrush
*brush
, int x
, int y
,
38 const char *str
, int len
, bool needfill
);
39 extern void debrush_do_draw_string(DEBrush
*brush
, int x
, int y
,
40 const char *str
, int len
, bool needfill
,
41 DEColourGroup
*colours
);
42 extern void debrush_do_draw_string_default(DEBrush
*brush
, int x
, int y
,
43 const char *str
, int len
,
45 DEColourGroup
*colours
);
47 extern void debrush_get_font_extents(DEBrush
*brush
, GrFontExtents
*fnte
);
49 extern uint
debrush_get_text_width(DEBrush
*brush
, const char *text
, uint len
);
51 extern uint
defont_get_text_width(DEFont
*font
, const char *text
, uint len
);
52 extern void defont_get_font_extents(DEFont
*font
, GrFontExtents
*fnte
);
54 #endif /* ION_DE_FONT_H */