Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

130 lines
3.6 KiB

  1. /***
  2. **
  3. ** Module: T1Parser
  4. **
  5. ** Description:
  6. ** This is a module of the T1 to TT font converter. The module
  7. ** will extract information from a T1 font file, by parsing
  8. ** the data/commands found in PFB, PFM and AFM files.
  9. **
  10. ** Author: Michael Jansson
  11. **
  12. ** Created: 5/26/93
  13. **
  14. ***/
  15. #ifndef _ARGS
  16. # define IN const
  17. # define OUT
  18. # define INOUT
  19. # define _ARGS(arg) arg
  20. #endif
  21. struct T1Arg;
  22. struct T1Info;
  23. struct T1Glyph;
  24. struct T1Handle;
  25. struct T1Metrics;
  26. struct Composite;
  27. struct GlyphFilter;
  28. /***
  29. ** Function: InitT1Input
  30. **
  31. ** Description:
  32. ** Allocate and initiate a handle for a T1 font file, including
  33. ** extracting data from the font prolog that is needed to
  34. ** read the glyphs, such as /FontMatrix, /Subrs and /lenIV.
  35. ***/
  36. errcode InitT1Input _ARGS((IN struct T1Arg *,
  37. OUT struct T1Handle **,
  38. OUT struct T1Metrics **,
  39. IN short (*cb)(IN char *,
  40. IN char *,
  41. IN char *)));
  42. /***
  43. ** Function: CleanUpT1
  44. **
  45. ** Description:
  46. ** Free the resources allocated for the T1 handle.
  47. ***/
  48. errcode CleanUpT1 _ARGS((INOUT struct T1Handle *));
  49. /***
  50. ** Function: ReadOtherMetrics
  51. **
  52. ** Description:
  53. ** Return font level information about the T1 font (mostly
  54. ** metrics).
  55. ***/
  56. errcode ReadOtherMetrics _ARGS((INOUT struct T1Metrics *,
  57. IN char *metrics));
  58. /***
  59. ** Function: GetT1Glyph
  60. **
  61. ** Description:
  62. ** The current file position of the T1 font file must be
  63. ** at the begining of an entry in the /CharStrings dictionary.
  64. ** The function will decode the font commands, parse them, and
  65. ** finally build a representation of the glyph.
  66. ***/
  67. errcode GetT1Glyph _ARGS((INOUT struct T1Handle *,
  68. OUT struct T1Glyph *,
  69. IN struct GlyphFilter *));
  70. /***
  71. ** Function: FreeT1Glyph
  72. **
  73. ** Description:
  74. ** This function frees the memory used to represent
  75. ** a glyph that has been translated.
  76. ***/
  77. void FreeT1Glyph _ARGS((INOUT struct T1Glyph *));
  78. /***
  79. ** Function: GetT1Composite
  80. **
  81. ** Description:
  82. ** This function unlinks the first composite glyph
  83. ** from the list of recorded composite glyphs, which
  84. ** is returned to the caller.
  85. ***/
  86. struct Composite *GetT1Composite _ARGS((INOUT struct T1Handle *));
  87. /***
  88. ** Function: GetT1AccentGlyph
  89. **
  90. ** Description:
  91. ** This function parses the charstring code associated to the
  92. ** accent character of a composite character, if that glyph
  93. ** is not already converted.
  94. ***/
  95. errcode GetT1AccentGlyph _ARGS((INOUT struct T1Handle *,
  96. IN struct Composite *,
  97. OUT struct T1Glyph *));
  98. /***
  99. ** Function: GetT1BaseGlyph
  100. **
  101. ** Description:
  102. ** This function parses the charstring code associated to the
  103. ** base character of a composite character, if that glyph
  104. ** is not already converted.
  105. ***/
  106. errcode GetT1BaseGlyph _ARGS((INOUT struct T1Handle *,
  107. IN struct Composite *,
  108. OUT struct T1Glyph *));
  109. /***
  110. ** Function: FlushWorkspace
  111. **
  112. ** Description:
  113. ** Free the resources allocated for the T1 handle.
  114. ***/
  115. void FlushWorkspace _ARGS((INOUT struct T1Handle *t1));