Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / system / ftmanager / globals.h
blob7e5f158f24527c4d86c55b0349f4a4da36efff20
1 #ifndef GLOBALS_H
2 #define GLOBALS_H
4 #include <dos/bptr.h>
6 #define DEBUG_FONTBITMAP(x)
8 #ifdef __AROS__
9 #define dprintf kprintf
10 #endif
12 #ifndef MAKE_ID
13 # define MAKE_ID(a,b,c,d) (((a)<<24)|((b)<<16)|((c)<<8)|(d))
14 #endif
16 #define DEBUG_MAIN(x)
17 #define DEBUG_FONTBITMAP(x)
18 #define DEBUG_FONTINFO(x)
19 #define DEBUG_FONTWINDOW(x)
20 #define DEBUG_ADDDIR(x)
22 #include <ft2build.h>
23 #include FT_FREETYPE_H
24 //#include FT_IMAGE_H
25 //#include FT_RENDER_H
26 //#include FT_OUTLINE_H
27 #include FT_TRUETYPE_TABLES_H
29 #include <freetype/freetype.h>
31 #ifndef OT_GlyphMap8Bit
32 #define OT_GlyphMap8Bit (OT_Level1 | 0x108)
34 #define OT_Spec1_FontFile (OT_Spec1 | OT_Indirect)
35 #define OT_Spec2_CodePage (OT_Level1 | OT_Indirect | 0x102)
36 #define OT_Spec3_AFMFile (OT_Level1 | OT_Indirect | 0x103)
37 #define OT_Spec4_Metric (OT_Level1 | 0x104)
38 #define OT_Spec5_BBox (OT_Level1 | 0x105)
39 #define OT_Spec6_FaceNum (OT_Level1 | 0x106) // index for .ttc files
40 #define OT_Spec7_BMSize (OT_Level1 | 0x107) // embbeded bitmap size
42 // Values for OT_Spec4_Metric
43 #define METRIC_GLOBALBBOX 0 // default
44 #define METRIC_RAW_EM 1
45 #define METRIC_ASCEND 2
46 #define METRIC_TYPOASCEND 3
47 #define METRIC_USWINASCEND 4
48 #define METRIC_CUSTOMBBOX 5
49 #define METRIC_BMSIZE 6
50 #endif
52 #define UFHN(func) ((IPTR (*)())&func)
54 #ifndef __AROS__
56 #define UFH2(rt, func, p1, p2) \
57 rt func(void); \
58 struct EmulLibEntry func##Gate = { TRAP_LIB, 0, (void (*)(void)) func }; \
59 rt func(void) \
60 { \
61 p1; \
62 p2;
64 #define UFH3(rt, func, p1, p2, p3) \
65 rt func(void); \
66 struct EmulLibEntry func##Gate = { TRAP_LIB, 0, (void (*)(void)) func }; \
67 rt func(void) \
68 { \
69 p1; \
70 p2; \
71 p3;
73 #endif
75 extern BPTR destdir;
76 extern UWORD codepage[256];
78 BOOL IsDefaultCodePage(void);
79 FT_Library ftlibrary;
81 #endif