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
|
/*
File: Fonts.h
Contains: Public interface to the Font Manager.
Version: QuickTime 7.3
Copyright: (c) 2007 (c) 1985-2001 by Apple Computer, Inc., all rights reserved
Bugs?: For bug reports, consult the following page on
the World Wide Web:
http://developer.apple.com/bugreporter/
*/
#ifndef __FONTS__
#define __FONTS__
#ifndef __MACTYPES__
#include <MacTypes.h>
#endif
#ifndef __FILES__
#include <Files.h>
#endif
#ifndef __MACERRORS__
#include <MacErrors.h>
#endif
#ifndef __TEXTCOMMON__
#include <TextCommon.h>
#endif
#ifndef __ATSTYPES__
#include <ATSTypes.h>
#endif
#ifndef __QUICKDRAW__
#include <Quickdraw.h>
#endif
#if PRAGMA_ONCE
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if PRAGMA_IMPORT
#pragma import on
#endif
#if PRAGMA_STRUCT_ALIGN
#pragma options align=mac68k
#elif PRAGMA_STRUCT_PACKPUSH
#pragma pack(push, 2)
#elif PRAGMA_STRUCT_PACK
#pragma pack(2)
#endif
enum {
systemFont = 0,
applFont = 1
};
enum {
kFMDefaultOptions = kNilOptions
};
/* Activation contexts */
enum {
kFMDefaultActivationContext = kFMDefaultOptions,
kFMGlobalActivationContext = 0x00000001,
kFMLocalActivationContext = kFMDefaultActivationContext
};
/* Iteration scopes */
enum {
kFMDefaultIterationScope = kFMDefaultOptions,
kFMGlobalIterationScope = 0x00000001,
kFMLocalIterationScope = kFMDefaultIterationScope
};
/* kPlatformDefaultGuiFontID is used in QuickTime 3.0. */
#if TARGET_OS_MAC
enum {
kPlatformDefaultGuiFontID = applFont
};
#else
enum {
kPlatformDefaultGuiFontID = -1
};
#endif /* TARGET_OS_MAC */
enum {
commandMark = 17,
checkMark = 18,
diamondMark = 19,
appleMark = 20
};
enum {
propFont = 36864L,
prpFntH = 36865L,
prpFntW = 36866L,
prpFntHW = 36867L,
fixedFont = 45056L,
fxdFntH = 45057L,
fxdFntW = 45058L,
fxdFntHW = 45059L,
fontWid = 44208L
};
struct FMInput {
short family;
short size;
Style face;
Boolean needBits;
short device;
Point numer;
Point denom;
};
typedef struct FMInput FMInput;
struct FMOutput {
short errNum;
Handle fontHandle;
UInt8 boldPixels;
UInt8 italicPixels;
UInt8 ulOffset;
UInt8 ulShadow;
UInt8 ulThick;
UInt8 shadowPixels;
SInt8 extra;
UInt8 ascent;
UInt8 descent;
UInt8 widMax;
SInt8 leading;
SInt8 curStyle;
Point numer;
Point denom;
};
typedef struct FMOutput FMOutput;
typedef FMOutput * FMOutputPtr;
typedef FMOutputPtr FMOutPtr;
struct FMetricRec {
Fixed ascent; /*base line to top*/
Fixed descent; /*base line to bottom*/
Fixed leading; /*leading between lines*/
Fixed widMax; /*maximum character width*/
Handle wTabHandle; /*handle to font width table*/
};
typedef struct FMetricRec FMetricRec;
typedef FMetricRec * FMetricRecPtr;
typedef FMetricRecPtr * FMetricRecHandle;
#if CALL_NOT_IN_CARBON
/*
* InitFonts()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( void )
InitFonts(void) ONEWORDINLINE(0xA8FE);
#endif /* CALL_NOT_IN_CARBON */
/*
* GetFontName()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API( void )
GetFontName(
short familyID,
Str255 name) ONEWORDINLINE(0xA8FF);
/*
* GetFNum()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API( void )
GetFNum(
ConstStr255Param name,
short * familyID) ONEWORDINLINE(0xA900);
/*
* RealFont()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API( Boolean )
RealFont(
short fontNum,
short size) ONEWORDINLINE(0xA902);
#if CALL_NOT_IN_CARBON
/*
* SetFontLock()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( void )
SetFontLock(Boolean lockFlag) ONEWORDINLINE(0xA903);
#endif /* CALL_NOT_IN_CARBON */
/*
* FMSwapFont()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API( FMOutPtr )
FMSwapFont(const FMInput * inRec) ONEWORDINLINE(0xA901);
/*
* SetFScaleDisable()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API( void )
SetFScaleDisable(Boolean fscaleDisable) ONEWORDINLINE(0xA834);
/*
* FontMetrics()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API( void )
FontMetrics(FMetricRecPtr theMetrics) ONEWORDINLINE(0xA835);
/*
* SetFractEnable()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API( void )
SetFractEnable(Boolean fractEnable) ONEWORDINLINE(0xA814);
/*
* GetDefFontSize()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API( short )
GetDefFontSize(void) FIVEWORDINLINE(0x3EB8, 0x0BA8, 0x6604, 0x3EBC, 0x000C);
/*
* IsOutline()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API( Boolean )
IsOutline(
Point numer,
Point denom) TWOWORDINLINE(0x7000, 0xA854);
/*
* SetOutlinePreferred()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API( void )
SetOutlinePreferred(Boolean outlinePreferred) TWOWORDINLINE(0x7001, 0xA854);
/*
* GetOutlinePreferred()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API( Boolean )
GetOutlinePreferred(void) TWOWORDINLINE(0x7009, 0xA854);
/*
* OutlineMetrics()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API( OSErr )
OutlineMetrics(
short byteCount,
const void * textPtr,
Point numer,
Point denom,
short * yMax,
short * yMin,
FixedPtr awArray,
FixedPtr lsbArray,
RectPtr boundsArray) TWOWORDINLINE(0x7008, 0xA854);
/*
* SetPreserveGlyph()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API( void )
SetPreserveGlyph(Boolean preserveGlyph) TWOWORDINLINE(0x700A, 0xA854);
/*
* GetPreserveGlyph()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API( Boolean )
GetPreserveGlyph(void) TWOWORDINLINE(0x700B, 0xA854);
#if CALL_NOT_IN_CARBON
/*
* FlushFonts()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( OSErr )
FlushFonts(void) TWOWORDINLINE(0x700C, 0xA854);
#endif /* CALL_NOT_IN_CARBON */
#if CALL_NOT_IN_CARBON
/*
* getfnum()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API_C( void )
getfnum(
const char * theName,
short * familyID);
/*
* getfontname()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API_C( void )
getfontname(
short familyID,
char * theName);
#endif /* CALL_NOT_IN_CARBON */
/*
* GetSysFont()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API( short )
GetSysFont(void) TWOWORDINLINE(0x3EB8, 0x0BA6);
/*
* GetAppFont()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API( short )
GetAppFont(void) TWOWORDINLINE(0x3EB8, 0x0984);
/*--------------------------------------------------------------------------------------*/
/* Extended font data functions (available only with Mac OS 8.5 or later) */
/*--------------------------------------------------------------------------------------*/
/*
* SetAntiAliasedTextEnabled()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 8.6 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API( OSStatus )
SetAntiAliasedTextEnabled(
Boolean iEnable,
SInt16 iMinFontSize) TWOWORDINLINE(0x7011, 0xA854);
/*
* IsAntiAliasedTextEnabled()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 8.6 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API( Boolean )
IsAntiAliasedTextEnabled(SInt16 * oMinFontSize) TWOWORDINLINE(0x7012, 0xA854);
/*
* QDTextBounds()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 8.6 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API( void )
QDTextBounds(
short byteCount,
const void * textAddr,
Rect * bounds) TWOWORDINLINE(0x7013, 0xA854);
/*
* FetchFontInfo()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 8.6 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API( OSErr )
FetchFontInfo(
SInt16 fontID,
SInt16 fontSize,
SInt16 fontStyle,
FontInfo * info) TWOWORDINLINE(0x7014, 0xA854);
/*--------------------------------------------------------------------------------------*/
/* Font access and data management functions (available only with Mac OS 9.0 or later) */
/*--------------------------------------------------------------------------------------*/
/* Enumeration */
/*
* FMCreateFontFamilyIterator()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMCreateFontFamilyIterator(
const FMFilter * iFilter, /* can be NULL */
void * iRefCon,
OptionBits iOptions,
FMFontFamilyIterator * ioIterator);
/*
* FMDisposeFontFamilyIterator()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMDisposeFontFamilyIterator(FMFontFamilyIterator * ioIterator);
/*
* FMResetFontFamilyIterator()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMResetFontFamilyIterator(
const FMFilter * iFilter, /* can be NULL */
void * iRefCon,
OptionBits iOptions,
FMFontFamilyIterator * ioIterator);
/*
* FMGetNextFontFamily()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMGetNextFontFamily(
FMFontFamilyIterator * ioIterator,
FMFontFamily * oFontFamily);
/*
* FMCreateFontIterator()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMCreateFontIterator(
const FMFilter * iFilter, /* can be NULL */
void * iRefCon,
OptionBits iOptions,
FMFontIterator * ioIterator);
/*
* FMDisposeFontIterator()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMDisposeFontIterator(FMFontIterator * ioIterator);
/*
* FMResetFontIterator()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMResetFontIterator(
const FMFilter * iFilter, /* can be NULL */
void * iRefCon,
OptionBits iOptions,
FMFontIterator * ioIterator);
/*
* FMGetNextFont()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMGetNextFont(
FMFontIterator * ioIterator,
FMFont * oFont);
/* Font families */
/*
* FMCreateFontFamilyInstanceIterator()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMCreateFontFamilyInstanceIterator(
FMFontFamily iFontFamily,
FMFontFamilyInstanceIterator * ioIterator);
/*
* FMDisposeFontFamilyInstanceIterator()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMDisposeFontFamilyInstanceIterator(FMFontFamilyInstanceIterator * ioIterator);
/*
* FMResetFontFamilyInstanceIterator()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMResetFontFamilyInstanceIterator(
FMFontFamily iFontFamily,
FMFontFamilyInstanceIterator * ioIterator);
/*
* FMGetNextFontFamilyInstance()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMGetNextFontFamilyInstance(
FMFontFamilyInstanceIterator * ioIterator,
FMFont * oFont,
FMFontStyle * oStyle, /* can be NULL */
FMFontSize * oSize); /* can be NULL */
/*
* FMGetFontFamilyFromName()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( FMFontFamily )
FMGetFontFamilyFromName(ConstStr255Param iName);
/*
* FMGetFontFamilyName()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMGetFontFamilyName(
FMFontFamily iFontFamily,
Str255 oName);
/*
* FMGetFontFamilyTextEncoding()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMGetFontFamilyTextEncoding(
FMFontFamily iFontFamily,
TextEncoding * oTextEncoding);
/*
* FMGetFontFamilyGeneration()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMGetFontFamilyGeneration(
FMFontFamily iFontFamily,
FMGeneration * oGeneration);
/* Fonts */
/*
* FMGetFontFormat()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMGetFontFormat(
FMFont iFont,
FourCharCode * oFormat);
/*
* FMGetFontTableDirectory()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMGetFontTableDirectory(
FMFont iFont,
ByteCount iLength,
void * iBuffer,
ByteCount * oActualLength); /* can be NULL */
/*
* FMGetFontTable()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMGetFontTable(
FMFont iFont,
FourCharCode iTag,
ByteOffset iOffset,
ByteCount iLength,
void * iBuffer,
ByteCount * oActualLength); /* can be NULL */
/*
* FMGetFontGeneration()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMGetFontGeneration(
FMFont iFont,
FMGeneration * oGeneration);
/*
* FMGetFontContainer()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMGetFontContainer(
FMFont iFont,
FSSpec * oFontContainer);
/* Conversion */
/*
* FMGetFontFromFontFamilyInstance()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMGetFontFromFontFamilyInstance(
FMFontFamily iFontFamily,
FMFontStyle iStyle,
FMFont * oFont,
FMFontStyle * oIntrinsicStyle); /* can be NULL */
/*
* FMGetFontFamilyInstanceFromFont()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMGetFontFamilyInstanceFromFont(
FMFont iFont,
FMFontFamily * oFontFamily,
FMFontStyle * oStyle);
/*
* FMGetATSFontRefFromFont()
*
* Availability:
* Non-Carbon CFM: not available
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
* Mac OS X: in version 10.1 and later
*/
EXTERN_API_C( ATSFontRef )
FMGetATSFontRefFromFont(FMFont iFont);
/*
* FMGetATSFontFamilyRefFromFontFamily()
*
* Availability:
* Non-Carbon CFM: not available
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
* Mac OS X: in version 10.1 and later
*/
EXTERN_API_C( ATSFontFamilyRef )
FMGetATSFontFamilyRefFromFontFamily(FMFontFamily iFamily);
/*
* FMGetFontFromATSFontRef()
*
* Availability:
* Non-Carbon CFM: not available
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
* Mac OS X: in version 10.1 and later
*/
EXTERN_API_C( FMFont )
FMGetFontFromATSFontRef(ATSFontRef iFont);
/*
* FMGetFontFamilyFromATSFontFamilyRef()
*
* Availability:
* Non-Carbon CFM: not available
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
* Mac OS X: in version 10.1 and later
*/
EXTERN_API_C( FMFontFamily )
FMGetFontFamilyFromATSFontFamilyRef(ATSFontFamilyRef iFamily);
/* Activation */
/*
* FMActivateFonts()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMActivateFonts(
const FSSpec * iFontContainer,
const FMFilter * iFilter, /* can be NULL */
void * iRefCon,
OptionBits iOptions);
/*
* FMDeactivateFonts()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( OSStatus )
FMDeactivateFonts(
const FSSpec * iFontContainer,
const FMFilter * iFilter, /* can be NULL */
void * iRefCon,
OptionBits iOptions);
/*
* FMGetGeneration()
*
* Availability:
* Non-Carbon CFM: in FontManager 9.0 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( FMGeneration )
FMGetGeneration(void);
/* Container Access */
/*
* FMGetFontContainerFromFontFamilyInstance()
*
* Availability:
* Non-Carbon CFM: not available
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
* Mac OS X: in version 10.1 and later
*/
EXTERN_API_C( OSStatus )
FMGetFontContainerFromFontFamilyInstance(
FMFontFamily iFontFamily,
FMFontStyle iStyle,
FMFontSize iFontSize,
FSSpec * oFontContainer);
/*
* FMGetFontFamilyResource()
*
* Availability:
* Non-Carbon CFM: not available
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
* Mac OS X: in version 10.1 and later
*/
EXTERN_API_C( OSStatus )
FMGetFontFamilyResource(
FMFontFamily iFontFamily,
FMFontStyle iFontStyle,
FMFontSize iFontSize,
ByteCount iBufferSize,
void * ioBuffer,
ByteCount * oSize); /* can be NULL */
typedef FMFontFamily FontFamilyID;
typedef FMFontSize FontPointSize;
/*--------------------------------------------------------------------------------------*/
/* Deprecated constant and type definitions */
/*--------------------------------------------------------------------------------------*/
/* The font identifier constants are deprecated; use GetFNum or FMGetFontFamilyFromName
to find a font family from a standard QuickDraw name.
*/
enum {
kFMUseGlobalScopeOption = 0x00000001
};
enum {
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 the
Font Manager 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 of the Font Manager and may only be accessed
through the font access and data management functions of the Font Manager or ATS.
*/
struct WidEntry {
short widStyle; /*style entry applies to*/
};
typedef struct WidEntry WidEntry;
struct WidTable {
short numWidths; /*number of entries - 1*/
};
typedef struct WidTable WidTable;
struct AsscEntry {
short fontSize;
short fontStyle;
short fontID; /*font resource ID*/
};
typedef struct AsscEntry AsscEntry;
struct FontAssoc {
short numAssoc; /*number of entries - 1*/
};
typedef struct FontAssoc FontAssoc;
struct StyleTable {
short fontClass;
long offset;
long reserved;
char indexes[48];
};
typedef struct StyleTable StyleTable;
struct NameTable {
short stringCount;
Str255 baseFontName;
};
typedef struct NameTable NameTable;
struct KernPair {
char kernFirst; /*1st character of kerned pair*/
char kernSecond; /*2nd character of kerned pair*/
short kernWidth; /*kerning in 1pt fixed format*/
};
typedef struct KernPair KernPair;
struct KernEntry {
short kernStyle; /*style the entry applies to*/
short kernLength; /*length of this entry*/
};
typedef struct KernEntry KernEntry;
struct KernTable {
short numKerns; /*number of kerning entries*/
};
typedef struct KernTable KernTable;
struct WidthTable {
Fixed tabData[256]; /*character widths*/
Handle tabFont; /*font record used to build table*/
long sExtra; /*space extra used for table*/
long style; /*extra due to style*/
short fID; /*font family ID*/
short fSize; /*font size request*/
short face; /*style (face) request*/
short device; /*device requested*/
Point inNumer; /*scale factors requested*/
Point inDenom; /*scale factors requested*/
short aFID; /*actual font family ID for table*/
Handle fHand; /*family record used to build up table*/
Boolean usedFam; /*used fixed point family widths*/
UInt8 aFace; /*actual face produced*/
short vOutput; /*vertical scale output value*/
short hOutput; /*horizontal scale output value*/
short vFactor; /*vertical scale output value*/
short hFactor; /*horizontal scale output value*/
short aSize; /*actual size of actual font used*/
short tabSize; /*total size of table*/
};
typedef struct WidthTable WidthTable;
typedef WidthTable * WidthTablePtr;
typedef WidthTablePtr * WidthTableHdl;
struct FamRec {
short ffFlags; /*flags for family*/
short ffFamID; /*family ID number*/
short ffFirstChar; /*ASCII code of 1st character*/
short ffLastChar; /*ASCII code of last character*/
short ffAscent; /*maximum ascent for 1pt font*/
short ffDescent; /*maximum descent for 1pt font*/
short ffLeading; /*maximum leading for 1pt font*/
short ffWidMax; /*maximum widMax for 1pt font*/
long ffWTabOff; /*offset to width table*/
long ffKernOff; /*offset to kerning table*/
long ffStylOff; /*offset to style mapping table*/
short ffProperty[9]; /*style property info*/
short ffIntl[2]; /*for international use*/
short ffVersion; /*version number*/
};
typedef struct FamRec FamRec;
struct FontRec {
short fontType; /*font type*/
short firstChar; /*ASCII code of first character*/
short lastChar; /*ASCII code of last character*/
short widMax; /*maximum character width*/
short kernMax; /*negative of maximum character kern*/
short nDescent; /*negative of descent*/
short fRectWidth; /*width of font rectangle*/
short fRectHeight; /*height of font rectangle*/
unsigned short owTLoc; /*offset to offset/width table*/
short ascent; /*ascent*/
short descent; /*descent*/
short leading; /*leading*/
short rowWords; /*row width of bit image / 2 */
};
typedef struct FontRec FontRec;
typedef FontRec * FontRecPtr;
typedef FontRecPtr * FontRecHdl;
/*--------------------------------------------------------------------------------------*/
#if OLDROUTINENAMES
enum {
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
};
#endif /* OLDROUTINENAMES */
/*--------------------------------------------------------------------------------------*/
#if PRAGMA_STRUCT_ALIGN
#pragma options align=reset
#elif PRAGMA_STRUCT_PACKPUSH
#pragma pack(pop)
#elif PRAGMA_STRUCT_PACK
#pragma pack()
#endif
#ifdef PRAGMA_IMPORT_OFF
#pragma import off
#elif PRAGMA_IMPORT
#pragma import reset
#endif
#ifdef __cplusplus
}
#endif
#endif /* __FONTS__ */
|