Mac OS 9
ScalerStreamTypes.h
Go to the documentation of this file.
1 
19 #ifndef __SCALERSTREAMTYPES__
20 #define __SCALERSTREAMTYPES__
21 
22 #ifndef __MACTYPES__
23 #include <MacTypes.h>
24 #endif
25 
26 #ifndef __SFNTTYPES__
27 #include <SFNTTypes.h>
28 #endif
29 
30 #if PRAGMA_ONCE
31 #pragma once
32 #endif
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 #if PRAGMA_IMPORT
39 #pragma import on
40 #endif
41 
42 #if PRAGMA_STRUCT_ALIGN
43 #pragma options align = mac68k
44 #elif PRAGMA_STRUCT_PACKPUSH
45 #pragma pack(push, 2)
46 #elif PRAGMA_STRUCT_PACK
47 #pragma pack(2)
48 #endif
49 
50 /* ScalerStream input/output types */
51 enum {
52  cexec68K = 0x00000001,
53  truetypeStreamType = 0x00000001,
54  type1StreamType = 0x00000002,
55  type3StreamType = 0x00000004,
56  type42StreamType = 0x00000008,
57  type42GXStreamType = 0x00000010,
58  portableStreamType = 0x00000020,
59  flattenedStreamType = 0x00000040,
60  cidType2StreamType = 0x00000080,
61  cidType0StreamType = 0x00000100,
62  type1CFFStreamType = 0x00000200,
63  evenOddModifierStreamType = 0x00008000,
64  eexecBinaryModifierStreamType =
65  0x00010000, /* encrypted portion of Type1Stream to be binary */
66  unicodeMappingModifierStreamType =
67  0x00020000, /* include glyph ID to unicode mapping info for PDF */
68  scalerSpecifcModifierMask = 0x0000F000, /* for scaler's internal use */
69  streamTypeModifierMask =
70  (long)0xFFFFF000 /* 16 bits for Apple, 4 bits for scaler */
71 };
72 
73 /* Possible streamed font formats */
74 typedef unsigned long scalerStreamTypeFlag;
75 enum {
76  downloadStreamAction = 0, /* Transmit the (possibly sparse) font data */
77  asciiDownloadStreamAction =
78  1, /* Transmit font data to a 7-bit ASCII destination */
79  fontSizeQueryStreamAction =
80  2, /* Estimate in-printer memory used if the font were downloaded */
81  encodingOnlyStreamAction = 3, /* Transmit only the encoding for the font */
82  prerequisiteQueryStreamAction =
83  4, /* Return a list of prerequisite items needed for the font */
84  prerequisiteItemStreamAction = 5, /* Transmit a specified prerequisite item */
85  variationQueryStreamAction =
86  6, /* Return information regarding support for variation streaming */
87  variationPSOperatorStreamAction =
88  7 /* Transmit Postscript code necessary to effect variation of a font */
89 };
90 
91 typedef long scalerStreamAction;
92 enum {
93  selectAllVariations =
94  -1 /* Special variationCount value meaning include all variation data */
95 };
96 
98  long enumeration; /* Shorthand tag identifying the item */
99  long size; /* Worst case vm in printer item requires */
100  unsigned char name[1]; /* Name to be used by the client when emitting the item
101  (Pascal string) */
102 };
104 struct scalerStream {
105  const void *streamRefCon; /* <- private reference for client */
106  const char *targetVersion; /* <- e.g. Postscript printer name (C string) */
107  scalerStreamTypeFlag types; /* <-> Data stream formats desired/supplied */
108  scalerStreamAction action; /* <- What action to take */
109  unsigned long
110  memorySize; /* -> Worst case memory use (vm) in printer or as sfnt */
111  long variationCount; /* <- The number of variations, or selectAllVariations */
112  const void *variations; /* <- A pointer to an array of the variations
113  (gxFontVariation) */
114  union {
115  /* Normal font streaming information*/
116  struct {
117  const unsigned short
118  *encoding; /* <- Intention is * unsigned short[256] */
119  long *glyphBits; /* <-> Bitvector: a bit for each glyph, 1 =
120  desired/supplied */
121  char *name; /* <-> The printer font name to use/used (C string) */
122  } font;
123 
124  /* Used to obtain a list of prerequisites from the scaler*/
125  struct {
126  long size; /* -> Size of the prereq. list in bytes (0 indicates no
127  prerequisites)*/
128  void *list; /* <- Pointer to client block to hold list (nil = list size
129  query only) */
130  } prerequisiteQuery;
131 
132  long prerequisiteItem; /* <- Enumeration value for the prerequisite item
133  to be streamed.*/
134 
135  long variationQueryResult; /* -> Output from the variationQueryStreamAction
136  */
137  } info;
138 };
139 typedef struct scalerStream scalerStream;
141  long hexFlag; /* Indicates that the data is to be interpreted as hex, versus
142  binary */
143  long byteCount; /* Number of bytes in the data being streamed */
144  const void *data; /* Pointer to the data being streamed */
145 };
146 typedef struct scalerStreamData scalerStreamData;
147 
148 #if PRAGMA_STRUCT_ALIGN
149 #pragma options align = reset
150 #elif PRAGMA_STRUCT_PACKPUSH
151 #pragma pack(pop)
152 #elif PRAGMA_STRUCT_PACK
153 #pragma pack()
154 #endif
155 
156 #ifdef PRAGMA_IMPORT_OFF
157 #pragma import off
158 #elif PRAGMA_IMPORT
159 #pragma import reset
160 #endif
161 
162 #ifdef __cplusplus
163 }
164 #endif
165 
166 #endif /* __SCALERSTREAMTYPES__ */
Basic Macintosh data types.
Font file structures.
Definition: TranslationExtensions.h:114
Definition: ScalerStreamTypes.h:97
Definition: ScalerStreamTypes.h:140
Definition: ScalerStreamTypes.h:104