pdf2json 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (473) hide show
  1. data/README.markdown +9 -0
  2. data/bin/.gitkeep +0 -0
  3. data/ext/extconf.rb +30 -0
  4. data/lib/pdf2json.rb +8 -0
  5. data/pdf2json-0.52-source/AUTHORS +24 -0
  6. data/pdf2json-0.52-source/CHANGES +11 -0
  7. data/pdf2json-0.52-source/Makefile +84 -0
  8. data/pdf2json-0.52-source/Makefile.in +84 -0
  9. data/pdf2json-0.52-source/aclocal.m4 +274 -0
  10. data/pdf2json-0.52-source/aconf-win32.h +86 -0
  11. data/pdf2json-0.52-source/aconf.h +42 -0
  12. data/pdf2json-0.52-source/aconf.h.in +41 -0
  13. data/pdf2json-0.52-source/autom4te.cache/output.0 +6908 -0
  14. data/pdf2json-0.52-source/autom4te.cache/requests +76 -0
  15. data/pdf2json-0.52-source/autom4te.cache/traces.0 +466 -0
  16. data/pdf2json-0.52-source/config.log +1259 -0
  17. data/pdf2json-0.52-source/config.status +1050 -0
  18. data/pdf2json-0.52-source/configure +6908 -0
  19. data/pdf2json-0.52-source/configure.ac +93 -0
  20. data/pdf2json-0.52-source/doc/pdffonts.1 +130 -0
  21. data/pdf2json-0.52-source/doc/pdffonts.cat +107 -0
  22. data/pdf2json-0.52-source/doc/pdffonts.hlp +117 -0
  23. data/pdf2json-0.52-source/doc/pdfimages.1 +102 -0
  24. data/pdf2json-0.52-source/doc/pdfimages.cat +92 -0
  25. data/pdf2json-0.52-source/doc/pdfimages.hlp +101 -0
  26. data/pdf2json-0.52-source/doc/pdfinfo.1 +158 -0
  27. data/pdf2json-0.52-source/doc/pdfinfo.cat +119 -0
  28. data/pdf2json-0.52-source/doc/pdfinfo.hlp +129 -0
  29. data/pdf2json-0.52-source/doc/pdftoppm.1 +115 -0
  30. data/pdf2json-0.52-source/doc/pdftoppm.cat +105 -0
  31. data/pdf2json-0.52-source/doc/pdftoppm.hlp +114 -0
  32. data/pdf2json-0.52-source/doc/pdftops.1 +229 -0
  33. data/pdf2json-0.52-source/doc/pdftops.cat +221 -0
  34. data/pdf2json-0.52-source/doc/pdftops.hlp +231 -0
  35. data/pdf2json-0.52-source/doc/pdftotext.1 +137 -0
  36. data/pdf2json-0.52-source/doc/pdftotext.cat +120 -0
  37. data/pdf2json-0.52-source/doc/pdftotext.hlp +133 -0
  38. data/pdf2json-0.52-source/doc/sample-xpdfrc +91 -0
  39. data/pdf2json-0.52-source/doc/xpdf.1 +513 -0
  40. data/pdf2json-0.52-source/doc/xpdf.cat +476 -0
  41. data/pdf2json-0.52-source/doc/xpdf.hlp +489 -0
  42. data/pdf2json-0.52-source/doc/xpdfrc.5 +480 -0
  43. data/pdf2json-0.52-source/doc/xpdfrc.cat +474 -0
  44. data/pdf2json-0.52-source/doc/xpdfrc.hlp +479 -0
  45. data/pdf2json-0.52-source/fofi/.DS_Store +0 -0
  46. data/pdf2json-0.52-source/fofi/FoFiBase.cc +156 -0
  47. data/pdf2json-0.52-source/fofi/FoFiBase.h +57 -0
  48. data/pdf2json-0.52-source/fofi/FoFiBase.o +0 -0
  49. data/pdf2json-0.52-source/fofi/FoFiEncodings.cc +994 -0
  50. data/pdf2json-0.52-source/fofi/FoFiEncodings.h +36 -0
  51. data/pdf2json-0.52-source/fofi/FoFiEncodings.o +0 -0
  52. data/pdf2json-0.52-source/fofi/FoFiTrueType.cc +2027 -0
  53. data/pdf2json-0.52-source/fofi/FoFiTrueType.h +174 -0
  54. data/pdf2json-0.52-source/fofi/FoFiTrueType.o +0 -0
  55. data/pdf2json-0.52-source/fofi/FoFiType1.cc +252 -0
  56. data/pdf2json-0.52-source/fofi/FoFiType1.h +59 -0
  57. data/pdf2json-0.52-source/fofi/FoFiType1.o +0 -0
  58. data/pdf2json-0.52-source/fofi/FoFiType1C.cc +2603 -0
  59. data/pdf2json-0.52-source/fofi/FoFiType1C.h +233 -0
  60. data/pdf2json-0.52-source/fofi/FoFiType1C.o +0 -0
  61. data/pdf2json-0.52-source/fofi/Makefile +70 -0
  62. data/pdf2json-0.52-source/fofi/Makefile.dep +0 -0
  63. data/pdf2json-0.52-source/fofi/Makefile.in +70 -0
  64. data/pdf2json-0.52-source/fofi/libfofi.a +0 -0
  65. data/pdf2json-0.52-source/fofi/vms_make.com +0 -0
  66. data/pdf2json-0.52-source/freetype.win32/.DS_Store +0 -0
  67. data/pdf2json-0.52-source/freetype.win32/include/.DS_Store +0 -0
  68. data/pdf2json-0.52-source/freetype.win32/include/freetype/config/ftconfig.h +528 -0
  69. data/pdf2json-0.52-source/freetype.win32/include/freetype/config/ftheader.h +780 -0
  70. data/pdf2json-0.52-source/freetype.win32/include/freetype/config/ftmodule.h +32 -0
  71. data/pdf2json-0.52-source/freetype.win32/include/freetype/config/ftoption.h +733 -0
  72. data/pdf2json-0.52-source/freetype.win32/include/freetype/config/ftstdlib.h +173 -0
  73. data/pdf2json-0.52-source/freetype.win32/include/freetype/freetype.h +3919 -0
  74. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftadvanc.h +179 -0
  75. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftbbox.h +94 -0
  76. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftbdf.h +209 -0
  77. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftbitmap.h +227 -0
  78. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftcache.h +1128 -0
  79. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftchapters.h +103 -0
  80. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftcid.h +166 -0
  81. data/pdf2json-0.52-source/freetype.win32/include/freetype/fterrdef.h +244 -0
  82. data/pdf2json-0.52-source/freetype.win32/include/freetype/fterrors.h +206 -0
  83. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftgasp.h +120 -0
  84. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftglyph.h +613 -0
  85. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftgxval.h +358 -0
  86. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftgzip.h +102 -0
  87. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftimage.h +1313 -0
  88. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftincrem.h +353 -0
  89. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftlcdfil.h +213 -0
  90. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftlist.h +277 -0
  91. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftlzw.h +99 -0
  92. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftmac.h +274 -0
  93. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftmm.h +378 -0
  94. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftmodapi.h +483 -0
  95. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftmoderr.h +155 -0
  96. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftotval.h +203 -0
  97. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftoutln.h +537 -0
  98. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftpfr.h +172 -0
  99. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftrender.h +230 -0
  100. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftsizes.h +159 -0
  101. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftsnames.h +200 -0
  102. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftstroke.h +716 -0
  103. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftsynth.h +80 -0
  104. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftsystem.h +347 -0
  105. data/pdf2json-0.52-source/freetype.win32/include/freetype/fttrigon.h +350 -0
  106. data/pdf2json-0.52-source/freetype.win32/include/freetype/fttypes.h +588 -0
  107. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftwinfnt.h +274 -0
  108. data/pdf2json-0.52-source/freetype.win32/include/freetype/ftxf86.h +83 -0
  109. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/autohint.h +231 -0
  110. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftcalc.h +179 -0
  111. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftdebug.h +250 -0
  112. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftdriver.h +422 -0
  113. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftgloadr.h +168 -0
  114. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftmemory.h +380 -0
  115. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftobjs.h +1428 -0
  116. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftpic.h +67 -0
  117. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftrfork.h +196 -0
  118. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftserv.h +620 -0
  119. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftstream.h +539 -0
  120. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/fttrace.h +139 -0
  121. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftvalid.h +150 -0
  122. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/internal.h +51 -0
  123. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/pcftypes.h +56 -0
  124. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/psaux.h +873 -0
  125. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/pshints.h +712 -0
  126. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svbdf.h +77 -0
  127. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svcid.h +83 -0
  128. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svgldict.h +82 -0
  129. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svgxval.h +72 -0
  130. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svkern.h +51 -0
  131. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svmm.h +104 -0
  132. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svotval.h +55 -0
  133. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svpfr.h +66 -0
  134. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svpostnm.h +79 -0
  135. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svpscmap.h +164 -0
  136. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svpsinfo.h +92 -0
  137. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svsfnt.h +102 -0
  138. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svttcmap.h +106 -0
  139. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svtteng.h +53 -0
  140. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svttglyf.h +67 -0
  141. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svwinfnt.h +50 -0
  142. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svxf86nm.h +55 -0
  143. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/sfnt.h +897 -0
  144. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/t1types.h +270 -0
  145. data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/tttypes.h +1543 -0
  146. data/pdf2json-0.52-source/freetype.win32/include/freetype/t1tables.h +504 -0
  147. data/pdf2json-0.52-source/freetype.win32/include/freetype/ttnameid.h +1247 -0
  148. data/pdf2json-0.52-source/freetype.win32/include/freetype/tttables.h +759 -0
  149. data/pdf2json-0.52-source/freetype.win32/include/freetype/tttags.h +107 -0
  150. data/pdf2json-0.52-source/freetype.win32/include/freetype/ttunpat.h +59 -0
  151. data/pdf2json-0.52-source/freetype.win32/include/ft2build.h +39 -0
  152. data/pdf2json-0.52-source/freetype.win32/lib/freetype_a.lib +0 -0
  153. data/pdf2json-0.52-source/goo/.DS_Store +0 -0
  154. data/pdf2json-0.52-source/goo/FixedPoint.cc +118 -0
  155. data/pdf2json-0.52-source/goo/FixedPoint.h +155 -0
  156. data/pdf2json-0.52-source/goo/FixedPoint.o +0 -0
  157. data/pdf2json-0.52-source/goo/GHash.cc +380 -0
  158. data/pdf2json-0.52-source/goo/GHash.h +78 -0
  159. data/pdf2json-0.52-source/goo/GHash.o +0 -0
  160. data/pdf2json-0.52-source/goo/GList.cc +97 -0
  161. data/pdf2json-0.52-source/goo/GList.h +96 -0
  162. data/pdf2json-0.52-source/goo/GList.o +0 -0
  163. data/pdf2json-0.52-source/goo/GMutex.h +49 -0
  164. data/pdf2json-0.52-source/goo/GString.cc +724 -0
  165. data/pdf2json-0.52-source/goo/GString.cc.fixed +718 -0
  166. data/pdf2json-0.52-source/goo/GString.h +136 -0
  167. data/pdf2json-0.52-source/goo/GString.o +0 -0
  168. data/pdf2json-0.52-source/goo/ImgWriter.o +0 -0
  169. data/pdf2json-0.52-source/goo/JpegWriter.o +0 -0
  170. data/pdf2json-0.52-source/goo/Makefile +72 -0
  171. data/pdf2json-0.52-source/goo/Makefile.dep +0 -0
  172. data/pdf2json-0.52-source/goo/Makefile.in +72 -0
  173. data/pdf2json-0.52-source/goo/PNGWriter.o +0 -0
  174. data/pdf2json-0.52-source/goo/gfile.cc +731 -0
  175. data/pdf2json-0.52-source/goo/gfile.h +138 -0
  176. data/pdf2json-0.52-source/goo/gfile.o +0 -0
  177. data/pdf2json-0.52-source/goo/gmem.cc +264 -0
  178. data/pdf2json-0.52-source/goo/gmem.h +79 -0
  179. data/pdf2json-0.52-source/goo/gmem.o +0 -0
  180. data/pdf2json-0.52-source/goo/gmempp.cc +32 -0
  181. data/pdf2json-0.52-source/goo/gmempp.o +0 -0
  182. data/pdf2json-0.52-source/goo/gtypes.h +29 -0
  183. data/pdf2json-0.52-source/goo/libGoo.a +0 -0
  184. data/pdf2json-0.52-source/goo/parseargs.c +190 -0
  185. data/pdf2json-0.52-source/goo/parseargs.h +71 -0
  186. data/pdf2json-0.52-source/goo/parseargs.o +0 -0
  187. data/pdf2json-0.52-source/goo/vms_directory.c +214 -0
  188. data/pdf2json-0.52-source/goo/vms_dirent.h +67 -0
  189. data/pdf2json-0.52-source/goo/vms_make.com +82 -0
  190. data/pdf2json-0.52-source/goo/vms_sys_dirent.h +54 -0
  191. data/pdf2json-0.52-source/goo/vms_unix_time.h +102 -0
  192. data/pdf2json-0.52-source/goo/vms_unix_times.c +42 -0
  193. data/pdf2json-0.52-source/goo/vms_unlink.c +22 -0
  194. data/pdf2json-0.52-source/ms_make.bat +199 -0
  195. data/pdf2json-0.52-source/splash/.DS_Store +0 -0
  196. data/pdf2json-0.52-source/splash/Makefile +103 -0
  197. data/pdf2json-0.52-source/splash/Makefile.dep +0 -0
  198. data/pdf2json-0.52-source/splash/Makefile.in +103 -0
  199. data/pdf2json-0.52-source/splash/Splash.cc +3310 -0
  200. data/pdf2json-0.52-source/splash/Splash.h +293 -0
  201. data/pdf2json-0.52-source/splash/Splash.o +0 -0
  202. data/pdf2json-0.52-source/splash/SplashBitmap.cc +188 -0
  203. data/pdf2json-0.52-source/splash/SplashBitmap.h +64 -0
  204. data/pdf2json-0.52-source/splash/SplashBitmap.o +0 -0
  205. data/pdf2json-0.52-source/splash/SplashClip.cc +382 -0
  206. data/pdf2json-0.52-source/splash/SplashClip.h +107 -0
  207. data/pdf2json-0.52-source/splash/SplashClip.o +0 -0
  208. data/pdf2json-0.52-source/splash/SplashErrorCodes.h +32 -0
  209. data/pdf2json-0.52-source/splash/SplashFTFont.cc +357 -0
  210. data/pdf2json-0.52-source/splash/SplashFTFont.h +58 -0
  211. data/pdf2json-0.52-source/splash/SplashFTFont.o +0 -0
  212. data/pdf2json-0.52-source/splash/SplashFTFontEngine.cc +179 -0
  213. data/pdf2json-0.52-source/splash/SplashFTFontEngine.h +65 -0
  214. data/pdf2json-0.52-source/splash/SplashFTFontEngine.o +0 -0
  215. data/pdf2json-0.52-source/splash/SplashFTFontFile.cc +114 -0
  216. data/pdf2json-0.52-source/splash/SplashFTFontFile.h +73 -0
  217. data/pdf2json-0.52-source/splash/SplashFTFontFile.o +0 -0
  218. data/pdf2json-0.52-source/splash/SplashFont.cc +176 -0
  219. data/pdf2json-0.52-source/splash/SplashFont.h +104 -0
  220. data/pdf2json-0.52-source/splash/SplashFont.o +0 -0
  221. data/pdf2json-0.52-source/splash/SplashFontEngine.cc +317 -0
  222. data/pdf2json-0.52-source/splash/SplashFontEngine.h +91 -0
  223. data/pdf2json-0.52-source/splash/SplashFontEngine.o +0 -0
  224. data/pdf2json-0.52-source/splash/SplashFontFile.cc +55 -0
  225. data/pdf2json-0.52-source/splash/SplashFontFile.h +60 -0
  226. data/pdf2json-0.52-source/splash/SplashFontFile.o +0 -0
  227. data/pdf2json-0.52-source/splash/SplashFontFileID.cc +23 -0
  228. data/pdf2json-0.52-source/splash/SplashFontFileID.h +30 -0
  229. data/pdf2json-0.52-source/splash/SplashFontFileID.o +0 -0
  230. data/pdf2json-0.52-source/splash/SplashGlyphBitmap.h +26 -0
  231. data/pdf2json-0.52-source/splash/SplashMath.h +89 -0
  232. data/pdf2json-0.52-source/splash/SplashPath.cc +184 -0
  233. data/pdf2json-0.52-source/splash/SplashPath.h +121 -0
  234. data/pdf2json-0.52-source/splash/SplashPath.o +0 -0
  235. data/pdf2json-0.52-source/splash/SplashPattern.cc +40 -0
  236. data/pdf2json-0.52-source/splash/SplashPattern.h +65 -0
  237. data/pdf2json-0.52-source/splash/SplashPattern.o +0 -0
  238. data/pdf2json-0.52-source/splash/SplashScreen.cc +383 -0
  239. data/pdf2json-0.52-source/splash/SplashScreen.h +56 -0
  240. data/pdf2json-0.52-source/splash/SplashScreen.o +0 -0
  241. data/pdf2json-0.52-source/splash/SplashState.cc +165 -0
  242. data/pdf2json-0.52-source/splash/SplashState.h +103 -0
  243. data/pdf2json-0.52-source/splash/SplashState.o +0 -0
  244. data/pdf2json-0.52-source/splash/SplashT1Font.cc +287 -0
  245. data/pdf2json-0.52-source/splash/SplashT1Font.h +57 -0
  246. data/pdf2json-0.52-source/splash/SplashT1Font.o +0 -0
  247. data/pdf2json-0.52-source/splash/SplashT1FontEngine.cc +124 -0
  248. data/pdf2json-0.52-source/splash/SplashT1FontEngine.h +53 -0
  249. data/pdf2json-0.52-source/splash/SplashT1FontEngine.o +0 -0
  250. data/pdf2json-0.52-source/splash/SplashT1FontFile.cc +97 -0
  251. data/pdf2json-0.52-source/splash/SplashT1FontFile.h +58 -0
  252. data/pdf2json-0.52-source/splash/SplashT1FontFile.o +0 -0
  253. data/pdf2json-0.52-source/splash/SplashTypes.h +132 -0
  254. data/pdf2json-0.52-source/splash/SplashXPath.cc +438 -0
  255. data/pdf2json-0.52-source/splash/SplashXPath.h +100 -0
  256. data/pdf2json-0.52-source/splash/SplashXPath.o +0 -0
  257. data/pdf2json-0.52-source/splash/SplashXPathScanner.cc +428 -0
  258. data/pdf2json-0.52-source/splash/SplashXPathScanner.h +87 -0
  259. data/pdf2json-0.52-source/splash/SplashXPathScanner.o +0 -0
  260. data/pdf2json-0.52-source/splash/libsplash.a +0 -0
  261. data/pdf2json-0.52-source/splash/vms_make.com +0 -0
  262. data/pdf2json-0.52-source/src/.DS_Store +0 -0
  263. data/pdf2json-0.52-source/src/GVector.h +101 -0
  264. data/pdf2json-0.52-source/src/ImgOutputDev.cc +1243 -0
  265. data/pdf2json-0.52-source/src/ImgOutputDev.h +307 -0
  266. data/pdf2json-0.52-source/src/ImgOutputDev.o +0 -0
  267. data/pdf2json-0.52-source/src/Makefile +68 -0
  268. data/pdf2json-0.52-source/src/Makefile.in +68 -0
  269. data/pdf2json-0.52-source/src/XmlFonts.cc +367 -0
  270. data/pdf2json-0.52-source/src/XmlFonts.h +91 -0
  271. data/pdf2json-0.52-source/src/XmlFonts.o +0 -0
  272. data/pdf2json-0.52-source/src/XmlLinks.cc +101 -0
  273. data/pdf2json-0.52-source/src/XmlLinks.h +54 -0
  274. data/pdf2json-0.52-source/src/XmlLinks.o +0 -0
  275. data/pdf2json-0.52-source/src/pdf2json +0 -0
  276. data/pdf2json-0.52-source/src/pdf2json.cc +343 -0
  277. data/pdf2json-0.52-source/src/pdf2json.o +0 -0
  278. data/pdf2json-0.52-source/src/pdf2xml.dtd +22 -0
  279. data/pdf2json-0.52-source/src/pdf2xmljson.dtd +9 -0
  280. data/pdf2json-0.52-source/xpdf/.DS_Store +0 -0
  281. data/pdf2json-0.52-source/xpdf/Annot.cc +1556 -0
  282. data/pdf2json-0.52-source/xpdf/Annot.h +142 -0
  283. data/pdf2json-0.52-source/xpdf/Annot.o +0 -0
  284. data/pdf2json-0.52-source/xpdf/Array.cc +73 -0
  285. data/pdf2json-0.52-source/xpdf/Array.h +58 -0
  286. data/pdf2json-0.52-source/xpdf/Array.o +0 -0
  287. data/pdf2json-0.52-source/xpdf/BuiltinFont.cc +65 -0
  288. data/pdf2json-0.52-source/xpdf/BuiltinFont.h +57 -0
  289. data/pdf2json-0.52-source/xpdf/BuiltinFont.o +0 -0
  290. data/pdf2json-0.52-source/xpdf/BuiltinFontTables.cc +4284 -0
  291. data/pdf2json-0.52-source/xpdf/BuiltinFontTables.h +23 -0
  292. data/pdf2json-0.52-source/xpdf/BuiltinFontTables.o +0 -0
  293. data/pdf2json-0.52-source/xpdf/CMap.cc +408 -0
  294. data/pdf2json-0.52-source/xpdf/CMap.h +102 -0
  295. data/pdf2json-0.52-source/xpdf/CMap.o +0 -0
  296. data/pdf2json-0.52-source/xpdf/Catalog.cc +374 -0
  297. data/pdf2json-0.52-source/xpdf/Catalog.h +97 -0
  298. data/pdf2json-0.52-source/xpdf/Catalog.o +0 -0
  299. data/pdf2json-0.52-source/xpdf/CharCodeToUnicode.cc +540 -0
  300. data/pdf2json-0.52-source/xpdf/CharCodeToUnicode.h +117 -0
  301. data/pdf2json-0.52-source/xpdf/CharCodeToUnicode.o +0 -0
  302. data/pdf2json-0.52-source/xpdf/CharTypes.h +24 -0
  303. data/pdf2json-0.52-source/xpdf/CompactFontTables.h +464 -0
  304. data/pdf2json-0.52-source/xpdf/CoreOutputDev.cc +61 -0
  305. data/pdf2json-0.52-source/xpdf/CoreOutputDev.h +61 -0
  306. data/pdf2json-0.52-source/xpdf/Decrypt.cc +776 -0
  307. data/pdf2json-0.52-source/xpdf/Decrypt.h +95 -0
  308. data/pdf2json-0.52-source/xpdf/Decrypt.o +0 -0
  309. data/pdf2json-0.52-source/xpdf/Dict.cc +95 -0
  310. data/pdf2json-0.52-source/xpdf/Dict.h +77 -0
  311. data/pdf2json-0.52-source/xpdf/Dict.o +0 -0
  312. data/pdf2json-0.52-source/xpdf/Error.cc +38 -0
  313. data/pdf2json-0.52-source/xpdf/Error.h +23 -0
  314. data/pdf2json-0.52-source/xpdf/Error.o +0 -0
  315. data/pdf2json-0.52-source/xpdf/ErrorCodes.h +36 -0
  316. data/pdf2json-0.52-source/xpdf/FontEncodingTables.cc +1824 -0
  317. data/pdf2json-0.52-source/xpdf/FontEncodingTables.h +20 -0
  318. data/pdf2json-0.52-source/xpdf/FontEncodingTables.o +0 -0
  319. data/pdf2json-0.52-source/xpdf/Function.cc +1573 -0
  320. data/pdf2json-0.52-source/xpdf/Function.h +229 -0
  321. data/pdf2json-0.52-source/xpdf/Function.o +0 -0
  322. data/pdf2json-0.52-source/xpdf/Gfx.cc +4187 -0
  323. data/pdf2json-0.52-source/xpdf/Gfx.h +312 -0
  324. data/pdf2json-0.52-source/xpdf/Gfx.o +0 -0
  325. data/pdf2json-0.52-source/xpdf/GfxFont.cc +1568 -0
  326. data/pdf2json-0.52-source/xpdf/GfxFont.h +320 -0
  327. data/pdf2json-0.52-source/xpdf/GfxFont.o +0 -0
  328. data/pdf2json-0.52-source/xpdf/GfxState.cc +4137 -0
  329. data/pdf2json-0.52-source/xpdf/GfxState.h +1244 -0
  330. data/pdf2json-0.52-source/xpdf/GfxState.o +0 -0
  331. data/pdf2json-0.52-source/xpdf/GlobalParams.cc +2924 -0
  332. data/pdf2json-0.52-source/xpdf/GlobalParams.cc.old +2908 -0
  333. data/pdf2json-0.52-source/xpdf/GlobalParams.h +466 -0
  334. data/pdf2json-0.52-source/xpdf/GlobalParams.h.old +463 -0
  335. data/pdf2json-0.52-source/xpdf/GlobalParams.o +0 -0
  336. data/pdf2json-0.52-source/xpdf/ImageOutputDev.cc +195 -0
  337. data/pdf2json-0.52-source/xpdf/ImageOutputDev.h +76 -0
  338. data/pdf2json-0.52-source/xpdf/ImageOutputDev.o +0 -0
  339. data/pdf2json-0.52-source/xpdf/JArithmeticDecoder.cc +322 -0
  340. data/pdf2json-0.52-source/xpdf/JArithmeticDecoder.h +109 -0
  341. data/pdf2json-0.52-source/xpdf/JArithmeticDecoder.o +0 -0
  342. data/pdf2json-0.52-source/xpdf/JBIG2Stream.cc +3413 -0
  343. data/pdf2json-0.52-source/xpdf/JBIG2Stream.h +145 -0
  344. data/pdf2json-0.52-source/xpdf/JBIG2Stream.o +0 -0
  345. data/pdf2json-0.52-source/xpdf/JPXStream.cc +3144 -0
  346. data/pdf2json-0.52-source/xpdf/JPXStream.h +351 -0
  347. data/pdf2json-0.52-source/xpdf/JPXStream.o +0 -0
  348. data/pdf2json-0.52-source/xpdf/Lexer.cc +485 -0
  349. data/pdf2json-0.52-source/xpdf/Lexer.h +80 -0
  350. data/pdf2json-0.52-source/xpdf/Lexer.o +0 -0
  351. data/pdf2json-0.52-source/xpdf/Link.cc +806 -0
  352. data/pdf2json-0.52-source/xpdf/Link.cc.old +784 -0
  353. data/pdf2json-0.52-source/xpdf/Link.h +415 -0
  354. data/pdf2json-0.52-source/xpdf/Link.h.old +369 -0
  355. data/pdf2json-0.52-source/xpdf/Link.o +0 -0
  356. data/pdf2json-0.52-source/xpdf/Makefile +232 -0
  357. data/pdf2json-0.52-source/xpdf/Makefile.dep +0 -0
  358. data/pdf2json-0.52-source/xpdf/Makefile.in +232 -0
  359. data/pdf2json-0.52-source/xpdf/NameToCharCode.cc +116 -0
  360. data/pdf2json-0.52-source/xpdf/NameToCharCode.h +42 -0
  361. data/pdf2json-0.52-source/xpdf/NameToCharCode.o +0 -0
  362. data/pdf2json-0.52-source/xpdf/NameToUnicodeTable.h +1097 -0
  363. data/pdf2json-0.52-source/xpdf/Object.cc +231 -0
  364. data/pdf2json-0.52-source/xpdf/Object.h +303 -0
  365. data/pdf2json-0.52-source/xpdf/Object.o +0 -0
  366. data/pdf2json-0.52-source/xpdf/Outline.cc +151 -0
  367. data/pdf2json-0.52-source/xpdf/Outline.h +76 -0
  368. data/pdf2json-0.52-source/xpdf/Outline.o +0 -0
  369. data/pdf2json-0.52-source/xpdf/OutputDev.cc +131 -0
  370. data/pdf2json-0.52-source/xpdf/OutputDev.h +253 -0
  371. data/pdf2json-0.52-source/xpdf/OutputDev.o +0 -0
  372. data/pdf2json-0.52-source/xpdf/PDFCore.cc +2044 -0
  373. data/pdf2json-0.52-source/xpdf/PDFCore.h +321 -0
  374. data/pdf2json-0.52-source/xpdf/PDFDoc.cc +404 -0
  375. data/pdf2json-0.52-source/xpdf/PDFDoc.h +183 -0
  376. data/pdf2json-0.52-source/xpdf/PDFDoc.o +0 -0
  377. data/pdf2json-0.52-source/xpdf/PDFDocEncoding.cc +44 -0
  378. data/pdf2json-0.52-source/xpdf/PDFDocEncoding.h +16 -0
  379. data/pdf2json-0.52-source/xpdf/PDFDocEncoding.o +0 -0
  380. data/pdf2json-0.52-source/xpdf/PSOutputDev.cc +6224 -0
  381. data/pdf2json-0.52-source/xpdf/PSOutputDev.h +395 -0
  382. data/pdf2json-0.52-source/xpdf/PSOutputDev.o +0 -0
  383. data/pdf2json-0.52-source/xpdf/PSTokenizer.cc +135 -0
  384. data/pdf2json-0.52-source/xpdf/PSTokenizer.h +41 -0
  385. data/pdf2json-0.52-source/xpdf/PSTokenizer.o +0 -0
  386. data/pdf2json-0.52-source/xpdf/Page.cc +454 -0
  387. data/pdf2json-0.52-source/xpdf/Page.h +187 -0
  388. data/pdf2json-0.52-source/xpdf/Page.o +0 -0
  389. data/pdf2json-0.52-source/xpdf/Parser.cc +227 -0
  390. data/pdf2json-0.52-source/xpdf/Parser.h +59 -0
  391. data/pdf2json-0.52-source/xpdf/Parser.o +0 -0
  392. data/pdf2json-0.52-source/xpdf/PreScanOutputDev.cc +257 -0
  393. data/pdf2json-0.52-source/xpdf/PreScanOutputDev.h +130 -0
  394. data/pdf2json-0.52-source/xpdf/PreScanOutputDev.o +0 -0
  395. data/pdf2json-0.52-source/xpdf/SecurityHandler.cc +390 -0
  396. data/pdf2json-0.52-source/xpdf/SecurityHandler.h +160 -0
  397. data/pdf2json-0.52-source/xpdf/SecurityHandler.o +0 -0
  398. data/pdf2json-0.52-source/xpdf/SplashOutputDev.cc +2845 -0
  399. data/pdf2json-0.52-source/xpdf/SplashOutputDev.h +247 -0
  400. data/pdf2json-0.52-source/xpdf/SplashOutputDev.o +0 -0
  401. data/pdf2json-0.52-source/xpdf/Stream-CCITT.h +459 -0
  402. data/pdf2json-0.52-source/xpdf/Stream.cc +4627 -0
  403. data/pdf2json-0.52-source/xpdf/Stream.h +858 -0
  404. data/pdf2json-0.52-source/xpdf/Stream.o +0 -0
  405. data/pdf2json-0.52-source/xpdf/TextOutputDev.cc +4090 -0
  406. data/pdf2json-0.52-source/xpdf/TextOutputDev.h +661 -0
  407. data/pdf2json-0.52-source/xpdf/TextOutputDev.o +0 -0
  408. data/pdf2json-0.52-source/xpdf/UTF8.h +56 -0
  409. data/pdf2json-0.52-source/xpdf/UnicodeMap.cc +302 -0
  410. data/pdf2json-0.52-source/xpdf/UnicodeMap.cc.old +293 -0
  411. data/pdf2json-0.52-source/xpdf/UnicodeMap.h +135 -0
  412. data/pdf2json-0.52-source/xpdf/UnicodeMap.h.old +123 -0
  413. data/pdf2json-0.52-source/xpdf/UnicodeMap.o +0 -0
  414. data/pdf2json-0.52-source/xpdf/UnicodeMapTables.h +361 -0
  415. data/pdf2json-0.52-source/xpdf/UnicodeTypeTable.cc +949 -0
  416. data/pdf2json-0.52-source/xpdf/UnicodeTypeTable.h +20 -0
  417. data/pdf2json-0.52-source/xpdf/UnicodeTypeTable.o +0 -0
  418. data/pdf2json-0.52-source/xpdf/XPDFApp.cc +447 -0
  419. data/pdf2json-0.52-source/xpdf/XPDFApp.h +114 -0
  420. data/pdf2json-0.52-source/xpdf/XPDFCore.cc +1655 -0
  421. data/pdf2json-0.52-source/xpdf/XPDFCore.h +251 -0
  422. data/pdf2json-0.52-source/xpdf/XPDFTree.cc +931 -0
  423. data/pdf2json-0.52-source/xpdf/XPDFTree.h +45 -0
  424. data/pdf2json-0.52-source/xpdf/XPDFTreeP.h +87 -0
  425. data/pdf2json-0.52-source/xpdf/XPDFViewer.cc +3488 -0
  426. data/pdf2json-0.52-source/xpdf/XPDFViewer.h +352 -0
  427. data/pdf2json-0.52-source/xpdf/XRef.cc +896 -0
  428. data/pdf2json-0.52-source/xpdf/XRef.h +133 -0
  429. data/pdf2json-0.52-source/xpdf/XRef.o +0 -0
  430. data/pdf2json-0.52-source/xpdf/XpdfPluginAPI.cc +262 -0
  431. data/pdf2json-0.52-source/xpdf/XpdfPluginAPI.h +341 -0
  432. data/pdf2json-0.52-source/xpdf/XpdfPluginAPI.o +0 -0
  433. data/pdf2json-0.52-source/xpdf/about-text.h +48 -0
  434. data/pdf2json-0.52-source/xpdf/about.xbm +6 -0
  435. data/pdf2json-0.52-source/xpdf/backArrow.xbm +6 -0
  436. data/pdf2json-0.52-source/xpdf/backArrowDis.xbm +6 -0
  437. data/pdf2json-0.52-source/xpdf/config.h +112 -0
  438. data/pdf2json-0.52-source/xpdf/dblLeftArrow.xbm +6 -0
  439. data/pdf2json-0.52-source/xpdf/dblLeftArrowDis.xbm +6 -0
  440. data/pdf2json-0.52-source/xpdf/dblRightArrow.xbm +6 -0
  441. data/pdf2json-0.52-source/xpdf/dblRightArrowDis.xbm +6 -0
  442. data/pdf2json-0.52-source/xpdf/find.xbm +6 -0
  443. data/pdf2json-0.52-source/xpdf/findDis.xbm +6 -0
  444. data/pdf2json-0.52-source/xpdf/forwardArrow.xbm +6 -0
  445. data/pdf2json-0.52-source/xpdf/forwardArrowDis.xbm +6 -0
  446. data/pdf2json-0.52-source/xpdf/leftArrow.xbm +5 -0
  447. data/pdf2json-0.52-source/xpdf/leftArrowDis.xbm +5 -0
  448. data/pdf2json-0.52-source/xpdf/libXpdf.a +0 -0
  449. data/pdf2json-0.52-source/xpdf/pdffonts +0 -0
  450. data/pdf2json-0.52-source/xpdf/pdffonts.cc +298 -0
  451. data/pdf2json-0.52-source/xpdf/pdffonts.o +0 -0
  452. data/pdf2json-0.52-source/xpdf/pdfimages +0 -0
  453. data/pdf2json-0.52-source/xpdf/pdfimages.cc +155 -0
  454. data/pdf2json-0.52-source/xpdf/pdfimages.o +0 -0
  455. data/pdf2json-0.52-source/xpdf/pdfinfo +0 -0
  456. data/pdf2json-0.52-source/xpdf/pdfinfo.cc +387 -0
  457. data/pdf2json-0.52-source/xpdf/pdfinfo.o +0 -0
  458. data/pdf2json-0.52-source/xpdf/pdftoppm.cc +203 -0
  459. data/pdf2json-0.52-source/xpdf/pdftops +0 -0
  460. data/pdf2json-0.52-source/xpdf/pdftops.cc +344 -0
  461. data/pdf2json-0.52-source/xpdf/pdftops.o +0 -0
  462. data/pdf2json-0.52-source/xpdf/pdftotext +0 -0
  463. data/pdf2json-0.52-source/xpdf/pdftotext.cc +333 -0
  464. data/pdf2json-0.52-source/xpdf/pdftotext.o +0 -0
  465. data/pdf2json-0.52-source/xpdf/print.xbm +6 -0
  466. data/pdf2json-0.52-source/xpdf/printDis.xbm +6 -0
  467. data/pdf2json-0.52-source/xpdf/rightArrow.xbm +5 -0
  468. data/pdf2json-0.52-source/xpdf/rightArrowDis.xbm +5 -0
  469. data/pdf2json-0.52-source/xpdf/vms_make.com +129 -0
  470. data/pdf2json-0.52-source/xpdf/xpdf.cc +344 -0
  471. data/pdf2json-0.52-source/xpdf/xpdfIcon.xpm +62 -0
  472. data/pdf2json.gemspec +29 -0
  473. metadata +518 -0
