pdf2json 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,139 @@
1
+ /***************************************************************************/
2
+ /* */
3
+ /* fttrace.h */
4
+ /* */
5
+ /* Tracing handling (specification only). */
6
+ /* */
7
+ /* Copyright 2002, 2004, 2005, 2006, 2007 by */
8
+ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9
+ /* */
10
+ /* This file is part of the FreeType project, and may only be used, */
11
+ /* modified, and distributed under the terms of the FreeType project */
12
+ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
13
+ /* this file you indicate that you have read the license and */
14
+ /* understand and accept it fully. */
15
+ /* */
16
+ /***************************************************************************/
17
+
18
+
19
+ /* definitions of trace levels for FreeType 2 */
20
+
21
+ /* the first level must always be `trace_any' */
22
+ FT_TRACE_DEF( any )
23
+
24
+ /* base components */
25
+ FT_TRACE_DEF( calc ) /* calculations (ftcalc.c) */
26
+ FT_TRACE_DEF( memory ) /* memory manager (ftobjs.c) */
27
+ FT_TRACE_DEF( stream ) /* stream manager (ftstream.c) */
28
+ FT_TRACE_DEF( io ) /* i/o interface (ftsystem.c) */
29
+ FT_TRACE_DEF( list ) /* list management (ftlist.c) */
30
+ FT_TRACE_DEF( init ) /* initialization (ftinit.c) */
31
+ FT_TRACE_DEF( objs ) /* base objects (ftobjs.c) */
32
+ FT_TRACE_DEF( outline ) /* outline management (ftoutln.c) */
33
+ FT_TRACE_DEF( glyph ) /* glyph management (ftglyph.c) */
34
+ FT_TRACE_DEF( gloader ) /* glyph loader (ftgloadr.c) */
35
+
36
+ FT_TRACE_DEF( raster ) /* monochrome rasterizer (ftraster.c) */
37
+ FT_TRACE_DEF( smooth ) /* anti-aliasing raster (ftgrays.c) */
38
+ FT_TRACE_DEF( mm ) /* MM interface (ftmm.c) */
39
+ FT_TRACE_DEF( raccess ) /* resource fork accessor (ftrfork.c) */
40
+ FT_TRACE_DEF( synth ) /* bold/slant synthesizer (ftsynth.c) */
41
+
42
+ /* Cache sub-system */
43
+ FT_TRACE_DEF( cache ) /* cache sub-system (ftcache.c, etc.) */
44
+
45
+ /* SFNT driver components */
46
+ FT_TRACE_DEF( sfdriver ) /* SFNT font driver (sfdriver.c) */
47
+ FT_TRACE_DEF( sfobjs ) /* SFNT object handler (sfobjs.c) */
48
+ FT_TRACE_DEF( ttcmap ) /* charmap handler (ttcmap.c) */
49
+ FT_TRACE_DEF( ttkern ) /* kerning handler (ttkern.c) */
50
+ FT_TRACE_DEF( ttload ) /* basic TrueType tables (ttload.c) */
51
+ FT_TRACE_DEF( ttmtx ) /* metrics-related tables (ttmtx.c) */
52
+ FT_TRACE_DEF( ttpost ) /* PS table processing (ttpost.c) */
53
+ FT_TRACE_DEF( ttsbit ) /* TrueType sbit handling (ttsbit.c) */
54
+ FT_TRACE_DEF( ttbdf ) /* TrueType embedded BDF (ttbdf.c) */
55
+
56
+ /* TrueType driver components */
57
+ FT_TRACE_DEF( ttdriver ) /* TT font driver (ttdriver.c) */
58
+ FT_TRACE_DEF( ttgload ) /* TT glyph loader (ttgload.c) */
59
+ FT_TRACE_DEF( ttinterp ) /* bytecode interpreter (ttinterp.c) */
60
+ FT_TRACE_DEF( ttobjs ) /* TT objects manager (ttobjs.c) */
61
+ FT_TRACE_DEF( ttpload ) /* TT data/program loader (ttpload.c) */
62
+ FT_TRACE_DEF( ttgxvar ) /* TrueType GX var handler (ttgxvar.c) */
63
+
64
+ /* Type 1 driver components */
65
+ FT_TRACE_DEF( t1afm )
66
+ FT_TRACE_DEF( t1driver )
67
+ FT_TRACE_DEF( t1gload )
68
+ FT_TRACE_DEF( t1hint )
69
+ FT_TRACE_DEF( t1load )
70
+ FT_TRACE_DEF( t1objs )
71
+ FT_TRACE_DEF( t1parse )
72
+
73
+ /* PostScript helper module `psaux' */
74
+ FT_TRACE_DEF( t1decode )
75
+ FT_TRACE_DEF( psobjs )
76
+
77
+ /* PostScript hinting module `pshinter' */
78
+ FT_TRACE_DEF( pshrec )
79
+ FT_TRACE_DEF( pshalgo1 )
80
+ FT_TRACE_DEF( pshalgo2 )
81
+
82
+ /* Type 2 driver components */
83
+ FT_TRACE_DEF( cffdriver )
84
+ FT_TRACE_DEF( cffgload )
85
+ FT_TRACE_DEF( cffload )
86
+ FT_TRACE_DEF( cffobjs )
87
+ FT_TRACE_DEF( cffparse )
88
+
89
+ /* Type 42 driver component */
90
+ FT_TRACE_DEF( t42 )
91
+
92
+ /* CID driver components */
93
+ FT_TRACE_DEF( cidafm )
94
+ FT_TRACE_DEF( ciddriver )
95
+ FT_TRACE_DEF( cidgload )
96
+ FT_TRACE_DEF( cidload )
97
+ FT_TRACE_DEF( cidobjs )
98
+ FT_TRACE_DEF( cidparse )
99
+
100
+ /* Windows font component */
101
+ FT_TRACE_DEF( winfnt )
102
+
103
+ /* PCF font components */
104
+ FT_TRACE_DEF( pcfdriver )
105
+ FT_TRACE_DEF( pcfread )
106
+
107
+ /* BDF font components */
108
+ FT_TRACE_DEF( bdfdriver )
109
+ FT_TRACE_DEF( bdflib )
110
+
111
+ /* PFR font component */
112
+ FT_TRACE_DEF( pfr )
113
+
114
+ /* OpenType validation components */
115
+ FT_TRACE_DEF( otvmodule )
116
+ FT_TRACE_DEF( otvcommon )
117
+ FT_TRACE_DEF( otvbase )
118
+ FT_TRACE_DEF( otvgdef )
119
+ FT_TRACE_DEF( otvgpos )
120
+ FT_TRACE_DEF( otvgsub )
121
+ FT_TRACE_DEF( otvjstf )
122
+ FT_TRACE_DEF( otvmath )
123
+
124
+ /* TrueTypeGX/AAT validation components */
125
+ FT_TRACE_DEF( gxvmodule )
126
+ FT_TRACE_DEF( gxvcommon )
127
+ FT_TRACE_DEF( gxvfeat )
128
+ FT_TRACE_DEF( gxvmort )
129
+ FT_TRACE_DEF( gxvmorx )
130
+ FT_TRACE_DEF( gxvbsln )
131
+ FT_TRACE_DEF( gxvjust )
132
+ FT_TRACE_DEF( gxvkern )
133
+ FT_TRACE_DEF( gxvopbd )
134
+ FT_TRACE_DEF( gxvtrak )
135
+ FT_TRACE_DEF( gxvprop )
136
+ FT_TRACE_DEF( gxvlcar )
137
+
138
+
139
+ /* END */
@@ -0,0 +1,150 @@
1
+ /***************************************************************************/
2
+ /* */
3
+ /* ftvalid.h */
4
+ /* */
5
+ /* FreeType validation support (specification). */
6
+ /* */
7
+ /* Copyright 2004 by */
8
+ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9
+ /* */
10
+ /* This file is part of the FreeType project, and may only be used, */
11
+ /* modified, and distributed under the terms of the FreeType project */
12
+ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
13
+ /* this file you indicate that you have read the license and */
14
+ /* understand and accept it fully. */
15
+ /* */
16
+ /***************************************************************************/
17
+
18
+
19
+ #ifndef __FTVALID_H__
20
+ #define __FTVALID_H__
21
+
22
+ #include <ft2build.h>
23
+ #include FT_CONFIG_STANDARD_LIBRARY_H /* for ft_setjmp and ft_longjmp */
24
+
25
+
26
+ FT_BEGIN_HEADER
27
+
28
+
29
+ /*************************************************************************/
30
+ /*************************************************************************/
31
+ /*************************************************************************/
32
+ /**** ****/
33
+ /**** ****/
34
+ /**** V A L I D A T I O N ****/
35
+ /**** ****/
36
+ /**** ****/
37
+ /*************************************************************************/
38
+ /*************************************************************************/
39
+ /*************************************************************************/
40
+
41
+ /* handle to a validation object */
42
+ typedef struct FT_ValidatorRec_ volatile* FT_Validator;
43
+
44
+
45
+ /*************************************************************************/
46
+ /* */
47
+ /* There are three distinct validation levels defined here: */
48
+ /* */
49
+ /* FT_VALIDATE_DEFAULT :: */
50
+ /* A table that passes this validation level can be used reliably by */
51
+ /* FreeType. It generally means that all offsets have been checked to */
52
+ /* prevent out-of-bound reads, that array counts are correct, etc. */
53
+ /* */
54
+ /* FT_VALIDATE_TIGHT :: */
55
+ /* A table that passes this validation level can be used reliably and */
56
+ /* doesn't contain invalid data. For example, a charmap table that */
57
+ /* returns invalid glyph indices will not pass, even though it can */
58
+ /* be used with FreeType in default mode (the library will simply */
59
+ /* return an error later when trying to load the glyph). */
60
+ /* */
61
+ /* It also checks that fields which must be a multiple of 2, 4, or 8, */
62
+ /* don't have incorrect values, etc. */
63
+ /* */
64
+ /* FT_VALIDATE_PARANOID :: */
65
+ /* Only for font debugging. Checks that a table follows the */
66
+ /* specification by 100%. Very few fonts will be able to pass this */
67
+ /* level anyway but it can be useful for certain tools like font */
68
+ /* editors/converters. */
69
+ /* */
70
+ typedef enum FT_ValidationLevel_
71
+ {
72
+ FT_VALIDATE_DEFAULT = 0,
73
+ FT_VALIDATE_TIGHT,
74
+ FT_VALIDATE_PARANOID
75
+
76
+ } FT_ValidationLevel;
77
+
78
+
79
+ /* validator structure */
80
+ typedef struct FT_ValidatorRec_
81
+ {
82
+ const FT_Byte* base; /* address of table in memory */
83
+ const FT_Byte* limit; /* `base' + sizeof(table) in memory */
84
+ FT_ValidationLevel level; /* validation level */
85
+ FT_Error error; /* error returned. 0 means success */
86
+
87
+ ft_jmp_buf jump_buffer; /* used for exception handling */
88
+
89
+ } FT_ValidatorRec;
90
+
91
+
92
+ #define FT_VALIDATOR( x ) ((FT_Validator)( x ))
93
+
94
+
95
+ FT_BASE( void )
96
+ ft_validator_init( FT_Validator valid,
97
+ const FT_Byte* base,
98
+ const FT_Byte* limit,
99
+ FT_ValidationLevel level );
100
+
101
+ /* Do not use this. It's broken and will cause your validator to crash */
102
+ /* if you run it on an invalid font. */
103
+ FT_BASE( FT_Int )
104
+ ft_validator_run( FT_Validator valid );
105
+
106
+ /* Sets the error field in a validator, then calls `longjmp' to return */
107
+ /* to high-level caller. Using `setjmp/longjmp' avoids many stupid */
108
+ /* error checks within the validation routines. */
109
+ /* */
110
+ FT_BASE( void )
111
+ ft_validator_error( FT_Validator valid,
112
+ FT_Error error );
113
+
114
+
115
+ /* Calls ft_validate_error. Assumes that the `valid' local variable */
116
+ /* holds a pointer to the current validator object. */
117
+ /* */
118
+ /* Use preprocessor prescan to pass FT_ERR_PREFIX. */
119
+ /* */
120
+ #define FT_INVALID( _prefix, _error ) FT_INVALID_( _prefix, _error )
121
+ #define FT_INVALID_( _prefix, _error ) \
122
+ ft_validator_error( valid, _prefix ## _error )
123
+
124
+ /* called when a broken table is detected */
125
+ #define FT_INVALID_TOO_SHORT \
126
+ FT_INVALID( FT_ERR_PREFIX, Invalid_Table )
127
+
128
+ /* called when an invalid offset is detected */
129
+ #define FT_INVALID_OFFSET \
130
+ FT_INVALID( FT_ERR_PREFIX, Invalid_Offset )
131
+
132
+ /* called when an invalid format/value is detected */
133
+ #define FT_INVALID_FORMAT \
134
+ FT_INVALID( FT_ERR_PREFIX, Invalid_Table )
135
+
136
+ /* called when an invalid glyph index is detected */
137
+ #define FT_INVALID_GLYPH_ID \
138
+ FT_INVALID( FT_ERR_PREFIX, Invalid_Glyph_Index )
139
+
140
+ /* called when an invalid field value is detected */
141
+ #define FT_INVALID_DATA \
142
+ FT_INVALID( FT_ERR_PREFIX, Invalid_Table )
143
+
144
+
145
+ FT_END_HEADER
146
+
147
+ #endif /* __FTVALID_H__ */
148
+
149
+
150
+ /* END */
@@ -0,0 +1,51 @@
1
+ /***************************************************************************/
2
+ /* */
3
+ /* internal.h */
4
+ /* */
5
+ /* Internal header files (specification only). */
6
+ /* */
7
+ /* Copyright 1996-2001, 2002, 2003, 2004 by */
8
+ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9
+ /* */
10
+ /* This file is part of the FreeType project, and may only be used, */
11
+ /* modified, and distributed under the terms of the FreeType project */
12
+ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
13
+ /* this file you indicate that you have read the license and */
14
+ /* understand and accept it fully. */
15
+ /* */
16
+ /***************************************************************************/
17
+
18
+
19
+ /*************************************************************************/
20
+ /* */
21
+ /* This file is automatically included by `ft2build.h'. */
22
+ /* Do not include it manually! */
23
+ /* */
24
+ /*************************************************************************/
25
+
26
+
27
+ #define FT_INTERNAL_OBJECTS_H <freetype/internal/ftobjs.h>
28
+ #define FT_INTERNAL_PIC_H <freetype/internal/ftpic.h>
29
+ #define FT_INTERNAL_STREAM_H <freetype/internal/ftstream.h>
30
+ #define FT_INTERNAL_MEMORY_H <freetype/internal/ftmemory.h>
31
+ #define FT_INTERNAL_DEBUG_H <freetype/internal/ftdebug.h>
32
+ #define FT_INTERNAL_CALC_H <freetype/internal/ftcalc.h>
33
+ #define FT_INTERNAL_DRIVER_H <freetype/internal/ftdriver.h>
34
+ #define FT_INTERNAL_TRACE_H <freetype/internal/fttrace.h>
35
+ #define FT_INTERNAL_GLYPH_LOADER_H <freetype/internal/ftgloadr.h>
36
+ #define FT_INTERNAL_SFNT_H <freetype/internal/sfnt.h>
37
+ #define FT_INTERNAL_SERVICE_H <freetype/internal/ftserv.h>
38
+ #define FT_INTERNAL_RFORK_H <freetype/internal/ftrfork.h>
39
+ #define FT_INTERNAL_VALIDATE_H <freetype/internal/ftvalid.h>
40
+
41
+ #define FT_INTERNAL_TRUETYPE_TYPES_H <freetype/internal/tttypes.h>
42
+ #define FT_INTERNAL_TYPE1_TYPES_H <freetype/internal/t1types.h>
43
+
44
+ #define FT_INTERNAL_POSTSCRIPT_AUX_H <freetype/internal/psaux.h>
45
+ #define FT_INTERNAL_POSTSCRIPT_HINTS_H <freetype/internal/pshints.h>
46
+ #define FT_INTERNAL_POSTSCRIPT_GLOBALS_H <freetype/internal/psglobal.h>
47
+
48
+ #define FT_INTERNAL_AUTOHINT_H <freetype/internal/autohint.h>
49
+
50
+
51
+ /* END */
@@ -0,0 +1,56 @@
1
+ /* pcftypes.h
2
+
3
+ FreeType font driver for pcf fonts
4
+
5
+ Copyright (C) 2000, 2001, 2002 by
6
+ Francesco Zappa Nardelli
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in
16
+ all copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+ THE SOFTWARE.
25
+ */
26
+
27
+
28
+ #ifndef __PCFTYPES_H__
29
+ #define __PCFTYPES_H__
30
+
31
+
32
+ #include <ft2build.h>
33
+ #include FT_FREETYPE_H
34
+
35
+
36
+ FT_BEGIN_HEADER
37
+
38
+
39
+ typedef struct PCF_Public_FaceRec_
40
+ {
41
+ FT_FaceRec root;
42
+ FT_StreamRec gzip_stream;
43
+ FT_Stream gzip_source;
44
+
45
+ char* charset_encoding;
46
+ char* charset_registry;
47
+
48
+ } PCF_Public_FaceRec, *PCF_Public_Face;
49
+
50
+
51
+ FT_END_HEADER
52
+
53
+ #endif /* __PCFTYPES_H__ */
54
+
55
+
56
+ /* END */
@@ -0,0 +1,873 @@
1
+ /***************************************************************************/
2
+ /* */
3
+ /* psaux.h */
4
+ /* */
5
+ /* Auxiliary functions and data structures related to PostScript fonts */
6
+ /* (specification). */
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 __PSAUX_H__
21
+ #define __PSAUX_H__
22
+
23
+
24
+ #include <ft2build.h>
25
+ #include FT_INTERNAL_OBJECTS_H
26
+ #include FT_INTERNAL_TYPE1_TYPES_H
27
+ #include FT_SERVICE_POSTSCRIPT_CMAPS_H
28
+
29
+
30
+ FT_BEGIN_HEADER
31
+
32
+
33
+ /*************************************************************************/
34
+ /*************************************************************************/
35
+ /***** *****/
36
+ /***** T1_TABLE *****/
37
+ /***** *****/
38
+ /*************************************************************************/
39
+ /*************************************************************************/
40
+
41
+
42
+ typedef struct PS_TableRec_* PS_Table;
43
+ typedef const struct PS_Table_FuncsRec_* PS_Table_Funcs;
44
+
45
+
46
+ /*************************************************************************/
47
+ /* */
48
+ /* <Struct> */
49
+ /* PS_Table_FuncsRec */
50
+ /* */
51
+ /* <Description> */
52
+ /* A set of function pointers to manage PS_Table objects. */
53
+ /* */
54
+ /* <Fields> */
55
+ /* table_init :: Used to initialize a table. */
56
+ /* */
57
+ /* table_done :: Finalizes resp. destroy a given table. */
58
+ /* */
59
+ /* table_add :: Adds a new object to a table. */
60
+ /* */
61
+ /* table_release :: Releases table data, then finalizes it. */
62
+ /* */
63
+ typedef struct PS_Table_FuncsRec_
64
+ {
65
+ FT_Error
66
+ (*init)( PS_Table table,
67
+ FT_Int count,
68
+ FT_Memory memory );
69
+
70
+ void
71
+ (*done)( PS_Table table );
72
+
73
+ FT_Error
74
+ (*add)( PS_Table table,
75
+ FT_Int idx,
76
+ void* object,
77
+ FT_PtrDist length );
78
+
79
+ void
80
+ (*release)( PS_Table table );
81
+
82
+ } PS_Table_FuncsRec;
83
+
84
+
85
+ /*************************************************************************/
86
+ /* */
87
+ /* <Struct> */
88
+ /* PS_TableRec */
89
+ /* */
90
+ /* <Description> */
91
+ /* A PS_Table is a simple object used to store an array of objects in */
92
+ /* a single memory block. */
93
+ /* */
94
+ /* <Fields> */
95
+ /* block :: The address in memory of the growheap's block. This */
96
+ /* can change between two object adds, due to */
97
+ /* reallocation. */
98
+ /* */
99
+ /* cursor :: The current top of the grow heap within its block. */
100
+ /* */
101
+ /* capacity :: The current size of the heap block. Increments by */
102
+ /* 1kByte chunks. */
103
+ /* */
104
+ /* max_elems :: The maximum number of elements in table. */
105
+ /* */
106
+ /* num_elems :: The current number of elements in table. */
107
+ /* */
108
+ /* elements :: A table of element addresses within the block. */
109
+ /* */
110
+ /* lengths :: A table of element sizes within the block. */
111
+ /* */
112
+ /* memory :: The object used for memory operations */
113
+ /* (alloc/realloc). */
114
+ /* */
115
+ /* funcs :: A table of method pointers for this object. */
116
+ /* */
117
+ typedef struct PS_TableRec_
118
+ {
119
+ FT_Byte* block; /* current memory block */
120
+ FT_Offset cursor; /* current cursor in memory block */
121
+ FT_Offset capacity; /* current size of memory block */
122
+ FT_Long init;
123
+
124
+ FT_Int max_elems;
125
+ FT_Int num_elems;
126
+ FT_Byte** elements; /* addresses of table elements */
127
+ FT_PtrDist* lengths; /* lengths of table elements */
128
+
129
+ FT_Memory memory;
130
+ PS_Table_FuncsRec funcs;
131
+
132
+ } PS_TableRec;
133
+
134
+
135
+ /*************************************************************************/
136
+ /*************************************************************************/
137
+ /***** *****/
138
+ /***** T1 FIELDS & TOKENS *****/
139
+ /***** *****/
140
+ /*************************************************************************/
141
+ /*************************************************************************/
142
+
143
+ typedef struct PS_ParserRec_* PS_Parser;
144
+
145
+ typedef struct T1_TokenRec_* T1_Token;
146
+
147
+ typedef struct T1_FieldRec_* T1_Field;
148
+
149
+
150
+ /* simple enumeration type used to identify token types */
151
+ typedef enum T1_TokenType_
152
+ {
153
+ T1_TOKEN_TYPE_NONE = 0,
154
+ T1_TOKEN_TYPE_ANY,
155
+ T1_TOKEN_TYPE_STRING,
156
+ T1_TOKEN_TYPE_ARRAY,
157
+ T1_TOKEN_TYPE_KEY, /* aka `name' */
158
+
159
+ /* do not remove */
160
+ T1_TOKEN_TYPE_MAX
161
+
162
+ } T1_TokenType;
163
+
164
+
165
+ /* a simple structure used to identify tokens */
166
+ typedef struct T1_TokenRec_
167
+ {
168
+ FT_Byte* start; /* first character of token in input stream */
169
+ FT_Byte* limit; /* first character after the token */
170
+ T1_TokenType type; /* type of token */
171
+
172
+ } T1_TokenRec;
173
+
174
+
175
+ /* enumeration type used to identify object fields */
176
+ typedef enum T1_FieldType_
177
+ {
178
+ T1_FIELD_TYPE_NONE = 0,
179
+ T1_FIELD_TYPE_BOOL,
180
+ T1_FIELD_TYPE_INTEGER,
181
+ T1_FIELD_TYPE_FIXED,
182
+ T1_FIELD_TYPE_FIXED_1000,
183
+ T1_FIELD_TYPE_STRING,
184
+ T1_FIELD_TYPE_KEY,
185
+ T1_FIELD_TYPE_BBOX,
186
+ T1_FIELD_TYPE_INTEGER_ARRAY,
187
+ T1_FIELD_TYPE_FIXED_ARRAY,
188
+ T1_FIELD_TYPE_CALLBACK,
189
+
190
+ /* do not remove */
191
+ T1_FIELD_TYPE_MAX
192
+
193
+ } T1_FieldType;
194
+
195
+
196
+ typedef enum T1_FieldLocation_
197
+ {
198
+ T1_FIELD_LOCATION_CID_INFO,
199
+ T1_FIELD_LOCATION_FONT_DICT,
200
+ T1_FIELD_LOCATION_FONT_EXTRA,
201
+ T1_FIELD_LOCATION_FONT_INFO,
202
+ T1_FIELD_LOCATION_PRIVATE,
203
+ T1_FIELD_LOCATION_BBOX,
204
+ T1_FIELD_LOCATION_LOADER,
205
+ T1_FIELD_LOCATION_FACE,
206
+ T1_FIELD_LOCATION_BLEND,
207
+
208
+ /* do not remove */
209
+ T1_FIELD_LOCATION_MAX
210
+
211
+ } T1_FieldLocation;
212
+
213
+
214
+ typedef void
215
+ (*T1_Field_ParseFunc)( FT_Face face,
216
+ FT_Pointer parser );
217
+
218
+
219
+ /* structure type used to model object fields */
220
+ typedef struct T1_FieldRec_
221
+ {
222
+ const char* ident; /* field identifier */
223
+ T1_FieldLocation location;
224
+ T1_FieldType type; /* type of field */
225
+ T1_Field_ParseFunc reader;
226
+ FT_UInt offset; /* offset of field in object */
227
+ FT_Byte size; /* size of field in bytes */
228
+ FT_UInt array_max; /* maximal number of elements for */
229
+ /* array */
230
+ FT_UInt count_offset; /* offset of element count for */
231
+ /* arrays; must not be zero if in */
232
+ /* use -- in other words, a */
233
+ /* `num_FOO' element must not */
234
+ /* start the used structure if we */
235
+ /* parse a `FOO' array */
236
+ FT_UInt dict; /* where we expect it */
237
+ } T1_FieldRec;
238
+
239
+ #define T1_FIELD_DICT_FONTDICT ( 1 << 0 ) /* also FontInfo and FDArray */
240
+ #define T1_FIELD_DICT_PRIVATE ( 1 << 1 )
241
+
242
+
243
+
244
+ #define T1_NEW_SIMPLE_FIELD( _ident, _type, _fname, _dict ) \
245
+ { \
246
+ _ident, T1CODE, _type, \
247
+ 0, \
248
+ FT_FIELD_OFFSET( _fname ), \
249
+ FT_FIELD_SIZE( _fname ), \
250
+ 0, 0, \
251
+ _dict \
252
+ },
253
+
254
+ #define T1_NEW_CALLBACK_FIELD( _ident, _reader, _dict ) \
255
+ { \
256
+ _ident, T1CODE, T1_FIELD_TYPE_CALLBACK, \
257
+ (T1_Field_ParseFunc)_reader, \
258
+ 0, 0, \
259
+ 0, 0, \
260
+ _dict \
261
+ },
262
+
263
+ #define T1_NEW_TABLE_FIELD( _ident, _type, _fname, _max, _dict ) \
264
+ { \
265
+ _ident, T1CODE, _type, \
266
+ 0, \
267
+ FT_FIELD_OFFSET( _fname ), \
268
+ FT_FIELD_SIZE_DELTA( _fname ), \
269
+ _max, \
270
+ FT_FIELD_OFFSET( num_ ## _fname ), \
271
+ _dict \
272
+ },
273
+
274
+ #define T1_NEW_TABLE_FIELD2( _ident, _type, _fname, _max, _dict ) \
275
+ { \
276
+ _ident, T1CODE, _type, \
277
+ 0, \
278
+ FT_FIELD_OFFSET( _fname ), \
279
+ FT_FIELD_SIZE_DELTA( _fname ), \
280
+ _max, 0, \
281
+ _dict \
282
+ },
283
+
284
+
285
+ #define T1_FIELD_BOOL( _ident, _fname, _dict ) \
286
+ T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BOOL, _fname, _dict )
287
+
288
+ #define T1_FIELD_NUM( _ident, _fname, _dict ) \
289
+ T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER, _fname, _dict )
290
+
291
+ #define T1_FIELD_FIXED( _ident, _fname, _dict ) \
292
+ T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED, _fname, _dict )
293
+
294
+ #define T1_FIELD_FIXED_1000( _ident, _fname, _dict ) \
295
+ T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_1000, _fname, \
296
+ _dict )
297
+
298
+ #define T1_FIELD_STRING( _ident, _fname, _dict ) \
299
+ T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_STRING, _fname, _dict )
300
+
301
+ #define T1_FIELD_KEY( _ident, _fname, _dict ) \
302
+ T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_KEY, _fname, _dict )
303
+
304
+ #define T1_FIELD_BBOX( _ident, _fname, _dict ) \
305
+ T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BBOX, _fname, _dict )
306
+
307
+
308
+ #define T1_FIELD_NUM_TABLE( _ident, _fname, _fmax, _dict ) \
309
+ T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \
310
+ _fname, _fmax, _dict )
311
+
312
+ #define T1_FIELD_FIXED_TABLE( _ident, _fname, _fmax, _dict ) \
313
+ T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \
314
+ _fname, _fmax, _dict )
315
+
316
+ #define T1_FIELD_NUM_TABLE2( _ident, _fname, _fmax, _dict ) \
317
+ T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \
318
+ _fname, _fmax, _dict )
319
+
320
+ #define T1_FIELD_FIXED_TABLE2( _ident, _fname, _fmax, _dict ) \
321
+ T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \
322
+ _fname, _fmax, _dict )
323
+
324
+ #define T1_FIELD_CALLBACK( _ident, _name, _dict ) \
325
+ T1_NEW_CALLBACK_FIELD( _ident, _name, _dict )
326
+
327
+
328
+ /*************************************************************************/
329
+ /*************************************************************************/
330
+ /***** *****/
331
+ /***** T1 PARSER *****/
332
+ /***** *****/
333
+ /*************************************************************************/
334
+ /*************************************************************************/
335
+
336
+ typedef const struct PS_Parser_FuncsRec_* PS_Parser_Funcs;
337
+
338
+ typedef struct PS_Parser_FuncsRec_
339
+ {
340
+ void
341
+ (*init)( PS_Parser parser,
342
+ FT_Byte* base,
343
+ FT_Byte* limit,
344
+ FT_Memory memory );
345
+
346
+ void
347
+ (*done)( PS_Parser parser );
348
+
349
+ void
350
+ (*skip_spaces)( PS_Parser parser );
351
+ void
352
+ (*skip_PS_token)( PS_Parser parser );
353
+
354
+ FT_Long
355
+ (*to_int)( PS_Parser parser );
356
+ FT_Fixed
357
+ (*to_fixed)( PS_Parser parser,
358
+ FT_Int power_ten );
359
+
360
+ FT_Error
361
+ (*to_bytes)( PS_Parser parser,
362
+ FT_Byte* bytes,
363
+ FT_Offset max_bytes,
364
+ FT_Long* pnum_bytes,
365
+ FT_Bool delimiters );
366
+
367
+ FT_Int
368
+ (*to_coord_array)( PS_Parser parser,
369
+ FT_Int max_coords,
370
+ FT_Short* coords );
371
+ FT_Int
372
+ (*to_fixed_array)( PS_Parser parser,
373
+ FT_Int max_values,
374
+ FT_Fixed* values,
375
+ FT_Int power_ten );
376
+
377
+ void
378
+ (*to_token)( PS_Parser parser,
379
+ T1_Token token );
380
+ void
381
+ (*to_token_array)( PS_Parser parser,
382
+ T1_Token tokens,
383
+ FT_UInt max_tokens,
384
+ FT_Int* pnum_tokens );
385
+
386
+ FT_Error
387
+ (*load_field)( PS_Parser parser,
388
+ const T1_Field field,
389
+ void** objects,
390
+ FT_UInt max_objects,
391
+ FT_ULong* pflags );
392
+
393
+ FT_Error
394
+ (*load_field_table)( PS_Parser parser,
395
+ const T1_Field field,
396
+ void** objects,
397
+ FT_UInt max_objects,
398
+ FT_ULong* pflags );
399
+
400
+ } PS_Parser_FuncsRec;
401
+
402
+
403
+ /*************************************************************************/
404
+ /* */
405
+ /* <Struct> */
406
+ /* PS_ParserRec */
407
+ /* */
408
+ /* <Description> */
409
+ /* A PS_Parser is an object used to parse a Type 1 font very quickly. */
410
+ /* */
411
+ /* <Fields> */
412
+ /* cursor :: The current position in the text. */
413
+ /* */
414
+ /* base :: Start of the processed text. */
415
+ /* */
416
+ /* limit :: End of the processed text. */
417
+ /* */
418
+ /* error :: The last error returned. */
419
+ /* */
420
+ /* memory :: The object used for memory operations (alloc/realloc). */
421
+ /* */
422
+ /* funcs :: A table of functions for the parser. */
423
+ /* */
424
+ typedef struct PS_ParserRec_
425
+ {
426
+ FT_Byte* cursor;
427
+ FT_Byte* base;
428
+ FT_Byte* limit;
429
+ FT_Error error;
430
+ FT_Memory memory;
431
+
432
+ PS_Parser_FuncsRec funcs;
433
+
434
+ } PS_ParserRec;
435
+
436
+
437
+ /*************************************************************************/
438
+ /*************************************************************************/
439
+ /***** *****/
440
+ /***** T1 BUILDER *****/
441
+ /***** *****/
442
+ /*************************************************************************/
443
+ /*************************************************************************/
444
+
445
+
446
+ typedef struct T1_BuilderRec_* T1_Builder;
447
+
448
+
449
+ typedef FT_Error
450
+ (*T1_Builder_Check_Points_Func)( T1_Builder builder,
451
+ FT_Int count );
452
+
453
+ typedef void
454
+ (*T1_Builder_Add_Point_Func)( T1_Builder builder,
455
+ FT_Pos x,
456
+ FT_Pos y,
457
+ FT_Byte flag );
458
+
459
+ typedef FT_Error
460
+ (*T1_Builder_Add_Point1_Func)( T1_Builder builder,
461
+ FT_Pos x,
462
+ FT_Pos y );
463
+
464
+ typedef FT_Error
465
+ (*T1_Builder_Add_Contour_Func)( T1_Builder builder );
466
+
467
+ typedef FT_Error
468
+ (*T1_Builder_Start_Point_Func)( T1_Builder builder,
469
+ FT_Pos x,
470
+ FT_Pos y );
471
+
472
+ typedef void
473
+ (*T1_Builder_Close_Contour_Func)( T1_Builder builder );
474
+
475
+
476
+ typedef const struct T1_Builder_FuncsRec_* T1_Builder_Funcs;
477
+
478
+ typedef struct T1_Builder_FuncsRec_
479
+ {
480
+ void
481
+ (*init)( T1_Builder builder,
482
+ FT_Face face,
483
+ FT_Size size,
484
+ FT_GlyphSlot slot,
485
+ FT_Bool hinting );
486
+
487
+ void
488
+ (*done)( T1_Builder builder );
489
+
490
+ T1_Builder_Check_Points_Func check_points;
491
+ T1_Builder_Add_Point_Func add_point;
492
+ T1_Builder_Add_Point1_Func add_point1;
493
+ T1_Builder_Add_Contour_Func add_contour;
494
+ T1_Builder_Start_Point_Func start_point;
495
+ T1_Builder_Close_Contour_Func close_contour;
496
+
497
+ } T1_Builder_FuncsRec;
498
+
499
+
500
+ /* an enumeration type to handle charstring parsing states */
501
+ typedef enum T1_ParseState_
502
+ {
503
+ T1_Parse_Start,
504
+ T1_Parse_Have_Width,
505
+ T1_Parse_Have_Moveto,
506
+ T1_Parse_Have_Path
507
+
508
+ } T1_ParseState;
509
+
510
+
511
+ /*************************************************************************/
512
+ /* */
513
+ /* <Structure> */
514
+ /* T1_BuilderRec */
515
+ /* */
516
+ /* <Description> */
517
+ /* A structure used during glyph loading to store its outline. */
518
+ /* */
519
+ /* <Fields> */
520
+ /* memory :: The current memory object. */
521
+ /* */
522
+ /* face :: The current face object. */
523
+ /* */
524
+ /* glyph :: The current glyph slot. */
525
+ /* */
526
+ /* loader :: XXX */
527
+ /* */
528
+ /* base :: The base glyph outline. */
529
+ /* */
530
+ /* current :: The current glyph outline. */
531
+ /* */
532
+ /* max_points :: maximum points in builder outline */
533
+ /* */
534
+ /* max_contours :: Maximal number of contours in builder outline. */
535
+ /* */
536
+ /* pos_x :: The horizontal translation (if composite glyph). */
537
+ /* */
538
+ /* pos_y :: The vertical translation (if composite glyph). */
539
+ /* */
540
+ /* left_bearing :: The left side bearing point. */
541
+ /* */
542
+ /* advance :: The horizontal advance vector. */
543
+ /* */
544
+ /* bbox :: Unused. */
545
+ /* */
546
+ /* parse_state :: An enumeration which controls the charstring */
547
+ /* parsing state. */
548
+ /* */
549
+ /* load_points :: If this flag is not set, no points are loaded. */
550
+ /* */
551
+ /* no_recurse :: Set but not used. */
552
+ /* */
553
+ /* metrics_only :: A boolean indicating that we only want to compute */
554
+ /* the metrics of a given glyph, not load all of its */
555
+ /* points. */
556
+ /* */
557
+ /* funcs :: An array of function pointers for the builder. */
558
+ /* */
559
+ typedef struct T1_BuilderRec_
560
+ {
561
+ FT_Memory memory;
562
+ FT_Face face;
563
+ FT_GlyphSlot glyph;
564
+ FT_GlyphLoader loader;
565
+ FT_Outline* base;
566
+ FT_Outline* current;
567
+
568
+ FT_Pos pos_x;
569
+ FT_Pos pos_y;
570
+
571
+ FT_Vector left_bearing;
572
+ FT_Vector advance;
573
+
574
+ FT_BBox bbox; /* bounding box */
575
+ T1_ParseState parse_state;
576
+ FT_Bool load_points;
577
+ FT_Bool no_recurse;
578
+
579
+ FT_Bool metrics_only;
580
+
581
+ void* hints_funcs; /* hinter-specific */
582
+ void* hints_globals; /* hinter-specific */
583
+
584
+ T1_Builder_FuncsRec funcs;
585
+
586
+ } T1_BuilderRec;
587
+
588
+
589
+ /*************************************************************************/
590
+ /*************************************************************************/
591
+ /***** *****/
592
+ /***** T1 DECODER *****/
593
+ /***** *****/
594
+ /*************************************************************************/
595
+ /*************************************************************************/
596
+
597
+ #if 0
598
+
599
+ /*************************************************************************/
600
+ /* */
601
+ /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */
602
+ /* calls during glyph loading. */
603
+ /* */
604
+ #define T1_MAX_SUBRS_CALLS 8
605
+
606
+
607
+ /*************************************************************************/
608
+ /* */
609
+ /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A */
610
+ /* minimum of 16 is required. */
611
+ /* */
612
+ #define T1_MAX_CHARSTRINGS_OPERANDS 32
613
+
614
+ #endif /* 0 */
615
+
616
+
617
+ typedef struct T1_Decoder_ZoneRec_
618
+ {
619
+ FT_Byte* cursor;
620
+ FT_Byte* base;
621
+ FT_Byte* limit;
622
+
623
+ } T1_Decoder_ZoneRec, *T1_Decoder_Zone;
624
+
625
+
626
+ typedef struct T1_DecoderRec_* T1_Decoder;
627
+ typedef const struct T1_Decoder_FuncsRec_* T1_Decoder_Funcs;
628
+
629
+
630
+ typedef FT_Error
631
+ (*T1_Decoder_Callback)( T1_Decoder decoder,
632
+ FT_UInt glyph_index );
633
+
634
+
635
+ typedef struct T1_Decoder_FuncsRec_
636
+ {
637
+ FT_Error
638
+ (*init)( T1_Decoder decoder,
639
+ FT_Face face,
640
+ FT_Size size,
641
+ FT_GlyphSlot slot,
642
+ FT_Byte** glyph_names,
643
+ PS_Blend blend,
644
+ FT_Bool hinting,
645
+ FT_Render_Mode hint_mode,
646
+ T1_Decoder_Callback callback );
647
+
648
+ void
649
+ (*done)( T1_Decoder decoder );
650
+
651
+ FT_Error
652
+ (*parse_charstrings)( T1_Decoder decoder,
653
+ FT_Byte* base,
654
+ FT_UInt len );
655
+
656
+ } T1_Decoder_FuncsRec;
657
+
658
+
659
+ typedef struct T1_DecoderRec_
660
+ {
661
+ T1_BuilderRec builder;
662
+
663
+ FT_Long stack[T1_MAX_CHARSTRINGS_OPERANDS];
664
+ FT_Long* top;
665
+
666
+ T1_Decoder_ZoneRec zones[T1_MAX_SUBRS_CALLS + 1];
667
+ T1_Decoder_Zone zone;
668
+
669
+ FT_Service_PsCMaps psnames; /* for seac */
670
+ FT_UInt num_glyphs;
671
+ FT_Byte** glyph_names;
672
+
673
+ FT_Int lenIV; /* internal for sub routine calls */
674
+ FT_UInt num_subrs;
675
+ FT_Byte** subrs;
676
+ FT_PtrDist* subrs_len; /* array of subrs length (optional) */
677
+
678
+ FT_Matrix font_matrix;
679
+ FT_Vector font_offset;
680
+
681
+ FT_Int flex_state;
682
+ FT_Int num_flex_vectors;
683
+ FT_Vector flex_vectors[7];
684
+
685
+ PS_Blend blend; /* for multiple master support */
686
+
687
+ FT_Render_Mode hint_mode;
688
+
689
+ T1_Decoder_Callback parse_callback;
690
+ T1_Decoder_FuncsRec funcs;
691
+
692
+ FT_Long* buildchar;
693
+ FT_UInt len_buildchar;
694
+
695
+ FT_Bool seac;
696
+
697
+ } T1_DecoderRec;
698
+
699
+
700
+ /*************************************************************************/
701
+ /*************************************************************************/
702
+ /***** *****/
703
+ /***** AFM PARSER *****/
704
+ /***** *****/
705
+ /*************************************************************************/
706
+ /*************************************************************************/
707
+
708
+ typedef struct AFM_ParserRec_* AFM_Parser;
709
+
710
+ typedef struct AFM_Parser_FuncsRec_
711
+ {
712
+ FT_Error
713
+ (*init)( AFM_Parser parser,
714
+ FT_Memory memory,
715
+ FT_Byte* base,
716
+ FT_Byte* limit );
717
+
718
+ void
719
+ (*done)( AFM_Parser parser );
720
+
721
+ FT_Error
722
+ (*parse)( AFM_Parser parser );
723
+
724
+ } AFM_Parser_FuncsRec;
725
+
726
+
727
+ typedef struct AFM_StreamRec_* AFM_Stream;
728
+
729
+
730
+ /*************************************************************************/
731
+ /* */
732
+ /* <Struct> */
733
+ /* AFM_ParserRec */
734
+ /* */
735
+ /* <Description> */
736
+ /* An AFM_Parser is a parser for the AFM files. */
737
+ /* */
738
+ /* <Fields> */
739
+ /* memory :: The object used for memory operations (alloc and */
740
+ /* realloc). */
741
+ /* */
742
+ /* stream :: This is an opaque object. */
743
+ /* */
744
+ /* FontInfo :: The result will be stored here. */
745
+ /* */
746
+ /* get_index :: A user provided function to get a glyph index by its */
747
+ /* name. */
748
+ /* */
749
+ typedef struct AFM_ParserRec_
750
+ {
751
+ FT_Memory memory;
752
+ AFM_Stream stream;
753
+
754
+ AFM_FontInfo FontInfo;
755
+
756
+ FT_Int
757
+ (*get_index)( const char* name,
758
+ FT_Offset len,
759
+ void* user_data );
760
+
761
+ void* user_data;
762
+
763
+ } AFM_ParserRec;
764
+
765
+
766
+ /*************************************************************************/
767
+ /*************************************************************************/
768
+ /***** *****/
769
+ /***** TYPE1 CHARMAPS *****/
770
+ /***** *****/
771
+ /*************************************************************************/
772
+ /*************************************************************************/
773
+
774
+ typedef const struct T1_CMap_ClassesRec_* T1_CMap_Classes;
775
+
776
+ typedef struct T1_CMap_ClassesRec_
777
+ {
778
+ FT_CMap_Class standard;
779
+ FT_CMap_Class expert;
780
+ FT_CMap_Class custom;
781
+ FT_CMap_Class unicode;
782
+
783
+ } T1_CMap_ClassesRec;
784
+
785
+
786
+ /*************************************************************************/
787
+ /*************************************************************************/
788
+ /***** *****/
789
+ /***** PSAux Module Interface *****/
790
+ /***** *****/
791
+ /*************************************************************************/
792
+ /*************************************************************************/
793
+
794
+ typedef struct PSAux_ServiceRec_
795
+ {
796
+ /* don't use `PS_Table_Funcs' and friends to avoid compiler warnings */
797
+ const PS_Table_FuncsRec* ps_table_funcs;
798
+ const PS_Parser_FuncsRec* ps_parser_funcs;
799
+ const T1_Builder_FuncsRec* t1_builder_funcs;
800
+ const T1_Decoder_FuncsRec* t1_decoder_funcs;
801
+
802
+ void
803
+ (*t1_decrypt)( FT_Byte* buffer,
804
+ FT_Offset length,
805
+ FT_UShort seed );
806
+
807
+ T1_CMap_Classes t1_cmap_classes;
808
+
809
+ /* fields after this comment line were added after version 2.1.10 */
810
+ const AFM_Parser_FuncsRec* afm_parser_funcs;
811
+
812
+ } PSAux_ServiceRec, *PSAux_Service;
813
+
814
+ /* backwards-compatible type definition */
815
+ typedef PSAux_ServiceRec PSAux_Interface;
816
+
817
+
818
+ /*************************************************************************/
819
+ /*************************************************************************/
820
+ /***** *****/
821
+ /***** Some convenience functions *****/
822
+ /***** *****/
823
+ /*************************************************************************/
824
+ /*************************************************************************/
825
+
826
+ #define IS_PS_NEWLINE( ch ) \
827
+ ( (ch) == '\r' || \
828
+ (ch) == '\n' )
829
+
830
+ #define IS_PS_SPACE( ch ) \
831
+ ( (ch) == ' ' || \
832
+ IS_PS_NEWLINE( ch ) || \
833
+ (ch) == '\t' || \
834
+ (ch) == '\f' || \
835
+ (ch) == '\0' )
836
+
837
+ #define IS_PS_SPECIAL( ch ) \
838
+ ( (ch) == '/' || \
839
+ (ch) == '(' || (ch) == ')' || \
840
+ (ch) == '<' || (ch) == '>' || \
841
+ (ch) == '[' || (ch) == ']' || \
842
+ (ch) == '{' || (ch) == '}' || \
843
+ (ch) == '%' )
844
+
845
+ #define IS_PS_DELIM( ch ) \
846
+ ( IS_PS_SPACE( ch ) || \
847
+ IS_PS_SPECIAL( ch ) )
848
+
849
+ #define IS_PS_DIGIT( ch ) \
850
+ ( (ch) >= '0' && (ch) <= '9' )
851
+
852
+ #define IS_PS_XDIGIT( ch ) \
853
+ ( IS_PS_DIGIT( ch ) || \
854
+ ( (ch) >= 'A' && (ch) <= 'F' ) || \
855
+ ( (ch) >= 'a' && (ch) <= 'f' ) )
856
+
857
+ #define IS_PS_BASE85( ch ) \
858
+ ( (ch) >= '!' && (ch) <= 'u' )
859
+
860
+ #define IS_PS_TOKEN( cur, limit, token ) \
861
+ ( (char)(cur)[0] == (token)[0] && \
862
+ ( (cur) + sizeof ( (token) ) == (limit) || \
863
+ ( (cur) + sizeof( (token) ) < (limit) && \
864
+ IS_PS_DELIM( (cur)[sizeof ( (token) ) - 1] ) ) ) && \
865
+ ft_strncmp( (char*)(cur), (token), sizeof ( (token) ) - 1 ) == 0 )
866
+
867
+
868
+ FT_END_HEADER
869
+
870
+ #endif /* __PSAUX_H__ */
871
+
872
+
873
+ /* END */