1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 struct mac_glyph_layout
25 {
26
27
28
29 CFRange comp_range;
30
31
32
33 CFIndex string_index;
34
35
36
37
38
39 CGFloat advance_delta, baseline_delta;
40
41
42 CGFloat advance;
43
44
45 CGGlyph glyph_id;
46 };
47
48 #if MAC_OS_X_VERSION_MAX_ALLOWED < 1080
49 enum {
50 kCTFontTraitItalic = kCTFontItalicTrait,
51 kCTFontTraitBold = kCTFontBoldTrait,
52 kCTFontTraitMonoSpace = kCTFontMonoSpaceTrait,
53 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
54 kCTFontTraitColorGlyphs = kCTFontColorGlyphsTrait
55 #else
56 kCTFontTraitColorGlyphs = (1 << 13)
57 #endif
58 };
59
60 enum {
61 kCTCharacterCollectionIdentityMapping = kCTIdentityMappingCharacterCollection,
62 kCTCharacterCollectionAdobeJapan1 = kCTAdobeJapan1CharacterCollection
63 };
64
65 enum {
66 kCTFontOrientationDefault = kCTFontDefaultOrientation
67 };
68 #endif
69
70 #if USE_CT_GLYPH_INFO
71 #define mac_font_get_glyph_for_cid mac_ctfont_get_glyph_for_cid
72 #endif
73
74 #ifndef kCTVersionNumber10_9
75 #define kCTVersionNumber10_9 0x00060000
76 #endif
77 #define MAC_FONT_CHARACTER_SET_STRING_ATTRIBUTE \
78 (CFSTR ("MAC_FONT_CHARACTER_SET_STRING_ATTRIBUTE"))
79
80 typedef const struct _EmacsScreenFont *ScreenFontRef;
81
82 extern void mac_register_font_driver (struct frame *f);
83 extern void *macfont_get_nsctfont (struct font *font);
84 extern void macfont_update_antialias_threshold (void);
85
86
87 extern void CGContextSetFontSmoothingStyle(CGContextRef, int)
88 __attribute__((weak_import));