1 /* Interface definition for Mac OSX Core text font backend.
2 Copyright (C) 2009-2015 Free Software Foundation, Inc.
4 This file is part of GNU Emacs.
6 GNU Emacs is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 GNU Emacs is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19 Original author: YAMAMOTO Mitsuharu
22 /* Structure used by Mac `shape' functions for storing layout
23 information for each glyph. */
24 struct mac_glyph_layout
26 /* Range of indices of the characters composed into the group of
27 glyphs that share the cursor position with this glyph. The
28 members `location' and `length' are in UTF-16 indices. */
31 /* UTF-16 index in the source string for the first character
32 associated with this glyph. */
35 /* Horizontal and vertical adjustments of glyph position. The
36 coordinate space is that of Core Text. So, the `baseline_delta'
37 value is negative if the glyph should be placed below the
39 CGFloat advance_delta
, baseline_delta
;
41 /* Typographical width of the glyph. */
44 /* Glyph ID of the glyph. */
48 #if MAC_OS_X_VERSION_MAX_ALLOWED < 1080
50 kCTFontTraitItalic
= kCTFontItalicTrait
,
51 kCTFontTraitBold
= kCTFontBoldTrait
,
52 kCTFontTraitMonoSpace
= kCTFontMonoSpaceTrait
,
53 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
54 kCTFontTraitColorGlyphs
= kCTFontColorGlyphsTrait
56 kCTFontTraitColorGlyphs
= (1 << 13)
61 kCTCharacterCollectionIdentityMapping
= kCTIdentityMappingCharacterCollection
,
62 kCTCharacterCollectionAdobeJapan1
= kCTAdobeJapan1CharacterCollection
66 kCTFontOrientationDefault
= kCTFontDefaultOrientation
71 #define mac_font_get_glyph_for_cid mac_ctfont_get_glyph_for_cid
74 #ifndef kCTVersionNumber10_9
75 #define kCTVersionNumber10_9 0x00060000
77 #define MAC_FONT_CHARACTER_SET_STRING_ATTRIBUTE \
78 (CFSTR ("MAC_FONT_CHARACTER_SET_STRING_ATTRIBUTE"))
80 typedef const struct _EmacsScreenFont
*ScreenFontRef
; /* opaque */
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);