w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

gsub.c
Go to the documentation of this file.
1 /* gsub.c -- Glyph Substitution Table
2  */
3 #ifdef HAVE_CONFIG_H
4 #include <config.h>
5 #endif
6 
7 #include <stdio.h>
8 #include <stdlib.h>
9 #include "ttf.h"
10 #include "ttfutil.h"
11 
13 {
14  USHORT cOffset;
16 
17  cOffset = ttfGetUSHORT (fp);
18  sub->deltaGlyphID = ttfGetUSHORT (fp);
19  sub->coverage = otfMakeCoverage (fp, offset + cOffset);
20 
21  return sub;
22 }
23 
24 static void printGSUB11 (FILE *fp, Sub11Ptr sub)
25 {
26  fprintf (fp, " - Single Substitution Delta\n\t ");
27  otfPrintCoverage (fp, sub->coverage);
28  fprintf (fp, "\t deltaGlyphID: %d\n", sub->deltaGlyphID);
29 }
30 
31 static void freeGSUB11 (Sub11Ptr sub)
32 {
33  otfFreeCoverage (sub->coverage);
34 }
35 
37 {
38  USHORT cOffset;
40 
41  cOffset = ttfGetUSHORT (fp);
42  sub->glyphCount = ttfGetUSHORT (fp);
43  sub->substitute = ttfMakeUSHORT (sub->glyphCount, fp);
44  sub->coverage = otfMakeCoverage (fp, offset + cOffset);
45 
46  return sub;
47 }
48 
49 static void printGSUB12 (FILE *fp, Sub12Ptr sub)
50 {
51  int i;
52 
53  fprintf (fp, " - Single Substitution List\n\t ");
54  otfPrintCoverage (fp, sub->coverage);
55  fprintf (fp, "\t glyphCount: %d\n\t\t substitute: %d",
56  sub->glyphCount, sub->substitute[0]);
57  for (i = 1; i < sub->glyphCount; i++)
58  fprintf (fp, i % 8 ? ", %d" : ",\n\t\t\t %d", sub->substitute[i]);
59  fprintf (fp, "\n");
60 }
61 
62 static void freeGSUB12 (Sub12Ptr sub)
63 {
64  otfFreeCoverage (sub->coverage);
65  free (sub->substitute);
66 }
67 
68 static void gsubLoadSequence (SequencePtr sequence, FILE *fp, ULONG offset)
69 {
70  xfseek (fp, offset, SEEK_SET, "gsubLoadSequence");
71 
72  sequence->glyphCount = ttfGetUSHORT (fp);
73  sequence->substitute = ttfMakeUSHORT (sequence->glyphCount, fp);
74 }
75 
77 {
78  int i;
79  USHORT cOffset;
80  USHORT *sOffset;
82 
83  cOffset = ttfGetUSHORT (fp);
84  sub->sequenceCount = ttfGetUSHORT (fp);
85  sOffset = ttfMakeUSHORT (sub->sequenceCount, fp);
86  sub->coverage = otfMakeCoverage (fp, offset + cOffset);
87  sub->sequence = XCALLOC (sub->sequenceCount, Sequence);
88  for (i = 0; i < sub->sequenceCount; i++)
89  gsubLoadSequence (&sub->sequence[i], fp, offset + sOffset[i]);
90  free (sOffset);
91 
92  return sub;
93 }
94 
95 static void printGSUB21 (FILE *fp, Sub21Ptr sub)
96 {
97  int i;
98 
99  fprintf (fp, " - Multiple Substitution\n\t ");
100  otfPrintCoverage (fp, sub->coverage);
101  fprintf (fp, "\t sequenceCount: %d\n", sub->sequenceCount);
102  for (i = 0; i < sub->sequenceCount; i++) {
103  int j;
104 
105  fprintf (fp, "\t %2d. glyphCount: %d - ", i, sub->sequence[i].glyphCount);
106  for (j = 0; j < sub->sequence[i].glyphCount; j++)
107  fprintf (fp, j == 0 ? "- %d" : ", %d", sub->sequence[i].substitute[j]);
108  fprintf (fp, "\n");
109  }
110 }
111 
112 static void freeGSUB21 (Sub21Ptr sub)
113 {
114  int i;
115 
116  otfFreeCoverage (sub->coverage);
117  for (i = 0; i < sub->sequenceCount; i++)
118  free (sub->sequence[i].substitute);
119  free (sub->sequence);
120 }
121 
123 {
124  xfseek (fp, offset, SEEK_SET, "gsubLoadAlternateSet");
125 
126  alternateSet->glyphCount = ttfGetUSHORT (fp);
127  alternateSet->alternate = ttfMakeUSHORT (alternateSet->glyphCount, fp);
128 }
129 
131 {
132  int i;
133  USHORT cOffset;
134  USHORT *aOffset;
136 
137  cOffset = ttfGetUSHORT (fp);
138  sub->alternateSetCount = ttfGetUSHORT (fp);
139  aOffset = ttfMakeUSHORT (sub->alternateSetCount, fp);
140  sub->coverage = otfMakeCoverage (fp, offset + cOffset);
141  sub->alternateSet = XCALLOC (sub->alternateSetCount, AlternateSet);
142  for (i = 0; i < sub->alternateSetCount; i++)
143  gsubLoadAlternateSet (&sub->alternateSet[i], fp, offset + aOffset[i]);
144  free (aOffset);
145 
146  return sub;
147 }
148 
149 static void printGSUB31 (FILE *fp, Sub31Ptr sub)
150 {
151  int i;
152 
153  fprintf (fp, " - Alternate Substitution\n\t ");
154  otfPrintCoverage (fp, sub->coverage);
155  fprintf (fp, "\t alternateSetCount: %d\n", sub->alternateSetCount);
156  for (i = 0; i < sub->alternateSetCount; i++) {
157  int j;
158 
159  fprintf (fp, "\t %2d. glyphCount: %d ", i, sub->alternateSet[i].glyphCount);
160  for (j = 0; j < sub->alternateSet[i].glyphCount; j++)
161  fprintf (fp, j == 0 ? "- %d" : ", %d", sub->alternateSet[i].alternate[j]);
162  fprintf (fp, "\n");
163  }
164 }
165 
166 static void freeGSUB31 (Sub31Ptr sub)
167 {
168  int i;
169 
170  otfFreeCoverage (sub->coverage);
171  for (i = 0; i < sub->alternateSetCount; i++)
172  free (sub->alternateSet[i].alternate);
173  free (sub->alternateSet);
174 }
175 
176 static void gsubLoadLigature (LigaturePtr ligature, FILE *fp, ULONG offset)
177 {
178  xfseek (fp, offset, SEEK_SET, "gsubLoadLigature");
179 
180  ligature->ligGlyph = ttfGetUSHORT (fp);
181  ligature->compCount = ttfGetUSHORT (fp);
182  ligature->component = ttfMakeUSHORT (ligature->compCount - 1, fp);
183 }
184 
185 static void gsubLoadLigatureSet (LigatureSetPtr ligatureSet, FILE *fp, ULONG offset)
186 {
187  int i;
188  USHORT *lOffset;
189 
190  xfseek (fp, offset, SEEK_SET, "gsubLoadLigatureSet");
191 
192  ligatureSet->ligatureCount = ttfGetUSHORT (fp);
193  lOffset = ttfMakeUSHORT (ligatureSet->ligatureCount, fp);
194  ligatureSet->ligature = XCALLOC (ligatureSet->ligatureCount, Ligature);
195  for (i = 0; i < ligatureSet->ligatureCount; i++)
196  gsubLoadLigature (&ligatureSet->ligature[i], fp, offset + lOffset[i]);
197  free (lOffset);
198 }
199 
201 {
202  int i;
203  USHORT cOffset;
204  USHORT *lOffset;
206 
207  cOffset = ttfGetUSHORT (fp);
208  sub->ligSetCount = ttfGetUSHORT (fp);
209  lOffset = ttfMakeUSHORT (sub->ligSetCount, fp);
210  sub->coverage = otfMakeCoverage (fp, offset + cOffset);
211  sub->ligatureSet = XCALLOC (sub->ligSetCount, LigatureSet);
212  for (i = 0; i < sub->ligSetCount; i++)
213  gsubLoadLigatureSet (&sub->ligatureSet[i], fp, offset + lOffset[i]);
214  free (lOffset);
215 
216  return sub;
217 }
218 
219 static void printGSUB41 (FILE *fp, Sub41Ptr sub)
220 {
221  int i;
222 
223  fprintf (fp, " - Ligature Substitution\n\t ");
224  otfPrintCoverage (fp, sub->coverage);
225  fprintf (fp, "\t ligSetCount: %d\n", sub->ligSetCount);
226  for (i = 0; i < sub->ligSetCount; i++) {
227  int j;
228 
229  fprintf (fp, "\t %2d. ligatureCount: %d\n", i, sub->ligatureSet[i].ligatureCount);
230  for (j = 0; j < sub->ligatureSet[i].ligatureCount; j++) {
231  int k;
232 
233  fprintf (fp, "\t %2d. ligGlyph: %d, compCount: %d ", j,
234  sub->ligatureSet[i].ligature[j].ligGlyph,
235  sub->ligatureSet[i].ligature[j].compCount);
236  for (k = 0; k < sub->ligatureSet[i].ligature[j].compCount - 1; k++)
237  fprintf (fp, k == 0 ? "- %d" : ", %d", sub->ligatureSet[i].ligature[j].component[k]);
238  fprintf (fp, "\n");
239  }
240  }
241 }
242 
243 static void freeGSUB41 (Sub41Ptr sub)
244 {
245  int i;
246 
247  otfFreeCoverage (sub->coverage);
248  for (i = 0; i < sub->ligSetCount; i++) {
249  int j;
250 
251  for (j = 0; j < sub->ligatureSet[i].ligatureCount; j++)
252  free (sub->ligatureSet[i].ligature[j].component);
253  free (sub->ligatureSet[i].ligature);
254  }
255  free (sub->ligatureSet);
256 }
257 
258 #define makeGSUB51 makeOTFCtx1
259 #define printGSUB51 printOTFCtx1
260 #define freeGSUB51 freeOTFCtx1
261 
262 #define makeGSUB52 makeOTFCtx2
263 #define printGSUB52 printOTFCtx2
264 #define freeGSUB52 freeOTFCtx2
265 
266 #define makeGSUB53 makeOTFCtx3
267 #define printGSUB53 printOTFCtx3
268 #define freeGSUB53 freeOTFCtx3
269 
270 #define makeGSUB61 makeOTFChn1
271 #define printGSUB61 printOTFChn1
272 #define freeGSUB61 freeOTFChn1
273 
274 #define makeGSUB62 makeOTFChn2
275 #define printGSUB62 printOTFChn2
276 #define freeGSUB62 freeOTFChn2
277 
278 #define makeGSUB63 makeOTFChn3
279 #define printGSUB63 printOTFChn3
280 #define freeGSUB63 freeOTFChn3
281 
283 {
284  int i;
285  USHORT cOffset;
286  USHORT *bOffset, *lOffset;
288 
289  cOffset = ttfGetUSHORT (fp);
290  sub->backtrackGlyphCount = ttfGetUSHORT (fp);
291  bOffset = ttfMakeUSHORT (sub->backtrackGlyphCount, fp);
292  sub->lookaheadGlyphCount = ttfGetUSHORT (fp);
293  lOffset = ttfMakeUSHORT (sub->lookaheadGlyphCount, fp);
294  sub->glyphCount = ttfGetUSHORT (fp);
295  sub->substitute = ttfMakeUSHORT (sub->glyphCount, fp);
296  sub->coverage = otfMakeCoverage (fp, offset + cOffset);
297  sub->backtrack = XCALLOC (sub->backtrackGlyphCount, CoveragePtr);
298  for (i = 0; i < sub->backtrackGlyphCount; i++)
299  sub->backtrack[i] = otfMakeCoverage (fp, offset + bOffset[i]);
300  free (bOffset);
301  sub->lookahead = XCALLOC (sub->lookaheadGlyphCount, CoveragePtr);
302  for (i = 0; i < sub->lookaheadGlyphCount; i++)
303  sub->lookahead[i] = otfMakeCoverage (fp, offset + lOffset[i]);
304  free (lOffset);
305 
306  return sub;
307 }
308 
309 static void printGSUB81 (FILE *fp, Sub81Ptr sub)
310 {
311  int i;
312 
313  fprintf (fp, " - Reverse Chaining Context Single Substitution\n\t ");
314  otfPrintCoverage (fp, sub->coverage);
315  fprintf (fp, "\t backtrackGlyphCount: %d\n", sub->backtrackGlyphCount);
316  for (i = 0; i < sub->backtrackGlyphCount; i++) {
317  fprintf (fp, "\t %2d. backtrack", i);
318  otfPrintCoverage (fp, sub->backtrack[i]);
319  }
320  fprintf (fp, "\t lookaheadGlyphCount: %d\n", sub->lookaheadGlyphCount);
321  for (i = 0; i < sub->lookaheadGlyphCount; i++) {
322  fprintf (fp, "\t %2d. lookahead", i);
323  otfPrintCoverage (fp, sub->lookahead[i]);
324  }
325  fprintf (fp, "\t glyphCount: %d\n\t substitute - %d",
326  sub->glyphCount, sub->substitute[0]);
327  for (i = 1; i < sub->glyphCount; i++)
328  fprintf (fp, i % 8 ? ",\n\t\t %d" : ", %d", sub->substitute[i]);
329 }
330 
331 static void freeGSUB81 (Sub81Ptr sub)
332 {
333  int i;
334 
335  otfFreeCoverage (sub->coverage);
336  for (i = 0; i < sub->backtrackGlyphCount; i++)
337  otfFreeCoverage (sub->backtrack[i]);
338  free (sub->backtrack);
339  for (i = 0; i < sub->lookaheadGlyphCount; i++)
340  otfFreeCoverage (sub->lookahead[i]);
341  free (sub->lookahead);
342  free (sub->substitute);
343 }
344 
346 {
348  USHORT lookupFormat;
349 
350 again:
351  if (lookupType == 0 || lookupType > SubLookup_Max)
352  ttfError ("Unrecognized GSUB lookupType\n");
353 
354  xfseek (fp, offset, SEEK_SET, "makeGSUBLookup");
355 
356  lookupFormat = ttfGetUSHORT (fp);
357  if (lookupFormat & 0xfff0)
358  lookupFormat = 0x000f;
359 
360  switch (lookupType << 4 | lookupFormat)
361  {
362  case 0x011:
363  lookup.sub.sub11 = makeGSUB11 (fp, offset);
364  break;
365  case 0x012:
366  lookup.sub.sub12 = makeGSUB12 (fp, offset);
367  break;
368  case 0x021:
369  lookup.sub.sub21 = makeGSUB21 (fp, offset);
370  break;
371  case 0x031:
372  lookup.sub.sub31 = makeGSUB31 (fp, offset);
373  break;
374  case 0x041:
375  lookup.sub.sub41 = makeGSUB41 (fp, offset);
376  break;
377  case 0x051:
378  lookup.sub.sub51 = makeGSUB51 (fp, offset);
379  break;
380  case 0x052:
381  lookup.sub.sub52 = makeGSUB52 (fp, offset);
382  break;
383  case 0x053:
384  lookup.sub.sub53 = makeGSUB53 (fp, offset);
385  break;
386  case 0x061:
387  lookup.sub.sub61 = makeGSUB61 (fp, offset);
388  break;
389  case 0x062:
390  lookup.sub.sub62 = makeGSUB62 (fp, offset);
391  break;
392  case 0x063:
393  lookup.sub.sub63 = makeGSUB63 (fp, offset);
394  break;
395  case 0x081:
396  lookup.sub.sub81 = makeGSUB81 (fp, offset);
397  break;
398  case 0x071:
399  lookupType = ttfGetUSHORT (fp);
400  if (lookupType == 7)
401  ttfError ("Invalid GSUB extensionLookupType\n");
402  offset += ttfGetULONG (fp);
403  goto again;
404  default:
405  ttfError ("Unrecognized GSUB lookupFormat\n");
406  }
407 
408  lookup.otf->lookupType = lookupType;
409  lookup.otf->lookupFormat = lookupFormat;
410 
411  return lookup;
412 }
413 
415 {
416  switch (lookup.otf->lookupType << 4 | lookup.otf->lookupFormat)
417  {
418  case 0x011:
419  printGSUB11 (fp, lookup.sub.sub11);
420  break;
421  case 0x012:
422  printGSUB12 (fp, lookup.sub.sub12);
423  break;
424  case 0x021:
425  printGSUB21 (fp, lookup.sub.sub21);
426  break;
427  case 0x031:
428  printGSUB31 (fp, lookup.sub.sub31);
429  break;
430  case 0x041:
431  printGSUB41 (fp, lookup.sub.sub41);
432  break;
433  case 0x051:
434  printGSUB51 (fp, lookup.sub.sub51);
435  break;
436  case 0x052:
437  printGSUB52 (fp, lookup.sub.sub52);
438  break;
439  case 0x053:
440  printGSUB53 (fp, lookup.sub.sub53);
441  break;
442  case 0x061:
443  printGSUB61 (fp, lookup.sub.sub61);
444  break;
445  case 0x062:
446  printGSUB62 (fp, lookup.sub.sub62);
447  break;
448  case 0x063:
449  printGSUB63 (fp, lookup.sub.sub63);
450  break;
451  case 0x081:
452  printGSUB81 (fp, lookup.sub.sub81);
453  break;
454  default:
455  ttfError ("Internal error: printGSUBLookup\n");
456  }
457 }
458 
460 {
461  switch (lookup.otf->lookupType << 4 | lookup.otf->lookupFormat)
462  {
463  case 0x011:
464  freeGSUB11 (lookup.sub.sub11);
465  break;
466  case 0x012:
467  freeGSUB12 (lookup.sub.sub12);
468  break;
469  case 0x021:
470  freeGSUB21 (lookup.sub.sub21);
471  break;
472  case 0x031:
473  freeGSUB31 (lookup.sub.sub31);
474  break;
475  case 0x041:
476  freeGSUB41 (lookup.sub.sub41);
477  break;
478  case 0x051:
479  freeGSUB51 (lookup.sub.sub51);
480  break;
481  case 0x052:
482  freeGSUB52 (lookup.sub.sub52);
483  break;
484  case 0x053:
485  freeGSUB53 (lookup.sub.sub53);
486  break;
487  case 0x061:
488  freeGSUB61 (lookup.sub.sub61);
489  break;
490  case 0x062:
491  freeGSUB62 (lookup.sub.sub62);
492  break;
493  case 0x063:
494  freeGSUB63 (lookup.sub.sub63);
495  break;
496  case 0x081:
497  freeGSUB81 (lookup.sub.sub81);
498  break;
499  default:
500  ttfError ("Internal error: freeGSUBLookup\n");
501  }
502 }
503 
504 static void ttfLoadGSUB (FILE *fp, GSUBPtr gsub, ULONG offset)
505 {
506  USHORT sOffset, fOffset, lOffset;
507 
508  xfseek (fp, offset, SEEK_SET, "ttfLoadGSUB");
509 
510  gsub->version = ttfGetFixed (fp);
511  sOffset = ttfGetUSHORT (fp);
512  fOffset = ttfGetUSHORT (fp);
513  lOffset = ttfGetUSHORT (fp);
514 
515  gsub->scriptList = otfMakeScriptList (fp, offset + sOffset);
516  gsub->featureList = otfMakeFeatureList (fp, offset + fOffset);
517  gsub->lookupList = otfMakeLookupList (fp, offset + lOffset, &makeGSUBLookup);
518 }
519 
521 {
522  ULONG tag = FT_MAKE_TAG ('G', 'S', 'U', 'B');
523  TableDirPtr ptd;
524 
525  if ((ptd = ttfLookUpTableDir (tag, font)) != NULL)
526  {
527  font->gsub = XCALLOC1 (GSUB);
528  ttfLoadGSUB (font->fp, font->gsub, ptd->offset);
529  }
530 }
531 
533 {
534  int b[2];
535 
536  FixedSplit (gsub->version, b);
537 
538  fprintf (fp, "'GSUB' Table - Glyph Substitution Data\n");
539  fprintf (fp, "--------------------------------------\n");
540  fprintf (fp, "\t 'GSUB' Version:\t %d.%d\n",b[1],b[0]);
541 
545 }
546 
547 void ttfFreeGSUB (GSUBPtr gsub)
548 {
549  if (gsub != NULL)
550  {
554  free (gsub);
555  }
556 }
int lookup(const char *)
#define b
Definition: jpegint.h:372
#define free(a)
Definition: decNumber.cpp:310
static Sub81Ptr makeGSUB81(FILE *fp, ULONG offset)
Definition: gsub.c:282
static void printGSUB12(FILE *fp, Sub12Ptr sub)
Definition: gsub.c:49
#define freeGSUB53
Definition: gsub.c:268
static void freeGSUB31(Sub31Ptr sub)
Definition: gsub.c:166
static void freeGSUB11(Sub11Ptr sub)
Definition: gsub.c:31
void ttfPrintGSUB(FILE *fp, GSUBPtr gsub)
Definition: gsub.c:532
#define printGSUB51
Definition: gsub.c:259
static void gsubLoadSequence(SequencePtr sequence, FILE *fp, ULONG offset)
Definition: gsub.c:68
static void freeGSUB21(Sub21Ptr sub)
Definition: gsub.c:112
static void printGSUB41(FILE *fp, Sub41Ptr sub)
Definition: gsub.c:219
#define printGSUB61
Definition: gsub.c:271
#define makeGSUB52
Definition: gsub.c:262
static void gsubLoadAlternateSet(AlternateSetPtr alternateSet, FILE *fp, ULONG offset)
Definition: gsub.c:122
#define freeGSUB62
Definition: gsub.c:276
static void freeGSUB41(Sub41Ptr sub)
Definition: gsub.c:243
#define printGSUB63
Definition: gsub.c:279
static Sub11Ptr makeGSUB11(FILE *fp, ULONG offset)
Definition: gsub.c:12
void ttfInitGSUB(TTFontPtr font)
Definition: gsub.c:520
#define printGSUB62
Definition: gsub.c:275
static void printGSUB11(FILE *fp, Sub11Ptr sub)
Definition: gsub.c:24
static void printGSUB31(FILE *fp, Sub31Ptr sub)
Definition: gsub.c:149
#define freeGSUB63
Definition: gsub.c:280
static Sub21Ptr makeGSUB21(FILE *fp, ULONG offset)
Definition: gsub.c:76
#define freeGSUB61
Definition: gsub.c:272
static Sub31Ptr makeGSUB31(FILE *fp, ULONG offset)
Definition: gsub.c:130
static void freeGSUB81(Sub81Ptr sub)
Definition: gsub.c:331
#define makeGSUB53
Definition: gsub.c:266
static void ttfLoadGSUB(FILE *fp, GSUBPtr gsub, ULONG offset)
Definition: gsub.c:504
static void printGSUBLookup(FILE *fp, LookupPtr lookup)
Definition: gsub.c:414
#define printGSUB52
Definition: gsub.c:263
static void printGSUB81(FILE *fp, Sub81Ptr sub)
Definition: gsub.c:309
#define makeGSUB61
Definition: gsub.c:270
static LookupPtr makeGSUBLookup(FILE *fp, USHORT lookupType, ULONG offset)
Definition: gsub.c:345
#define freeGSUB52
Definition: gsub.c:264
static void freeGSUB12(Sub12Ptr sub)
Definition: gsub.c:62
static Sub12Ptr makeGSUB12(FILE *fp, ULONG offset)
Definition: gsub.c:36
void ttfFreeGSUB(GSUBPtr gsub)
Definition: gsub.c:547
#define printGSUB53
Definition: gsub.c:267
#define makeGSUB63
Definition: gsub.c:278
static void gsubLoadLigature(LigaturePtr ligature, FILE *fp, ULONG offset)
Definition: gsub.c:176
static Sub41Ptr makeGSUB41(FILE *fp, ULONG offset)
Definition: gsub.c:200
#define freeGSUB51
Definition: gsub.c:260
#define makeGSUB62
Definition: gsub.c:274
static void gsubLoadLigatureSet(LigatureSetPtr ligatureSet, FILE *fp, ULONG offset)
Definition: gsub.c:185
#define makeGSUB51
Definition: gsub.c:258
static void freeGSUBLookup(LookupPtr lookup)
Definition: gsub.c:459
static void printGSUB21(FILE *fp, Sub21Ptr sub)
Definition: gsub.c:95
#define SubLookup_Max
Definition: gsub.h:16
#define SEEK_SET
Definition: jmemansi.c:26
#define FT_MAKE_TAG(_x1, _x2, _x3, _x4)
Definition: fttypes.h:488
#define NULL
Definition: ftobjs.h:61
small capitals from c petite p scientific i
Definition: afcover.h:80
unsigned short USHORT
Definition: sfnt.h:36
KPSEDLL void xfseek(FILE *fp, long offset, int wherefrom, const_string filename)
Definition: xfseek.c:22
#define fprintf
Definition: mendex.h:64
ULONG ttfGetULONG(FILE *fp)
Definition: ttfread.c:66
USHORT ttfGetUSHORT(FILE *fp)
Definition: ttfread.c:48
Fixed ttfGetFixed(FILE *fp)
Definition: ttfread.c:88
USHORT * ttfMakeUSHORT(size_t nelem, FILE *fp)
Definition: ttfread.c:145
void otfFreeLookupList(LookupListPtr lookupList, FreeLookupFunc freeLookup)
Definition: otfcommon.c:316
void otfFreeCoverage(CoveragePtr coverage)
Definition: otfcommon.c:401
void otfFreeScriptList(ScriptListPtr scriptList)
Definition: otfcommon.c:155
void otfPrintCoverage(FILE *fp, CoveragePtr coverage)
Definition: otfcommon.c:371
CoveragePtr otfMakeCoverage(FILE *fp, ULONG offset)
Definition: otfcommon.c:336
ScriptListPtr otfMakeScriptList(FILE *fp, ULONG offset)
Definition: otfcommon.c:61
void otfPrintFeatureList(FILE *fp, FeatureListPtr featureList)
Definition: otfcommon.c:220
void otfPrintScriptList(FILE *fp, ScriptListPtr scriptList)
Definition: otfcommon.c:122
void otfPrintLookupList(FILE *fp, LookupListPtr lookupList, PrintLookupFunc printLookup)
Definition: otfcommon.c:291
FeatureListPtr otfMakeFeatureList(FILE *fp, ULONG offset)
Definition: otfcommon.c:176
void otfFreeFeatureList(FeatureListPtr featureList)
Definition: otfcommon.c:234
TableDirPtr ttfLookUpTableDir(ULONG tag, TTFontPtr font)
Definition: tabledir.c:61
LookupListPtr otfMakeLookupList(FILE *fp, ULONG offset, MakeLookupFunc makeLookup)
Definition: otfcommon.c:268
int k
Definition: otp-parser.c:70
unsigned long ULONG
Definition: pdfgen.h:158
set set set set set set set set set set set set set set set set set set set set *set set set macro pixldst op &r &cond WK op &r &cond WK op &r &cond WK else op &m &cond &ia op &r &cond WK else op &m &cond &ia elseif elseif else error unsupported base if elseif elseif else error unsupported unaligned pixldst unaligned endm macro pixst base base else pixldst base endif endm macro PF base if bpp PF set rept prefetch_distance PF set OFFSET endr endif endm macro preload_leading_step2 base if bpp ifc DST PF PF else if bpp lsl PF PF lsl PF sub
#define fp
static int offset
Definition: ppmtogif.c:642
USHORT glyphCount
Definition: gsub.h:56
USHORT * alternate
Definition: gsub.h:57
ScriptListPtr scriptList
Definition: otftables.h:362
Fixed version
Definition: otftables.h:361
LookupListPtr lookupList
Definition: otftables.h:364
FeatureListPtr featureList
Definition: otftables.h:363
USHORT ligatureCount
Definition: gsub.h:81
LigaturePtr ligature
Definition: gsub.h:82
Definition: gsub.h:72
USHORT ligGlyph
Definition: gsub.h:73
USHORT * component
Definition: gsub.h:75
USHORT compCount
Definition: gsub.h:74
Definition: gsub.h:38
USHORT * substitute
Definition: gsub.h:40
USHORT glyphCount
Definition: gsub.h:39
Definition: gsub.h:19
Definition: gsub.h:28
Definition: gsub.h:45
Definition: gsub.h:62
Definition: gsub.h:87
Definition: gsub.h:104
Definition: ttf.h:110
ULONG offset
Definition: tables.h:30
Definition: pbmfont.h:11
Definition: zic.c:306
Definition: xmlparse.c:179
#define FILE
Definition: t1stdio.h:34
int j
Definition: t4ht.c:1589
#define XCALLOC1(t)
Definition: ttfutil.h:60
void ttfError(const char *msg)
Definition: ttfutil.c:32
#define XCALLOC(n, t)
Definition: ttfutil.h:59
void FixedSplit(Fixed f, int b[])
Definition: ttfutil.c:14