summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/univint/src/Fonts.pas
blob: 0a79b0771fda5d099be4ac9f792a4eb7497f06e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
{
     File:       QD/Fonts.h
 
     Contains:   Public interface to the Font Manager.
 
     Version:    Quickdraw-262~1
 
     Copyright:  © 1985-2008 by Apple Inc. all rights reserved.
 
     Bugs?:      For bug reports, consult the following page on
                 the World Wide Web:
 
                     http://www.freepascal.org/bugs.html
 
}
{   Pascal Translation Updated:  Jonas Maebe, <jonas@freepascal.org>, October 2009 }
{
    Modified for use with Free Pascal
    Version 308
    Please report any bugs to <gpc@microbizz.nl>
}

{$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
{$mode macpas}
{$packenum 1}
{$macro on}
{$inline on}
{$calling mwpascal}

unit Fonts;
interface
{$setc UNIVERSAL_INTERFACES_VERSION := $0400}
{$setc GAP_INTERFACES_VERSION := $0308}

{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
{$endc}

{$ifc defined CPUPOWERPC and defined CPUI386}
	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
{$endc}
{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
{$endc}

{$ifc not defined __ppc__ and defined CPUPOWERPC32}
	{$setc __ppc__ := 1}
{$elsec}
	{$setc __ppc__ := 0}
{$endc}
{$ifc not defined __ppc64__ and defined CPUPOWERPC64}
	{$setc __ppc64__ := 1}
{$elsec}
	{$setc __ppc64__ := 0}
{$endc}
{$ifc not defined __i386__ and defined CPUI386}
	{$setc __i386__ := 1}
{$elsec}
	{$setc __i386__ := 0}
{$endc}
{$ifc not defined __x86_64__ and defined CPUX86_64}
	{$setc __x86_64__ := 1}
{$elsec}
	{$setc __x86_64__ := 0}
{$endc}
{$ifc not defined __arm__ and defined CPUARM}
	{$setc __arm__ := 1}
{$elsec}
	{$setc __arm__ := 0}
{$endc}

{$ifc defined cpu64}
  {$setc __LP64__ := 1}
{$elsec}
  {$setc __LP64__ := 0}
{$endc}


{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
	{$error Conflicting definitions for __ppc__ and __i386__}
{$endc}

{$ifc defined __ppc__ and __ppc__}
	{$setc TARGET_CPU_PPC := TRUE}
	{$setc TARGET_CPU_PPC64 := FALSE}
	{$setc TARGET_CPU_X86 := FALSE}
	{$setc TARGET_CPU_X86_64 := FALSE}
	{$setc TARGET_CPU_ARM := FALSE}
	{$setc TARGET_OS_MAC := TRUE}
	{$setc TARGET_OS_IPHONE := FALSE}
	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
{$elifc defined __ppc64__ and __ppc64__}
	{$setc TARGET_CPU_PPC := FALSE}
	{$setc TARGET_CPU_PPC64 := TRUE}
	{$setc TARGET_CPU_X86 := FALSE}
	{$setc TARGET_CPU_X86_64 := FALSE}
	{$setc TARGET_CPU_ARM := FALSE}
	{$setc TARGET_OS_MAC := TRUE}
	{$setc TARGET_OS_IPHONE := FALSE}
	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
{$elifc defined __i386__ and __i386__}
	{$setc TARGET_CPU_PPC := FALSE}
	{$setc TARGET_CPU_PPC64 := FALSE}
	{$setc TARGET_CPU_X86 := TRUE}
	{$setc TARGET_CPU_X86_64 := FALSE}
	{$setc TARGET_CPU_ARM := FALSE}
{$ifc defined(iphonesim)}
 	{$setc TARGET_OS_MAC := FALSE}
	{$setc TARGET_OS_IPHONE := TRUE}
	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
{$elsec}
	{$setc TARGET_OS_MAC := TRUE}
	{$setc TARGET_OS_IPHONE := FALSE}
	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
{$endc}
{$elifc defined __x86_64__ and __x86_64__}
	{$setc TARGET_CPU_PPC := FALSE}
	{$setc TARGET_CPU_PPC64 := FALSE}
	{$setc TARGET_CPU_X86 := FALSE}
	{$setc TARGET_CPU_X86_64 := TRUE}
	{$setc TARGET_CPU_ARM := FALSE}
	{$setc TARGET_OS_MAC := TRUE}
	{$setc TARGET_OS_IPHONE := FALSE}
	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
{$elifc defined __arm__ and __arm__}
	{$setc TARGET_CPU_PPC := FALSE}
	{$setc TARGET_CPU_PPC64 := FALSE}
	{$setc TARGET_CPU_X86 := FALSE}
	{$setc TARGET_CPU_X86_64 := FALSE}
	{$setc TARGET_CPU_ARM := TRUE}
	{ will require compiler define when/if other Apple devices with ARM cpus ship }
	{$setc TARGET_OS_MAC := FALSE}
	{$setc TARGET_OS_IPHONE := TRUE}
	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
{$elsec}
	{$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ is defined.}
{$endc}

{$ifc defined __LP64__ and __LP64__ }
  {$setc TARGET_CPU_64 := TRUE}
{$elsec}
  {$setc TARGET_CPU_64 := FALSE}
{$endc}

{$ifc defined FPC_BIG_ENDIAN}
	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
{$elifc defined FPC_LITTLE_ENDIAN}
	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
{$elsec}
	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
{$endc}
{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
{$setc CALL_NOT_IN_CARBON := FALSE}
{$setc OLDROUTINENAMES := FALSE}
{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
{$setc OPAQUE_UPP_TYPES := TRUE}
{$setc OTCARBONAPPLICATION := TRUE}
{$setc OTKERNEL := FALSE}
{$setc PM_USE_SESSION_APIS := TRUE}
{$setc TARGET_API_MAC_CARBON := TRUE}
{$setc TARGET_API_MAC_OS8 := FALSE}
{$setc TARGET_API_MAC_OSX := TRUE}
{$setc TARGET_CARBON := TRUE}
{$setc TARGET_CPU_68K := FALSE}
{$setc TARGET_CPU_MIPS := FALSE}
{$setc TARGET_CPU_SPARC := FALSE}
{$setc TARGET_OS_UNIX := FALSE}
{$setc TARGET_OS_WIN32 := FALSE}
{$setc TARGET_RT_MAC_68881 := FALSE}
{$setc TARGET_RT_MAC_CFM := FALSE}
{$setc TARGET_RT_MAC_MACHO := TRUE}
{$setc TYPED_FUNCTION_POINTERS := TRUE}
{$setc TYPE_BOOL := FALSE}
{$setc TYPE_EXTENDED := FALSE}
{$setc TYPE_LONGLONG := TRUE}
uses MacTypes,QuickdrawText,ATSTypes,Files,MacErrors,QuickdrawTypes,TextCommon,CGFont;
{$endc} {not MACOSALLINCLUDE}


{$ifc TARGET_OS_MAC}

{$ALIGN MAC68K}

{$ifc not TARGET_CPU_64}
{
 *  FMGetATSFontRefFromFont()
 *  
 *  Summary:
 *    Obtains the ATS font reference associated with a QuickDraw font
 *    reference.
 *  
 *  Parameters:
 *    
 *    iFont:
 *      A QuickDraw font reference.
 *    
 *    Result:
 *      The ATS font reference associated with the specified QuickDraw
 *      font reference.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.1 and later in ApplicationServices.framework [32-bit only]
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
 *    Non-Carbon CFM:   not available
 }
function FMGetATSFontRefFromFont( iFont: FMFont ): ATSFontRef; external name '_FMGetATSFontRefFromFont';
(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)


{
 *  FMGetFontFromATSFontRef()
 *  
 *  Summary:
 *    Obtains the QuickDraw font reference associated with an ATS font
 *    reference.
 *  
 *  Parameters:
 *    
 *    iFont:
 *      An ATS font reference.
 *    
 *    Result:
 *      The QuickDraw font reference associated with the specified ATS
 *      font reference.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.1 and later in ApplicationServices.framework [32-bit only]
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
 *    Non-Carbon CFM:   not available
 }
function FMGetFontFromATSFontRef( iFont: ATSFontRef ): FMFont; external name '_FMGetFontFromATSFontRef';
(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)


{
 *  FMFontGetCGFontRefFromFontFamilyInstance()
 *  
 *  Summary:
 *    Obtains the Quartz font reference associated with a typeface from
 *    a QuickDraw font family reference.
 *  
 *  Parameters:
 *    
 *    iFontFamily:
 *      A QuickDraw font family reference.
 *    
 *    iStyle:
 *      A QuickDraw font style.
 *    
 *    oFont:
 *      A pointer to a Quartz font reference. On output, points to the
 *      font reference for the specified font family and style. You are
 *      responsible for allocating the memory for the font reference.
 *    
 *    oStyle:
 *      On output, a pointer to an intrinsic font style. If a font
 *      reference isnÕt found that matches the font family reference
 *      and font style you specify, the function returns the QuickDraw
 *      style that matches most closely.
 *    
 *    Result:
 *      A result code. If a font reference and intrinsic style are not
 *      found, the function returns a value of kFMInvalidFontErr.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework [32-bit only]
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function FMFontGetCGFontRefFromFontFamilyInstance( iFontFamily: FMFontFamily; iStyle: FMFontStyle; var oFont: CGFontRef; var oStyle: FMFontStyle ): OSStatus; external name '_FMFontGetCGFontRefFromFontFamilyInstance';
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)


{
 *  The remaining functions in this file have all been deprecated on Mac OS X 10.4. There are other
 *  solutions that are recommended that provide better compatibility with the rest of the operating
 *  system.
 *  
 *  Instead of using the QuickDraw functions, you should consider the following:
 *
 *  1.  For drawing and measuring text, you can use the Appearance Manager API in HITheme.h or the
 *      ATSUI API in ATSUnicode.h to render text directly through a Quartz graphics context. Alternatively
 *      use CoreText on Mac OS X 10.5 or later.
 *
 *  2.  For accessing information on fonts tracked by the operating system, please refer to the
 *      functions described in ATSFont.h. Alternatively use CoreText on Mac OS X 10.5 or later.
 *  
 *  3.  For accessing and modifying information on fonts in a Quartz graphics context, please refer
 *      to the functions described in CoreGraphics.h.
 }
{$endc} {not TARGET_CPU_64}

const
	systemFont = 0;
	applFont = 1;

const
	kFMDefaultOptions = kNilOptions;

{ Activation contexts }
const
	kFMDefaultActivationContext = kFMDefaultOptions;
	kFMGlobalActivationContext = $00000001;
	kFMLocalActivationContext = kFMDefaultActivationContext;

{ Iteration scopes }
const
	kFMDefaultIterationScope = kFMDefaultOptions;
	kFMGlobalIterationScope = $00000001;
	kFMLocalIterationScope = kFMDefaultIterationScope;

{ kPlatformDefaultGuiFontID is used in QuickTime 3.0. }
const
	kPlatformDefaultGuiFontID = applFont;

const
	commandMark = 17;
	checkMark = 18;
	diamondMark = 19;
	appleMark = 20;

const
	propFont = 36864;
	prpFntH = 36865;
	prpFntW = 36866;
	prpFntHW = 36867;
	fixedFont = 45056;
	fxdFntH = 45057;
	fxdFntW = 45058;
	fxdFntHW = 45059;
	fontWid = 44208;

type
	FMInputPtr = ^FMInput;
	FMInput = record
		family: SInt16;
		size: SInt16;
		face: Style;
		needBits: Boolean;
		device: SInt16;
		numer: Point;
		denom: Point;
	end;
type
	FMOutput = record
		errNum: SInt16;
		fontHandle: Handle;
		boldPixels: UInt8;
		italicPixels: UInt8;
		ulOffset: UInt8;
		ulShadow: UInt8;
		ulThick: UInt8;
		shadowPixels: UInt8;
		extra: SInt8;
		ascent: UInt8;
		descent: UInt8;
		widMax: UInt8;
		leading: SInt8;
		curStyle: SInt8;
		numer: Point;
		denom: Point;
	end;
	FMOutputPtr = ^FMOutput;
type
	FMOutPtr = FMOutputPtr;
	FMetricRec = record
		ascent: Fixed;                 {base line to top}
		descent: Fixed;                {base line to bottom}
		leading: Fixed;                {leading between lines}
		widMax: Fixed;                 {maximum character width}
		wTabHandle: Handle;             {handle to font width table}
	end;
	FMetricRecPtr = ^FMetricRec;
type
	FMetricRecHandle = ^FMetricRecPtr;
{$ifc not TARGET_CPU_64}
{
 *  InitFonts()
 *  
 *  Availability:
 *    Mac OS X:         not available [32-bit only]
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 }


{
 *  GetFontName()   *** DEPRECATED ***
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 }
procedure GetFontName( familyID: SInt16; var name: Str255 ); external name '_GetFontName';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  GetFNum()   *** DEPRECATED ***
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 }
procedure GetFNum( const (*var*) name: Str255; var familyID: SInt16 ); external name '_GetFNum';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  RealFont()   *** DEPRECATED ***
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 }
function RealFont( fontNum: SInt16; size: SInt16 ): Boolean; external name '_RealFont';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  SetFontLock()
 *  
 *  Availability:
 *    Mac OS X:         not available [32-bit only]
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 }


{
 *  FMSwapFont()   *** DEPRECATED ***
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 }
function FMSwapFont( const (*var*) inRec: FMInput ): FMOutPtr; external name '_FMSwapFont';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  SetFScaleDisable()   *** DEPRECATED ***
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 }
procedure SetFScaleDisable( fscaleDisable: Boolean ); external name '_SetFScaleDisable';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FontMetrics()   *** DEPRECATED ***
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 }
procedure FontMetrics( theMetrics: FMetricRecPtr ); external name '_FontMetrics';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  SetFractEnable()   *** DEPRECATED ***
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 }
procedure SetFractEnable( fractEnable: Boolean ); external name '_SetFractEnable';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  GetDefFontSize()   *** DEPRECATED ***
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 }
function GetDefFontSize: SInt16; external name '_GetDefFontSize';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  IsOutline()   *** DEPRECATED ***
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 }
function IsOutline( numer: Point; denom: Point ): Boolean; external name '_IsOutline';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  SetOutlinePreferred()   *** DEPRECATED ***
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 }
procedure SetOutlinePreferred( outlinePreferred: Boolean ); external name '_SetOutlinePreferred';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  GetOutlinePreferred()   *** DEPRECATED ***
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 }
function GetOutlinePreferred: Boolean; external name '_GetOutlinePreferred';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  OutlineMetrics()   *** DEPRECATED ***
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 }
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';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  SetPreserveGlyph()   *** DEPRECATED ***
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 }
procedure SetPreserveGlyph( preserveGlyph: Boolean ); external name '_SetPreserveGlyph';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  GetPreserveGlyph()   *** DEPRECATED ***
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 }
function GetPreserveGlyph: Boolean; external name '_GetPreserveGlyph';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{$endc} {not TARGET_CPU_64}

