1 { CoreGraphics - CGFont.h
2 Copyright (c) 1999-2009 Apple Inc.
3 All rights reserved. }
4 { Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
5 { Pascal Translation Updated: Jonas Maebe, <jonas@freepascal.org>, October 2009 }
6 { Pascal Translation Updated: Jonas Maebe, <jonas@freepascal.org>, October 2012 }
7 {
8 Modified for use with Free Pascal
9 Version 308
10 Please report any bugs to <gpc@microbizz.nl>
11 }
12
13 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
14 {$mode macpas}
15 {$modeswitch cblocks}
16 {$packenum 1}
17 {$macro on}
18 {$inline on}
19 {$calling mwpascal}
20
21 unit CGFont;
22 interface
23 {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
24 {$setc GAP_INTERFACES_VERSION := $0308}
25
26 {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
27 {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
28 {$endc}
29
30 {$ifc defined CPUPOWERPC and defined CPUI386}
31 {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
32 {$endc}
33 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
34 {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
35 {$endc}
36
37 {$ifc not defined __ppc__ and defined CPUPOWERPC32}
38 {$setc __ppc__ := 1}
39 {$elsec}
40 {$setc __ppc__ := 0}
41 {$endc}
42 {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
43 {$setc __ppc64__ := 1}
44 {$elsec}
45 {$setc __ppc64__ := 0}
46 {$endc}
47 {$ifc not defined __i386__ and defined CPUI386}
48 {$setc __i386__ := 1}
49 {$elsec}
50 {$setc __i386__ := 0}
51 {$endc}
52 {$ifc not defined __x86_64__ and defined CPUX86_64}
53 {$setc __x86_64__ := 1}
54 {$elsec}
55 {$setc __x86_64__ := 0}
56 {$endc}
57 {$ifc not defined __arm__ and defined CPUARM}
58 {$setc __arm__ := 1}
59 {$elsec}
60 {$setc __arm__ := 0}
61 {$endc}
62 {$ifc not defined __arm64__ and defined CPUAARCH64}
63 {$setc __arm64__ := 1}
64 {$elsec}
65 {$setc __arm64__ := 0}
66 {$endc}
67
68 {$ifc defined cpu64}
69 {$setc __LP64__ := 1}
70 {$elsec}
71 {$setc __LP64__ := 0}
72 {$endc}
73
74
75 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
76 {$error Conflicting definitions for __ppc__ and __i386__}
77 {$endc}
78
79 {$ifc defined __ppc__ and __ppc__}
80 {$setc TARGET_CPU_PPC := TRUE}
81 {$setc TARGET_CPU_PPC64 := FALSE}
82 {$setc TARGET_CPU_X86 := FALSE}
83 {$setc TARGET_CPU_X86_64 := FALSE}
84 {$setc TARGET_CPU_ARM := FALSE}
85 {$setc TARGET_CPU_ARM64 := FALSE}
86 {$setc TARGET_OS_MAC := TRUE}
87 {$setc TARGET_OS_IPHONE := FALSE}
88 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
89 {$setc TARGET_OS_EMBEDDED := FALSE}
90 {$elifc defined __ppc64__ and __ppc64__}
91 {$setc TARGET_CPU_PPC := FALSE}
92 {$setc TARGET_CPU_PPC64 := TRUE}
93 {$setc TARGET_CPU_X86 := FALSE}
94 {$setc TARGET_CPU_X86_64 := FALSE}
95 {$setc TARGET_CPU_ARM := FALSE}
96 {$setc TARGET_CPU_ARM64 := FALSE}
97 {$setc TARGET_OS_MAC := TRUE}
98 {$setc TARGET_OS_IPHONE := FALSE}
99 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
100 {$setc TARGET_OS_EMBEDDED := FALSE}
101 {$elifc defined __i386__ and __i386__}
102 {$setc TARGET_CPU_PPC := FALSE}
103 {$setc TARGET_CPU_PPC64 := FALSE}
104 {$setc TARGET_CPU_X86 := TRUE}
105 {$setc TARGET_CPU_X86_64 := FALSE}
106 {$setc TARGET_CPU_ARM := FALSE}
107 {$setc TARGET_CPU_ARM64 := FALSE}
108 {$ifc defined iphonesim}
109 {$setc TARGET_OS_MAC := FALSE}
110 {$setc TARGET_OS_IPHONE := TRUE}
111 {$setc TARGET_IPHONE_SIMULATOR := TRUE}
112 {$elsec}
113 {$setc TARGET_OS_MAC := TRUE}
114 {$setc TARGET_OS_IPHONE := FALSE}
115 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
116 {$endc}
117 {$setc TARGET_OS_EMBEDDED := FALSE}
118 {$elifc defined __x86_64__ and __x86_64__}
119 {$setc TARGET_CPU_PPC := FALSE}
120 {$setc TARGET_CPU_PPC64 := FALSE}
121 {$setc TARGET_CPU_X86 := FALSE}
122 {$setc TARGET_CPU_X86_64 := TRUE}
123 {$setc TARGET_CPU_ARM := FALSE}
124 {$setc TARGET_CPU_ARM64 := FALSE}
125 {$ifc defined iphonesim}
126 {$setc TARGET_OS_MAC := FALSE}
127 {$setc TARGET_OS_IPHONE := TRUE}
128 {$setc TARGET_IPHONE_SIMULATOR := TRUE}
129 {$elsec}
130 {$setc TARGET_OS_MAC := TRUE}
131 {$setc TARGET_OS_IPHONE := FALSE}
132 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
133 {$endc}
134 {$setc TARGET_OS_EMBEDDED := FALSE}
135 {$elifc defined __arm__ and __arm__}
136 {$setc TARGET_CPU_PPC := FALSE}
137 {$setc TARGET_CPU_PPC64 := FALSE}
138 {$setc TARGET_CPU_X86 := FALSE}
139 {$setc TARGET_CPU_X86_64 := FALSE}
140 {$setc TARGET_CPU_ARM := TRUE}
141 {$setc TARGET_CPU_ARM64 := FALSE}
142 {$setc TARGET_OS_MAC := FALSE}
143 {$setc TARGET_OS_IPHONE := TRUE}
144 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
145 {$setc TARGET_OS_EMBEDDED := TRUE}
146 {$elifc defined __arm64__ and __arm64__}
147 {$setc TARGET_CPU_PPC := FALSE}
148 {$setc TARGET_CPU_PPC64 := FALSE}
149 {$setc TARGET_CPU_X86 := FALSE}
150 {$setc TARGET_CPU_X86_64 := FALSE}
151 {$setc TARGET_CPU_ARM := FALSE}
152 {$setc TARGET_CPU_ARM64 := TRUE}
153 {$ifc defined ios}
154 {$setc TARGET_OS_MAC := FALSE}
155 {$setc TARGET_OS_IPHONE := TRUE}
156 {$setc TARGET_OS_EMBEDDED := TRUE}
157 {$elsec}
158 {$setc TARGET_OS_MAC := TRUE}
159 {$setc TARGET_OS_IPHONE := FALSE}
160 {$setc TARGET_OS_EMBEDDED := FALSE}
161 {$endc}
162 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
163 {$elsec}
164 {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
165 {$endc}
166
167 {$ifc defined __LP64__ and __LP64__ }
168 {$setc TARGET_CPU_64 := TRUE}
169 {$elsec}
170 {$setc TARGET_CPU_64 := FALSE}
171 {$endc}
172
173 {$ifc defined FPC_BIG_ENDIAN}
174 {$setc TARGET_RT_BIG_ENDIAN := TRUE}
175 {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
176 {$elifc defined FPC_LITTLE_ENDIAN}
177 {$setc TARGET_RT_BIG_ENDIAN := FALSE}
178 {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
179 {$elsec}
180 {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
181 {$endc}
182 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
183 {$setc CALL_NOT_IN_CARBON := FALSE}
184 {$setc OLDROUTINENAMES := FALSE}
185 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
186 {$setc OPAQUE_UPP_TYPES := TRUE}
187 {$setc OTCARBONAPPLICATION := TRUE}
188 {$setc OTKERNEL := FALSE}
189 {$setc PM_USE_SESSION_APIS := TRUE}
190 {$setc TARGET_API_MAC_CARBON := TRUE}
191 {$setc TARGET_API_MAC_OS8 := FALSE}
192 {$setc TARGET_API_MAC_OSX := TRUE}
193 {$setc TARGET_CARBON := TRUE}
194 {$setc TARGET_CPU_68K := FALSE}
195 {$setc TARGET_CPU_MIPS := FALSE}
196 {$setc TARGET_CPU_SPARC := FALSE}
197 {$setc TARGET_OS_UNIX := FALSE}
198 {$setc TARGET_OS_WIN32 := FALSE}
199 {$setc TARGET_RT_MAC_68881 := FALSE}
200 {$setc TARGET_RT_MAC_CFM := FALSE}
201 {$setc TARGET_RT_MAC_MACHO := TRUE}
202 {$setc TYPED_FUNCTION_POINTERS := TRUE}
203 {$setc TYPE_BOOL := FALSE}
204 {$setc TYPE_EXTENDED := FALSE}
205 {$setc TYPE_LONGLONG := TRUE}
206 uses MacTypes,CFBase,CFData,CFDictionary,CFArray,CGBase,CGDataProvider,CGGeometry;
207 {$endc} {not MACOSALLINCLUDE}
208
209 {$ALIGN POWER}
210
211
212 { The type used to represent a CoreGraphics font. }
213
214 type
215 CGFontRef = ^OpaqueCGFontRef; { an opaque type }
216 OpaqueCGFontRef = record end;
217
218 { A type to represent indexes in a CGFontRef. }
219
220 type
221 CGFontIndex = UInt16;
222
223 { A type to represent glyph identifiers in a CGFontRef. }
224
225 type
226 CGGlyph = CGFontIndex;
227 CGGlyphPtr = ^CGGlyph;
228
229 { The format of a PostScript font subset. Type1 is documented in "Adobe
230 Type 1 Font Format"; Type3 in "PostScript Language Reference, 3rd ed."
231 and Type42 in "Adobe Technical Note 5012, The Type 42 Font Format
232 Specification". }
233
234 type
235 CGFontPostScriptFormat = SInt32;
236 const
237 kCGFontPostScriptFormatType1 = 1;
238 kCGFontPostScriptFormatType3 = 3;
239 kCGFontPostScriptFormatType42 = 42;
240
241
242 const
243 { The maximum allowed value of a CGFontIndex. Always <= USHRT_MAX - 1. }
244 kCGFontIndexMax = (1 shl 16) - 2;
245
246 { A value representing an invalid CGFontIndex. Always <= USHRT_MAX. }
247 kCGFontIndexInvalid = (1 shl 16) - 1;
248
249 { The maximum allowed value of a CGGlyph. }
250 kCGGlyphMax = kCGFontIndexMax;
251
252 { Return the CFTypeID for CGFontRefs. }
253
CGFontGetTypeIDnull254 function CGFontGetTypeID: CFTypeID; external name '_CGFontGetTypeID';
255 (* CG_AVAILABLE_STARTING(__MAC_10_2, __IPHONE_2_0) *)
256
257 {$ifc TARGET_OS_MAC}
258 { Create a CGFontRef using `platformFontReference', a pointer to a
259 platform-specific font reference. For MacOS X, `platformFontReference'
260 should be a pointer to an ATSFontRef. }
261
CGFontCreateWithPlatformFontnull262 function CGFontCreateWithPlatformFont( platformFontReference: UnivPtr ): CGFontRef; external name '_CGFontCreateWithPlatformFont';
263 (* CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6,
264 __IPHONE_NA, __IPHONE_NA) *)
265 {$endc}
266
267 { Return the font defined by the data provided by `provider', or NULL if
268 the font can't be created. }
269
CGFontCreateWithDataProvidernull270 function CGFontCreateWithDataProvider( provider: CGDataProviderRef ): CGFontRef; external name '_CGFontCreateWithDataProvider';
271 (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0) *)
272
273 { Return the font identified by `name', corresponding to the font's
274 PostScript name or its full name, or NULL if the font can't be
275 created. }
276
CGFontCreateWithFontNamenull277 function CGFontCreateWithFontName( name: CFStringRef ): CGFontRef; external name '_CGFontCreateWithFontName';
278 (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0) *)
279
280 { Return a font based on `font' with the variation specification dictionary
281 `variations' applied to `font'. A variation specification dictionary
282 contains keys corresponding the variation axis names of the font. Each
283 key is a variation axis name; the value for each key is the value
284 specified for that particular variation axis represented as a
285 CFNumberRef. If a variation axis name is not specified in `variations',
286 then the current value from `font' is used. }
287
CGFontCreateCopyWithVariationsnull288 function CGFontCreateCopyWithVariations( font: CGFontRef; variations: CFDictionaryRef ): CGFontRef; external name '_CGFontCreateCopyWithVariations';
289 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
290
291 { Equivalent to `CFRetain(font)', except it doesn't crash (as CFRetain
292 does) if `font' is NULL. }
293
CGFontRetainnull294 function CGFontRetain( font: CGFontRef ): CGFontRef; external name '_CGFontRetain';
295 (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_2_0) *)
296
297 { Equivalent to `CFRelease(font)', except it doesn't crash (as CFRelease
298 does) if `font' is NULL. }
299
300 procedure CGFontRelease( font: CGFontRef ); external name '_CGFontRelease';
301 (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_2_0) *)
302
303 { Return the number of glyphs in `font'. }
304
CGFontGetNumberOfGlyphsnull305 function CGFontGetNumberOfGlyphs( font: CGFontRef ): size_t; external name '_CGFontGetNumberOfGlyphs';
306 (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_2_0) *)
307
308 { Return the glyph space units/em for `font'. }
309
CGFontGetUnitsPerEmnull310 function CGFontGetUnitsPerEm( font: CGFontRef ): SInt32; external name '_CGFontGetUnitsPerEm';
311 (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_2_0) *)
312
313 { Return the PostScript name of `font'. }
314
CGFontCopyPostScriptNamenull315 function CGFontCopyPostScriptName( font: CGFontRef ): CFStringRef; external name '_CGFontCopyPostScriptName';
316 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
317
318 { Return the "full name" of `font'. }
319
CGFontCopyFullNamenull320 function CGFontCopyFullName( font: CGFontRef ): CFStringRef; external name '_CGFontCopyFullName';
321 (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0) *)
322
323 { Return the ascent of `font'. The ascent is the maximum distance above the
324 baseline of glyphs in a font. The value is specified in glyph space
325 units. }
326
CGFontGetAscentnull327 function CGFontGetAscent( font: CGFontRef ): SInt32; external name '_CGFontGetAscent';
328 (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0) *)
329
330 { Return the descent of `font'. The descent is the maximum distance below
331 the baseline of glyphs in a font. The value is specified in glyph space
332 units. }
333
CGFontGetDescentnull334 function CGFontGetDescent( font: CGFontRef ): SInt32; external name '_CGFontGetDescent';
335 (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0) *)
336
337 { Return the leading of `font'. The leading is the spacing between
338 consecutive lines of text in a font. The value is specified in glyph
339 space units. }
340
CGFontGetLeadingnull341 function CGFontGetLeading( font: CGFontRef ): SInt32; external name '_CGFontGetLeading';
342 (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0) *)
343
344 { Return the cap height of `font'. The cap height is the distance above the
345 baseline of the top of flat capital letters of glyphs in a font. The
346 value is specified in glyph space units. }
347
CGFontGetCapHeightnull348 function CGFontGetCapHeight( font: CGFontRef ): SInt32; external name '_CGFontGetCapHeight';
349 (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0) *)
350
351 { Return the x-height of `font'. The x-height is the distance above the
352 baseline of the top of flat, non-ascending lowercase letters (such as
353 "x") of glyphs in a font. The value is specified in glyph space units. }
354
CGFontGetXHeightnull355 function CGFontGetXHeight( font: CGFontRef ): SInt32; external name '_CGFontGetXHeight';
356 (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0) *)
357
358 { Return the font bounding box of `font'. The font bounding box is the
359 union of all of the bounding boxes for all the glyphs in a font. The
360 value is specified in glyph space units. }
361
CGFontGetFontBBoxnull362 function CGFontGetFontBBox( font: CGFontRef ): CGRect; external name '_CGFontGetFontBBox';
363 (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0) *)
364
365 { Return the italic angle of `font', measured in degrees counter-clockwise
366 from the vertical. }
367
CGFontGetItalicAnglenull368 function CGFontGetItalicAngle( font: CGFontRef ): CGFloat; external name '_CGFontGetItalicAngle';
369 (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0) *)
370
371 { Return the thickness of the dominant vertical stems of glyphs in `font'.
372 The value is specified in glyph space units. }
373
CGFontGetStemVnull374 function CGFontGetStemV( font: CGFontRef ): CGFloat; external name '_CGFontGetStemV';
375 (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0) *)
376
377 { Return an array of the variation axis dictionaries for `font'. Each
378 variation axis dictionary contains values for the variation axis keys
379 listed below. This function returns NULL if `font' doesn't support
380 variations. }
381
CGFontCopyVariationAxesnull382 function CGFontCopyVariationAxes( font: CGFontRef ): CFArrayRef; external name '_CGFontCopyVariationAxes';
383 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
384
385 { Return the variation specification dictionary from `font'. This
386 dictionary contains keys corresponding the variation axis names of the
387 font. Each key is a variation axis name; the value for each key is the
388 value specified for that particular variation axis represented as a
389 CFNumberRef. This function returns NULL if `font' doesn't support
390 variations. }
391
CGFontCopyVariationsnull392 function CGFontCopyVariations( font: CGFontRef ): CFDictionaryRef; external name '_CGFontCopyVariations';
393 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
394
395 { Get the advance of each glyph in `glyphs', an array of `count' glyphs,
396 and return it in the corresponding entry of `advances', an array of
397 `count' integers. The advances are specified in glyph space. Returns
398 false if advances can't be retrieved for any reason; true otherwise. }
399
CGFontGetGlyphAdvancesnull400 function CGFontGetGlyphAdvances( font: CGFontRef; {const} glyphs: {variable-size-array} CGGlyphPtr; count: size_t; advances: {variable-size-array} SInt32Ptr ): CBool; external name '_CGFontGetGlyphAdvances';
401 (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_2_0) *)
402
403 { Get the bounding box of each glyph in `glyphs', an array of `count'
404 glyphs, and return it in the corresponding entry of `bboxes', an array of
405 `count' rectangles. The bounding boxes are specified in glyph space.
406 Returns false if bounding boxes can't be retrieved for any reason; true
407 otherwise. }
408
CGFontGetGlyphBBoxesnull409 function CGFontGetGlyphBBoxes( font: CGFontRef; {const} glyphs: {variable-size-array} CGGlyphPtr; count: size_t; bboxes: {variable-size-array} CGRectPtr ): CBool; external name '_CGFontGetGlyphBBoxes';
410 (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0) *)
411
412 { Return the glyph associated with `name' in `font'. If `name' isn't found
413 in the font, return 0. }
414
CGFontGetGlyphWithGlyphNamenull415 function CGFontGetGlyphWithGlyphName( font: CGFontRef; name: CFStringRef ): CGGlyph; external name '_CGFontGetGlyphWithGlyphName';
416 (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0) *)
417
418 { Return the glyph name of `glyph' in `font', or NULL if `glyph' does not
419 appear in `font'. }
420
CGFontCopyGlyphNameForGlyphnull421 function CGFontCopyGlyphNameForGlyph( font: CGFontRef; glyph: CGGlyph ): CFStringRef; external name '_CGFontCopyGlyphNameForGlyph';
422 (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0) *)
423
424 { Return true if a subset in the PostScript format `format' can be created
425 for `font'; false otherwise. }
426
CGFontCanCreatePostScriptSubsetnull427 function CGFontCanCreatePostScriptSubset( font: CGFontRef; format: CGFontPostScriptFormat ): CBool; external name '_CGFontCanCreatePostScriptSubset';
428 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
429
430 { Create a subset of `font' named `subsetName' in the PostScript format
431 `format'. The subset will contain the glyphs specified by `glyphs', an
432 array of `count' CGGlyphs. If non-NULL, `encoding' specifies the default
433 encoding for the subset. }
434
435 type
436 CGGlyph256Array = array[0..255] of CGGlyph;
CGFontCreatePostScriptSubsetnull437 function CGFontCreatePostScriptSubset( font: CGFontRef; subsetName: CFStringRef; format: CGFontPostScriptFormat; {const} glyphs: {variable-size-array} CGGlyphPtr; count: size_t; const (*var*) encoding: CGGlyph256Array ): CFDataRef; external name '_CGFontCreatePostScriptSubset';
438 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
439
440 { Return a PostScript encoding of `font' containing glyphs in
441 `encoding'. }
442
CGFontCreatePostScriptEncodingnull443 function CGFontCreatePostScriptEncoding( font: CGFontRef; const (*var*) encoding: CGGlyph256Array ): CFDataRef; external name '_CGFontCreatePostScriptEncoding';
444 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
445
446 { Return an array of font table tags in `font'. Each entry in the array is
447 a four-byte value representing a single TrueType or OpenType font table
448 tag. }
449
CGFontCopyTableTagsnull450 function CGFontCopyTableTags( font: CGFontRef ): CFArrayRef; external name '_CGFontCopyTableTags';
451 (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0) *)
452
453 { Return the table in `font' corresponding to `tag', or NULL if no such
454 table exists. }
455
CGFontCopyTableForTagnull456 function CGFontCopyTableForTag( font: CGFontRef; tag: UInt32 ): CFDataRef; external name '_CGFontCopyTableForTag';
457 (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0) *)
458
459 {** Keys for the font variation axis dictionary. **}
460
461 { The key used to obtain the variation axis name from a variation axis
462 dictionary. The value obtained with this key is a CFStringRef specifying
463 the name of the variation axis. }
464
465 var kCGFontVariationAxisName: CFStringRef; external name '_kCGFontVariationAxisName'; (* attribute const *)
466 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
467
468 { The key used to obtain the minimum variation axis value from a variation
469 axis dictionary. The value obtained with this key is a CFNumberRef
470 specifying the minimum value of the variation axis. }
471
472 var kCGFontVariationAxisMinValue: CFStringRef; external name '_kCGFontVariationAxisMinValue'; (* attribute const *)
473 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
474
475 { The key used to obtain the maximum variation axis value from a variation
476 axis dictionary. The value obtained with this key is a CFNumberRef
477 specifying the maximum value of the variation axis. }
478
479 var kCGFontVariationAxisMaxValue: CFStringRef; external name '_kCGFontVariationAxisMaxValue'; (* attribute const *)
480 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
481
482 { The key used to obtain the default variation axis value from a variation
483 axis dictionary. The value obtained with this key is a CFNumberRef
484 specifying the default value of the variation axis. }
485
486 var kCGFontVariationAxisDefaultValue: CFStringRef; external name '_kCGFontVariationAxisDefaultValue'; (* attribute const *)
487 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
488
489 { Obsolete; don't use these. }
490
491 const
492 CGGlyphMin = 0;
493 CGGlyphMax = kCGGlyphMax;
494
495 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
496
497 end.
498 {$endc} {not MACOSALLINCLUDE}
499