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
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
|
{
File: QD/ATSUnicodeFonts.h
Contains: ATSUI font handling functions.
Version: Quickdraw-262~1
Copyright: © 2003-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: Peter N Lewis, <peter@stairways.com.au>, 2004 }
{ 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 ATSUnicodeFonts;
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,ATSUnicodeTypes,SFNTTypes;
{$endc} {not MACOSALLINCLUDE}
{$ifc TARGET_OS_MAC}
{$ALIGN POWER}
{ ---------------------------------------------------------------------------- }
{ Font features }
{ ---------------------------------------------------------------------------- }
{
* ATSUSetFontFeatures() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontDescriptorCreateCopyWithFeature,
* CTFontDescriptorCreateWithAttributes instead.
*
* Summary:
* Sets font features in a style object.
*
* Discussion:
* This function enables you to set multiple font features for a
* style object. Any unset font features retain their font-defined
* default values. To set style attributes and font variations for a
* style object, call the functions ATSUSetAttributes and
* ATSUSetVariations, respectively. The constants that represent
* font feature types are defined in the header file
* SFNTLayoutTypes.h. When you use ATSUI to access and set font
* features, you must use the constants defined in this header file,
* which are described in "Inside Mac OS X: Rendering Unicode Text
* With ATSUI". As feature types can be added at any time, you
* should check Apple's font feature registry website for the most
* up-to-date list of font feature types and selectors:
* http://developer.apple.com/fonts/Registry/index.html.
*
* Parameters:
*
* iStyle:
* The style object for which to set font features.
*
* iFeatureCount:
* The number of font features to set. This value should
* correspond to the number of elements in the iType and iSelector
* arrays.
*
* iType:
* An array of feature types. Each element in the array must
* contain a valid feature type that corresponds to a feature
* selector in the iSelector array. To obtain the valid feature
* types for a font, call the function ATSUGetFontFeatureTypes .
*
* iSelector:
* An array of feature selectors. Each element in the array must
* contain a valid feature selector that corresponds to a feature
* type in the iType array. To obtain the valid feature selectors
* for a font, call the function ATSUGetFontFeatureSelectors .
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUSetFontFeatures( iStyle: ATSUStyle; iFeatureCount: ItemCount; {const} iType: {variable-size-array} ATSUFontFeatureTypePtr; {const} iSelector: {variable-size-array} ATSUFontFeatureSelectorPtr ): OSStatus; external name '_ATSUSetFontFeatures';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{$ifc not TARGET_CPU_64}
{
* ATSUGetFontFeature() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontDescriptorCopyAttribute instead.
*
* Summary:
* Obtains the font feature corresponding to an index into an array
* of font features for a style object.
*
* Discussion:
* You might typically call ATSUGetFontFeature if you need to obtain
* one previously set feature after another within your program's
* processing loop. To obtain all previously set font features for a
* given style object, you can call the function
* ATSUGetAllFontFeatures. Before calling ATSUGetFontFeature, you
* should call the function ATSUGetAllFontFeatures to obtain a count
* of the font features that are set in the style object. You can
* then pass the index for the feature whose setting you want to
* obtain in the iTag and iMaximumValueSize parameters of
* ATSUGetFontFeature.
*
* Parameters:
*
* iStyle:
* The style you wish to obtain font feature information for.
*
* iFeatureIndex:
* An index into the array of font features for the style object.
* This index identifies the font feature to examine. Because this
* index is zero-based, you must pass a value between 0 and one
* less than the value produced in the oActualFeatureCount
* parameter of the function ATSUGetAllFontFeatures.
*
* oFeatureType:
* On return, the value identifies the font feature type
* corresponding to the index passed in the iFeatureIndex
* parameter. You must allocate space for ATSUGetFontFeature to
* store this value.
*
* oFeatureSelector:
* On return, the value identifies the font feature selector that
* corresponds to the feature type produced in the oFeatureType
* parameter. ou must allocate space for ATSUGetFontFeature to
* store this value.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUGetFontFeature( iStyle: ATSUStyle; iFeatureIndex: ItemCount; oFeatureType: ATSUFontFeatureTypePtr; oFeatureSelector: ATSUFontFeatureSelectorPtr ): OSStatus; external name '_ATSUGetFontFeature';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{
* ATSUGetAllFontFeatures() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontDescriptorCopyAttribute instead.
*
* Summary:
* Obtains the font features of a style object that are not at
* default settings.
*
* Discussion:
* The ATSUGetAllFontFeatures function obtains all of a style
* object's font features that are not at default settings. Font
* features are grouped into categories called feature types, within
* which individual feature selectors define particular feature
* settings. The arrays produced by ATSUGetAllFontFeatures contain
* constants identifying the object's font types and their
* corresponding font selectors. Typically you use the function
* ATSUGetAllFontFeatures by calling it twice, as follows: (1) Pass
* a reference to the style object to examine in the iStyle
* parameter, a valid pointer to an ItemCount value in the
* oActualFeatureCount parameter, NULL for the oFeatureType and
* oFeatureSelector parameters, and 0 for the iMaximumFeatureCount
* parameter. ATSUGetAllFontFeatures returns the size in the
* oActualFeatureCount parameter to use for the feature type and
* selector arrays. (2) Allocate enough space for arrays of the
* returned size, then call ATSUGetAllFontFeatures again, passing a
* pointer to the arrays in the oFeatureType and oFeatureSelector
* parameters. On return, the arrays contain the font feature types
* and selectors, respectively, for the style object.
*
* Parameters:
*
* iStyle:
* The style for which you wish to obtain font feature information.
*
* iMaximumFeatureCount:
* The maximum number of feature types and selectors to obtain for
* the style object. Typically, this is equivalent to the number
* of ATSUFontFeatureType and ATSUFontFeatureSelector values for
* which you have allocated memory in the oFeatureType and
* oFeatureSelector parameters, respectively. To determine this
* value, see the Discussion.
*
* oFeatureType:
* On return, the array contains constants identifying each type
* of font feature that is at a nondefault setting in the style
* object. If you are uncertain of how much memory to allocate for
* this array, see the Discussion.
*
* oFeatureSelector:
* On return, the array contains constants identifying the feature
* selectors that are at nondefault settings in the style object.
* Each selector determines the setting for a corresponding
* feature type produced in the oFeatureType parameter. If you are
* uncertain of how much memory to allocate for this array, see
* the Discussion.
*
* oActualFeatureCount:
* On return, the value specifies the actual number of font
* feature types and selectors in the style object. This may be
* greater than the value you specified in the
* iMaximumFeatureCount parameter.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUGetAllFontFeatures( iStyle: ATSUStyle; iMaximumFeatureCount: ItemCount; oFeatureType: {variable-size-array} ATSUFontFeatureTypePtr { can be NULL }; oFeatureSelector: {variable-size-array} ATSUFontFeatureSelectorPtr { can be NULL }; oActualFeatureCount: ItemCountPtr { can be NULL } ): OSStatus; external name '_ATSUGetAllFontFeatures';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{
* ATSUClearFontFeatures() *** DEPRECATED ***
*
* Deprecated:
* Use CoreText API and CFRelease instead.
*
* Summary:
* Restores default settings to the specified font features of a
* style object.
*
* Discussion:
* This function removes those font features that are identified by
* the feature selector and type constants in the iSelector and
* iType arrays and replaces them with their font-defined default
* values. Note that if you pass ATSUClearFontFeatures a font
* feature and selector that are already at default settings, the
* function does not return an error. To restore default font
* variations to a style object, call the function
* ATSUClearFontVariations. To restore default style attributes to a
* style object, call ATSUClearAttributes. To restore all default
* settings to a style object (for font features, variations, and
* style attributes), call the function ATSUClearStyle.
*
* Parameters:
*
* iStyle:
* A style whose font features you wish to clear.
*
* iFeatureCount:
* The number of font features to restore to default settings.
* This value should correspond to the number of elements in the
* iType and iSelector arrays. To restore default settings to all
* the font features in the specified style object, pass the
* constant kATSUClearAll in this parameter. In this case, the
* values in the iType and iSelector parameters are ignored.
*
* iType:
* An array of feature types. Each value should identify a font
* feature to restore to its default setting. To obtain all
* previously set font features for a given style object, you can
* call the function ATSUGetAllFontFeatures. You may pass NULL for
* this parameter if you are passing kATSUClearAll for the
* iFeatureCount parameter.
*
* iSelector:
* An array of feature selectors. Each element in the array must
* contain a valid feature selector corresponding to a font
* feature you provide in the iType parameter. To obtain all
* previously set feature selectors for a given style object, you
* can call the function ATSUGetAllFontFeatures. You may pass NULL
* for this parameter if you are passing kATSUClearAll for the
* iFeatureCount parameter.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUClearFontFeatures( iStyle: ATSUStyle; iFeatureCount: ItemCount; {const} iType: {variable-size-array} ATSUFontFeatureTypePtr { can be NULL }; {const} iSelector: {variable-size-array} ATSUFontFeatureSelectorPtr { can be NULL } ): OSStatus; external name '_ATSUClearFontFeatures';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{ ---------------------------------------------------------------------------- }
{ Font variations }
{ ---------------------------------------------------------------------------- }
{
* ATSUSetVariations() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontDescriptorCreateCopyWithVariation,
* CTFontDescriptorCreateWithAttributes instead.
*
* Summary:
* Sets font variation axes and values in a style object.
*
* Discussion:
* If you supply font variation axes and values to the
* ATSUSetVariations function, you can change the appearance of a
* style object's font accordingly. You may specify any number of
* variation axes and values in a style object. Any of the font's
* variations that you do not set retain their font-defined default
* values. You can also use the ATSUSetVariations function to supply
* your own value within any variation axes defined for the font.
* However, if the font does not support the variation axis you
* specify, your custom variation has no visual effect. By calling
* the function ATSUGetIndFontVariation, you can obtain a variation
* axis and its maximum, minimum, and default values for a font.
*
* Parameters:
*
* iStyle:
* The style object for which to set font variation values.
*
* iVariationCount:
* The number of font variation values to set. This value should
* correspond to the number of elements in the iAxes and iValue
* arrays.
*
* iAxes:
* An array of font variation axes. Each element in the array must
* represent a valid variation axis tag that corresponds to a
* variation value in the iValue array. To obtain a valid
* variation axis tag for a font, you can call the functions
* ATSUGetIndFontVariation or ATSUGetFontInstance.
*
* iValue:
* An array of font variation values. Each element in the array
* must contain a value that is valid for the corresponding
* variation axis in the iAxes parameter. You can obtain a font's
* maximum, minimum, and default values for a given variation axis
* by calling the function ATSUGetIndFontVariation . You can
* obtain the font variation axis values for a font instance by
* calling ATSUGetFontInstance.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUSetVariations( iStyle: ATSUStyle; iVariationCount: ItemCount; {const} iAxes: {variable-size-array} ATSUFontVariationAxisPtr; {const} iValue: {variable-size-array} ATSUFontVariationValuePtr ): OSStatus; external name '_ATSUSetVariations';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{
* ATSUGetFontVariationValue() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontDescriptorCopyAttribute instead.
*
* Summary:
* Obtains the current value for a single font variation axis in a
* style object.
*
* Discussion:
* This function obtains the setting for a specified font variation
* axis in a style object. You might typically call
* ATSUGetFontVariationValue if you need to obtain one previously
* set variation axis value after another within your program's
* processing loop. To obtain all nondefault font variation axis
* values for a given style object, you can call the function
* ATSUGetAllFontVariations. Before calling
* ATSUGetFontVariationValue, call the function
* ATSUGetAllFontVariations to obtain the font variation axes that
* are set for the style object.
*
* Parameters:
*
* iStyle:
* The style for which you want to obtain a variation value.
*
* iFontVariationAxis:
* A tag specifying the style object's variation axis to examine.
* You can obtain a list of variation axis tags that are set to
* non-default values in a particular style object from the
* function ATSUGetAllFontVariations.
*
* oFontVariationValue:
* On return, ATSUGetFontVariationValue produces the currently set
* value for the style object's specified variation axis. If this
* value has not been set, ATSUGetFontVariationValue produces the
* font-defined default value.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUGetFontVariationValue( iStyle: ATSUStyle; iFontVariationAxis: ATSUFontVariationAxis; oFontVariationValue: ATSUFontVariationValuePtr ): OSStatus; external name '_ATSUGetFontVariationValue';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{
* ATSUGetAllFontVariations() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontDescriptorCopyAttribute instead.
*
* Summary:
* Obtains a style object's font variation values that are not at
* default settings.
*
* Discussion:
* This function obtains all of a style object's font variation axes
* that are not at default settings, as well as the current values
* for the axes. Typically you use the function
* ATSUGetAllFontVariations by calling it twice, as follows: (1)
* Pass a reference to the style object to examine in the iStyle
* parameter, a pointer to an ItemCount value in the
* oActualVariationCount parameter, NULL for the oVariationAxes and
* oFontVariationValues parameters, and 0 for the iVariationCount
* parameter. ATSUGetAllFontVariations returns the size to use for
* the variation axes and value arrays in the oActualVariationCount
* parameter. (2) Allocate enough space for arrays of the returned
* size, then call ATSUGetAllFontVariations again, passing a pointer
* to the arrays in the oVariationAxes and oFontVariationValues
* parameters. On return, the arrays contain the font variation axes
* and their corresponding values, respectively, for the style
* object.
*
* Parameters:
*
* iStyle:
* A style for which you wish to obtain information about current
* variation settings.
*
* iVariationCount:
* The maximum number of font variation values to obtain for the
* style object. Typically, this is equivalent to the number of
* ATSUFontVariationAxis and ATSUFontVariationValue values for
* which you have allocated memory in the oVariationAxes and
* oFontVariationValues parameters, respectively. To determine
* this value, see the Discussion.
*
* oVariationAxes:
* On return, the array contains the current font variation values
* for the font variation axes produced in the oVariationAxes
* array. If you are uncertain of how much memory to allocate for
* this array, see the Discussion.
*
* oFontVariationValues:
* On return, the value specifies the actual number of nondefault
* font variation values in the style object. This may be greater
* than the value you passed in the iVariationCount parameter. If
* you are uncertain of how much memory to allocate for this
* array, see the Discussion.
*
* oActualVariationCount:
* On return, the value specifies the actual number of nondefault
* font variation values in the style object. This may be greater
* than the value you passed in the iVariationCount parameter.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUGetAllFontVariations( iStyle: ATSUStyle; iVariationCount: ItemCount; oVariationAxes: {variable-size-array} ATSUFontVariationAxisPtr { can be NULL }; oFontVariationValues: {variable-size-array} ATSUFontVariationValuePtr { can be NULL }; oActualVariationCount: ItemCountPtr { can be NULL } ): OSStatus; external name '_ATSUGetAllFontVariations';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{
* ATSUClearFontVariations() *** DEPRECATED ***
*
* Deprecated:
* Use CoreText API and CFRelease instead.
*
* Summary:
* Restores default values to the specified font variation axes of a
* style object.
*
* Discussion:
* The ATSUClearFontVariations function removes those font variation
* axis values identified by variation axis tags in the iAxis array
* and replaces them with their font-defined default values. You can
* remove unset font variation values from a style object without a
* function error. To restore default font features to a style
* object, call the function ATSUClearFontFeatures. To restore
* default style attributes, call ATSUClearAttributes. To restore
* all default settings to a style object (for font features,
* variations, and style attributes), call the function
* ATSUClearStyle.
*
* Parameters:
*
* iStyle:
* The style in which you wish to clear font variation settings.
*
* iAxisCount:
* The number of font variation axes to restore to default
* settings. This value should correspond to the number of
* elements in the iAxis array. To restore default values to all
* the font variation axes in the style object, pass the constant
* kATSUClearAll in this parameter. If you pass kATSUClearAll the
* value in the iAxis parameter is ignored.
*
* iAxis:
* An array of font variation axes. Each element in the array must
* contain a valid tag that corresponds to a font variation axis
* to restore to its default setting. You can obtain variation
* axis tags for a style object from the function
* ATSUGetAllFontVariations. You may pass NULL for this parameter
* if you are passing kATSUClearAll for the iAxisCount parameter.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUClearFontVariations( iStyle: ATSUStyle; iAxisCount: ItemCount; {const} iAxis: {variable-size-array} ATSUFontVariationAxisPtr { can be NULL } ): OSStatus; external name '_ATSUClearFontVariations';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{ ---------------------------------------------------------------------------- }
{ Font ID's }
{ ---------------------------------------------------------------------------- }
{
* ATSUFontCount() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontCollectionCreateFromAvailableFonts instead.
*
* Summary:
* Obtains the number of ATSUI-compatible fonts installed on a
* user's system.
*
* Discussion:
* The ATSUFontCount function obtains the number of fonts on a
* user's system that are compatible with ATSUI. Incompatible fonts
* include those that cannot be used to represent Unicode, the
* missing-character glyph font, and fonts whose names begin with a
* period or a percent sign. You can use the count produced in the
* oFontCount parameter to determine the amount of memory to
* allocate for the oFontIDs array in the function ATSUGetFontIDs.
* It is important to note that the set of installed
* ATSUI-compatible fonts may change while your application is
* running. In Mac OS X, the set of installed fonts may change at
* any time. Although in Mac OS 9, fonts cannot be removed from the
* Fonts folder while an application other than the Finder is
* running, they can be removed from other locations, and it is
* possible for fonts to be added. Additionally, just because the
* number of fonts stays the same between two successive calls to
* ATSUFontCount , this does not mean that the font lists are the
* same. It is possible for a font to be added and another removed
* between two successive calls to ATSUFontCount , leaving the total
* number unchanged.
*
* Parameters:
*
* oFontCount:
* On return, the number of ATSUI-compatible fonts installed on a
* user's system.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUFontCount( var oFontCount: ItemCount ): OSStatus; external name '_ATSUFontCount';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{
* ATSUGetFontIDs() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontCollectionCreateFromAvailableFonts
* CTFontCollectionCreateWithFontDescriptors, or
* CTFontCollectionCreateCopyWithFontDescriptors instead.
*
* Summary:
* Obtains a list of all the ATSUI-compatible fonts installed on the
* user's system.
*
* Discussion:
* Use the function ATSUFontCount to determine how much memory to
* allocate before calling this function. Also see the discussion
* for the ATSUFontCount function.
*
* Parameters:
*
* oFontIDs:
* On return, the array contains unique identifiers for each of
* the ATSUI-compatible fonts installed on the user's system. You
* should allocate enough memory to contain an array the size of
* the count produced by the function ATSUFontCount.
*
* iArraySize:
* The maximum number of fonts to obtain. Typically, this is
* equivalent to the number of ATSUFontID values for which you
* have allocated memory in the oFontIDs parameter.
*
* oFontCount:
* On return, the value specifies the actual number of
* ATSUI-compatible fonts installed on the user's system. This may
* be greater than the value you specified in the iArraySize
* parameter.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUGetFontIDs( oFontIDs: {variable-size-array} ATSUFontIDPtr; iArraySize: ItemCount; oFontCount: ItemCountPtr { can be NULL } ): OSStatus; external name '_ATSUGetFontIDs';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{
* ATSUFONDtoFontID() *** DEPRECATED ***
*
* Deprecated:
* Use CoreText API instead.
*
* Summary:
* Finds the ATSUI font ID that corresponds to a font family number,
* if one exists.
*
* Discussion:
* This function is not recommended. It is specifically associated
* with old QD data types (i.e. the QD font family or 'FOND'
* identifier) that has no equivalent in the newer API sets. The
* concept of FOND ID and font family instances are all QD-specific
* concepts that are not supported in Cocoa, Quartz, and the
* non-deprecated parts of ATS and ATSUI.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUFONDtoFontID( iFONDNumber: SInt16; iFONDStyle: Style; var oFontID: ATSUFontID ): OSStatus; external name '_ATSUFONDtoFontID';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{
* ATSUFontIDtoFOND() *** DEPRECATED ***
*
* Deprecated:
* Use CoreText API instead.
*
* Summary:
* Finds the font family number and style that correspond to an
* ATSUI font ID, if these exist.
*
* Discussion:
* This function is not recommended. It is specifically associated
* with old QD data types (i.e. the QD font family or 'FOND'
* identifier) that has no equivalent in the newer API sets. The
* concept of FOND ID and font family instances are all QD-specific
* concepts that are not supported in Cocoa, Quartz, and the
* non-deprecated parts of ATS and ATSUI.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUFontIDtoFOND( iFontID: ATSUFontID; var oFONDNumber: SInt16; var oFONDStyle: Style ): OSStatus; external name '_ATSUFontIDtoFOND';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{ ---------------------------------------------------------------------------- }
{ Font names }
{ ---------------------------------------------------------------------------- }
{
* ATSUCountFontNames() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontCopyPostScriptName, CTFontCopyFamilyName,
* CTFontCopyFullName, CTFontCopyDisplayName, CTFontCopyName, or
* CTFontCopyLocalizedName instead.
*
* Summary:
* Obtains the number of font names that correspond to a given ATSUI
* font ID.
*
* Discussion:
* This function obtains the number of font names defined in a font
* name table for a given ATSUI font ID. This number includes
* repetitions of the same name in different platforms, languages,
* and scripts; names of font features, variations, tracking
* settings, and instances for the font; and font names identified
* by name code constants. You can pass an index value based on this
* count to the function ATSUGetIndFontName to obtain a name string,
* name code, platform, script, and language for a given ATSUI font
* ID.
*
* Parameters:
*
* iFontID:
* The font for which you wish to obtain the font name count.
*
* oFontNameCount:
* On return, the value specifies the number of entries in the
* font name table corresponding to the given ATSUI font ID.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUCountFontNames( iFontID: ATSUFontID; var oFontNameCount: ItemCount ): OSStatus; external name '_ATSUCountFontNames';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{
* ATSUGetIndFontName() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontCopyPostScriptName, CTFontCopyFamilyName,
* CTFontCopyFullName, CTFontCopyDisplayName, CTFontCopyName, or
* CTFontCopyLocalizedName instead.
*
* Summary:
* Obtains a name string, name code, platform, script, and language
* for the font that matches an ATSUI font ID and name table index
* value.
*
* Discussion:
* Typically you use the ATSUGetIndFontName function by calling it
* twice, as follows: (1) Pass valid values for the iFontID,
* iFontNameIndex, and oActualNameLength parameters, 0 for the
* iMaximumNameLength parameter, and NULL for the other parameters.
* ATSUGetIndFontName returns the length of the font name string in
* the oActualNameLength parameter. (2) Allocate enough space for a
* buffer of the returned size, then call the function again,
* passing a valid pointer to the buffer in the oName parameter. On
* return, the buffer contains the font name string. To find a name
* string and index value for the first font in a name table that
* matches an ATSUI font ID and the specified font parameters, call
* the function ATSUFindFontName. To obtain an ATSUI font ID for the
* first font in a name table that matches the specified name
* string, name code, platform, script, and/or language, call the
* function ATSUFindFontFromName.
*
* Parameters:
*
* iFontID:
* The font for which to obtain information. Note that because
* Apple Type Services assigns ATSUFontID values systemwide at
* runtime, font IDs can change across system restarts.
*
* iFontNameIndex:
* An index to the font for which to obtain information. Because
* this index must be 0-based, you should pass a value between 0
* and one less than the count produced by the function
* ATSUCountFontNames.
*
* iMaximumNameLength:
* The maximum length of the font name string to obtain.
* Typically, this is equivalent to the size of the buffer that
* you have allocated in the oName parameter. To determine this
* length, see the Discussion.
*
* oName:
* On return, the buffer contains the name string of the font
* matching the ATSUI font ID and name table index value being
* passed. If the buffer you allocate is not large enough to
* contain the name string, ATSUGetIndFontName produces a partial
* string. If you are unsure how much memory to allocate for this
* parameter, see the Discussion.
*
* oActualNameLength:
* On return, the value specifies the actual length of the
* complete name string. This may be greater than the value passed
* in the iMaximumNameLength parameter. You should check this
* value to ensure that you have allocated sufficient memory and
* therefore obtained the complete name string for the font.
*
* oFontNameCode:
* On return, a value specifying the type of name returned (i.e.,
* full name, postscript name) of the font. See SFNTTypes.h for a
* list of possible values.
*
* oFontNamePlatform:
* On return, a value specifying the encoding of the font. See
* SFNTTypes.h for a list of possible values.
*
* oFontNameScript:
* On return, a value specifying the script of the font. See
* SFNTTypes.h for a list of possible values.
*
* oFontNameLanguage:
* On return, a value specifying the language of the font. See
* SFNTTypes.h for a list of possible values.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUGetIndFontName( iFontID: ATSUFontID; iFontNameIndex: ItemCount; iMaximumNameLength: ByteCount; oName: Ptr; oActualNameLength: ByteCountPtr { can be NULL }; oFontNameCode: FontNameCodePtr { can be NULL }; oFontNamePlatform: FontPlatformCodePtr { can be NULL }; oFontNameScript: FontScriptCodePtr { can be NULL }; oFontNameLanguage: FontLanguageCodePtr { can be NULL } ): OSStatus; external name '_ATSUGetIndFontName';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{
* ATSUFindFontName() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontCopyPostScriptName, CTFontCopyFamilyName,
* CTFontCopyFullName, CTFontCopyDisplayName, CTFontCopyName, or
* CTFontCopyLocalizedName instead.
*
* Summary:
* Obtains a name string and index value for the first font in a
* name table that matches the specified ATSUI font ID, name code,
* platform, script, and/or language.
*
* Discussion:
* Typically you use the ATSUFindFontName function by calling it
* twice, as follows: (1) Pass NULL for the oName and oFontNameIndex
* parameters, 0 for the iMaximumNameLength parameter, and valid
* values for the other parameters. ATSUFindFontName returns the
* length of the font name string in the oActualNameLength
* parameter. (2) Allocate enough space for a buffer of the returned
* size, then call the function again, passing a valid pointer to
* the buffer in the oName parameter. On return, the buffer contains
* the font name string. To obtain an ATSUI font ID for the first
* font in a name table that matches the specified name string, name
* code, platform, script, and/or language, call the function
* ATSUFindFontFromName. To obtain the font name string, name code,
* platform, script, and language for the font that matches an ATSUI
* font ID and name table index, call the function
* ATSUGetIndFontName. Although they will each accept NULL on input
* individually, you must pass a vaild pointer to at least one of
* the three parameters oName, oActualNameLength, or oFontNameIndex,
* or ATSUFindFontName will return paramErr.
*
* Parameters:
*
* iFontID:
* The font for which to obtain a name string. Note that because
* Apple Type Services assigns ATSUFontID values systemwide at
* runtime, font IDs can change across system restarts.
*
* iFontNameCode:
* A constant specifying the FontNameCode value of the font for
* which to obtain a name string. See the SFNTTypes.h header file
* for a definition of the FontNameCode type and a list of
* possible values.
*
* iFontNamePlatform:
* A constant specifying the encoding of the font. See SFNTTypes.h
* for possible values to pass for this parameter. If you pass the
* kFontNoPlatformCode constant, ATSUFindFontName produces the
* first font in the name table matching the other specified
* parameters.
*
* iFontNameScript:
* A constant specifying the script of the font. See SFNTTypes.h
* for possible values to pass for this parameter. If you pass the
* kFontNoScriptCode constant, ATSUFindFontName produces the first
* font in the name table matching the other specified parameters.
*
* iFontNameLanguage:
* A constant specifying the language of the font you are
* searching for. See SFNTLayoutTypes.h for possible values to
* pass for this parameter.
*
* iMaximumNameLength:
* The maximum size of string you want ATSUFindFontName to return.
* Typically, this value is equal to the size of the buffer you
* have allocated for the oName parameter. To determine this
* length, see the Discussion.
*
* oName:
* On return, the name string of the first font in the font name
* table matching your specified parameters. If the buffer you
* allocate is not large enough, ATSUFindFontName produces a
* partial string. If you are unsure how much space to allocate
* for this parameter, see the Discussion.
*
* oActualNameLength:
* On return, specifies the actual length of the complete name
* string. This may be greater than the value passed in the
* iMaximumNameLength parameter. You should check this value to
* ensure that you have allocated sufficient memory and therefore
* obtained the complete name string for the font.
*
* oFontNameIndex:
* On return, the value provides a 0-based index to the font name
* in the font name table.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUFindFontName( iFontID: ATSUFontID; iFontNameCode: FontNameCode; iFontNamePlatform: FontPlatformCode; iFontNameScript: FontScriptCode; iFontNameLanguage: FontLanguageCode; iMaximumNameLength: ByteCount; oName: Ptr { can be NULL }; oActualNameLength: ByteCountPtr { can be NULL }; oFontNameIndex: ItemCountPtr { can be NULL } ): OSStatus; external name '_ATSUFindFontName';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{
* ATSUFindFontFromName() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontCreateWithName instead.
*
* Summary:
* Obtains an ATSUI font ID for the first font in a name table that
* matches the specified name string, name code, platform, script,
* and/or language.
*
* Discussion:
* Because ATSUI cannot guarantee the uniqueness of names among
* installed fonts, ATSUFindFontFromName does not necessarily find
* the only font that matches these parameters. As a result, you may
* want to create a more sophisticated name-matching algorithm or
* guarantee the uniqueness of names among installed fonts.
*
* Parameters:
*
* iName:
* A pointer to a buffer containing the name string of the font
* for which to obtain an ATSUI font ID.
*
* iNameLength:
* The length, in bytes, of the name string provided in the iName
* parameter.
*
* iFontNameCode:
* A constant specifying the type of name to search for (i.e.,
* full name, postcript name). See SFNTTypes.h for a list possible
* values to pass for this parameter.
*
* iFontNamePlatform:
* A constant specifying the encoding of the font you are
* searching for. See SFNTTypes.h for possible values to pass for
* this parameter. Pass kFontNoPlatformCode if you do not want to
* limit your search to a particular encoding.
*
* iFontNameScript:
* A constant specifying the script of the font you are searching
* for. See SFNTTypes.h for possible values to pass for this
* parameter. Pass kFontNoScriptCode if you do not want to limit
* your search to a particular script.
*
* iFontNameLanguage:
* A constant specifying the language of the font you are
* searching for. See SFNTTypes.h for possible values to pass for
* this parameter. Pass kFontNoLanguageCode if you do not want to
* limit your search to a particular language.
*
* oFontID:
* On return, the value provides a unique identifier for the
* specified font. If no installed font matches the specified
* parameters, kATSUInvalidFontID is returned for this parameter.
*
* Result:
* On success, noErr is returned. If the font cannot be found,
* kATSUInvalidFontErr is returned. See MacErrors.h for other
* possible error codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUFindFontFromName( iName: {const} UnivPtr; iNameLength: ByteCount; iFontNameCode: FontNameCode; iFontNamePlatform: FontPlatformCode; iFontNameScript: FontScriptCode; iFontNameLanguage: FontLanguageCode; var oFontID: ATSUFontID ): OSStatus; external name '_ATSUFindFontFromName';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{ ---------------------------------------------------------------------------- }
{ Font features }
{ ---------------------------------------------------------------------------- }
{
* ATSUCountFontFeatureTypes() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontCopyFeatures, CTFontCopyFeatureSettings instead.
*
* Summary:
* Obtains the number of available feature types in a font.
*
* Discussion:
* This function function obtains the total number of feature types
* defined for a font. You can use the count produced by
* ATSUCountFontFeatureTypes to determine how much memory to
* allocate for the oTypes array in the function
* ATSUGetFontFeatureTypes.
*
* Parameters:
*
* iFontID:
* The font for which to obtain a count of feature types.
*
* oTypeCount:
* On return, the actual number of feature types defined for the
* font.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUCountFontFeatureTypes( iFontID: ATSUFontID; var oTypeCount: ItemCount ): OSStatus; external name '_ATSUCountFontFeatureTypes';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{
* ATSUCountFontFeatureSelectors() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontCopyFeatures, CTFontCopyFeatureSettings instead.
*
* Summary:
* Obtains the number of available feature selectors for a given
* feature type in a font.
*
* Discussion:
* This function obtains the total number of feature selectors
* defined for a given feature type in the font. You can use the
* count produced by ATSUCountFontFeatureSelectors to determine how
* much memory to allocate for the oSelectors array in the function
* ATSUGetFontFeatureSelectors.
*
* Parameters:
*
* iFontID:
* The font for which to obtain feature selector information.
*
* iType:
* A value specifying one of the font's supported feature types.
* To obtain the available feature types for a font, call the
* function ATSUGetFontFeatureTypes.
*
* oSelectorCount:
* On return, specifies the actual number of feature selectors
* defined for the feature type by the font.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUCountFontFeatureSelectors( iFontID: ATSUFontID; iType: ATSUFontFeatureType; var oSelectorCount: ItemCount ): OSStatus; external name '_ATSUCountFontFeatureSelectors';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{
* ATSUGetFontFeatureTypes() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontCopyFeatures, CTFontCopyFeatureSettings instead.
*
* Summary:
* Obtains the available feature types of a font.
*
* Discussion:
* A given font may not support all possible feature types and
* selectors. If you select features that are not available in a
* font, you won't see a change in the glyph's appearance. To
* determine the available features of a font, you can call the
* functions ATSUGetFontFeatureTypes and
* ATSUGetFontFeatureSelectors. The ATSUGetFontFeatureTypes function
* reads the font data table for the specified font and obtains its
* supported feature types. You can then use this information both
* to present the user a list of font features from which to select
* and to call such functions as ATSUSetFontFeatures with more
* accuracy.
*
* Parameters:
*
* iFontID:
* The font for which to obtain information about feature types.
*
* iMaximumTypes:
* The maximum number of feature types to obtain for the font.
* Typically, this is equivalent to the number of elements in the
* oTypes array.
*
* oTypes:
* A pointer to memory you have allocated for an array of
* ATSUFontFeatureType values. You can call the function
* ATSUCountFontFeatureTypes to obtain the number of available
* feature types for a given font and thus determine the amount of
* memory to allocate. On return, the array contains constants
* identifying each type of feature that is defined for the font.
* The constants that represent font feature types are defined in
* the header file SFNTLayoutTypes.h and are described in the
* official ATSUI documentation, available on the Apple developer
* website.
*
* oActualTypeCount:
* On return, the actual number of feature types defined in the
* font. This may be greater than the value you specify in the
* iMaximumTypes parameter.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUGetFontFeatureTypes( iFontID: ATSUFontID; iMaximumTypes: ItemCount; oTypes: {variable-size-array} ATSUFontFeatureTypePtr { can be NULL }; oActualTypeCount: ItemCountPtr { can be NULL } ): OSStatus; external name '_ATSUGetFontFeatureTypes';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{
* ATSUGetFontFeatureSelectors() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontCopyFeatures, CTFontCopyFeatureSettings instead.
*
* Summary:
* Obtains the available feature selectors for a given feature type
* in a font.
*
* Discussion:
* A given font may not support all possible feature types and
* selectors. If you select features that are not available in a
* font, you won't see a change in the glyph's appearance. To
* determine the available features of a font, you can call the
* functions ATSUGetFontFeatureTypes and
* ATSUGetFontFeatureSelectors. The ATSUGetFontFeatureSelectors
* function reads the font data table for the specified font and
* obtains its supported feature selectors for the given feature
* types. You can then use this information both to present the user
* a list of font features from which to select and to call such
* functions as ATSUSetFontFeatures with more accuracy.
*
* Parameters:
*
* iFontID:
* The font for which to obtain feature selectors.
*
* iType:
* An ATSUFontFeatureType value specifying one of the font's
* supported feature types. To obtain the available feature types
* for a font, call the function ATSUGetFontFeatureTypes.
*
* iMaximumSelectors:
* An ItemCount value specifying the maximum number of feature
* selectors to obtain for the font's specified feature type.
* Typically, this is equivalent to the number of elements in the
* oSelectors array.
*
* oSelectors:
* A pointer to memory you have allocated for an array of
* ATSUFontFeatureSelector values. You can call the function
* ATSUCountFontFeatureSelectors to obtain the number of available
* feature selectors for a given font feature type and thus
* determine the amount of memory to allocate. On return, the
* array contains constants identifying each available feature
* selector for the given feature type. The constants that
* represent font feature selectors are defined in the header file
* SFNTLayoutTypes.h and are described in the official ATSUI
* documentation, available on the Apple developer website.
*
* oSelectorIsOnByDefault:
* A pointer to memory you have allocated for an array of Boolean
* values. The number of elements in this array should correspond
* to the number of elements in the oSelectors array. On return,
* the array contains Boolean values indicating whether the
* corresponding feature selector in the oSelectors array is on or
* off. If true, the feature selector is on by default; if false,
* off.
*
* oActualSelectorCount:
* On return, the value specifies the actual number of feature
* selectors defined for the given feature type. This value may be
* greater than the value you specify in the iMaximumSelectors
* parameter.
*
* oIsMutuallyExclusive:
* On return, the value indicates whether the feature selectors
* for the given feature type are exclusive or nonexclusive. If a
* feature type is exclusive you can choose only one of its
* available feature selectors at a time, such as whether to
* display numbers as proportional or fixed-width. If a feature
* type is nonexclusive, you can enable any number of feature
* selectors at once. If true , the feature type is exclusive and
* only one selector can be used at a time.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUGetFontFeatureSelectors( iFontID: ATSUFontID; iType: ATSUFontFeatureType; iMaximumSelectors: ItemCount; oSelectors: {variable-size-array} ATSUFontFeatureSelectorPtr { can be NULL }; oSelectorIsOnByDefault: {variable-size-array} BooleanPtr { can be NULL }; oActualSelectorCount: ItemCountPtr { can be NULL }; oIsMutuallyExclusive: BooleanPtr { can be NULL } ): OSStatus; external name '_ATSUGetFontFeatureSelectors';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{
* ATSUGetFontFeatureNameCode() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontCopyFeatures, CTFontCopyFeatureSettings instead.
*
* Summary:
* btains the name code for a font's feature type or selector that
* matches an ASTUI font ID, feature type, and feature selector.
*
* Discussion:
* This function obtains the name code for a font's feature type or
* selector that matches an ASTUI font ID, feature type and feature
* selector values. By default, ATSUGetFontFeatureNameCode function
* obtains the name code of a feature selector. To determine the
* name code of a feature type, pass the constant kATSUNoSelector in
* the iSelector parameter. You can use the function
* ATSUFindFontName to obtain the localized name string for the name
* code produced by ATSUGetFontFeatureNameCode.
*
* Parameters:
*
* iFontID:
* The font for which to obtain the name code for a feature type
* or selector.
*
* iType:
* A constant identifying a valid feature type. To obtain the
* valid feature types for a font, call the function
* ATSUGetFontFeatureTypes.
*
* iSelector:
* A constant identifying a valid feature selector that
* corresponds to the feature type passed in the iType parameter.
* If you pass the constant kATSUNoSelector, the name code
* produced by ATSUGetFontFeatureNameCode is that of the feature
* type, not the feature selector. To obtain the valid feature
* selectors for a font, call the function
* ATSUGetFontFeatureSelectors.
*
* oNameCode:
* On return, the value contains the name code for the font
* feature selector or type. See the SFNTTypes.h header file for a
* definition of the FontNameCode type and a list of possible
* values.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUGetFontFeatureNameCode( iFontID: ATSUFontID; iType: ATSUFontFeatureType; iSelector: ATSUFontFeatureSelector; var oNameCode: FontNameCode ): OSStatus; external name '_ATSUGetFontFeatureNameCode';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{ ---------------------------------------------------------------------------- }
{ Font tracking value & names }
{ ---------------------------------------------------------------------------- }
{
* ATSUCountFontTracking() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontCopyTable instead.
*
* Summary:
* Obtains the number of entries in the font tracking table that
* correspond to a given ATSUI font ID and glyph orientation.
*
* Discussion:
* This function obtains the number of font tracking entries defined
* in a font tracking table for a given ATSUI font ID and glyph
* orientation. You can pass an index value based on this count to
* the function ATSUGetIndFontTracking to obtain the name code and
* tracking value of a font tracking.
*
* Parameters:
*
* iFontID:
* The font for which to obtain tracking table information.
*
* iCharacterOrientation:
* A constant identifying the glyph orientation of the font
* tracking entries. See the definition of
* ATSUVerticalCharacterType for a list of possible values.
*
* oTrackingCount:
* On return, the number of entries in the font tracking table
* corresponding to the given ATSUI font ID and glyph orientation.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
}
function ATSUCountFontTracking( iFontID: ATSUFontID; iCharacterOrientation: ATSUVerticalCharacterType; var oTrackingCount: ItemCount ): OSStatus; external name '_ATSUCountFontTracking';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{
* ATSUGetIndFontTracking() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontCopyTable instead.
*
* Summary:
* Obtains the name code and tracking value for the font tracking
* that matches an ASTUI font ID, glyph orientation, and tracking
* table index.
*
* Discussion:
* You can call the ATSUGetIndFontTracking function to obtain the
* name code and tracking value that matches the specified ATSUI
* font ID, glyph orientation, and tracking table index value. This
* information allows you to manipulate tracking settings for a
* style using this font via the kATSUTrackingTag attribute. You can
* use the function ATSUFindFontName to obtain the localized name
* string for the name code produced by ATSUGetIndFontTracking.
*
* Parameters:
*
* iFontID:
* The font for which to obtain tracking information.
*
* iCharacterOrientation:
* A constant identifying the glyph orientation of the font
* tracking entries. See the definition of
* ATSUVerticalCharacterType for a list of possible values.
*
* iTrackIndex:
* An index to the font tracking for which to obtain information.
* Because this index must be 0-based, you should pass a value
* between 0 and one less than the count produced by the function
* ATSUCountFontTracking.
*
* oFontTrackingValue:
* On return, the value contains the font tracking value.
*
* oNameCode:
* On return, the value contains the name code for the font
* tracking. See the SFNTTypes.h header file for a definition of
* the FontNameCode type and a list of possible values.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
}
function ATSUGetIndFontTracking( iFontID: ATSUFontID; iCharacterOrientation: ATSUVerticalCharacterType; iTrackIndex: ItemCount; var oFontTrackingValue: Fixed; var oNameCode: FontNameCode ): OSStatus; external name '_ATSUGetIndFontTracking';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{ ---------------------------------------------------------------------------- }
{ Font variations }
{ ---------------------------------------------------------------------------- }
{
* ATSUCountFontVariations() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontCopyVariationAxes, CTFontCopyVariation instead.
*
* Summary:
* Obtains the number of defined variation axes in a font.
*
* Discussion:
* This function function obtains the total number of variation axes
* defined for a font. You can use the count produced by
* ATSUCountFontVariations to get information about a specific font
* variation axis from the function ATSUGetIndFontVariation.
*
* Parameters:
*
* iFontID:
* The font for which to obtain a count of variation axes.
*
* oVariationCount:
* On return, a count of the number of variation axes defined for
* the font.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUCountFontVariations( iFontID: ATSUFontID; var oVariationCount: ItemCount ): OSStatus; external name '_ATSUCountFontVariations';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{
* ATSUGetIndFontVariation() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontCopyVariationAxes, CTFontCopyVariation instead.
*
* Summary:
* Obtains a variation axis and its value range for a font.
*
* Discussion:
* By calling this function, you can obtain a variation axis and its
* maximum, minimum, and default values for a font. If you supply
* font variation axes and values to the function ATSUSetVariations,
* you can change the appearance of a style object's font
* accordingly. Note that while you may pass NULL for any of the
* output parameters, at least one must be non-NULL or paramErr will
* be returned.
*
* Parameters:
*
* iFontID:
* A font for which to obtain variation information for.
*
* iVariationIndex:
* A value specifying an index into the array of variation axes
* for the font. This index identifies the font variation axis to
* examine. Because this index is zero-based, you must pass a
* value between 0 and one less than the value produced in the
* oVariationCount parameter of the function
* ATSUCountFontVariations.
*
* oATSUFontVariationAxis:
* On return, a four-character code identifying the font variation
* axis corresponding to the specified index.
*
* oMinimumValue:
* On return, the variation axis minimum.
*
* oMaximumValue:
* On return, the variation axis maximum.
*
* oDefaultValue:
* On return, the variation axis default.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUGetIndFontVariation( iFontID: ATSUFontID; iVariationIndex: ItemCount; oATSUFontVariationAxis: ATSUFontVariationAxisPtr { can be NULL }; oMinimumValue: ATSUFontVariationValuePtr { can be NULL }; oMaximumValue: ATSUFontVariationValuePtr { can be NULL }; oDefaultValue: ATSUFontVariationValuePtr { can be NULL } ): OSStatus; external name '_ATSUGetIndFontVariation';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{
* ATSUGetFontVariationNameCode() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontCopyVariationAxes, CTFontCopyVariation instead.
*
* Summary:
* Obtains the name code for the font variation that matches an
* ASTUI font ID and font variation axis.
*
* Discussion:
* This function function obtains the name code for the font
* variation that matches an ASTUI font ID and font variation axis
* tag. You can use the function ATSUFindFontName to obtain the
* localized name string for the name code produced by
* ATSUGetFontVariationNameCode.
*
* Parameters:
*
* iFontID:
* The font for which to obtain a font variation name code.
*
* iAxis:
* An ATSUFontVariationAxis value representing a valid variation
* axis tag. To obtain a valid variation axis tag for a font, you
* can call the functions ATSUGetIndFontVariation or
* ATSUGetFontInstance.
*
* oNameCode:
* On return, the value contains the name code for the font
* variation. See the SFNTTypes.h header file for a definition of
* the FontNameCode type and a list of possible values.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUGetFontVariationNameCode( iFontID: ATSUFontID; iAxis: ATSUFontVariationAxis; var oNameCode: FontNameCode ): OSStatus; external name '_ATSUGetFontVariationNameCode';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{ ---------------------------------------------------------------------------- }
{ Font Instances }
{ ---------------------------------------------------------------------------- }
{
* ATSUCountFontInstances() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontCopyVariationAxes, CTFontCopyVariation instead.
*
* Summary:
* Obtains the number of defined font instances in a font.
*
* Discussion:
* This function obtains the total number of font instances defined
* in a font. You can use an index value derived from this count to
* get information about a specific font instance by calling the
* function ATSUGetFontInstance.
*
* Parameters:
*
* iFontID:
* The font for which to obtain a count of defined instances.
*
* oInstances:
* On return, the value specifies the number of font instances
* defined for the font.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUCountFontInstances( iFontID: ATSUFontID; var oInstances: ItemCount ): OSStatus; external name '_ATSUCountFontInstances';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{
* ATSUGetFontInstance() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontCopyVariationAxes, CTFontCopyVariation instead.
*
* Summary:
* Obtains the font variation axis values for a font instance.
*
* Discussion:
* with a minimum value of 0.0, a default of 0.5, and a maximum of
* 1.0. Additionally, the variation axis 'wdth' is also defined for
* the font, with a similar value range. The type designer can then
* choose to declare a font instance for a set of specific values
* within these axes, such as ÒDemiboldÓ for a value of 0.8 for the
* 'wght' axis and 0.5 for the 'wdth' axis. By calling the function
* ATSUGetFontInstance , you can obtain the variation axis values
* for a given index into an array of font instances. Typically you
* use the function ATSUGetFontInstance by calling it twice, as
* follows: (1) Pass the ID of the font to examine in the iFont
* parameter, a valid pointer to an ItemCount value in the
* oActualVariationCount parameter, NULL for the oAxes and oValues
* parameters, and 0 for the other parameters. ATSUGetFontInstance
* returns the size to use for the oAxes and oValues arrays in the
* oActualVariationCount parameter. (2) Allocate enough space for
* arrays of the returned size, then call the ATSUGetFontInstance
* again, passing pointers to the arrays in the oAxes and oValues
* parameters. On return, the arrays contain the font variation axes
* and their corresponding values, respectively, for the font
* instance.
*
* Parameters:
*
* iFontID:
* The font for which to obtain instance information.
*
* iFontInstanceIndex:
* An index into an array of instances for the font. This index
* identifies the font instance to examine. Because this index is
* zero-based, you must pass a value between 0 and one less than
* the value produced in the oInstances parameter of the function
* ATSUCountFontInstances.
*
* iMaximumVariations:
* The maximum number of font variation axes to obtain for the
* font instance. Typically, this is equivalent to the number of
* ATSUFontVariationAxis and ATSUFontVariationValue values for
* which you have allocated memory in the oAxes and oValues
* parameters, respectively. To determine this value, see the
* Discussion.
*
* oAxes:
* On return, the array contains tags identifying the font
* variation axes that constitute the font instance. If you are
* uncertain of how much memory to allocate for this array, see
* the Discussion.
*
* oValues:
* On return, the array contains the defined values for the font
* variation axes produced in the oAxes array. If you are
* uncertain of how much memory to allocate for this array, see
* the Discussion.
*
* oActualVariationCount:
* On return, the actual number of font variation axes that
* constitute the font instance. This may be greater than the
* value you passed in the iMaximumVariations parameter.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUGetFontInstance( iFontID: ATSUFontID; iFontInstanceIndex: ItemCount; iMaximumVariations: ItemCount; oAxes: {variable-size-array} ATSUFontVariationAxisPtr { can be NULL }; oValues: {variable-size-array} ATSUFontVariationValuePtr { can be NULL }; var oActualVariationCount: ItemCount ): OSStatus; external name '_ATSUGetFontInstance';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{
* ATSUGetFontInstanceNameCode() *** DEPRECATED ***
*
* Deprecated:
* Use CTFontCopyVariationAxes, CTFontCopyVariation instead.
*
* Summary:
* Obtains the name code for the font instance that matches an ASTUI
* font ID and font instance index value.
*
* Discussion:
* A font instance consists of a named set of values for each
* variation axis in a font. The ATSUGetFontInstanceNameCode
* function obtains the name code for the font instance that matches
* an ASTUI font ID and font instance index value. You can use the
* function ATSUFindFontName to obtain the localized name string for
* the name code produced by ATSUGetFontInstanceNameCode. You can
* obtain the font variation axis values for a font instance by
* calling the function ATSUGetFontInstance.
*
* Parameters:
*
* iFontID:
* The font for which to obtain a font instance name code.
*
* iInstanceIndex:
* An index to the font instance for which to obtain a name code.
* Because this index must be 0-based, you should pass a value
* between 0 and one less than the count produced by the function
* ATSUCountFontInstances.
*
* oNameCode:
* On return, the name code for the font instance. See the
* SFNTTypes.h header file for a definition of the FontNameCode
* type and a list of possible values.
*
* Result:
* On success, noErr is returned. See MacErrors.h for possible error
* codes.
*
* Availability:
* Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
* CarbonLib: in CarbonLib 1.0 and later
* Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
}
function ATSUGetFontInstanceNameCode( iFontID: ATSUFontID; iInstanceIndex: ItemCount; var oNameCode: FontNameCode ): OSStatus; external name '_ATSUGetFontInstanceNameCode';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
{$endc} {not TARGET_CPU_64}
{$endc} {TARGET_OS_MAC}
{$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
end.
{$endc} {not MACOSALLINCLUDE}
|