{
 *  FlushFonts()
 *  
 *  Availability:
 *    Mac OS X:         not available
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 }


{$ifc not TARGET_CPU_64}
{
 *  getfnum()
 *  
 *  Availability:
 *    Mac OS X:         not available [32-bit only]
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 }


{
 *  getfontname()
 *  
 *  Availability:
 *    Mac OS X:         not available [32-bit only]
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 }


{$endc} {not TARGET_CPU_64}

{$ifc not TARGET_CPU_64}
{
 *  GetSysFont()   *** DEPRECATED ***
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 }
function GetSysFont: SInt16; external name '_GetSysFont';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  GetAppFont()   *** DEPRECATED ***
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 }
function GetAppFont: SInt16; external name '_GetAppFont';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{ Extended font data functions (available only with Mac OS 8.5 or later). }
{
 *  SetAntiAliasedTextEnabled()   *** DEPRECATED ***
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in InterfaceLib 8.6 and later
 }
function SetAntiAliasedTextEnabled( iEnable: Boolean; iMinFontSize: SInt16 ): OSStatus; external name '_SetAntiAliasedTextEnabled';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  IsAntiAliasedTextEnabled()   *** DEPRECATED ***
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in InterfaceLib 8.6 and later
 }
function IsAntiAliasedTextEnabled( var oMinFontSize: SInt16 ): Boolean; external name '_IsAntiAliasedTextEnabled';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  QDTextBounds()   *** DEPRECATED ***
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in InterfaceLib 8.6 and later
 }
