1 {
2 File: QD/Fonts.h
3
4 Contains: Public interface to the Font Manager.
5
6 Version: Quickdraw-285~150
7
8 Copyright: � 1985-2008 by Apple Inc. all rights reserved.
9
10 Bugs?: For bug reports, consult the following page on
11 the World Wide Web:
12
13 http://bugs.freepascal.org
14
15 }
16 { Pascal Translation Updated: Jonas Maebe, <jonas@freepascal.org>, October 2009 }
17 { Pascal Translation Updated: Jonas Maebe, <jonas@freepascal.org>, October 2012 }
18 {
19 Modified for use with Free Pascal
20 Version 308
21 Please report any bugs to <gpc@microbizz.nl>
22 }
23
24 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
25 {$mode macpas}
26 {$modeswitch cblocks}
27 {$packenum 1}
28 {$macro on}
29 {$inline on}
30 {$calling mwpascal}
31
32 unit Fonts;
33 interface
34 {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
35 {$setc GAP_INTERFACES_VERSION := $0308}
36
37 {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
38 {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
39 {$endc}
40
41 {$ifc defined CPUPOWERPC and defined CPUI386}
42 {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
43 {$endc}
44 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
45 {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
46 {$endc}
47
48 {$ifc not defined __ppc__ and defined CPUPOWERPC32}
49 {$setc __ppc__ := 1}
50 {$elsec}
51 {$setc __ppc__ := 0}
52 {$endc}
53 {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
54 {$setc __ppc64__ := 1}
55 {$elsec}
56 {$setc __ppc64__ := 0}
57 {$endc}
58 {$ifc not defined __i386__ and defined CPUI386}
59 {$setc __i386__ := 1}
60 {$elsec}
61 {$setc __i386__ := 0}
62 {$endc}
63 {$ifc not defined __x86_64__ and defined CPUX86_64}
64 {$setc __x86_64__ := 1}
65 {$elsec}
66 {$setc __x86_64__ := 0}
67 {$endc}
68 {$ifc not defined __arm__ and defined CPUARM}
69 {$setc __arm__ := 1}
70 {$elsec}
71 {$setc __arm__ := 0}
72 {$endc}
73 {$ifc not defined __arm64__ and defined CPUAARCH64}
74 {$setc __arm64__ := 1}
75 {$elsec}
76 {$setc __arm64__ := 0}
77 {$endc}
78
79 {$ifc defined cpu64}
80 {$setc __LP64__ := 1}
81 {$elsec}
82 {$setc __LP64__ := 0}
83 {$endc}
84
85
86 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
87 {$error Conflicting definitions for __ppc__ and __i386__}
88 {$endc}
89
90 {$ifc defined __ppc__ and __ppc__}
91 {$setc TARGET_CPU_PPC := TRUE}
92 {$setc TARGET_CPU_PPC64 := FALSE}
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 __ppc64__ and __ppc64__}
102 {$setc TARGET_CPU_PPC := FALSE}
103 {$setc TARGET_CPU_PPC64 := TRUE}
104 {$setc TARGET_CPU_X86 := FALSE}
105 {$setc TARGET_CPU_X86_64 := FALSE}
106 {$setc TARGET_CPU_ARM := FALSE}
107 {$setc TARGET_CPU_ARM64 := FALSE}
108 {$setc TARGET_OS_MAC := TRUE}
109 {$setc TARGET_OS_IPHONE := FALSE}
110 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
111 {$setc TARGET_OS_EMBEDDED := FALSE}
112 {$elifc defined __i386__ and __i386__}
113 {$setc TARGET_CPU_PPC := FALSE}
114 {$setc TARGET_CPU_PPC64 := FALSE}
115 {$setc TARGET_CPU_X86 := TRUE}
116 {$setc TARGET_CPU_X86_64 := FALSE}
117 {$setc TARGET_CPU_ARM := FALSE}
118 {$setc TARGET_CPU_ARM64 := FALSE}
119 {$ifc defined iphonesim}
120 {$setc TARGET_OS_MAC := FALSE}
121 {$setc TARGET_OS_IPHONE := TRUE}
122 {$setc TARGET_IPHONE_SIMULATOR := TRUE}
123 {$elsec}
124 {$setc TARGET_OS_MAC := TRUE}
125 {$setc TARGET_OS_IPHONE := FALSE}
126 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
127 {$endc}
128 {$setc TARGET_OS_EMBEDDED := FALSE}
129 {$elifc defined __x86_64__ and __x86_64__}
130 {$setc TARGET_CPU_PPC := FALSE}
131 {$setc TARGET_CPU_PPC64 := FALSE}
132 {$setc TARGET_CPU_X86 := FALSE}
133 {$setc TARGET_CPU_X86_64 := TRUE}
134 {$setc TARGET_CPU_ARM := FALSE}
135 {$setc TARGET_CPU_ARM64 := FALSE}
136 {$ifc defined iphonesim}
137 {$setc TARGET_OS_MAC := FALSE}
138 {$setc TARGET_OS_IPHONE := TRUE}
139 {$setc TARGET_IPHONE_SIMULATOR := TRUE}
140 {$elsec}
141 {$setc TARGET_OS_MAC := TRUE}
142 {$setc TARGET_OS_IPHONE := FALSE}
143 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
144 {$endc}
145 {$setc TARGET_OS_EMBEDDED := FALSE}
146 {$elifc defined __arm__ and __arm__}
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 := TRUE}
152 {$setc TARGET_CPU_ARM64 := FALSE}
153 {$setc TARGET_OS_MAC := FALSE}
154 {$setc TARGET_OS_IPHONE := TRUE}
155 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
156 {$setc TARGET_OS_EMBEDDED := TRUE}
157 {$elifc defined __arm64__ and __arm64__}
158 {$setc TARGET_CPU_PPC := FALSE}
159 {$setc TARGET_CPU_PPC64 := FALSE}
160 {$setc TARGET_CPU_X86 := FALSE}
161 {$setc TARGET_CPU_X86_64 := FALSE}
162 {$setc TARGET_CPU_ARM := FALSE}
163 {$setc TARGET_CPU_ARM64 := TRUE}
164 {$ifc defined ios}
165 {$setc TARGET_OS_MAC := FALSE}
166 {$setc TARGET_OS_IPHONE := TRUE}
167 {$setc TARGET_OS_EMBEDDED := TRUE}
168 {$elsec}
169 {$setc TARGET_OS_MAC := TRUE}
170 {$setc TARGET_OS_IPHONE := FALSE}
171 {$setc TARGET_OS_EMBEDDED := FALSE}
172 {$endc}
173 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
174 {$elsec}
175 {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
176 {$endc}
177
178 {$ifc defined __LP64__ and __LP64__ }
179 {$setc TARGET_CPU_64 := TRUE}
180 {$elsec}
181 {$setc TARGET_CPU_64 := FALSE}
182 {$endc}
183
184 {$ifc defined FPC_BIG_ENDIAN}
185 {$setc TARGET_RT_BIG_ENDIAN := TRUE}
186 {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
187 {$elifc defined FPC_LITTLE_ENDIAN}
188 {$setc TARGET_RT_BIG_ENDIAN := FALSE}
189 {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
190 {$elsec}
191 {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
192 {$endc}
193 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
194 {$setc CALL_NOT_IN_CARBON := FALSE}
195 {$setc OLDROUTINENAMES := FALSE}
196 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
197 {$setc OPAQUE_UPP_TYPES := TRUE}
198 {$setc OTCARBONAPPLICATION := TRUE}
199 {$setc OTKERNEL := FALSE}
200 {$setc PM_USE_SESSION_APIS := TRUE}
201 {$setc TARGET_API_MAC_CARBON := TRUE}
202 {$setc TARGET_API_MAC_OS8 := FALSE}
203 {$setc TARGET_API_MAC_OSX := TRUE}
204 {$setc TARGET_CARBON := TRUE}
205 {$setc TARGET_CPU_68K := FALSE}
206 {$setc TARGET_CPU_MIPS := FALSE}
207 {$setc TARGET_CPU_SPARC := FALSE}
208 {$setc TARGET_OS_UNIX := FALSE}
209 {$setc TARGET_OS_WIN32 := FALSE}
210 {$setc TARGET_RT_MAC_68881 := FALSE}
211 {$setc TARGET_RT_MAC_CFM := FALSE}
212 {$setc TARGET_RT_MAC_MACHO := TRUE}
213 {$setc TYPED_FUNCTION_POINTERS := TRUE}
214 {$setc TYPE_BOOL := FALSE}
215 {$setc TYPE_EXTENDED := FALSE}
216 {$setc TYPE_LONGLONG := TRUE}
217 uses MacTypes,QuickdrawText,ATSTypes,Files,MacErrors,QuickdrawTypes,TextCommon,CGFont;
218 {$endc} {not MACOSALLINCLUDE}
219
220
221 {$ifc TARGET_OS_MAC}
222
223 {$ALIGN MAC68K}
224
225 {$ifc not TARGET_CPU_64}
226 {
227 * FMGetATSFontRefFromFont()
228 *
229 * Summary:
230 * Obtains the ATS font reference associated with a QuickDraw font
231 * reference.
232 *
233 * Parameters:
234 *
235 * iFont:
236 * A QuickDraw font reference.
237 *
238 * Result:
239 * The ATS font reference associated with the specified QuickDraw
240 * font reference.
241 *
242 * Availability:
243 * Mac OS X: in version 10.1 and later in ApplicationServices.framework [32-bit only]
244 * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
245 * Non-Carbon CFM: not available
246 }
FMGetATSFontRefFromFontnull247 function FMGetATSFontRefFromFont( iFont: FMFont ): ATSFontRef; external name '_FMGetATSFontRefFromFont';
248 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
249
250
251 {
252 * FMGetFontFromATSFontRef()
253 *
254 * Summary:
255 * Obtains the QuickDraw font reference associated with an ATS font
256 * reference.
257 *
258 * Parameters:
259 *
260 * iFont:
261 * An ATS font reference.
262 *
263 * Result:
264 * The QuickDraw font reference associated with the specified ATS
265 * font reference.
266 *
267 * Availability:
268 * Mac OS X: in version 10.1 and later in ApplicationServices.framework [32-bit only]
269 * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
270 * Non-Carbon CFM: not available
271 }
FMGetFontFromATSFontRefnull272 function FMGetFontFromATSFontRef( iFont: ATSFontRef ): FMFont; external name '_FMGetFontFromATSFontRef';
273 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
274
275
276 {
277 * FMFontGetCGFontRefFromFontFamilyInstance()
278 *
279 * Summary:
280 * Obtains the Quartz font reference associated with a typeface from
281 * a QuickDraw font family reference.
282 *
283 * Parameters:
284 *
285 * iFontFamily:
286 * A QuickDraw font family reference.
287 *
288 * iStyle:
289 * A QuickDraw font style.
290 *
291 * oFont:
292 * A pointer to a Quartz font reference. On output, points to the
293 * font reference for the specified font family and style. You are
294 * responsible for allocating the memory for the font reference.
295 *
296 * oStyle:
297 * On output, a pointer to an intrinsic font style. If a font
298 * reference isn�t found that matches the font family reference
299 * and font style you specify, the function returns the QuickDraw
300 * style that matches most closely.
301 *
302 * Result:
303 * A result code. If a font reference and intrinsic style are not
304 * found, the function returns a value of kFMInvalidFontErr.
305 *
306 * Availability:
307 * Mac OS X: in version 10.4 and later in ApplicationServices.framework [32-bit only]
308 * CarbonLib: not available
309 * Non-Carbon CFM: not available
310 }
FMFontGetCGFontRefFromFontFamilyInstancenull311 function FMFontGetCGFontRefFromFontFamilyInstance( iFontFamily: FMFontFamily; iStyle: FMFontStyle; var oFont: CGFontRef; var oStyle: FMFontStyle ): OSStatus; external name '_FMFontGetCGFontRefFromFontFamilyInstance';
312 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
313
314
315 {
316 * The remaining functions in this file have all been deprecated on Mac OS X 10.4. There are other
317 * solutions that are recommended that provide better compatibility with the rest of the operating
318 * system.
319 *
320 * Instead of using the QuickDraw functions, you should consider the following:
321 *
322 * 1. For drawing and measuring text, you can use the Appearance Manager API in HITheme.h or the
323 * ATSUI API in ATSUnicode.h to render text directly through a Quartz graphics context. Alternatively
324 * use CoreText on Mac OS X 10.5 or later.
325 *
326 * 2. For accessing information on fonts tracked by the operating system, please refer to the
327 * functions described in ATSFont.h. Alternatively use CoreText on Mac OS X 10.5 or later.
328 *
329 * 3. For accessing and modifying information on fonts in a Quartz graphics context, please refer
330 * to the functions described in CoreGraphics.h.
331 }
332 {$endc} {not TARGET_CPU_64}
333
334 const
335 systemFont = 0;
336 applFont = 1;
337
338 const
339 kFMDefaultOptions = kNilOptions;
340
341 { Activation contexts }
342 const
343 kFMDefaultActivationContext = kFMDefaultOptions;
344 kFMGlobalActivationContext = $00000001;
345 kFMLocalActivationContext = kFMDefaultActivationContext;
346
347 { Iteration scopes }
348 const
349 kFMDefaultIterationScope = kFMDefaultOptions;
350 kFMGlobalIterationScope = $00000001;
351 kFMLocalIterationScope = kFMDefaultIterationScope;
352
353 { kPlatformDefaultGuiFontID is used in QuickTime 3.0. }
354 const
355 kPlatformDefaultGuiFontID = applFont;
356
357 const
358 commandMark = 17;
359 checkMark = 18;
360 diamondMark = 19;
361 appleMark = 20;
362
363 const
364 propFont = 36864;
365 prpFntH = 36865;
366 prpFntW = 36866;
367 prpFntHW = 36867;
368 fixedFont = 45056;
369 fxdFntH = 45057;
370 fxdFntW = 45058;
371 fxdFntHW = 45059;
372 fontWid = 44208;
373
374 type
375 FontRec = record
376 fontType: SInt16; {font type}
377 firstChar: SInt16; {ASCII code of first character}
378 lastChar: SInt16; {ASCII code of last character}
379 widMax: SInt16; {maximum character width}
380 kernMax: SInt16; {negative of maximum character kern}
381 nDescent: SInt16; {negative of descent}
382 fRectWidth: SInt16; {width of font rectangle}
383 fRectHeight: SInt16; {height of font rectangle}
384 owTLoc: UInt16; {offset to offset/width table}
385 ascent: SInt16; {ascent}
386 descent: SInt16; {descent}
387 leading: SInt16; {leading}
388 rowWords: SInt16; {row width of bit image / 2 }
389 end;
390 FontRecPtr = ^FontRec;
391 type
392 FontRecHdl = ^FontRecPtr;
393 FMInput = record
394 family: SInt16;
395 size: SInt16;
396 face: Style;
397 needBits: Boolean;
398 device: SInt16;
399 numer: Point;
400 denom: Point;
401 end;
402 FMInputPtr = ^FMInput;
403 type
404 FamRecPtr = ^FamRec;
405 FamRec = record
406 ffFlags: SInt16; {flags for family}
407 ffFamID: SInt16; {family ID number}
408 ffFirstChar: SInt16; {ASCII code of 1st character}
409 ffLastChar: SInt16; {ASCII code of last character}
410 ffAscent: SInt16; {maximum ascent for 1pt font}
411 ffDescent: SInt16; {maximum descent for 1pt font}
412 ffLeading: SInt16; {maximum leading for 1pt font}
413 ffWidMax: SInt16; {maximum widMax for 1pt font}
414 ffWTabOff: SInt32; {offset to width table}
415 ffKernOff: SInt32; {offset to kerning table}
416 ffStylOff: SInt32; {offset to style mapping table}
417 ffProperty: array [0..8] of SInt16; {style property info}
418 ffIntl: array [0..1] of SInt16; {for international use}
419 ffVersion: SInt16; {version number}
420 end;
421 type
422 AsscEntryPtr = ^AsscEntry;
423 AsscEntry = record
424 fontSize: SInt16;
425 fontStyle: SInt16;
426 fontID: SInt16; {font resource ID}
427 end;
428 type
429 FontAssocPtr = ^FontAssoc;
430 FontAssoc = record
431 numAssoc: SInt16; {number of entries - 1}
432 end;
433 type
434 StyleTablePtr = ^StyleTable;
435 StyleTable = record
436 fontClass: SInt16;
437 offset: SInt32;
438 reserved: SInt32;
439 indexes: array [0..47] of SInt8;
440 end;
441 type
442 NameTablePtr = ^NameTable;
443 NameTable = record
444 stringCount: SInt16;
445 baseFontName: Str255;
446 end;
447 type
448 KernPairPtr = ^KernPair;
449 KernPair = record
450 kernFirst: char; {1st character of kerned pair}
451 kernSecond: char; {2nd character of kerned pair}
452 kernWidth: SInt16; {kerning in 1pt fixed format}
453 end;
454 type
455 KernEntryPtr = ^KernEntry;
456 KernEntry = record
457 kernStyle: SInt16; {style the entry applies to}
458 kernLength: SInt16; {length of this entry}
459 end;
460 type
461 KernTablePtr = ^KernTable;
462 KernTable = record
463 numKerns: SInt16; {number of kerning entries}
464 end;
465 FMOutput = record
466 errNum: SInt16;
467 fontHandle: Handle;
468 boldPixels: UInt8;
469 italicPixels: UInt8;
470 ulOffset: UInt8;
471 ulShadow: UInt8;
472 ulThick: UInt8;
473 shadowPixels: UInt8;
474 extra: SInt8;
475 ascent: UInt8;
476 descent: UInt8;
477 widMax: UInt8;
478 leading: SInt8;
479 curStyle: SInt8;
480 numer: Point;
481 denom: Point;
482 end;
483 FMOutputPtr = ^FMOutput;
484 type
485 FMOutPtr = FMOutputPtr;
486 FMetricRec = record
487 ascent: Fixed; {base line to top}
488 descent: Fixed; {base line to bottom}
489 leading: Fixed; {leading between lines}
490 widMax: Fixed; {maximum character width}
491 wTabHandle: Handle; {handle to font width table}
492 end;
493 FMetricRecPtr = ^FMetricRec;
494 type
495 FMetricRecHandle = ^FMetricRecPtr;
496 {$ifc not TARGET_CPU_64}
497 {
498 * InitFonts()
499 *
500 * Availability:
501 * Mac OS X: not available [32-bit only]
502 * CarbonLib: not available
503 * Non-Carbon CFM: in InterfaceLib 7.1 and later
504 }
505
506
507 {
508 * GetFontName() *** DEPRECATED ***
509 *
510 * Availability:
511 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
512 * CarbonLib: in CarbonLib 1.0 and later
513 * Non-Carbon CFM: in InterfaceLib 7.1 and later
514 }
515 procedure GetFontName( familyID: SInt16; var name: Str255 ); external name '_GetFontName';
516 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
517
518
519 {
520 * GetFNum() *** DEPRECATED ***
521 *
522 * Availability:
523 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
524 * CarbonLib: in CarbonLib 1.0 and later
525 * Non-Carbon CFM: in InterfaceLib 7.1 and later
526 }
527 procedure GetFNum( const (*var*) name: Str255; var familyID: SInt16 ); external name '_GetFNum';
528 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
529
530
531 {
532 * RealFont() *** DEPRECATED ***
533 *
534 * Availability:
535 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
536 * CarbonLib: in CarbonLib 1.0 and later
537 * Non-Carbon CFM: in InterfaceLib 7.1 and later
538 }
RealFontnull539 function RealFont( fontNum: SInt16; size: SInt16 ): Boolean; external name '_RealFont';
540 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
541
542
543 {
544 * SetFontLock()
545 *
546 * Availability:
547 * Mac OS X: not available [32-bit only]
548 * CarbonLib: not available
549 * Non-Carbon CFM: in InterfaceLib 7.1 and later
550 }
551
552
553 {
554 * FMSwapFont() *** DEPRECATED ***
555 *
556 * Availability:
557 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
558 * CarbonLib: in CarbonLib 1.0 and later
559 * Non-Carbon CFM: in InterfaceLib 7.1 and later
560 }
FMSwapFontnull561 function FMSwapFont( const (*var*) inRec: FMInput ): FMOutPtr; external name '_FMSwapFont';
562 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
563
564
565 {
566 * SetFScaleDisable() *** DEPRECATED ***
567 *
568 * Availability:
569 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
570 * CarbonLib: in CarbonLib 1.0 and later
571 * Non-Carbon CFM: in InterfaceLib 7.1 and later
572 }
573 procedure SetFScaleDisable( fscaleDisable: Boolean ); external name '_SetFScaleDisable';
574 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
575
576
577 {
578 * FontMetrics() *** DEPRECATED ***
579 *
580 * Availability:
581 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
582 * CarbonLib: in CarbonLib 1.0 and later
583 * Non-Carbon CFM: in InterfaceLib 7.1 and later
584 }
585 procedure FontMetrics( theMetrics: FMetricRecPtr ); external name '_FontMetrics';
586 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
587
588
589 {
590 * SetFractEnable() *** DEPRECATED ***
591 *
592 * Availability:
593 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
594 * CarbonLib: in CarbonLib 1.0 and later
595 * Non-Carbon CFM: in InterfaceLib 7.1 and later
596 }
597 procedure SetFractEnable( fractEnable: Boolean ); external name '_SetFractEnable';
598 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
599
600
601 {
602 * GetDefFontSize() *** DEPRECATED ***
603 *
604 * Availability:
605 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
606 * CarbonLib: in CarbonLib 1.0 and later
607 * Non-Carbon CFM: in InterfaceLib 7.1 and later
608 }
GetDefFontSizenull609 function GetDefFontSize: SInt16; external name '_GetDefFontSize';
610 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
611
612
613 {
614 * IsOutline() *** DEPRECATED ***
615 *
616 * Availability:
617 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
618 * CarbonLib: in CarbonLib 1.0 and later
619 * Non-Carbon CFM: in InterfaceLib 7.1 and later
620 }
IsOutlinenull621 function IsOutline( numer: Point; denom: Point ): Boolean; external name '_IsOutline';
622 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
623
624
625 {
626 * SetOutlinePreferred() *** DEPRECATED ***
627 *
628 * Availability:
629 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
630 * CarbonLib: in CarbonLib 1.0 and later
631 * Non-Carbon CFM: in InterfaceLib 7.1 and later
632 }
633 procedure SetOutlinePreferred( outlinePreferred: Boolean ); external name '_SetOutlinePreferred';
634 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
635
636
637 {
638 * GetOutlinePreferred() *** DEPRECATED ***
639 *
640 * Availability:
641 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
642 * CarbonLib: in CarbonLib 1.0 and later
643 * Non-Carbon CFM: in InterfaceLib 7.1 and later
644 }
GetOutlinePreferrednull645 function GetOutlinePreferred: Boolean; external name '_GetOutlinePreferred';
646 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
647
648
649 {
650 * OutlineMetrics() *** DEPRECATED ***
651 *
652 * Availability:
653 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
654 * CarbonLib: in CarbonLib 1.0 and later
655 * Non-Carbon CFM: in InterfaceLib 7.1 and later
656 }
OutlineMetricsnull657 function OutlineMetrics( byteCount: SInt16; textPtr: {const} UnivPtr; numer: Point; denom: Point; var yMax: SInt16; var yMin: SInt16; awArray: FixedPtr; lsbArray: FixedPtr; boundsArray: RectPtr ): OSErr; external name '_OutlineMetrics';
658 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
659
660
661 {
662 * SetPreserveGlyph() *** DEPRECATED ***
663 *
664 * Availability:
665 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
666 * CarbonLib: in CarbonLib 1.0 and later
667 * Non-Carbon CFM: in InterfaceLib 7.1 and later
668 }
669 procedure SetPreserveGlyph( preserveGlyph: Boolean ); external name '_SetPreserveGlyph';
670 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
671
672
673 {
674 * GetPreserveGlyph() *** DEPRECATED ***
675 *
676 * Availability:
677 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
678 * CarbonLib: in CarbonLib 1.0 and later
679 * Non-Carbon CFM: in InterfaceLib 7.1 and later
680 }
GetPreserveGlyphnull681 function GetPreserveGlyph: Boolean; external name '_GetPreserveGlyph';
682 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
683
684
685 {$endc} {not TARGET_CPU_64}
686
687 {
688 * FlushFonts()
689 *
690 * Availability:
691 * Mac OS X: not available
692 * CarbonLib: not available
693 * Non-Carbon CFM: in InterfaceLib 7.1 and later
694 }
695
696
697 {$ifc not TARGET_CPU_64}
698 {
699 * getfnum()
700 *
701 * Availability:
702 * Mac OS X: not available [32-bit only]
703 * CarbonLib: not available
704 * Non-Carbon CFM: in InterfaceLib 7.1 and later
705 }
706
707
708 {
709 * getfontname()
710 *
711 * Availability:
712 * Mac OS X: not available [32-bit only]
713 * CarbonLib: not available
714 * Non-Carbon CFM: in InterfaceLib 7.1 and later
715 }
716
717
718 {$endc} {not TARGET_CPU_64}
719
720 {$ifc not TARGET_CPU_64}
721 {
722 * GetSysFont() *** DEPRECATED ***
723 *
724 * Availability:
725 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
726 * CarbonLib: in CarbonLib 1.0 and later
727 * Non-Carbon CFM: in InterfaceLib 7.1 and later
728 }
GetSysFontnull729 function GetSysFont: SInt16; external name '_GetSysFont';
730 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
731
732
733 {
734 * GetAppFont() *** DEPRECATED ***
735 *
736 * Availability:
737 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
738 * CarbonLib: in CarbonLib 1.0 and later
739 * Non-Carbon CFM: in InterfaceLib 7.1 and later
740 }
GetAppFontnull741 function GetAppFont: SInt16; external name '_GetAppFont';
742 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
743
744
745 { Extended font data functions (available only with Mac OS 8.5 or later). }
746 {
747 * SetAntiAliasedTextEnabled() *** DEPRECATED ***
748 *
749 * Availability:
750 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
751 * CarbonLib: in CarbonLib 1.0 and later
752 * Non-Carbon CFM: in InterfaceLib 8.6 and later
753 }
SetAntiAliasedTextEnablednull754 function SetAntiAliasedTextEnabled( iEnable: Boolean; iMinFontSize: SInt16 ): OSStatus; external name '_SetAntiAliasedTextEnabled';
755 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
756
757
758 {
759 * IsAntiAliasedTextEnabled() *** DEPRECATED ***
760 *
761 * Availability:
762 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
763 * CarbonLib: in CarbonLib 1.0 and later
764 * Non-Carbon CFM: in InterfaceLib 8.6 and later
765 }
IsAntiAliasedTextEnablednull766 function IsAntiAliasedTextEnabled( var oMinFontSize: SInt16 ): Boolean; external name '_IsAntiAliasedTextEnabled';
767 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
768
769
770 {
771 * QDTextBounds() *** DEPRECATED ***
772 *
773 * Availability:
774 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
775 * CarbonLib: in CarbonLib 1.0 and later
776 * Non-Carbon CFM: in InterfaceLib 8.6 and later
777 }
778 procedure QDTextBounds( byteCount: SInt16; textAddr: {const} UnivPtr; var bounds: Rect ); external name '_QDTextBounds';
779 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
780
781
782 {
783 * FetchFontInfo() *** DEPRECATED ***
784 *
785 * Availability:
786 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
787 * CarbonLib: in CarbonLib 1.0 and later
788 * Non-Carbon CFM: in InterfaceLib 8.6 and later
789 }
FetchFontInfonull790 function FetchFontInfo( fontID: SInt16; fontSize: SInt16; fontStyle: SInt16; var info: FontInfo ): OSErr; external name '_FetchFontInfo';
791 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
792
793
794 { Font access and data management functions (available only with Mac OS 9.0 or later). }
795 {
796 * FMCreateFontFamilyIterator() *** DEPRECATED ***
797 *
798 * Deprecated:
799 * This function is deprecated in Mac OS X 10.4 and not available in
800 * 64-bit. Please see ATSFont.h for alternatives. Suggested
801 * replacement is ATSFontFamilyIteratorCreate.
802 *
803 * Availability:
804 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
805 * CarbonLib: in CarbonLib 1.0 and later
806 * Non-Carbon CFM: in FontManager 9.0 and later
807 }
FMCreateFontFamilyIteratornull808 function FMCreateFontFamilyIterator( {const} iFilter: FMFilterPtr { can be NULL }; iRefCon: UnivPtr; iOptions: OptionBits; var ioIterator: FMFontFamilyIterator ): OSStatus; external name '_FMCreateFontFamilyIterator';
809 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
810
811
812 {
813 * FMDisposeFontFamilyIterator() *** DEPRECATED ***
814 *
815 * Deprecated:
816 * This function is deprecated in Mac OS X 10.4 and not available in
817 * 64-bit. Please see ATSFont.h for alternatives. Suggested
818 * replacement is ATSFontFamilyIteratorRelease.
819 *
820 * Availability:
821 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
822 * CarbonLib: in CarbonLib 1.0 and later
823 * Non-Carbon CFM: in FontManager 9.0 and later
824 }
FMDisposeFontFamilyIteratornull825 function FMDisposeFontFamilyIterator( var ioIterator: FMFontFamilyIterator ): OSStatus; external name '_FMDisposeFontFamilyIterator';
826 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
827
828
829 {
830 * FMResetFontFamilyIterator() *** DEPRECATED ***
831 *
832 * Deprecated:
833 * This function is deprecated in Mac OS X 10.4 and not available in
834 * 64-bit. Please see ATSFont.h for alternatives. Suggested
835 * replacement is ATSFontFamilyIteratorReset.
836 *
837 * Availability:
838 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
839 * CarbonLib: in CarbonLib 1.0 and later
840 * Non-Carbon CFM: in FontManager 9.0 and later
841 }
FMResetFontFamilyIteratornull842 function FMResetFontFamilyIterator( {const} iFilter: FMFilterPtr { can be NULL }; iRefCon: UnivPtr; iOptions: OptionBits; var ioIterator: FMFontFamilyIterator ): OSStatus; external name '_FMResetFontFamilyIterator';
843 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
844
845
846 {
847 * FMGetNextFontFamily() *** DEPRECATED ***
848 *
849 * Deprecated:
850 * This function is deprecated in Mac OS X 10.4 and not available in
851 * 64-bit. Please see ATSFont.h for alternatives. Suggested
852 * replacement is ATSFontFamilyIteratorNext.
853 *
854 * Availability:
855 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
856 * CarbonLib: in CarbonLib 1.0 and later
857 * Non-Carbon CFM: in FontManager 9.0 and later
858 }
FMGetNextFontFamilynull859 function FMGetNextFontFamily( var ioIterator: FMFontFamilyIterator; var oFontFamily: FMFontFamily ): OSStatus; external name '_FMGetNextFontFamily';
860 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
861
862
863 {
864 * FMCreateFontIterator() *** DEPRECATED ***
865 *
866 * Deprecated:
867 * This function is deprecated in Mac OS X 10.4 and not available in
868 * 64-bit. Please see ATSFont.h for alternatives. Suggested
869 * replacement is ATSFontIteratorCreate.
870 *
871 * Availability:
872 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
873 * CarbonLib: in CarbonLib 1.0 and later
874 * Non-Carbon CFM: in FontManager 9.0 and later
875 }
FMCreateFontIteratornull876 function FMCreateFontIterator( {const} iFilter: FMFilterPtr { can be NULL }; iRefCon: UnivPtr; iOptions: OptionBits; var ioIterator: FMFontIterator ): OSStatus; external name '_FMCreateFontIterator';
877 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
878
879
880 {
881 * FMDisposeFontIterator() *** DEPRECATED ***
882 *
883 * Deprecated:
884 * This function is deprecated in Mac OS X 10.4 and not available in
885 * 64-bit. Please see ATSFont.h for alternatives. Suggested
886 * replacement is ATSFontIteratorRelease.
887 *
888 * Availability:
889 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
890 * CarbonLib: in CarbonLib 1.0 and later
891 * Non-Carbon CFM: in FontManager 9.0 and later
892 }
FMDisposeFontIteratornull893 function FMDisposeFontIterator( var ioIterator: FMFontIterator ): OSStatus; external name '_FMDisposeFontIterator';
894 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
895
896
897 {
898 * FMResetFontIterator() *** DEPRECATED ***
899 *
900 * Deprecated:
901 * This function is deprecated in Mac OS X 10.4 and not available in
902 * 64-bit. Please see ATSFont.h for alternatives. Suggested
903 * replacement is ATSFontIteratorReset.
904 *
905 * Availability:
906 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
907 * CarbonLib: in CarbonLib 1.0 and later
908 * Non-Carbon CFM: in FontManager 9.0 and later
909 }
FMResetFontIteratornull910 function FMResetFontIterator( {const} iFilter: FMFilterPtr { can be NULL }; iRefCon: UnivPtr; iOptions: OptionBits; var ioIterator: FMFontIterator ): OSStatus; external name '_FMResetFontIterator';
911 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
912
913
914 {
915 * FMGetNextFont() *** DEPRECATED ***
916 *
917 * Deprecated:
918 * This function is deprecated in Mac OS X 10.4 and not available in
919 * 64-bit. Please see ATSFont.h for alternatives. Suggested
920 * replacement is ATSFontIteratorNext.
921 *
922 * Availability:
923 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
924 * CarbonLib: in CarbonLib 1.0 and later
925 * Non-Carbon CFM: in FontManager 9.0 and later
926 }
FMGetNextFontnull927 function FMGetNextFont( var ioIterator: FMFontIterator; var oFont: FMFont ): OSStatus; external name '_FMGetNextFont';
928 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
929
930
931 {
932 * FMCreateFontFamilyInstanceIterator() *** DEPRECATED ***
933 *
934 * Deprecated:
935 * This function is deprecated in Mac OS X 10.4 and not available in
936 * 64-bit. Please see ATSFont.h for alternatives.
937 *
938 * Availability:
939 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
940 * CarbonLib: in CarbonLib 1.0 and later
941 * Non-Carbon CFM: in FontManager 9.0 and later
942 }
FMCreateFontFamilyInstanceIteratornull943 function FMCreateFontFamilyInstanceIterator( iFontFamily: FMFontFamily; var ioIterator: FMFontFamilyInstanceIterator ): OSStatus; external name '_FMCreateFontFamilyInstanceIterator';
944 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
945
946
947 {
948 * FMDisposeFontFamilyInstanceIterator() *** DEPRECATED ***
949 *
950 * Deprecated:
951 * This function is deprecated in Mac OS X 10.4 and not available in
952 * 64-bit. Please see ATSFont.h for alternatives.
953 *
954 * Availability:
955 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
956 * CarbonLib: in CarbonLib 1.0 and later
957 * Non-Carbon CFM: in FontManager 9.0 and later
958 }
FMDisposeFontFamilyInstanceIteratornull959 function FMDisposeFontFamilyInstanceIterator( var ioIterator: FMFontFamilyInstanceIterator ): OSStatus; external name '_FMDisposeFontFamilyInstanceIterator';
960 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
961
962
963 {
964 * FMResetFontFamilyInstanceIterator() *** DEPRECATED ***
965 *
966 * Deprecated:
967 * This function is deprecated in Mac OS X 10.4 and not available in
968 * 64-bit. Please see ATSFont.h for alternatives.
969 *
970 * Availability:
971 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
972 * CarbonLib: in CarbonLib 1.0 and later
973 * Non-Carbon CFM: in FontManager 9.0 and later
974 }
FMResetFontFamilyInstanceIteratornull975 function FMResetFontFamilyInstanceIterator( iFontFamily: FMFontFamily; var ioIterator: FMFontFamilyInstanceIterator ): OSStatus; external name '_FMResetFontFamilyInstanceIterator';
976 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
977
978
979 {
980 * FMGetNextFontFamilyInstance() *** DEPRECATED ***
981 *
982 * Deprecated:
983 * This function is deprecated in Mac OS X 10.4 and not available in
984 * 64-bit. Please see ATSFont.h for alternatives.
985 *
986 * Availability:
987 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
988 * CarbonLib: in CarbonLib 1.0 and later
989 * Non-Carbon CFM: in FontManager 9.0 and later
990 }
FMGetNextFontFamilyInstancenull991 function FMGetNextFontFamilyInstance( var ioIterator: FMFontFamilyInstanceIterator; var oFont: FMFont; oStyle: FMFontStylePtr { can be NULL }; oSize: FMFontSizePtr { can be NULL } ): OSStatus; external name '_FMGetNextFontFamilyInstance';
992 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
993
994
995 {
996 * FMGetFontFamilyFromName() *** DEPRECATED ***
997 *
998 * Deprecated:
999 * This function is deprecated in Mac OS X 10.4 and not available in
1000 * 64-bit. Please see ATSFont.h for alternatives. Suggested
1001 * replacement is ATSFontFamilyFindFromName.
1002 *
1003 * Availability:
1004 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
1005 * CarbonLib: in CarbonLib 1.0 and later
1006 * Non-Carbon CFM: in FontManager 9.0 and later
1007 }
FMGetFontFamilyFromNamenull1008 function FMGetFontFamilyFromName( const (*var*) iName: Str255 ): FMFontFamily; external name '_FMGetFontFamilyFromName';
1009 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
1010
1011
1012 {
1013 * FMGetFontFamilyName() *** DEPRECATED ***
1014 *
1015 * Deprecated:
1016 * This function is deprecated in Mac OS X 10.4 and not available in
1017 * 64-bit. Please see ATSFont.h for alternatives. Suggested
1018 * replacement is ATSFontFamilyGetName.
1019 *
1020 * Availability:
1021 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
1022 * CarbonLib: in CarbonLib 1.0 and later
1023 * Non-Carbon CFM: in FontManager 9.0 and later
1024 }
FMGetFontFamilyNamenull1025 function FMGetFontFamilyName( iFontFamily: FMFontFamily; var oName: Str255 ): OSStatus; external name '_FMGetFontFamilyName';
1026 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
1027
1028
1029 {
1030 * FMGetFontFamilyTextEncoding() *** DEPRECATED ***
1031 *
1032 * Deprecated:
1033 * This function is deprecated in Mac OS X 10.4 and not available in
1034 * 64-bit. Please see ATSFont.h for alternatives. Suggested
1035 * replacement is ATSFontFamilyGetEncoding.
1036 *
1037 * Availability:
1038 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
1039 * CarbonLib: in CarbonLib 1.0 and later
1040 * Non-Carbon CFM: in FontManager 9.0 and later
1041 }
FMGetFontFamilyTextEncodingnull1042 function FMGetFontFamilyTextEncoding( iFontFamily: FMFontFamily; var oTextEncoding: TextEncoding ): OSStatus; external name '_FMGetFontFamilyTextEncoding';
1043 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
1044
1045
1046 {
1047 * FMGetFontFamilyGeneration() *** DEPRECATED ***
1048 *
1049 * Deprecated:
1050 * This function is deprecated in Mac OS X 10.4 and not available in
1051 * 64-bit. Please see ATSFont.h for alternatives. Suggested
1052 * replacement is ATSFontFamilyGetGeneration.
1053 *
1054 * Availability:
1055 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
1056 * CarbonLib: in CarbonLib 1.0 and later
1057 * Non-Carbon CFM: in FontManager 9.0 and later
1058 }
FMGetFontFamilyGenerationnull1059 function FMGetFontFamilyGeneration( iFontFamily: FMFontFamily; var oGeneration: FMGeneration ): OSStatus; external name '_FMGetFontFamilyGeneration';
1060 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
1061
1062
1063 {
1064 * FMGetFontFormat() *** DEPRECATED ***
1065 *
1066 * Deprecated:
1067 * This function is deprecated in Mac OS X 10.4 and not available in
1068 * 64-bit. Please see ATSFont.h for alternatives.
1069 *
1070 * Availability:
1071 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
1072 * CarbonLib: in CarbonLib 1.0 and later
1073 * Non-Carbon CFM: in FontManager 9.0 and later
1074 }
FMGetFontFormatnull1075 function FMGetFontFormat( iFont: FMFont; var oFormat: FourCharCode ): OSStatus; external name '_FMGetFontFormat';
1076 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
1077
1078
1079 {
1080 * FMGetFontTableDirectory() *** DEPRECATED ***
1081 *
1082 * Availability:
1083 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
1084 * CarbonLib: in CarbonLib 1.0 and later
1085 * Non-Carbon CFM: in FontManager 9.0 and later
1086 }
FMGetFontTableDirectorynull1087 function FMGetFontTableDirectory( iFont: FMFont; iLength: ByteCount; iBuffer: UnivPtr; oActualLength: ByteCountPtr { can be NULL } ): OSStatus; external name '_FMGetFontTableDirectory';
1088 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
1089
1090
1091 {
1092 * FMGetFontTable() *** DEPRECATED ***
1093 *
1094 * Deprecated:
1095 * This function is deprecated in Mac OS X 10.4 and not available in
1096 * 64-bit. Please see ATSFont.h for alternatives. Suggested
1097 * replacement is ATSFontGetTable or CTFontCopyTable from
1098 * CoreText/CTFont.h.
1099 *
1100 * Availability:
1101 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
1102 * CarbonLib: in CarbonLib 1.0 and later
1103 * Non-Carbon CFM: in FontManager 9.0 and later
1104 }
FMGetFontTablenull1105 function FMGetFontTable( iFont: FMFont; iTag: FourCharCode; iOffset: ByteOffset; iLength: ByteCount; iBuffer: UnivPtr; oActualLength: ByteCountPtr { can be NULL } ): OSStatus; external name '_FMGetFontTable';
1106 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
1107
1108
1109 {
1110 * FMGetFontGeneration() *** DEPRECATED ***
1111 *
1112 * Deprecated:
1113 * This function is deprecated in Mac OS X 10.4 and not available in
1114 * 64-bit. Please see ATSFont.h for alternatives. Suggested
1115 * replacement is ATSFontGetGeneration.
1116 *
1117 * Availability:
1118 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
1119 * CarbonLib: in CarbonLib 1.0 and later
1120 * Non-Carbon CFM: in FontManager 9.0 and later
1121 }
FMGetFontGenerationnull1122 function FMGetFontGeneration( iFont: FMFont; var oGeneration: FMGeneration ): OSStatus; external name '_FMGetFontGeneration';
1123 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
1124
1125
1126 {
1127 * FMGetFontContainer() *** DEPRECATED ***
1128 *
1129 * Deprecated:
1130 * This function is deprecated in Mac OS X 10.4 and not available in
1131 * 64-bit. Please see ATSFont.h for alternatives. Suggested
1132 * replacement is ATSFontGetContainer.
1133 *
1134 * Availability:
1135 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
1136 * CarbonLib: in CarbonLib 1.0 and later
1137 * Non-Carbon CFM: in FontManager 9.0 and later
1138 }
FMGetFontContainernull1139 function FMGetFontContainer( iFont: FMFont; var oFontContainer: FSSpec ): OSStatus; external name '_FMGetFontContainer';
1140 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
1141
1142
1143 {
1144 * FMGetFontFromFontFamilyInstance() *** DEPRECATED ***
1145 *
1146 * Deprecated:
1147 * This function is deprecated in Mac OS X 10.4 and not available in
1148 * 64-bit. Please see ATSFont.h for alternatives. Suggested
1149 * replacement is CTFontCreateFromQuickdrawInstance in
1150 * CoreText/CTFont.h.
1151 *
1152 * Availability:
1153 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
1154 * CarbonLib: in CarbonLib 1.0 and later
1155 * Non-Carbon CFM: in FontManager 9.0 and later
1156 }
FMGetFontFromFontFamilyInstancenull1157 function FMGetFontFromFontFamilyInstance( iFontFamily: FMFontFamily; iStyle: FMFontStyle; var oFont: FMFont; oIntrinsicStyle: FMFontStylePtr { can be NULL } ): OSStatus; external name '_FMGetFontFromFontFamilyInstance';
1158 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
1159
1160
1161 {
1162 * FMGetFontFamilyInstanceFromFont() *** DEPRECATED ***
1163 *
1164 * Deprecated:
1165 * This function is deprecated in Mac OS X 10.4 and not available in
1166 * 64-bit. Please see ATSFont.h for alternatives.
1167 *
1168 * Availability:
1169 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
1170 * CarbonLib: in CarbonLib 1.0 and later
1171 * Non-Carbon CFM: in FontManager 9.0 and later
1172 }
FMGetFontFamilyInstanceFromFontnull1173 function FMGetFontFamilyInstanceFromFont( iFont: FMFont; var oFontFamily: FMFontFamily; var oStyle: FMFontStyle ): OSStatus; external name '_FMGetFontFamilyInstanceFromFont';
1174 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
1175
1176
1177 {
1178 * FMGetATSFontFamilyRefFromFontFamily() *** DEPRECATED ***
1179 *
1180 * Deprecated:
1181 * This function is deprecated in Mac OS X 10.4 and not available in
1182 * 64-bit. Please see ATSFont.h for alternatives.
1183 *
1184 * Availability:
1185 * Mac OS X: in version 10.1 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
1186 * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
1187 * Non-Carbon CFM: not available
1188 }
FMGetATSFontFamilyRefFromFontFamilynull1189 function FMGetATSFontFamilyRefFromFontFamily( iFamily: FMFontFamily ): ATSFontFamilyRef; external name '_FMGetATSFontFamilyRefFromFontFamily';
1190 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
1191
1192
1193 {
1194 * FMGetFontFamilyFromATSFontFamilyRef() *** DEPRECATED ***
1195 *
1196 * Deprecated:
1197 * This function is deprecated in Mac OS X 10.4 and not available in
1198 * 64-bit. Please see ATSFont.h for alternatives.
1199 *
1200 * Availability:
1201 * Mac OS X: in version 10.1 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
1202 * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
1203 * Non-Carbon CFM: not available
1204 }
FMGetFontFamilyFromATSFontFamilyRefnull1205 function FMGetFontFamilyFromATSFontFamilyRef( iFamily: ATSFontFamilyRef ): FMFontFamily; external name '_FMGetFontFamilyFromATSFontFamilyRef';
1206 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
1207
1208
1209 {
1210 * FMActivateFonts() *** DEPRECATED ***
1211 *
1212 * Deprecated:
1213 * This function is deprecated in Mac OS X 10.4 and not available in
1214 * 64-bit. Please see ATSFont.h for alternatives. Suggested
1215 * replacement is ATSFontActivateFromFileReference.
1216 *
1217 * Availability:
1218 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
1219 * CarbonLib: in CarbonLib 1.0 and later
1220 * Non-Carbon CFM: in FontManager 9.0 and later
1221 }
FMActivateFontsnull1222 function FMActivateFonts( const (*var*) iFontContainer: FSSpec; {const} iFilter: FMFilterPtr { can be NULL }; iRefCon: UnivPtr; iOptions: OptionBits ): OSStatus; external name '_FMActivateFonts';
1223 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
1224
1225
1226 {
1227 * FMDeactivateFonts() *** DEPRECATED ***
1228 *
1229 * Deprecated:
1230 * This function is deprecated in Mac OS X 10.4 and not available in
1231 * 64-bit. Please see ATSFont.h for alternatives. Suggested
1232 * replacement is ATSFontDeactivate.
1233 *
1234 * Availability:
1235 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
1236 * CarbonLib: in CarbonLib 1.0 and later
1237 * Non-Carbon CFM: in FontManager 9.0 and later
1238 }
FMDeactivateFontsnull1239 function FMDeactivateFonts( const (*var*) iFontContainer: FSSpec; {const} iFilter: FMFilterPtr { can be NULL }; iRefCon: UnivPtr; iOptions: OptionBits ): OSStatus; external name '_FMDeactivateFonts';
1240 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
1241
1242
1243 { Use ATSGetGeneration instead of FMGetGeneration }
1244 {
1245 * FMGetGeneration() *** DEPRECATED ***
1246 *
1247 * Deprecated:
1248 * This function is deprecated in Mac OS X 10.4 and not available in
1249 * 64-bit. Please see ATSFont.h for alternatives. Suggested
1250 * replacement is ATSGetGeneration.
1251 *
1252 * Availability:
1253 * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.5
1254 * CarbonLib: in CarbonLib 1.0 and later
1255 * Non-Carbon CFM: in FontManager 9.0 and later
1256 }
FMGetGenerationnull1257 function FMGetGeneration: FMGeneration; external name '_FMGetGeneration';
1258 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1259
1260
1261 {
1262 * FMGetFontContainerFromFontFamilyInstance() *** DEPRECATED ***
1263 *
1264 * Deprecated:
1265 * This function is deprecated in Mac OS X 10.4 and not available in
1266 * 64-bit. Please see ATSFont.h for alternatives. Suggested
1267 * replacement is ATSFontGetContainer.
1268 *
1269 * Availability:
1270 * Mac OS X: in version 10.1 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
1271 * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
1272 * Non-Carbon CFM: not available
1273 }
FMGetFontContainerFromFontFamilyInstancenull1274 function FMGetFontContainerFromFontFamilyInstance( iFontFamily: FMFontFamily; iStyle: FMFontStyle; iFontSize: FMFontSize; var oFontContainer: FSSpec ): OSStatus; external name '_FMGetFontContainerFromFontFamilyInstance';
1275 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
1276
1277
1278 {
1279 * FMGetFontFamilyResource() *** DEPRECATED ***
1280 *
1281 * Deprecated:
1282 * This function is deprecated in Mac OS X 10.4 and not available in
1283 * 64-bit. Please see ATSFont.h for alternatives. Suggested
1284 * replacement is ATSFontGetFontFamilyResource.
1285 *
1286 * Availability:
1287 * Mac OS X: in version 10.1 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
1288 * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
1289 * Non-Carbon CFM: not available
1290 }
FMGetFontFamilyResourcenull1291 function FMGetFontFamilyResource( iFontFamily: FMFontFamily; iFontStyle: FMFontStyle; iFontSize: FMFontSize; iBufferSize: ByteCount; ioBuffer: UnivPtr; oSize: ByteCountPtr { can be NULL } ): OSStatus; external name '_FMGetFontFamilyResource';
1292 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
1293
1294
1295 {$endc} {not TARGET_CPU_64}
1296
1297 type
1298 FontFamilyID = FMFontFamily;
1299 FontPointSize = FMFontSize;
1300 const
1301 kFMUseGlobalScopeOption = $00000001;
1302
1303 {
1304 * The font identifier constants are deprecated; use ATSFontFamilyFindFromQuickDrawName in ATSFont.h
1305 * to find a font family from a standard QuickDraw name.
1306 }
1307 const
1308 kFontIDNewYork = 2;
1309 kFontIDGeneva = 3;
1310 kFontIDMonaco = 4;
1311 kFontIDVenice = 5;
1312 kFontIDLondon = 6;
1313 kFontIDAthens = 7;
1314 kFontIDSanFrancisco = 8;
1315 kFontIDToronto = 9;
1316 kFontIDCairo = 11;
1317 kFontIDLosAngeles = 12;
1318 kFontIDTimes = 20;
1319 kFontIDHelvetica = 21;
1320 kFontIDCourier = 22;
1321 kFontIDSymbol = 23;
1322 kFontIDMobile = 24;
1323
1324 {
1325 * The following data structures referenced by the low memory global variables of QuickDraw are
1326 * deprecated on Mac OS X and CarbonLib 1.1. The low memory global variables are not shared between
1327 * processes and may result in inconsistencies compared to previous releases of the system software.
1328 * Changes made to the information contained in the low memory global variables, including any
1329 * indirectly referenced width tables, font family records, and font records, are not reflected in
1330 * the global state for QuickDraw and should only be accessed through the font access and data
1331 * management functions of ATS.
1332 }
1333 type
1334 WidEntryPtr = ^WidEntry;
1335 WidEntry = record
1336 widStyle: SInt16; {style entry applies to}
1337 end;
1338 type
1339 WidTablePtr = ^WidTable;
1340 WidTable = record
1341 numWidths: SInt16; {number of entries - 1}
1342 end;
1343 type
1344 WidthTable = packed record
1345 tabData: array [0..255] of Fixed; {character widths}
1346 tabFont: Handle; {font record used to build table}
1347 sExtra: SIGNEDLONG; {space extra used for table}
1348 style: SIGNEDLONG; {extra due to style}
1349 fID: SInt16; {font family ID}
1350 fSize: SInt16; {font size request}
1351 face: SInt16; {style (face) request}
1352 device: SInt16; {device requested}
1353 inNumer: Point; {scale factors requested}
1354 inDenom: Point; {scale factors requested}
1355 aFID: SInt16; {actual font family ID for table}
1356 fHand: Handle; {family record used to build up table}
1357 usedFam: Boolean; {used fixed point family widths}
1358 aFace: UInt8; {actual face produced}
1359 vOutput: SInt16; {vertical scale output value}
1360 hOutput: SInt16; {horizontal scale output value}
1361 vFactor: SInt16; {vertical scale output value}
1362 hFactor: SInt16; {horizontal scale output value}
1363 aSize: SInt16; {actual size of actual font used}
1364 tabSize: SInt16; {total size of table}
1365 end;
1366 WidthTablePtr = ^WidthTable;
1367 type
1368 WidthTableHdl = ^WidthTablePtr;
1369 {$ifc OLDROUTINENAMES}
1370 const
1371 newYork = kFontIDNewYork;
1372 geneva = kFontIDGeneva;
1373 monaco = kFontIDMonaco;
1374 venice = kFontIDVenice;
1375 london = kFontIDLondon;
1376 athens = kFontIDAthens;
1377 sanFran = kFontIDSanFrancisco;
1378 toronto = kFontIDToronto;
1379 cairo = kFontIDCairo;
1380 losAngeles = kFontIDLosAngeles;
1381 times = kFontIDTimes;
1382 helvetica = kFontIDHelvetica;
1383 courier = kFontIDCourier;
1384 symbol = kFontIDSymbol;
1385 mobile = kFontIDMobile;
1386
1387 {$endc} {OLDROUTINENAMES}
1388
1389
1390 {$endc} {TARGET_OS_MAC}
1391
1392 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
1393
1394 end.
1395 {$endc} {not MACOSALLINCLUDE}
1396