Kludge IntelliJ IDEA splash popup to be transient
[notion.git] / de / font.h
blob0775fa11635def5e88f63d6a82aa60eea72ce447
1 /*
2 * notion/de/font.h
4 * Copyright (c) the Notion team 2013
5 * Copyright (c) Tuomo Valkonen 1999-2009.
7 * See the included file LICENSE for details.
8 */
10 #ifndef NOTION_DE_FONT_H
11 #define NOTION_DE_FONT_H
13 #include <ioncore/common.h>
14 #include <ioncore/gr.h>
16 INTRSTRUCT(DEFont);
18 #include "brush.h"
19 #include "colour.h"
20 #include "style.h"
22 #define DE_RESET_FONT_EXTENTS(FNTE) \
23 {(FNTE)->max_height=0; (FNTE)->max_width=0; (FNTE)->baseline=0;}
25 DECLSTRUCT(DEFont){
26 char *pattern;
27 int refcount;
28 XFontSet fontset;
29 XFontStruct *fontstruct;
30 DEFont *next, *prev;
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,
46 bool needfill,
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 */