procedure QDTextBounds( byteCount: SInt16; textAddr: {const} UnivPtr; var bounds: Rect ); external name '_QDTextBounds';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FetchFontInfo()   *** DEPRECATED ***
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in InterfaceLib 8.6 and later
 }
function FetchFontInfo( fontID: SInt16; fontSize: SInt16; fontStyle: SInt16; var info: FontInfo ): OSErr; external name '_FetchFontInfo';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{ Font access and data management functions (available only with Mac OS 9.0 or later). }
{
 *  FMCreateFontFamilyIterator()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives. Suggested
 *    replacement is ATSFontFamilyIteratorCreate.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMCreateFontFamilyIterator( {const} iFilter: FMFilterPtr { can be NULL }; iRefCon: UnivPtr; iOptions: OptionBits; var ioIterator: FMFontFamilyIterator ): OSStatus; external name '_FMCreateFontFamilyIterator';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMDisposeFontFamilyIterator()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives. Suggested
 *    replacement is ATSFontFamilyIteratorRelease.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMDisposeFontFamilyIterator( var ioIterator: FMFontFamilyIterator ): OSStatus; external name '_FMDisposeFontFamilyIterator';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMResetFontFamilyIterator()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives. Suggested
 *    replacement is ATSFontFamilyIteratorReset.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMResetFontFamilyIterator( {const} iFilter: FMFilterPtr { can be NULL }; iRefCon: UnivPtr; iOptions: OptionBits; var ioIterator: FMFontFamilyIterator ): OSStatus; external name '_FMResetFontFamilyIterator';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMGetNextFontFamily()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives. Suggested
 *    replacement is ATSFontFamilyIteratorNext.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMGetNextFontFamily( var ioIterator: FMFontFamilyIterator; var oFontFamily: FMFontFamily ): OSStatus; external name '_FMGetNextFontFamily';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMCreateFontIterator()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives. Suggested
 *    replacement is ATSFontIteratorCreate.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMCreateFontIterator( {const} iFilter: FMFilterPtr { can be NULL }; iRefCon: UnivPtr; iOptions: OptionBits; var ioIterator: FMFontIterator ): OSStatus; external name '_FMCreateFontIterator';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMDisposeFontIterator()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives. Suggested
 *    replacement is ATSFontIteratorRelease.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMDisposeFontIterator( var ioIterator: FMFontIterator ): OSStatus; external name '_FMDisposeFontIterator';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMResetFontIterator()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives. Suggested
 *    replacement is ATSFontIteratorReset.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMResetFontIterator( {const} iFilter: FMFilterPtr { can be NULL }; iRefCon: UnivPtr; iOptions: OptionBits; var ioIterator: FMFontIterator ): OSStatus; external name '_FMResetFontIterator';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMGetNextFont()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives. Suggested
 *    replacement is ATSFontIteratorNext.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMGetNextFont( var ioIterator: FMFontIterator; var oFont: FMFont ): OSStatus; external name '_FMGetNextFont';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMCreateFontFamilyInstanceIterator()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMCreateFontFamilyInstanceIterator( iFontFamily: FMFontFamily; var ioIterator: FMFontFamilyInstanceIterator ): OSStatus; external name '_FMCreateFontFamilyInstanceIterator';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMDisposeFontFamilyInstanceIterator()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMDisposeFontFamilyInstanceIterator( var ioIterator: FMFontFamilyInstanceIterator ): OSStatus; external name '_FMDisposeFontFamilyInstanceIterator';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMResetFontFamilyInstanceIterator()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMResetFontFamilyInstanceIterator( iFontFamily: FMFontFamily; var ioIterator: FMFontFamilyInstanceIterator ): OSStatus; external name '_FMResetFontFamilyInstanceIterator';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMGetNextFontFamilyInstance()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMGetNextFontFamilyInstance( var ioIterator: FMFontFamilyInstanceIterator; var oFont: FMFont; oStyle: FMFontStylePtr { can be NULL }; oSize: FMFontSizePtr { can be NULL } ): OSStatus; external name '_FMGetNextFontFamilyInstance';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMGetFontFamilyFromName()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives. Suggested
 *    replacement is ATSFontFamilyFindFromName.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMGetFontFamilyFromName( const (*var*) iName: Str255 ): FMFontFamily; external name '_FMGetFontFamilyFromName';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMGetFontFamilyName()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives. Suggested
 *    replacement is ATSFontFamilyGetName.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMGetFontFamilyName( iFontFamily: FMFontFamily; var oName: Str255 ): OSStatus; external name '_FMGetFontFamilyName';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMGetFontFamilyTextEncoding()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives. Suggested
 *    replacement is ATSFontFamilyGetEncoding.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMGetFontFamilyTextEncoding( iFontFamily: FMFontFamily; var oTextEncoding: TextEncoding ): OSStatus; external name '_FMGetFontFamilyTextEncoding';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMGetFontFamilyGeneration()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives. Suggested
 *    replacement is ATSFontFamilyGetGeneration.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMGetFontFamilyGeneration( iFontFamily: FMFontFamily; var oGeneration: FMGeneration ): OSStatus; external name '_FMGetFontFamilyGeneration';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMGetFontFormat()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMGetFontFormat( iFont: FMFont; var oFormat: FourCharCode ): OSStatus; external name '_FMGetFontFormat';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMGetFontTableDirectory()   *** DEPRECATED ***
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMGetFontTableDirectory( iFont: FMFont; iLength: ByteCount; iBuffer: UnivPtr; oActualLength: ByteCountPtr { can be NULL } ): OSStatus; external name '_FMGetFontTableDirectory';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMGetFontTable()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives. Suggested
 *    replacement is ATSFontGetTable or CTFontCopyTable from
 *    CoreText/CTFont.h.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMGetFontTable( iFont: FMFont; iTag: FourCharCode; iOffset: ByteOffset; iLength: ByteCount; iBuffer: UnivPtr; oActualLength: ByteCountPtr { can be NULL } ): OSStatus; external name '_FMGetFontTable';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMGetFontGeneration()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives. Suggested
 *    replacement is ATSFontGetGeneration.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMGetFontGeneration( iFont: FMFont; var oGeneration: FMGeneration ): OSStatus; external name '_FMGetFontGeneration';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMGetFontContainer()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives. Suggested
 *    replacement is ATSFontGetContainer.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMGetFontContainer( iFont: FMFont; var oFontContainer: FSSpec ): OSStatus; external name '_FMGetFontContainer';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMGetFontFromFontFamilyInstance()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives. Suggested
 *    replacement is CTFontCreateFromQuickdrawInstance in
 *    CoreText/CTFont.h.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMGetFontFromFontFamilyInstance( iFontFamily: FMFontFamily; iStyle: FMFontStyle; var oFont: FMFont; oIntrinsicStyle: FMFontStylePtr { can be NULL } ): OSStatus; external name '_FMGetFontFromFontFamilyInstance';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMGetFontFamilyInstanceFromFont()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMGetFontFamilyInstanceFromFont( iFont: FMFont; var oFontFamily: FMFontFamily; var oStyle: FMFontStyle ): OSStatus; external name '_FMGetFontFamilyInstanceFromFont';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMGetATSFontFamilyRefFromFontFamily()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.1 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
 *    Non-Carbon CFM:   not available
 }