@@ -0,0 +1,270 @@
1
+ /***************************************************************************/
2
+ /* */
3
+ /* t1types.h */
4
+ /* */
5
+ /* Basic Type1/Type2 type definitions and interface (specification */
6
+ /* only). */
7
+ /* */
8
+ /* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008, 2009 by */
9
+ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
10
+ /* */
11
+ /* This file is part of the FreeType project, and may only be used, */
12
+ /* modified, and distributed under the terms of the FreeType project */
13
+ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
14
+ /* this file you indicate that you have read the license and */
15
+ /* understand and accept it fully. */
16
+ /* */
17
+ /***************************************************************************/
18
+
19
+
20
+ #ifndef __T1TYPES_H__
21
+ #define __T1TYPES_H__
22
+
23
+
24
+ #include <ft2build.h>
25
+ #include FT_TYPE1_TABLES_H
26
+ #include FT_INTERNAL_POSTSCRIPT_HINTS_H
27
+ #include FT_INTERNAL_SERVICE_H
28
+ #include FT_SERVICE_POSTSCRIPT_CMAPS_H
29
+
30
+
31
+ FT_BEGIN_HEADER
32
+
33
+
34
+ /*************************************************************************/
35
+ /*************************************************************************/
36
+ /*************************************************************************/
37
+ /*** ***/
38
+ /*** ***/
39
+ /*** REQUIRED TYPE1/TYPE2 TABLES DEFINITIONS ***/
40
+ /*** ***/
41
+ /*** ***/
42
+ /*************************************************************************/
43
+ /*************************************************************************/
44
+ /*************************************************************************/
45
+
46
+
47
+ /*************************************************************************/
48
+ /* */
49
+ /* <Struct> */
50
+ /* T1_EncodingRec */
51
+ /* */
52
+ /* <Description> */
53
+ /* A structure modeling a custom encoding. */
54
+ /* */
55
+ /* <Fields> */
56
+ /* num_chars :: The number of character codes in the encoding. */
57
+ /* Usually 256. */
58
+ /* */
59
+ /* code_first :: The lowest valid character code in the encoding. */
60
+ /* */
61
+ /* code_last :: The highest valid character code in the encoding */
62
+ /* + 1. When equal to code_first there are no valid */
63
+ /* character codes. */
64
+ /* */
65
+ /* char_index :: An array of corresponding glyph indices. */
66
+ /* */
67
+ /* char_name :: An array of corresponding glyph names. */
68
+ /* */
69
+ typedef struct T1_EncodingRecRec_
70
+ {
71
+ FT_Int num_chars;
72
+ FT_Int code_first;
73
+ FT_Int code_last;
74
+
75
+ FT_UShort* char_index;
76
+ FT_String** char_name;
77
+
78
+ } T1_EncodingRec, *T1_Encoding;
79
+
80
+
81
+ typedef enum T1_EncodingType_
82
+ {
83
+ T1_ENCODING_TYPE_NONE = 0,
84
+ T1_ENCODING_TYPE_ARRAY,
85
+ T1_ENCODING_TYPE_STANDARD,
86
+ T1_ENCODING_TYPE_ISOLATIN1,
87
+ T1_ENCODING_TYPE_EXPERT
88
+
89
+ } T1_EncodingType;
90
+
91
+
92
+ /* used to hold extra data of PS_FontInfoRec that
93
+ * cannot be stored in the publicly defined structure.
94
+ *
95
+ * Note these can't be blended with multiple-masters.
96
+ */
97
+ typedef struct PS_FontExtraRec_
98
+ {
99
+ FT_UShort fs_type;
100
+
101
+ } PS_FontExtraRec;
102
+
103
+
104
+ typedef struct T1_FontRec_
105
+ {
106
+ PS_FontInfoRec font_info; /* font info dictionary */
107
+ PS_FontExtraRec font_extra; /* font info extra fields */
108
+ PS_PrivateRec private_dict; /* private dictionary */
109
+ FT_String* font_name; /* top-level dictionary */
110
+
111
+ T1_EncodingType encoding_type;
112
+ T1_EncodingRec encoding;
113
+
114
+ FT_Byte* subrs_block;
115
+ FT_Byte* charstrings_block;
116
+ FT_Byte* glyph_names_block;
117
+
118
+ FT_Int num_subrs;
119
+ FT_Byte** subrs;
120
+ FT_PtrDist* subrs_len;
121
+
122
+ FT_Int num_glyphs;
123
+ FT_String** glyph_names; /* array of glyph names */
124
+ FT_Byte** charstrings; /* array of glyph charstrings */
125
+ FT_PtrDist* charstrings_len;
126
+
127
+ FT_Byte paint_type;
128
+ FT_Byte font_type;
129
+ FT_Matrix font_matrix;
130
+ FT_Vector font_offset;
131
+ FT_BBox font_bbox;
132
+ FT_Long font_id;
133
+
134
+ FT_Fixed stroke_width;
135
+
136
+ } T1_FontRec, *T1_Font;
137
+
138
+
139
+ typedef struct CID_SubrsRec_
140
+ {
141
+ FT_UInt num_subrs;
142
+ FT_Byte** code;
143
+
144
+ } CID_SubrsRec, *CID_Subrs;
145
+
146
+
147
+ /*************************************************************************/
148
+ /*************************************************************************/
149
+ /*************************************************************************/
150
+ /*** ***/
151
+ /*** ***/
152
+ /*** AFM FONT INFORMATION STRUCTURES ***/
153
+ /*** ***/
154
+ /*** ***/
155
+ /*************************************************************************/
156
+ /*************************************************************************/
157
+ /*************************************************************************/
158
+
159
+ typedef struct AFM_TrackKernRec_
160
+ {
161
+ FT_Int degree;
162
+ FT_Fixed min_ptsize;
163
+ FT_Fixed min_kern;
164
+ FT_Fixed max_ptsize;
165
+ FT_Fixed max_kern;
166
+
167
+ } AFM_TrackKernRec, *AFM_TrackKern;
168
+
169
+ typedef struct AFM_KernPairRec_
170
+ {
171
+ FT_Int index1;
172
+ FT_Int index2;
173
+ FT_Int x;
174
+ FT_Int y;
175
+
176
+ } AFM_KernPairRec, *AFM_KernPair;
177
+
178
+ typedef struct AFM_FontInfoRec_
179
+ {
180
+ FT_Bool IsCIDFont;
181
+ FT_BBox FontBBox;
182
+ FT_Fixed Ascender;
183
+ FT_Fixed Descender;
184
+ AFM_TrackKern TrackKerns; /* free if non-NULL */
185
+ FT_Int NumTrackKern;
186
+ AFM_KernPair KernPairs; /* free if non-NULL */
187
+ FT_Int NumKernPair;
188
+
189
+ } AFM_FontInfoRec, *AFM_FontInfo;
190
+
191
+
192
+ /*************************************************************************/
193
+ /*************************************************************************/
194
+ /*************************************************************************/
195
+ /*** ***/
196
+ /*** ***/
197
+ /*** ORIGINAL T1_FACE CLASS DEFINITION ***/
198
+ /*** ***/
199
+ /*** ***/
200
+ /*************************************************************************/
201
+ /*************************************************************************/
202
+ /*************************************************************************/
203
+
204
+
205
+ typedef struct T1_FaceRec_* T1_Face;
206
+ typedef struct CID_FaceRec_* CID_Face;
207
+
208
+
209
+ typedef struct T1_FaceRec_
210
+ {
211
+ FT_FaceRec root;
212
+ T1_FontRec type1;
213
+ const void* psnames;
214
+ const void* psaux;
215
+ const void* afm_data;
216
+ FT_CharMapRec charmaprecs[2];
217
+ FT_CharMap charmaps[2];
218
+
219
+ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
220
+ PS_Unicodes unicode_map;
221
+ #endif
222
+
223
+ /* support for Multiple Masters fonts */
224
+ PS_Blend blend;
225
+
226
+ /* undocumented, optional: indices of subroutines that express */
227
+ /* the NormalizeDesignVector and the ConvertDesignVector procedure, */
228
+ /* respectively, as Type 2 charstrings; -1 if keywords not present */
229
+ FT_Int ndv_idx;
230
+ FT_Int cdv_idx;
231
+
232
+ /* undocumented, optional: has the same meaning as len_buildchar */
233
+ /* for Type 2 fonts; manipulated by othersubrs 19, 24, and 25 */
234
+ FT_UInt len_buildchar;
235
+ FT_Long* buildchar;
236
+
237
+ /* since version 2.1 - interface to PostScript hinter */
238
+ const void* pshinter;
239
+
240
+ } T1_FaceRec;
241
+
242
+
243
+ typedef struct CID_FaceRec_
244
+ {
245
+ FT_FaceRec root;
246
+ void* psnames;
247
+ void* psaux;
248
+ CID_FaceInfoRec cid;
249
+ PS_FontExtraRec font_extra;
250
+ #if 0
251
+ void* afm_data;
252
+ #endif
253
+ CID_Subrs subrs;
254
+
255
+ /* since version 2.1 - interface to PostScript hinter */
256
+ void* pshinter;
257
+
258
+ /* since version 2.1.8, but was originally positioned after `afm_data' */
259
+ FT_Byte* binary_data; /* used if hex data has been converted */
260
+ FT_Stream cid_stream;
261
+
262
+ } CID_FaceRec;
263
+
264
+
265
+ FT_END_HEADER
266
+
267
+ #endif /* __T1TYPES_H__ */
268
+
269
+
270
+ /* END */
@@ -0,0 +1,1543 @@
1
+ /***************************************************************************/
2
+ /* */
3
+ /* tttypes.h */
4
+ /* */
5
+ /* Basic SFNT/TrueType type definitions and interface (specification */
6
+ /* only). */
7
+ /* */
8
+ /* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2008 by */
9
+ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
10
+ /* */
11
+ /* This file is part of the FreeType project, and may only be used, */
12
+ /* modified, and distributed under the terms of the FreeType project */
13
+ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
14
+ /* this file you indicate that you have read the license and */
15
+ /* understand and accept it fully. */
16
+ /* */
17
+ /***************************************************************************/
18
+
19
+
20
+ #ifndef __TTTYPES_H__
21
+ #define __TTTYPES_H__
22
+
23
+
24
+ #include <ft2build.h>
25
+ #include FT_TRUETYPE_TABLES_H
26
+ #include FT_INTERNAL_OBJECTS_H
27
+
28
+ #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
29
+ #include FT_MULTIPLE_MASTERS_H
30
+ #endif
31
+
32
+
33
+ FT_BEGIN_HEADER
34
+
35
+
36
+ /*************************************************************************/
37
+ /*************************************************************************/
38
+ /*************************************************************************/
39
+ /*** ***/
40
+ /*** ***/
41
+ /*** REQUIRED TRUETYPE/OPENTYPE TABLES DEFINITIONS ***/
42
+ /*** ***/
43
+ /*** ***/
44
+ /*************************************************************************/
45
+ /*************************************************************************/
46
+ /*************************************************************************/
47
+
48
+
49
+ /*************************************************************************/
50
+ /* */
51
+ /* <Struct> */
52
+ /* TTC_HeaderRec */
53
+ /* */
54
+ /* <Description> */
55
+ /* TrueType collection header. This table contains the offsets of */
56
+ /* the font headers of each distinct TrueType face in the file. */
57
+ /* */
58
+ /* <Fields> */
59
+ /* tag :: Must be `ttc ' to indicate a TrueType collection. */
60
+ /* */
61
+ /* version :: The version number. */
62
+ /* */
63
+ /* count :: The number of faces in the collection. The */
64
+ /* specification says this should be an unsigned long, but */
65
+ /* we use a signed long since we need the value -1 for */
66
+ /* specific purposes. */
67
+ /* */
68
+ /* offsets :: The offsets of the font headers, one per face. */
69
+ /* */
70
+ typedef struct TTC_HeaderRec_
71
+ {
72
+ FT_ULong tag;
73
+ FT_Fixed version;
74
+ FT_Long count;
75
+ FT_ULong* offsets;
76
+
77
+ } TTC_HeaderRec;
78
+
79
+
80
+ /*************************************************************************/
81
+ /* */
82
+ /* <Struct> */
83
+ /* SFNT_HeaderRec */
84
+ /* */
85
+ /* <Description> */
86
+ /* SFNT file format header. */
87
+ /* */
88
+ /* <Fields> */
89
+ /* format_tag :: The font format tag. */
90
+ /* */
91
+ /* num_tables :: The number of tables in file. */
92
+ /* */
93
+ /* search_range :: Must be `16 * (max power of 2 <= num_tables)'. */
94
+ /* */
95
+ /* entry_selector :: Must be log2 of `search_range / 16'. */
96
+ /* */
97
+ /* range_shift :: Must be `num_tables * 16 - search_range'. */
98
+ /* */
99
+ typedef struct SFNT_HeaderRec_
100
+ {
101
+ FT_ULong format_tag;
102
+ FT_UShort num_tables;
103
+ FT_UShort search_range;
104
+ FT_UShort entry_selector;
105
+ FT_UShort range_shift;
106
+
107
+ FT_ULong offset; /* not in file */
108
+
109
+ } SFNT_HeaderRec, *SFNT_Header;
110
+
111
+
112
+ /*************************************************************************/
113
+ /* */
114
+ /* <Struct> */
115
+ /* TT_TableRec */
116
+ /* */
117
+ /* <Description> */
118
+ /* This structure describes a given table of a TrueType font. */
119
+ /* */
120
+ /* <Fields> */
121
+ /* Tag :: A four-bytes tag describing the table. */
122
+ /* */
123
+ /* CheckSum :: The table checksum. This value can be ignored. */
124
+ /* */
125
+ /* Offset :: The offset of the table from the start of the TrueType */
126
+ /* font in its resource. */
127
+ /* */
128
+ /* Length :: The table length (in bytes). */
129
+ /* */
130
+ typedef struct TT_TableRec_
131
+ {
132
+ FT_ULong Tag; /* table type */
133
+ FT_ULong CheckSum; /* table checksum */
134
+ FT_ULong Offset; /* table file offset */
135
+ FT_ULong Length; /* table length */
136
+
137
+ } TT_TableRec, *TT_Table;
138
+
139
+
140
+ /*************************************************************************/
141
+ /* */
142
+ /* <Struct> */
143
+ /* TT_LongMetricsRec */
144
+ /* */
145
+ /* <Description> */
146
+ /* A structure modeling the long metrics of the `hmtx' and `vmtx' */
147
+ /* TrueType tables. The values are expressed in font units. */
148
+ /* */
149
+ /* <Fields> */
150
+ /* advance :: The advance width or height for the glyph. */
151
+ /* */
152
+ /* bearing :: The left-side or top-side bearing for the glyph. */
153
+ /* */
154
+ typedef struct TT_LongMetricsRec_
155
+ {
156
+ FT_UShort advance;
157
+ FT_Short bearing;
158
+
159
+ } TT_LongMetricsRec, *TT_LongMetrics;
160
+
161
+
162
+ /*************************************************************************/
163
+ /* */
164
+ /* <Type> */
165
+ /* TT_ShortMetrics */
166
+ /* */
167
+ /* <Description> */
168
+ /* A simple type to model the short metrics of the `hmtx' and `vmtx' */
169
+ /* tables. */
170
+ /* */
171
+ typedef FT_Short TT_ShortMetrics;
172
+
173
+
174
+ /*************************************************************************/
175
+ /* */
176
+ /* <Struct> */
177
+ /* TT_NameEntryRec */
178
+ /* */
179
+ /* <Description> */
180
+ /* A structure modeling TrueType name records. Name records are used */
181
+ /* to store important strings like family name, style name, */
182
+ /* copyright, etc. in _localized_ versions (i.e., language, encoding, */
183
+ /* etc). */
184
+ /* */
185
+ /* <Fields> */
186
+ /* platformID :: The ID of the name's encoding platform. */
187
+ /* */
188
+ /* encodingID :: The platform-specific ID for the name's encoding. */
189
+ /* */
190
+ /* languageID :: The platform-specific ID for the name's language. */
191
+ /* */
192
+ /* nameID :: The ID specifying what kind of name this is. */
193
+ /* */
194
+ /* stringLength :: The length of the string in bytes. */
195
+ /* */
196
+ /* stringOffset :: The offset to the string in the `name' table. */
197
+ /* */
198
+ /* string :: A pointer to the string's bytes. Note that these */
199
+ /* are usually UTF-16 encoded characters. */
200
+ /* */
201
+ typedef struct TT_NameEntryRec_
202
+ {
203
+ FT_UShort platformID;
204
+ FT_UShort encodingID;
205
+ FT_UShort languageID;
206
+ FT_UShort nameID;
207
+ FT_UShort stringLength;
208
+ FT_ULong stringOffset;
209
+
210
+ /* this last field is not defined in the spec */
211
+ /* but used by the FreeType engine */
212
+
213
+ FT_Byte* string;
214
+
215
+ } TT_NameEntryRec, *TT_NameEntry;
216
+
217
+
218
+ /*************************************************************************/
219
+ /* */
220
+ /* <Struct> */
221
+ /* TT_NameTableRec */
222
+ /* */
223
+ /* <Description> */
224
+ /* A structure modeling the TrueType name table. */
225
+ /* */
226
+ /* <Fields> */
227
+ /* format :: The format of the name table. */
228
+ /* */
229
+ /* numNameRecords :: The number of names in table. */
230
+ /* */
231
+ /* storageOffset :: The offset of the name table in the `name' */
232
+ /* TrueType table. */
233
+ /* */
234
+ /* names :: An array of name records. */
235
+ /* */
236
+ /* stream :: the file's input stream. */
237
+ /* */
238
+ typedef struct TT_NameTableRec_
239
+ {
240
+ FT_UShort format;
241
+ FT_UInt numNameRecords;
242
+ FT_UInt storageOffset;
243
+ TT_NameEntryRec* names;
244
+ FT_Stream stream;
245
+
246
+ } TT_NameTableRec, *TT_NameTable;
247
+
248
+
249
+ /*************************************************************************/
250
+ /*************************************************************************/
251
+ /*************************************************************************/
252
+ /*** ***/
253
+ /*** ***/
254
+ /*** OPTIONAL TRUETYPE/OPENTYPE TABLES DEFINITIONS ***/
255
+ /*** ***/
256
+ /*** ***/
257
+ /*************************************************************************/
258
+ /*************************************************************************/
259
+ /*************************************************************************/
260
+
261
+
262
+ /*************************************************************************/
263
+ /* */
264
+ /* <Struct> */
265
+ /* TT_GaspRangeRec */
266
+ /* */
267
+ /* <Description> */
268
+ /* A tiny structure used to model a gasp range according to the */
269
+ /* TrueType specification. */
270
+ /* */
271
+ /* <Fields> */
272
+ /* maxPPEM :: The maximum ppem value to which `gaspFlag' applies. */
273
+ /* */
274
+ /* gaspFlag :: A flag describing the grid-fitting and anti-aliasing */
275
+ /* modes to be used. */
276
+ /* */
277
+ typedef struct TT_GaspRangeRec_
278
+ {
279
+ FT_UShort maxPPEM;
280
+ FT_UShort gaspFlag;
281
+
282
+ } TT_GaspRangeRec, *TT_GaspRange;
283
+
284
+
285
+ #define TT_GASP_GRIDFIT 0x01
286
+ #define TT_GASP_DOGRAY 0x02
287
+
288
+
289
+ /*************************************************************************/
290
+ /* */
291
+ /* <Struct> */
292
+ /* TT_GaspRec */
293
+ /* */
294
+ /* <Description> */
295
+ /* A structure modeling the TrueType `gasp' table used to specify */
296
+ /* grid-fitting and anti-aliasing behaviour. */
297
+ /* */
298
+ /* <Fields> */
299
+ /* version :: The version number. */
300
+ /* */
301
+ /* numRanges :: The number of gasp ranges in table. */
302
+ /* */
303
+ /* gaspRanges :: An array of gasp ranges. */
304
+ /* */
305
+ typedef struct TT_Gasp_
306
+ {
307
+ FT_UShort version;
308
+ FT_UShort numRanges;
309
+ TT_GaspRange gaspRanges;
310
+
311
+ } TT_GaspRec;
312
+
313
+
314
+ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
315
+
316
+ /*************************************************************************/
317
+ /* */
318
+ /* <Struct> */
319
+ /* TT_HdmxEntryRec */
320
+ /* */
321
+ /* <Description> */
322
+ /* A small structure used to model the pre-computed widths of a given */
323
+ /* size. They are found in the `hdmx' table. */
324
+ /* */
325
+ /* <Fields> */
326
+ /* ppem :: The pixels per EM value at which these metrics apply. */
327
+ /* */
328
+ /* max_width :: The maximum advance width for this metric. */
329
+ /* */
330
+ /* widths :: An array of widths. Note: These are 8-bit bytes. */
331
+ /* */
332
+ typedef struct TT_HdmxEntryRec_
333
+ {
334
+ FT_Byte ppem;
335
+ FT_Byte max_width;
336
+ FT_Byte* widths;
337
+
338
+ } TT_HdmxEntryRec, *TT_HdmxEntry;
339
+
340
+
341
+ /*************************************************************************/
342
+ /* */
343
+ /* <Struct> */
344
+ /* TT_HdmxRec */
345
+ /* */
346
+ /* <Description> */
347
+ /* A structure used to model the `hdmx' table, which contains */
348
+ /* pre-computed widths for a set of given sizes/dimensions. */
349
+ /* */
350
+ /* <Fields> */
351
+ /* version :: The version number. */
352
+ /* */
353
+ /* num_records :: The number of hdmx records. */
354
+ /* */
355
+ /* records :: An array of hdmx records. */
356
+ /* */
357
+ typedef struct TT_HdmxRec_
358
+ {
359
+ FT_UShort version;
360
+ FT_Short num_records;
361
+ TT_HdmxEntry records;
362
+
363
+ } TT_HdmxRec, *TT_Hdmx;
364
+
365
+
366
+ /*************************************************************************/
367
+ /* */
368
+ /* <Struct> */
369
+ /* TT_Kern0_PairRec */
370
+ /* */
371
+ /* <Description> */
372
+ /* A structure used to model a kerning pair for the kerning table */
373
+ /* format 0. The engine now loads this table if it finds one in the */
374
+ /* font file. */
375
+ /* */
376
+ /* <Fields> */
377
+ /* left :: The index of the left glyph in pair. */
378
+ /* */
379
+ /* right :: The index of the right glyph in pair. */
380
+ /* */
381
+ /* value :: The kerning distance. A positive value spaces the */
382
+ /* glyphs, a negative one makes them closer. */
383
+ /* */
384
+ typedef struct TT_Kern0_PairRec_
385
+ {
386
+ FT_UShort left; /* index of left glyph in pair */
387
+ FT_UShort right; /* index of right glyph in pair */
388
+ FT_FWord value; /* kerning value */
389
+
390
+ } TT_Kern0_PairRec, *TT_Kern0_Pair;
391
+
392
+ #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
393
+
394
+
395
+ /*************************************************************************/
396
+ /*************************************************************************/
397
+ /*************************************************************************/
398
+ /*** ***/
399
+ /*** ***/
400
+ /*** EMBEDDED BITMAPS SUPPORT ***/
401
+ /*** ***/
402
+ /*** ***/
403
+ /*************************************************************************/
404
+ /*************************************************************************/
405
+ /*************************************************************************/
406
+
407
+
408
+ /*************************************************************************/
409
+ /* */
410
+ /* <Struct> */
411
+ /* TT_SBit_MetricsRec */
412
+ /* */
413
+ /* <Description> */
414
+ /* A structure used to hold the big metrics of a given glyph bitmap */
415
+ /* in a TrueType or OpenType font. These are usually found in the */
416
+ /* `EBDT' (Microsoft) or `bloc' (Apple) table. */
417
+ /* */
418
+ /* <Fields> */
419
+ /* height :: The glyph height in pixels. */
420
+ /* */
421
+ /* width :: The glyph width in pixels. */
422
+ /* */
423
+ /* horiBearingX :: The horizontal left bearing. */
424
+ /* */
425
+ /* horiBearingY :: The horizontal top bearing. */
426
+ /* */
427
+ /* horiAdvance :: The horizontal advance. */
428
+ /* */
429
+ /* vertBearingX :: The vertical left bearing. */
430
+ /* */
431
+ /* vertBearingY :: The vertical top bearing. */
432
+ /* */
433
+ /* vertAdvance :: The vertical advance. */
434
+ /* */
435
+ typedef struct TT_SBit_MetricsRec_
436
+ {
437
+ FT_Byte height;
438
+ FT_Byte width;
439
+
440
+ FT_Char horiBearingX;
441
+ FT_Char horiBearingY;
442
+ FT_Byte horiAdvance;
443
+
444
+ FT_Char vertBearingX;
445
+ FT_Char vertBearingY;
446
+ FT_Byte vertAdvance;
447
+
448
+ } TT_SBit_MetricsRec, *TT_SBit_Metrics;
449
+
450
+
451
+ /*************************************************************************/
452
+ /* */
453
+ /* <Struct> */
454
+ /* TT_SBit_SmallMetricsRec */
455
+ /* */
456
+ /* <Description> */
457
+ /* A structure used to hold the small metrics of a given glyph bitmap */
458
+ /* in a TrueType or OpenType font. These are usually found in the */
459
+ /* `EBDT' (Microsoft) or the `bdat' (Apple) table. */
460
+ /* */
461
+ /* <Fields> */
462
+ /* height :: The glyph height in pixels. */
463
+ /* */
464
+ /* width :: The glyph width in pixels. */
465
+ /* */
466
+ /* bearingX :: The left-side bearing. */
467
+ /* */
468
+ /* bearingY :: The top-side bearing. */
469
+ /* */
470
+ /* advance :: The advance width or height. */
471
+ /* */
472
+ typedef struct TT_SBit_Small_Metrics_
473
+ {
474
+ FT_Byte height;
475
+ FT_Byte width;
476
+
477
+ FT_Char bearingX;
478
+ FT_Char bearingY;
479
+ FT_Byte advance;
480
+
481
+ } TT_SBit_SmallMetricsRec, *TT_SBit_SmallMetrics;
482
+
483
+
484
+ /*************************************************************************/
485
+ /* */
486
+ /* <Struct> */
487
+ /* TT_SBit_LineMetricsRec */
488
+ /* */
489
+ /* <Description> */
490
+ /* A structure used to describe the text line metrics of a given */
491
+ /* bitmap strike, for either a horizontal or vertical layout. */
492
+ /* */
493
+ /* <Fields> */
494
+ /* ascender :: The ascender in pixels. */
495
+ /* */
496
+ /* descender :: The descender in pixels. */
497
+ /* */
498
+ /* max_width :: The maximum glyph width in pixels. */
499
+ /* */
500
+ /* caret_slope_enumerator :: Rise of the caret slope, typically set */
501
+ /* to 1 for non-italic fonts. */
502
+ /* */
503
+ /* caret_slope_denominator :: Rise of the caret slope, typically set */
504
+ /* to 0 for non-italic fonts. */
505
+ /* */
506
+ /* caret_offset :: Offset in pixels to move the caret for */
507
+ /* proper positioning. */
508
+ /* */
509
+ /* min_origin_SB :: Minimum of horiBearingX (resp. */
510
+ /* vertBearingY). */
511
+ /* min_advance_SB :: Minimum of */
512
+ /* */
513
+ /* horizontal advance - */
514
+ /* ( horiBearingX + width ) */
515
+ /* */
516
+ /* resp. */
517
+ /* */
518
+ /* vertical advance - */
519
+ /* ( vertBearingY + height ) */
520
+ /* */
521
+ /* max_before_BL :: Maximum of horiBearingY (resp. */
522
+ /* vertBearingY). */
523
+ /* */
524
+ /* min_after_BL :: Minimum of */
525
+ /* */
526
+ /* horiBearingY - height */
527
+ /* */
528
+ /* resp. */
529
+ /* */
530
+ /* vertBearingX - width */
531
+ /* */
532
+ /* pads :: Unused (to make the size of the record */
533
+ /* a multiple of 32 bits. */
534
+ /* */
535
+ typedef struct TT_SBit_LineMetricsRec_
536
+ {
537
+ FT_Char ascender;
538
+ FT_Char descender;
539
+ FT_Byte max_width;
540
+ FT_Char caret_slope_numerator;
541
+ FT_Char caret_slope_denominator;
542
+ FT_Char caret_offset;
543
+ FT_Char min_origin_SB;
544
+ FT_Char min_advance_SB;
545
+ FT_Char max_before_BL;
546
+ FT_Char min_after_BL;
547
+ FT_Char pads[2];
548
+
549
+ } TT_SBit_LineMetricsRec, *TT_SBit_LineMetrics;
550
+
551
+
552
+ /*************************************************************************/
553
+ /* */
554
+ /* <Struct> */
555
+ /* TT_SBit_RangeRec */
556
+ /* */
557
+ /* <Description> */
558
+ /* A TrueType/OpenType subIndexTable as defined in the `EBLC' */
559
+ /* (Microsoft) or `bloc' (Apple) tables. */
560
+ /* */
561
+ /* <Fields> */
562
+ /* first_glyph :: The first glyph index in the range. */
563
+ /* */
564
+ /* last_glyph :: The last glyph index in the range. */
565
+ /* */
566
+ /* index_format :: The format of index table. Valid values are 1 */
567
+ /* to 5. */
568
+ /* */
569
+ /* image_format :: The format of `EBDT' image data. */
570
+ /* */
571
+ /* image_offset :: The offset to image data in `EBDT'. */
572
+ /* */
573
+ /* image_size :: For index formats 2 and 5. This is the size in */
574
+ /* bytes of each glyph bitmap. */
575
+ /* */
576
+ /* big_metrics :: For index formats 2 and 5. This is the big */
577
+ /* metrics for each glyph bitmap. */
578
+ /* */
579
+ /* num_glyphs :: For index formats 4 and 5. This is the number of */
580
+ /* glyphs in the code array. */
581
+ /* */
582
+ /* glyph_offsets :: For index formats 1 and 3. */
583
+ /* */
584
+ /* glyph_codes :: For index formats 4 and 5. */
585
+ /* */
586
+ /* table_offset :: The offset of the index table in the `EBLC' */
587
+ /* table. Only used during strike loading. */
588
+ /* */
589
+ typedef struct TT_SBit_RangeRec_
590
+ {
591
+ FT_UShort first_glyph;
592
+ FT_UShort last_glyph;
593
+
594
+ FT_UShort index_format;
595
+ FT_UShort image_format;
596
+ FT_ULong image_offset;
597
+
598
+ FT_ULong image_size;
599
+ TT_SBit_MetricsRec metrics;
600
+ FT_ULong num_glyphs;
601
+
602
+ FT_ULong* glyph_offsets;
603
+ FT_UShort* glyph_codes;
604
+
605
+ FT_ULong table_offset;
606
+
607
+ } TT_SBit_RangeRec, *TT_SBit_Range;
608
+
609
+
610
+ /*************************************************************************/
611
+ /* */
612
+ /* <Struct> */
613
+ /* TT_SBit_StrikeRec */
614
+ /* */
615
+ /* <Description> */
616
+ /* A structure used describe a given bitmap strike in the `EBLC' */
617
+ /* (Microsoft) or `bloc' (Apple) tables. */
618
+ /* */
619
+ /* <Fields> */
620
+ /* num_index_ranges :: The number of index ranges. */
621
+ /* */
622
+ /* index_ranges :: An array of glyph index ranges. */
623
+ /* */
624
+ /* color_ref :: Unused. `color_ref' is put in for future */
625
+ /* enhancements, but these fields are already */
626
+ /* in use by other platforms (e.g. Newton). */
627
+ /* For details, please see */
628
+ /* */
629
+ /* http://fonts.apple.com/ */
630
+ /* TTRefMan/RM06/Chap6bloc.html */
631
+ /* */
632
+ /* hori :: The line metrics for horizontal layouts. */
633
+ /* */
634
+ /* vert :: The line metrics for vertical layouts. */
635
+ /* */
636
+ /* start_glyph :: The lowest glyph index for this strike. */
637
+ /* */
638
+ /* end_glyph :: The highest glyph index for this strike. */
639
+ /* */
640
+ /* x_ppem :: The number of horizontal pixels per EM. */
641
+ /* */
642
+ /* y_ppem :: The number of vertical pixels per EM. */
643
+ /* */
644
+ /* bit_depth :: The bit depth. Valid values are 1, 2, 4, */
645
+ /* and 8. */
646
+ /* */
647
+ /* flags :: Is this a vertical or horizontal strike? For */
648
+ /* details, please see */
649
+ /* */
650
+ /* http://fonts.apple.com/ */
651
+ /* TTRefMan/RM06/Chap6bloc.html */
652
+ /* */
653
+ typedef struct TT_SBit_StrikeRec_
654
+ {
655
+ FT_Int num_ranges;
656
+ TT_SBit_Range sbit_ranges;
657
+ FT_ULong ranges_offset;
658
+
659
+ FT_ULong color_ref;
660
+
661
+ TT_SBit_LineMetricsRec hori;
662
+ TT_SBit_LineMetricsRec vert;
663
+
664
+ FT_UShort start_glyph;
665
+ FT_UShort end_glyph;
666
+
667
+ FT_Byte x_ppem;
668
+ FT_Byte y_ppem;
669
+
670
+ FT_Byte bit_depth;
671
+ FT_Char flags;
672
+
673
+ } TT_SBit_StrikeRec, *TT_SBit_Strike;
674
+
675
+
676
+ /*************************************************************************/
677
+ /* */
678
+ /* <Struct> */
679
+ /* TT_SBit_ComponentRec */
680
+ /* */
681
+ /* <Description> */
682
+ /* A simple structure to describe a compound sbit element. */
683
+ /* */
684
+ /* <Fields> */
685
+ /* glyph_code :: The element's glyph index. */
686
+ /* */
687
+ /* x_offset :: The element's left bearing. */
688
+ /* */
689
+ /* y_offset :: The element's top bearing. */
690
+ /* */
691
+ typedef struct TT_SBit_ComponentRec_
692
+ {
693
+ FT_UShort glyph_code;
694
+ FT_Char x_offset;
695
+ FT_Char y_offset;
696
+
697
+ } TT_SBit_ComponentRec, *TT_SBit_Component;
698
+
699
+
700
+ /*************************************************************************/
701
+ /* */
702
+ /* <Struct> */
703
+ /* TT_SBit_ScaleRec */
704
+ /* */
705
+ /* <Description> */
706
+ /* A structure used describe a given bitmap scaling table, as defined */
707
+ /* in the `EBSC' table. */
708
+ /* */
709
+ /* <Fields> */
710
+ /* hori :: The horizontal line metrics. */
711
+ /* */
712
+ /* vert :: The vertical line metrics. */
713
+ /* */
714
+ /* x_ppem :: The number of horizontal pixels per EM. */
715
+ /* */
716
+ /* y_ppem :: The number of vertical pixels per EM. */
717
+ /* */
718
+ /* x_ppem_substitute :: Substitution x_ppem value. */
719
+ /* */
720
+ /* y_ppem_substitute :: Substitution y_ppem value. */
721
+ /* */
722
+ typedef struct TT_SBit_ScaleRec_
723
+ {
724
+ TT_SBit_LineMetricsRec hori;
725
+ TT_SBit_LineMetricsRec vert;
726
+
727
+ FT_Byte x_ppem;
728
+ FT_Byte y_ppem;
729
+
730
+ FT_Byte x_ppem_substitute;
731
+ FT_Byte y_ppem_substitute;
732
+
733
+ } TT_SBit_ScaleRec, *TT_SBit_Scale;
734
+
735
+
736
+ /*************************************************************************/
737
+ /*************************************************************************/
738
+ /*************************************************************************/
739
+ /*** ***/
740
+ /*** ***/
741
+ /*** POSTSCRIPT GLYPH NAMES SUPPORT ***/
742
+ /*** ***/
743
+ /*** ***/
744
+ /*************************************************************************/
745
+ /*************************************************************************/
746
+ /*************************************************************************/
747
+
748
+
749
+ /*************************************************************************/
750
+ /* */
751
+ /* <Struct> */
752
+ /* TT_Post_20Rec */
753
+ /* */
754
+ /* <Description> */
755
+ /* Postscript names sub-table, format 2.0. Stores the PS name of */
756
+ /* each glyph in the font face. */
757
+ /* */
758
+ /* <Fields> */
759
+ /* num_glyphs :: The number of named glyphs in the table. */
760
+ /* */
761
+ /* num_names :: The number of PS names stored in the table. */
762
+ /* */
763
+ /* glyph_indices :: The indices of the glyphs in the names arrays. */
764
+ /* */
765
+ /* glyph_names :: The PS names not in Mac Encoding. */
766
+ /* */
767
+ typedef struct TT_Post_20Rec_
768
+ {
769
+ FT_UShort num_glyphs;
770
+ FT_UShort num_names;
771
+ FT_UShort* glyph_indices;
772
+ FT_Char** glyph_names;
773
+
774
+ } TT_Post_20Rec, *TT_Post_20;
775
+
776
+
777
+ /*************************************************************************/
778
+ /* */
779
+ /* <Struct> */
780
+ /* TT_Post_25Rec */
781
+ /* */
782
+ /* <Description> */
783
+ /* Postscript names sub-table, format 2.5. Stores the PS name of */
784
+ /* each glyph in the font face. */
785
+ /* */
786
+ /* <Fields> */
787
+ /* num_glyphs :: The number of glyphs in the table. */
788
+ /* */
789
+ /* offsets :: An array of signed offsets in a normal Mac */
790
+ /* Postscript name encoding. */
791
+ /* */
792
+ typedef struct TT_Post_25_
793
+ {
794
+ FT_UShort num_glyphs;
795
+ FT_Char* offsets;
796
+
797
+ } TT_Post_25Rec, *TT_Post_25;
798
+
799
+
800
+ /*************************************************************************/
801
+ /* */
802
+ /* <Struct> */
803
+ /* TT_Post_NamesRec */
804
+ /* */
805
+ /* <Description> */
806
+ /* Postscript names table, either format 2.0 or 2.5. */
807
+ /* */
808
+ /* <Fields> */
809
+ /* loaded :: A flag to indicate whether the PS names are loaded. */
810
+ /* */
811
+ /* format_20 :: The sub-table used for format 2.0. */
812
+ /* */
813
+ /* format_25 :: The sub-table used for format 2.5. */
814
+ /* */
815
+ typedef struct TT_Post_NamesRec_
816
+ {
817
+ FT_Bool loaded;
818
+
819
+ union
820
+ {
821
+ TT_Post_20Rec format_20;
822
+ TT_Post_25Rec format_25;
823
+
824
+ } names;
825
+
826
+ } TT_Post_NamesRec, *TT_Post_Names;
827
+
828
+
829
+ /*************************************************************************/
830
+ /*************************************************************************/
831
+ /*************************************************************************/
832
+ /*** ***/
833
+ /*** ***/
834
+ /*** GX VARIATION TABLE SUPPORT ***/
835
+ /*** ***/
836
+ /*** ***/
837
+ /*************************************************************************/
838
+ /*************************************************************************/
839
+ /*************************************************************************/
840
+
841
+
842
+ #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
843
+ typedef struct GX_BlendRec_ *GX_Blend;
844
+ #endif
845
+
846
+ /*************************************************************************/
847
+ /*************************************************************************/
848
+ /*************************************************************************/
849
+ /*** ***/
850
+ /*** ***/
851
+ /*** EMBEDDED BDF PROPERTIES TABLE SUPPORT ***/
852
+ /*** ***/
853
+ /*** ***/
854
+ /*************************************************************************/
855
+ /*************************************************************************/
856
+ /*************************************************************************/
857
+
858
+ /*
859
+ * These types are used to support a `BDF ' table that isn't part of the
860
+ * official TrueType specification. It is mainly used in SFNT-based
861
+ * bitmap fonts that were generated from a set of BDF fonts.
862
+ *
863
+ * The format of the table is as follows.
864
+ *
865
+ * USHORT version `BDF ' table version number, should be 0x0001.
866
+ * USHORT strikeCount Number of strikes (bitmap sizes) in this table.
867
+ * ULONG stringTable Offset (from start of BDF table) to string
868
+ * table.
869
+ *
870
+ * This is followed by an array of `strikeCount' descriptors, having the
871
+ * following format.
872
+ *
873
+ * USHORT ppem Vertical pixels per EM for this strike.
874
+ * USHORT numItems Number of items for this strike (properties and
875
+ * atoms). Maximum is 255.
876
+ *
877
+ * This array in turn is followed by `strikeCount' value sets. Each
878
+ * `value set' is an array of `numItems' items with the following format.
879
+ *
880
+ * ULONG item_name Offset in string table to item name.
881
+ * USHORT item_type The item type. Possible values are
882
+ * 0 => string (e.g., COMMENT)
883
+ * 1 => atom (e.g., FONT or even SIZE)
884
+ * 2 => int32
885
+ * 3 => uint32
886
+ * 0x10 => A flag to indicate a properties. This
887
+ * is ORed with the above values.
888
+ * ULONG item_value For strings => Offset into string table without
889
+ * the corresponding double quotes.
890
+ * For atoms => Offset into string table.
891
+ * For integers => Direct value.
892
+ *
893
+ * All strings in the string table consist of bytes and are
894
+ * zero-terminated.
895
+ *
896
+ */
897
+
898
+ #ifdef TT_CONFIG_OPTION_BDF
899
+
900
+ typedef struct TT_BDFRec_
901
+ {
902
+ FT_Byte* table;
903
+ FT_Byte* table_end;
904
+ FT_Byte* strings;
905
+ FT_ULong strings_size;
906
+ FT_UInt num_strikes;
907
+ FT_Bool loaded;
908
+
909
+ } TT_BDFRec, *TT_BDF;
910
+
911
+ #endif /* TT_CONFIG_OPTION_BDF */
912
+
913
+ /*************************************************************************/
914
+ /*************************************************************************/
915
+ /*************************************************************************/
916
+ /*** ***/
917
+ /*** ***/
918
+ /*** ORIGINAL TT_FACE CLASS DEFINITION ***/
919
+ /*** ***/
920
+ /*** ***/
921
+ /*************************************************************************/
922
+ /*************************************************************************/
923
+ /*************************************************************************/
924
+
925
+
926
+ /*************************************************************************/
927
+ /* */
928
+ /* This structure/class is defined here because it is common to the */
929
+ /* following formats: TTF, OpenType-TT, and OpenType-CFF. */
930
+ /* */
931
+ /* Note, however, that the classes TT_Size and TT_GlyphSlot are not */
932
+ /* shared between font drivers, and are thus defined in `ttobjs.h'. */
933
+ /* */
934
+ /*************************************************************************/
935
+
936
+
937
+ /*************************************************************************/
938
+ /* */
939
+ /* <Type> */
940
+ /* TT_Face */
941
+ /* */
942
+ /* <Description> */
943
+ /* A handle to a TrueType face/font object. A TT_Face encapsulates */
944
+ /* the resolution and scaling independent parts of a TrueType font */
945
+ /* resource. */
946
+ /* */
947
+ /* <Note> */
948
+ /* The TT_Face structure is also used as a `parent class' for the */
949
+ /* OpenType-CFF class (T2_Face). */
950
+ /* */
951
+ typedef struct TT_FaceRec_* TT_Face;
952
+
953
+
954
+ /* a function type used for the truetype bytecode interpreter hooks */
955
+ typedef FT_Error
956
+ (*TT_Interpreter)( void* exec_context );
957
+
958
+ /* forward declaration */
959
+ typedef struct TT_LoaderRec_* TT_Loader;
960
+
961
+
962
+ /*************************************************************************/
963
+ /* */
964
+ /* <FuncType> */
965
+ /* TT_Loader_GotoTableFunc */
966
+ /* */
967
+ /* <Description> */
968
+ /* Seeks a stream to the start of a given TrueType table. */
969
+ /* */
970
+ /* <Input> */
971
+ /* face :: A handle to the target face object. */
972
+ /* */
973
+ /* tag :: A 4-byte tag used to name the table. */
974
+ /* */
975
+ /* stream :: The input stream. */
976
+ /* */
977
+ /* <Output> */
978
+ /* length :: The length of the table in bytes. Set to 0 if not */
979
+ /* needed. */
980
+ /* */
981
+ /* <Return> */
982
+ /* FreeType error code. 0 means success. */
983
+ /* */
984
+ /* <Note> */
985
+ /* The stream cursor must be at the font file's origin. */
986
+ /* */
987
+ typedef FT_Error
988
+ (*TT_Loader_GotoTableFunc)( TT_Face face,
989
+ FT_ULong tag,
990
+ FT_Stream stream,
991
+ FT_ULong* length );
992
+
993
+
994
+ /*************************************************************************/
995
+ /* */
996
+ /* <FuncType> */
997
+ /* TT_Loader_StartGlyphFunc */
998
+ /* */
999
+ /* <Description> */
1000
+ /* Seeks a stream to the start of a given glyph element, and opens a */
1001
+ /* frame for it. */
1002
+ /* */
1003
+ /* <Input> */
1004
+ /* loader :: The current TrueType glyph loader object. */
1005
+ /* */
1006
+ /* glyph index :: The index of the glyph to access. */
1007
+ /* */
1008
+ /* offset :: The offset of the glyph according to the */
1009
+ /* `locations' table. */
1010
+ /* */
1011
+ /* byte_count :: The size of the frame in bytes. */
1012
+ /* */
1013
+ /* <Return> */
1014
+ /* FreeType error code. 0 means success. */
1015
+ /* */
1016
+ /* <Note> */
1017
+ /* This function is normally equivalent to FT_STREAM_SEEK(offset) */
1018
+ /* followed by FT_FRAME_ENTER(byte_count) with the loader's stream, */
1019
+ /* but alternative formats (e.g. compressed ones) might use something */
1020
+ /* different. */
1021
+ /* */
1022
+ typedef FT_Error
1023
+ (*TT_Loader_StartGlyphFunc)( TT_Loader loader,
1024
+ FT_UInt glyph_index,
1025
+ FT_ULong offset,
1026
+ FT_UInt byte_count );
1027
+
1028
+
1029
+ /*************************************************************************/
1030
+ /* */
1031
+ /* <FuncType> */
1032
+ /* TT_Loader_ReadGlyphFunc */
1033
+ /* */
1034
+ /* <Description> */
1035
+ /* Reads one glyph element (its header, a simple glyph, or a */
1036
+ /* composite) from the loader's current stream frame. */
1037
+ /* */
1038
+ /* <Input> */
1039
+ /* loader :: The current TrueType glyph loader object. */
1040
+ /* */
1041
+ /* <Return> */
1042
+ /* FreeType error code. 0 means success. */
1043
+ /* */
1044
+ typedef FT_Error
1045
+ (*TT_Loader_ReadGlyphFunc)( TT_Loader loader );
1046
+
1047
+
1048
+ /*************************************************************************/
1049
+ /* */
1050
+ /* <FuncType> */
1051
+ /* TT_Loader_EndGlyphFunc */
1052
+ /* */
1053
+ /* <Description> */
1054
+ /* Closes the current loader stream frame for the glyph. */
1055
+ /* */
1056
+ /* <Input> */
1057
+ /* loader :: The current TrueType glyph loader object. */
1058
+ /* */
1059
+ typedef void
1060
+ (*TT_Loader_EndGlyphFunc)( TT_Loader loader );
1061
+
1062
+
1063
+ /*************************************************************************/
1064
+ /* */
1065
+ /* TrueType Face Type */
1066
+ /* */
1067
+ /* <Struct> */
1068
+ /* TT_Face */
1069
+ /* */
1070
+ /* <Description> */
1071
+ /* The TrueType face class. These objects model the resolution and */
1072
+ /* point-size independent data found in a TrueType font file. */
1073
+ /* */
1074
+ /* <Fields> */
1075
+ /* root :: The base FT_Face structure, managed by the */
1076
+ /* base layer. */
1077
+ /* */
1078
+ /* ttc_header :: The TrueType collection header, used when */
1079
+ /* the file is a `ttc' rather than a `ttf'. */
1080
+ /* For ordinary font files, the field */
1081
+ /* `ttc_header.count' is set to 0. */
1082
+ /* */
1083
+ /* format_tag :: The font format tag. */
1084
+ /* */
1085
+ /* num_tables :: The number of TrueType tables in this font */
1086
+ /* file. */
1087
+ /* */
1088
+ /* dir_tables :: The directory of TrueType tables for this */
1089
+ /* font file. */
1090
+ /* */
1091
+ /* header :: The font's font header (`head' table). */
1092
+ /* Read on font opening. */
1093
+ /* */
1094
+ /* horizontal :: The font's horizontal header (`hhea' */
1095
+ /* table). This field also contains the */
1096
+ /* associated horizontal metrics table */
1097
+ /* (`hmtx'). */
1098
+ /* */
1099
+ /* max_profile :: The font's maximum profile table. Read on */
1100
+ /* font opening. Note that some maximum */
1101
+ /* values cannot be taken directly from this */
1102
+ /* table. We thus define additional fields */
1103
+ /* below to hold the computed maxima. */
1104
+ /* */
1105
+ /* vertical_info :: A boolean which is set when the font file */
1106
+ /* contains vertical metrics. If not, the */
1107
+ /* value of the `vertical' field is */
1108
+ /* undefined. */
1109
+ /* */
1110
+ /* vertical :: The font's vertical header (`vhea' table). */
1111
+ /* This field also contains the associated */
1112
+ /* vertical metrics table (`vmtx'), if found. */
1113
+ /* IMPORTANT: The contents of this field is */
1114
+ /* undefined if the `verticalInfo' field is */
1115
+ /* unset. */
1116
+ /* */
1117
+ /* num_names :: The number of name records within this */
1118
+ /* TrueType font. */
1119
+ /* */
1120
+ /* name_table :: The table of name records (`name'). */
1121
+ /* */
1122
+ /* os2 :: The font's OS/2 table (`OS/2'). */
1123
+ /* */
1124
+ /* postscript :: The font's PostScript table (`post' */
1125
+ /* table). The PostScript glyph names are */
1126
+ /* not loaded by the driver on face opening. */
1127
+ /* See the `ttpost' module for more details. */
1128
+ /* */
1129
+ /* cmap_table :: Address of the face's `cmap' SFNT table */
1130
+ /* in memory (it's an extracted frame). */
1131
+ /* */
1132
+ /* cmap_size :: The size in bytes of the `cmap_table' */
1133
+ /* described above. */
1134
+ /* */
1135
+ /* goto_table :: A function called by each TrueType table */
1136
+ /* loader to position a stream's cursor to */
1137
+ /* the start of a given table according to */
1138
+ /* its tag. It defaults to TT_Goto_Face but */
1139
+ /* can be different for strange formats (e.g. */
1140
+ /* Type 42). */
1141
+ /* */
1142
+ /* access_glyph_frame :: A function used to access the frame of a */
1143
+ /* given glyph within the face's font file. */
1144
+ /* */
1145
+ /* forget_glyph_frame :: A function used to forget the frame of a */
1146
+ /* given glyph when all data has been loaded. */
1147
+ /* */
1148
+ /* read_glyph_header :: A function used to read a glyph header. */
1149
+ /* It must be called between an `access' and */
1150
+ /* `forget'. */
1151
+ /* */
1152
+ /* read_simple_glyph :: A function used to read a simple glyph. */
1153
+ /* It must be called after the header was */
1154
+ /* read, and before the `forget'. */
1155
+ /* */
1156
+ /* read_composite_glyph :: A function used to read a composite glyph. */
1157
+ /* It must be called after the header was */
1158
+ /* read, and before the `forget'. */
1159
+ /* */
1160
+ /* sfnt :: A pointer to the SFNT service. */
1161
+ /* */
1162
+ /* psnames :: A pointer to the PostScript names service. */
1163
+ /* */
1164
+ /* hdmx :: The face's horizontal device metrics */
1165
+ /* (`hdmx' table). This table is optional in */
1166
+ /* TrueType/OpenType fonts. */
1167
+ /* */
1168
+ /* gasp :: The grid-fitting and scaling properties */
1169
+ /* table (`gasp'). This table is optional in */
1170
+ /* TrueType/OpenType fonts. */
1171
+ /* */
1172
+ /* pclt :: The `pclt' SFNT table. */
1173
+ /* */
1174
+ /* num_sbit_strikes :: The number of sbit strikes, i.e., bitmap */
1175
+ /* sizes, embedded in this font. */
1176
+ /* */
1177
+ /* sbit_strikes :: An array of sbit strikes embedded in this */
1178
+ /* font. This table is optional in a */
1179
+ /* TrueType/OpenType font. */
1180
+ /* */
1181
+ /* num_sbit_scales :: The number of sbit scales for this font. */
1182
+ /* */
1183
+ /* sbit_scales :: Array of sbit scales embedded in this */
1184
+ /* font. This table is optional in a */
1185
+ /* TrueType/OpenType font. */
1186
+ /* */
1187
+ /* postscript_names :: A table used to store the Postscript names */
1188
+ /* of the glyphs for this font. See the */
1189
+ /* file `ttconfig.h' for comments on the */
1190
+ /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES option. */
1191
+ /* */
1192
+ /* num_locations :: The number of glyph locations in this */
1193
+ /* TrueType file. This should be */
1194
+ /* identical to the number of glyphs. */
1195
+ /* Ignored for Type 2 fonts. */
1196
+ /* */
1197
+ /* glyph_locations :: An array of longs. These are offsets to */
1198
+ /* glyph data within the `glyf' table. */
1199
+ /* Ignored for Type 2 font faces. */
1200
+ /* */
1201
+ /* glyf_len :: The length of the `glyf' table. Needed */
1202
+ /* for malformed `loca' tables. */
1203
+ /* */
1204
+ /* font_program_size :: Size in bytecodes of the face's font */
1205
+ /* program. 0 if none defined. Ignored for */
1206
+ /* Type 2 fonts. */
1207
+ /* */
1208
+ /* font_program :: The face's font program (bytecode stream) */
1209
+ /* executed at load time, also used during */
1210
+ /* glyph rendering. Comes from the `fpgm' */
1211
+ /* table. Ignored for Type 2 font fonts. */
1212
+ /* */
1213
+ /* cvt_program_size :: The size in bytecodes of the face's cvt */
1214
+ /* program. Ignored for Type 2 fonts. */
1215
+ /* */
1216
+ /* cvt_program :: The face's cvt program (bytecode stream) */
1217
+ /* executed each time an instance/size is */
1218
+ /* changed/reset. Comes from the `prep' */
1219
+ /* table. Ignored for Type 2 fonts. */
1220
+ /* */
1221
+ /* cvt_size :: Size of the control value table (in */
1222
+ /* entries). Ignored for Type 2 fonts. */
1223
+ /* */
1224
+ /* cvt :: The face's original control value table. */
1225
+ /* Coordinates are expressed in unscaled font */
1226
+ /* units. Comes from the `cvt ' table. */
1227
+ /* Ignored for Type 2 fonts. */
1228
+ /* */
1229
+ /* num_kern_pairs :: The number of kerning pairs present in the */
1230
+ /* font file. The engine only loads the */
1231
+ /* first horizontal format 0 kern table it */
1232
+ /* finds in the font file. Ignored for */
1233
+ /* Type 2 fonts. */
1234
+ /* */
1235
+ /* kern_table_index :: The index of the kerning table in the font */
1236
+ /* kerning directory. Ignored for Type 2 */
1237
+ /* fonts. */
1238
+ /* */
1239
+ /* interpreter :: A pointer to the TrueType bytecode */
1240
+ /* interpreters field is also used to hook */
1241
+ /* the debugger in `ttdebug'. */
1242
+ /* */
1243
+ /* unpatented_hinting :: If true, use only unpatented methods in */
1244
+ /* the bytecode interpreter. */
1245
+ /* */
1246
+ /* doblend :: A boolean which is set if the font should */
1247
+ /* be blended (this is for GX var). */
1248
+ /* */
1249
+ /* blend :: Contains the data needed to control GX */
1250
+ /* variation tables (rather like Multiple */
1251
+ /* Master data). */
1252
+ /* */
1253
+ /* extra :: Reserved for third-party font drivers. */
1254
+ /* */
1255
+ /* postscript_name :: The PS name of the font. Used by the */
1256
+ /* postscript name service. */
1257
+ /* */
1258
+ typedef struct TT_FaceRec_
1259
+ {
1260
+ FT_FaceRec root;
1261
+
1262
+ TTC_HeaderRec ttc_header;
1263
+
1264
+ FT_ULong format_tag;
1265
+ FT_UShort num_tables;
1266
+ TT_Table dir_tables;
1267
+
1268
+ TT_Header header; /* TrueType header table */
1269
+ TT_HoriHeader horizontal; /* TrueType horizontal header */
1270
+
1271
+ TT_MaxProfile max_profile;
1272
+ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
1273
+ FT_ULong max_components; /* stubbed to 0 */
1274
+ #endif
1275
+
1276
+ FT_Bool vertical_info;
1277
+ TT_VertHeader vertical; /* TT Vertical header, if present */
1278
+
1279
+ FT_UShort num_names; /* number of name records */
1280
+ TT_NameTableRec name_table; /* name table */
1281
+
1282
+ TT_OS2 os2; /* TrueType OS/2 table */
1283
+ TT_Postscript postscript; /* TrueType Postscript table */
1284
+
1285
+ FT_Byte* cmap_table; /* extracted `cmap' table */
1286
+ FT_ULong cmap_size;
1287
+
1288
+ TT_Loader_GotoTableFunc goto_table;
1289
+
1290
+ TT_Loader_StartGlyphFunc access_glyph_frame;
1291
+ TT_Loader_EndGlyphFunc forget_glyph_frame;
1292
+ TT_Loader_ReadGlyphFunc read_glyph_header;
1293
+ TT_Loader_ReadGlyphFunc read_simple_glyph;
1294
+ TT_Loader_ReadGlyphFunc read_composite_glyph;
1295
+
1296
+ /* a typeless pointer to the SFNT_Interface table used to load */
1297
+ /* the basic TrueType tables in the face object */
1298
+ void* sfnt;
1299
+
1300
+ /* a typeless pointer to the FT_Service_PsCMapsRec table used to */
1301
+ /* handle glyph names <-> unicode & Mac values */
1302
+ void* psnames;
1303
+
1304
+
1305
+ /***********************************************************************/
1306
+ /* */
1307
+ /* Optional TrueType/OpenType tables */
1308
+ /* */
1309
+ /***********************************************************************/
1310
+
1311
+ /* horizontal device metrics */
1312
+ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
1313
+ TT_HdmxRec hdmx;
1314
+ #endif
1315
+
1316
+ /* grid-fitting and scaling table */
1317
+ TT_GaspRec gasp; /* the `gasp' table */
1318
+
1319
+ /* PCL 5 table */
1320
+ TT_PCLT pclt;
1321
+
1322
+ /* embedded bitmaps support */
1323
+ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
1324
+ FT_ULong num_sbit_strikes;
1325
+ TT_SBit_Strike sbit_strikes;
1326
+ #endif
1327
+
1328
+ FT_ULong num_sbit_scales;
1329
+ TT_SBit_Scale sbit_scales;
1330
+
1331
+ /* postscript names table */
1332
+ TT_Post_NamesRec postscript_names;
1333
+
1334
+
1335
+ /***********************************************************************/
1336
+ /* */
1337
+ /* TrueType-specific fields (ignored by the OTF-Type2 driver) */
1338
+ /* */
1339
+ /***********************************************************************/
1340
+
1341
+ /* the glyph locations */
1342
+ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
1343
+ FT_UShort num_locations_stub;
1344
+ FT_Long* glyph_locations_stub;
1345
+ #endif
1346
+
1347
+ /* the font program, if any */
1348
+ FT_ULong font_program_size;
1349
+ FT_Byte* font_program;
1350
+
1351
+ /* the cvt program, if any */
1352
+ FT_ULong cvt_program_size;
1353
+ FT_Byte* cvt_program;
1354
+
1355
+ /* the original, unscaled, control value table */
1356
+ FT_ULong cvt_size;
1357
+ FT_Short* cvt;
1358
+
1359
+ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
1360
+ /* the format 0 kerning table, if any */
1361
+ FT_Int num_kern_pairs;
1362
+ FT_Int kern_table_index;
1363
+ TT_Kern0_Pair kern_pairs;
1364
+ #endif
1365
+
1366
+ /* A pointer to the bytecode interpreter to use. This is also */
1367
+ /* used to hook the debugger for the `ttdebug' utility. */
1368
+ TT_Interpreter interpreter;
1369
+
1370
+ #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
1371
+ /* Use unpatented hinting only. */
1372
+ FT_Bool unpatented_hinting;
1373
+ #endif
1374
+
1375
+ /***********************************************************************/
1376
+ /* */
1377
+ /* Other tables or fields. This is used by derivative formats like */
1378
+ /* OpenType. */
1379
+ /* */
1380
+ /***********************************************************************/
1381
+
1382
+ FT_Generic extra;
1383
+
1384
+ const char* postscript_name;
1385
+
1386
+ /* since version 2.1.8, but was originally placed after */
1387
+ /* `glyph_locations_stub' */
1388
+ FT_ULong glyf_len;
1389
+
1390
+ /* since version 2.1.8, but was originally placed before `extra' */
1391
+ #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
1392
+ FT_Bool doblend;
1393
+ GX_Blend blend;
1394
+ #endif
1395
+
1396
+ /* since version 2.2 */
1397
+
1398
+ FT_Byte* horz_metrics;
1399
+ FT_ULong horz_metrics_size;
1400
+
1401
+ FT_Byte* vert_metrics;
1402
+ FT_ULong vert_metrics_size;
1403
+
1404
+ FT_ULong num_locations; /* in broken TTF, gid > 0xFFFF */
1405
+ FT_Byte* glyph_locations;
1406
+
1407
+ FT_Byte* hdmx_table;
1408
+ FT_ULong hdmx_table_size;
1409
+ FT_UInt hdmx_record_count;
1410
+ FT_ULong hdmx_record_size;
1411
+ FT_Byte* hdmx_record_sizes;
1412
+
1413
+ FT_Byte* sbit_table;
1414
+ FT_ULong sbit_table_size;
1415
+ FT_UInt sbit_num_strikes;
1416
+
1417
+ FT_Byte* kern_table;
1418
+ FT_ULong kern_table_size;
1419
+ FT_UInt num_kern_tables;
1420
+ FT_UInt32 kern_avail_bits;
1421
+ FT_UInt32 kern_order_bits;
1422
+
1423
+ #ifdef TT_CONFIG_OPTION_BDF
1424
+ TT_BDFRec bdf;
1425
+ #endif /* TT_CONFIG_OPTION_BDF */
1426
+
1427
+ /* since 2.3.0 */
1428
+ FT_ULong horz_metrics_offset;
1429
+ FT_ULong vert_metrics_offset;
1430
+
1431
+ } TT_FaceRec;
1432
+
1433
+
1434
+ /*************************************************************************/
1435
+ /* */
1436
+ /* <Struct> */
1437
+ /* TT_GlyphZoneRec */
1438
+ /* */
1439
+ /* <Description> */
1440
+ /* A glyph zone is used to load, scale and hint glyph outline */
1441
+ /* coordinates. */
1442
+ /* */
1443
+ /* <Fields> */
1444
+ /* memory :: A handle to the memory manager. */
1445
+ /* */
1446
+ /* max_points :: The maximal size in points of the zone. */
1447
+ /* */
1448
+ /* max_contours :: Max size in links contours of the zone. */
1449
+ /* */
1450
+ /* n_points :: The current number of points in the zone. */
1451
+ /* */
1452
+ /* n_contours :: The current number of contours in the zone. */
1453
+ /* */
1454
+ /* org :: The original glyph coordinates (font */
1455
+ /* units/scaled). */
1456
+ /* */
1457
+ /* cur :: The current glyph coordinates (scaled/hinted). */
1458
+ /* */
1459
+ /* tags :: The point control tags. */
1460
+ /* */
1461
+ /* contours :: The contours end points. */
1462
+ /* */
1463
+ /* first_point :: Offset of the current subglyph's first point. */
1464
+ /* */
1465
+ typedef struct TT_GlyphZoneRec_
1466
+ {
1467
+ FT_Memory memory;
1468
+ FT_UShort max_points;
1469
+ FT_UShort max_contours;
1470
+ FT_UShort n_points; /* number of points in zone */
1471
+ FT_Short n_contours; /* number of contours */
1472
+
1473
+ FT_Vector* org; /* original point coordinates */
1474
+ FT_Vector* cur; /* current point coordinates */
1475
+ FT_Vector* orus; /* original (unscaled) point coordinates */
1476
+
1477
+ FT_Byte* tags; /* current touch flags */
1478
+ FT_UShort* contours; /* contour end points */
1479
+
1480
+ FT_UShort first_point; /* offset of first (#0) point */
1481
+
1482
+ } TT_GlyphZoneRec, *TT_GlyphZone;
1483
+
1484
+
1485
+ /* handle to execution context */
1486
+ typedef struct TT_ExecContextRec_* TT_ExecContext;
1487
+
1488
+ /* glyph loader structure */
1489
+ typedef struct TT_LoaderRec_
1490
+ {
1491
+ FT_Face face;
1492
+ FT_Size size;
1493
+ FT_GlyphSlot glyph;
1494
+ FT_GlyphLoader gloader;
1495
+
1496
+ FT_ULong load_flags;
1497
+ FT_UInt glyph_index;
1498
+
1499
+ FT_Stream stream;
1500
+ FT_Int byte_len;
1501
+
1502
+ FT_Short n_contours;
1503
+ FT_BBox bbox;
1504
+ FT_Int left_bearing;
1505
+ FT_Int advance;
1506
+ FT_Int linear;
1507
+ FT_Bool linear_def;
1508
+ FT_Bool preserve_pps;
1509
+ FT_Vector pp1;
1510
+ FT_Vector pp2;
1511
+
1512
+ FT_ULong glyf_offset;
1513
+
1514
+ /* the zone where we load our glyphs */
1515
+ TT_GlyphZoneRec base;
1516
+ TT_GlyphZoneRec zone;
1517
+
1518
+ TT_ExecContext exec;
1519
+ FT_Byte* instructions;
1520
+ FT_ULong ins_pos;
1521
+
1522
+ /* for possible extensibility in other formats */
1523
+ void* other;
1524
+
1525
+ /* since version 2.1.8 */
1526
+ FT_Int top_bearing;
1527
+ FT_Int vadvance;
1528
+ FT_Vector pp3;
1529
+ FT_Vector pp4;
1530
+
1531
+ /* since version 2.2.1 */
1532
+ FT_Byte* cursor;
1533
+ FT_Byte* limit;
1534
+
1535
+ } TT_LoaderRec;
1536
+
1537
+
1538
+ FT_END_HEADER
1539
+
1540
+ #endif /* __TTTYPES_H__ */
1541
+
1542
+
1543
+ /* END */