4 * Copyright (c) the Notion team 2013
5 * Copyright (c) Tuomo Valkonen 1999-2009.
7 * See the included file LICENSE for details.
10 #ifndef NOTION_DE_FONT_H
11 #define NOTION_DE_FONT_H
13 #include <ioncore/common.h>
14 #include <ioncore/gr.h>
22 #define DE_RESET_FONT_EXTENTS(FNTE) \
23 {(FNTE)->max_height=0; (FNTE)->max_width=0; (FNTE)->baseline=0;}
29 XFontStruct
*fontstruct
;
33 extern const char *de_default_fontname();
34 extern bool de_load_font_for_style(DEStyle
*style
, const char *fontname
);
35 extern bool de_set_font_for_style(DEStyle
*style
, DEFont
*font
);
36 extern DEFont
*de_load_font(const char *fontname
);
37 extern void de_free_font(DEFont
*font
);
39 extern void debrush_draw_string(DEBrush
*brush
, int x
, int y
,
40 const char *str
, int len
, bool needfill
);
41 extern void debrush_do_draw_string(DEBrush
*brush
, int x
, int y
,
42 const char *str
, int len
, bool needfill
,
43 DEColourGroup
*colours
);
44 extern void debrush_do_draw_string_default(DEBrush
*brush
, int x
, int y
,
45 const char *str
, int len
,
47 DEColourGroup
*colours
);
49 extern void debrush_get_font_extents(DEBrush
*brush
, GrFontExtents
*fnte
);
51 extern uint
debrush_get_text_width(DEBrush
*brush
, const char *text
, uint len
);
53 extern uint
defont_get_text_width(DEFont
*font
, const char *text
, uint len
);
54 extern void defont_get_font_extents(DEFont
*font
, GrFontExtents
*fnte
);
56 #endif /* NOTION_DE_FONT_H */