function FMGetATSFontFamilyRefFromFontFamily( iFamily: FMFontFamily ): ATSFontFamilyRef; external name '_FMGetATSFontFamilyRefFromFontFamily';
(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMGetFontFamilyFromATSFontFamilyRef()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.1 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
 *    Non-Carbon CFM:   not available
 }
function FMGetFontFamilyFromATSFontFamilyRef( iFamily: ATSFontFamilyRef ): FMFontFamily; external name '_FMGetFontFamilyFromATSFontFamilyRef';
(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMActivateFonts()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives. Suggested
 *    replacement is ATSFontActivateFromFileReference.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMActivateFonts( const (*var*) iFontContainer: FSSpec; {const} iFilter: FMFilterPtr { can be NULL }; iRefCon: UnivPtr; iOptions: OptionBits ): OSStatus; external name '_FMActivateFonts';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMDeactivateFonts()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives. Suggested
 *    replacement is ATSFontDeactivate.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMDeactivateFonts( const (*var*) iFontContainer: FSSpec; {const} iFilter: FMFilterPtr { can be NULL }; iRefCon: UnivPtr; iOptions: OptionBits ): OSStatus; external name '_FMDeactivateFonts';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{ Use ATSGetGeneration instead of FMGetGeneration }
{
 *  FMGetGeneration()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives. Suggested
 *    replacement is ATSGetGeneration.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.5
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in FontManager 9.0 and later
 }
function FMGetGeneration: FMGeneration; external name '_FMGetGeneration';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)


{
 *  FMGetFontContainerFromFontFamilyInstance()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives. Suggested
 *    replacement is ATSFontGetContainer.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.1 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
 *    Non-Carbon CFM:   not available
 }
function FMGetFontContainerFromFontFamilyInstance( iFontFamily: FMFontFamily; iStyle: FMFontStyle; iFontSize: FMFontSize; var oFontContainer: FSSpec ): OSStatus; external name '_FMGetFontContainerFromFontFamilyInstance';
(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{
 *  FMGetFontFamilyResource()   *** DEPRECATED ***
 *  
 *  Deprecated:
 *    This function is deprecated in Mac OS X 10.4 and not available in
 *    64-bit. Please see ATSFont.h for alternatives. Suggested
 *    replacement is ATSFontGetFontFamilyResource.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.1 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
 *    Non-Carbon CFM:   not available
 }
function FMGetFontFamilyResource( iFontFamily: FMFontFamily; iFontStyle: FMFontStyle; iFontSize: FMFontSize; iBufferSize: ByteCount; ioBuffer: UnivPtr; oSize: ByteCountPtr { can be NULL } ): OSStatus; external name '_FMGetFontFamilyResource';
(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)


{$endc} {not TARGET_CPU_64}

type
	FontFamilyID = FMFontFamily;
	FontPointSize = FMFontSize;
const
	kFMUseGlobalScopeOption = $00000001;

{
 *  The font identifier constants are deprecated; use ATSFontFamilyFindFromQuickDrawName in ATSFont.h
 *  to find a font family from a standard QuickDraw name.
 }
const
	kFontIDNewYork = 2;
	kFontIDGeneva = 3;
	kFontIDMonaco = 4;
	kFontIDVenice = 5;
	kFontIDLondon = 6;
	kFontIDAthens = 7;
	kFontIDSanFrancisco = 8;
	kFontIDToronto = 9;
	kFontIDCairo = 11;
	kFontIDLosAngeles = 12;
	kFontIDTimes = 20;
	kFontIDHelvetica = 21;
	kFontIDCourier = 22;
	kFontIDSymbol = 23;
	kFontIDMobile = 24;

{
 *  The following data structures referenced by the low memory global variables of QuickDraw are
 *  deprecated on Mac OS X and CarbonLib 1.1. The low memory global variables are not shared between
 *  processes and may result in inconsistencies compared to previous releases of the system software.
 *  Changes made to the information contained in the low memory global variables, including any
 *  indirectly referenced width tables, font family records, and font records, are not reflected in
 *  the global state for QuickDraw and should only be accessed through the font access and data
 *  management functions of ATS.
 }
type
	WidEntryPtr = ^WidEntry;
	WidEntry = record
		widStyle: SInt16;               {style entry applies to}
	end;
type
	WidTablePtr = ^WidTable;
	WidTable = record
		numWidths: SInt16;              {number of entries - 1}
	end;
type
	AsscEntryPtr = ^AsscEntry;
	AsscEntry = record
		fontSize: SInt16;
		fontStyle: SInt16;
		fontID: SInt16;                 {font resource ID}
	end;
type
	FontAssocPtr = ^FontAssoc;
	FontAssoc = record
		numAssoc: SInt16;               {number of entries - 1}
	end;
type
	StyleTablePtr = ^StyleTable;
	StyleTable = record
		fontClass: SInt16;
		offset: SInt32;
		reserved: SInt32;
		indexes: array [0..47] of SInt8;
	end;
type
	NameTablePtr = ^NameTable;
	NameTable = record
		stringCount: SInt16;
		baseFontName: Str255;
	end;
type
	KernPairPtr = ^KernPair;
	KernPair = record
		kernFirst: char;              {1st character of kerned pair}
		kernSecond: char;             {2nd character of kerned pair}
		kernWidth: SInt16;              {kerning in 1pt fixed format}
	end;
type
	KernEntryPtr = ^KernEntry;
	KernEntry = record
		kernStyle: SInt16;              {style the entry applies to}
		kernLength: SInt16;             {length of this entry}
	end;
type
	KernTablePtr = ^KernTable;
	KernTable = record
		numKerns: SInt16;               {number of kerning entries}
	end;
type
	WidthTable = packed record
		tabData: array [0..255] of Fixed;           {character widths}
		tabFont: Handle;                {font record used to build table}
		sExtra: SIGNEDLONG;                 {space extra used for table}
		style: SIGNEDLONG;                  {extra due to style}
		fID: SInt16;                    {font family ID}
		fSize: SInt16;                  {font size request}
		face: SInt16;                   {style (face) request}
		device: SInt16;                 {device requested}
		inNumer: Point;                {scale factors requested}
		inDenom: Point;                {scale factors requested}
		aFID: SInt16;                   {actual font family ID for table}
		fHand: Handle;                  {family record used to build up table}
		usedFam: Boolean;                {used fixed point family widths}
		aFace: UInt8;                  {actual face produced}
		vOutput: SInt16;                {vertical scale output value}
		hOutput: SInt16;                {horizontal scale output value}
		vFactor: SInt16;                {vertical scale output value}
		hFactor: SInt16;                {horizontal scale output value}
		aSize: SInt16;                  {actual size of actual font used}
		tabSize: SInt16;                {total size of table}
	end;
	WidthTablePtr = ^WidthTable;
type
	WidthTableHdl = ^WidthTablePtr;
	FamRecPtr = ^FamRec;
	FamRec = record
		ffFlags: SInt16;                {flags for family}
		ffFamID: SInt16;                {family ID number}
		ffFirstChar: SInt16;            {ASCII code of 1st character}
		ffLastChar: SInt16;             {ASCII code of last character}
		ffAscent: SInt16;               {maximum ascent for 1pt font}
		ffDescent: SInt16;              {maximum descent for 1pt font}
		ffLeading: SInt16;              {maximum leading for 1pt font}
		ffWidMax: SInt16;               {maximum widMax for 1pt font}
		ffWTabOff: SInt32;              {offset to width table}
		ffKernOff: SInt32;              {offset to kerning table}
		ffStylOff: SInt32;              {offset to style mapping table}
		ffProperty: array [0..8] of SInt16;          {style property info}
		ffIntl: array [0..1] of SInt16;              {for international use}
		ffVersion: SInt16;              {version number}
	end;
type
	FontRec = record
		fontType: SInt16;               {font type}
		firstChar: SInt16;              {ASCII code of first character}
		lastChar: SInt16;               {ASCII code of last character}
		widMax: SInt16;                 {maximum character width}
		kernMax: SInt16;                {negative of maximum character kern}
		nDescent: SInt16;               {negative of descent}
		fRectWidth: SInt16;             {width of font rectangle}
		fRectHeight: SInt16;            {height of font rectangle}
		owTLoc: UInt16;                 {offset to offset/width table}
		ascent: SInt16;                 {ascent}
		descent: SInt16;                {descent}
		leading: SInt16;                {leading}
		rowWords: SInt16;               {row width of bit image / 2 }
	end;
	FontRecPtr = ^FontRec;
type
	FontRecHdl = ^FontRecPtr;
{$ifc OLDROUTINENAMES}
const
	newYork = kFontIDNewYork;
	geneva = kFontIDGeneva;
	monaco = kFontIDMonaco;
	venice = kFontIDVenice;
	london = kFontIDLondon;
	athens = kFontIDAthens;
	sanFran = kFontIDSanFrancisco;
	toronto = kFontIDToronto;
	cairo = kFontIDCairo;
	losAngeles = kFontIDLosAngeles;
	times = kFontIDTimes;
	helvetica = kFontIDHelvetica;
	courier = kFontIDCourier;
	symbol = kFontIDSymbol;
	mobile = kFontIDMobile;

{$endc} {OLDROUTINENAMES}


{$endc} {TARGET_OS_MAC}

{$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}

end.
{$endc} {not MACOSALLINCLUDE}