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,102 @@
1
+ /***************************************************************************/
2
+ /* */
3
+ /* svsfnt.h */
4
+ /* */
5
+ /* The FreeType SFNT table loading service (specification). */
6
+ /* */
7
+ /* Copyright 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
+ #ifndef __SVSFNT_H__
20
+ #define __SVSFNT_H__
21
+
22
+ #include FT_INTERNAL_SERVICE_H
23
+ #include FT_TRUETYPE_TABLES_H
24
+
25
+
26
+ FT_BEGIN_HEADER
27
+
28
+
29
+ /*
30
+ * SFNT table loading service.
31
+ */
32
+
33
+ #define FT_SERVICE_ID_SFNT_TABLE "sfnt-table"
34
+
35
+
36
+ /*
37
+ * Used to implement FT_Load_Sfnt_Table().
38
+ */
39
+ typedef FT_Error
40
+ (*FT_SFNT_TableLoadFunc)( FT_Face face,
41
+ FT_ULong tag,
42
+ FT_Long offset,
43
+ FT_Byte* buffer,
44
+ FT_ULong* length );
45
+
46
+ /*
47
+ * Used to implement FT_Get_Sfnt_Table().
48
+ */
49
+ typedef void*
50
+ (*FT_SFNT_TableGetFunc)( FT_Face face,
51
+ FT_Sfnt_Tag tag );
52
+
53
+
54
+ /*
55
+ * Used to implement FT_Sfnt_Table_Info().
56
+ */
57
+ typedef FT_Error
58
+ (*FT_SFNT_TableInfoFunc)( FT_Face face,
59
+ FT_UInt idx,
60
+ FT_ULong *tag,
61
+ FT_ULong *offset,
62
+ FT_ULong *length );
63
+
64
+
65
+ FT_DEFINE_SERVICE( SFNT_Table )
66
+ {
67
+ FT_SFNT_TableLoadFunc load_table;
68
+ FT_SFNT_TableGetFunc get_table;
69
+ FT_SFNT_TableInfoFunc table_info;
70
+ };
71
+
72
+ #ifndef FT_CONFIG_OPTION_PIC
73
+
74
+ #define FT_DEFINE_SERVICE_SFNT_TABLEREC(class_, load_, get_, info_) \
75
+ static const FT_Service_SFNT_TableRec class_ = \
76
+ { \
77
+ load_, get_, info_ \
78
+ };
79
+
80
+ #else /* FT_CONFIG_OPTION_PIC */
81
+
82
+ #define FT_DEFINE_SERVICE_SFNT_TABLEREC(class_, load_, get_, info_) \
83
+ void \
84
+ FT_Init_Class_##class_( FT_Service_SFNT_TableRec* clazz ) \
85
+ { \
86
+ clazz->load_table = load_; \
87
+ clazz->get_table = get_; \
88
+ clazz->table_info = info_; \
89
+ }
90
+
91
+ #endif /* FT_CONFIG_OPTION_PIC */
92
+
93
+ /* */
94
+
95
+
96
+ FT_END_HEADER
97
+
98
+
99
+ #endif /* __SVSFNT_H__ */
100
+
101
+
102
+ /* END */
@@ -0,0 +1,106 @@
1
+ /***************************************************************************/
2
+ /* */
3
+ /* svttcmap.h */
4
+ /* */
5
+ /* The FreeType TrueType/sfnt cmap extra information service. */
6
+ /* */
7
+ /* Copyright 2003 by */
8
+ /* Masatake YAMATO, Redhat K.K. */
9
+ /* */
10
+ /* Copyright 2003, 2008 by */
11
+ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
12
+ /* */
13
+ /* This file is part of the FreeType project, and may only be used, */
14
+ /* modified, and distributed under the terms of the FreeType project */
15
+ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
16
+ /* this file you indicate that you have read the license and */
17
+ /* understand and accept it fully. */
18
+ /* */
19
+ /***************************************************************************/
20
+
21
+ /* Development of this service is support of
22
+ Information-technology Promotion Agency, Japan. */
23
+
24
+ #ifndef __SVTTCMAP_H__
25
+ #define __SVTTCMAP_H__
26
+
27
+ #include FT_INTERNAL_SERVICE_H
28
+ #include FT_TRUETYPE_TABLES_H
29
+
30
+
31
+ FT_BEGIN_HEADER
32
+
33
+
34
+ #define FT_SERVICE_ID_TT_CMAP "tt-cmaps"
35
+
36
+
37
+ /*************************************************************************/
38
+ /* */
39
+ /* <Struct> */
40
+ /* TT_CMapInfo */
41
+ /* */
42
+ /* <Description> */
43
+ /* A structure used to store TrueType/sfnt specific cmap information */
44
+ /* which is not covered by the generic @FT_CharMap structure. This */
45
+ /* structure can be accessed with the @FT_Get_TT_CMap_Info function. */
46
+ /* */
47
+ /* <Fields> */
48
+ /* language :: */
49
+ /* The language ID used in Mac fonts. Definitions of values are in */
50
+ /* freetype/ttnameid.h. */
51
+ /* */
52
+ /* format :: */
53
+ /* The cmap format. OpenType 1.5 defines the formats 0 (byte */
54
+ /* encoding table), 2~(high-byte mapping through table), 4~(segment */
55
+ /* mapping to delta values), 6~(trimmed table mapping), 8~(mixed */
56
+ /* 16-bit and 32-bit coverage), 10~(trimmed array), 12~(segmented */
57
+ /* coverage), and 14 (Unicode Variation Sequences). */
58
+ /* */
59
+ typedef struct TT_CMapInfo_
60
+ {
61
+ FT_ULong language;
62
+ FT_Long format;
63
+
64
+ } TT_CMapInfo;
65
+
66
+
67
+ typedef FT_Error
68
+ (*TT_CMap_Info_GetFunc)( FT_CharMap charmap,
69
+ TT_CMapInfo *cmap_info );
70
+
71
+
72
+ FT_DEFINE_SERVICE( TTCMaps )
73
+ {
74
+ TT_CMap_Info_GetFunc get_cmap_info;
75
+ };
76
+
77
+ #ifndef FT_CONFIG_OPTION_PIC
78
+
79
+ #define FT_DEFINE_SERVICE_TTCMAPSREC(class_, get_cmap_info_) \
80
+ static const FT_Service_TTCMapsRec class_ = \
81
+ { \
82
+ get_cmap_info_ \
83
+ };
84
+
85
+ #else /* FT_CONFIG_OPTION_PIC */
86
+
87
+ #define FT_DEFINE_SERVICE_TTCMAPSREC(class_, get_cmap_info_) \
88
+ void \
89
+ FT_Init_Class_##class_( FT_Library library, \
90
+ FT_Service_TTCMapsRec* clazz) \
91
+ { \
92
+ FT_UNUSED(library); \
93
+ clazz->get_cmap_info = get_cmap_info_; \
94
+ }
95
+
96
+ #endif /* FT_CONFIG_OPTION_PIC */
97
+
98
+ /* */
99
+
100
+
101
+ FT_END_HEADER
102
+
103
+ #endif /* __SVTTCMAP_H__ */
104
+
105
+
106
+ /* END */
@@ -0,0 +1,53 @@
1
+ /***************************************************************************/
2
+ /* */
3
+ /* svtteng.h */
4
+ /* */
5
+ /* The FreeType TrueType engine query service (specification). */
6
+ /* */
7
+ /* Copyright 2006 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 __SVTTENG_H__
20
+ #define __SVTTENG_H__
21
+
22
+ #include FT_INTERNAL_SERVICE_H
23
+ #include FT_MODULE_H
24
+
25
+
26
+ FT_BEGIN_HEADER
27
+
28
+
29
+ /*
30
+ * SFNT table loading service.
31
+ */
32
+
33
+ #define FT_SERVICE_ID_TRUETYPE_ENGINE "truetype-engine"
34
+
35
+ /*
36
+ * Used to implement FT_Get_TrueType_Engine_Type
37
+ */
38
+
39
+ FT_DEFINE_SERVICE( TrueTypeEngine )
40
+ {
41
+ FT_TrueTypeEngineType engine_type;
42
+ };
43
+
44
+ /* */
45
+
46
+
47
+ FT_END_HEADER
48
+
49
+
50
+ #endif /* __SVTTENG_H__ */
51
+
52
+
53
+ /* END */
@@ -0,0 +1,67 @@
1
+ /***************************************************************************/
2
+ /* */
3
+ /* svttglyf.h */
4
+ /* */
5
+ /* The FreeType TrueType glyph service. */
6
+ /* */
7
+ /* Copyright 2007 by David Turner. */
8
+ /* */
9
+ /* This file is part of the FreeType project, and may only be used, */
10
+ /* modified, and distributed under the terms of the FreeType project */
11
+ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
12
+ /* this file you indicate that you have read the license and */
13
+ /* understand and accept it fully. */
14
+ /* */
15
+ /***************************************************************************/
16
+
17
+ #ifndef __SVTTGLYF_H__
18
+ #define __SVTTGLYF_H__
19
+
20
+ #include FT_INTERNAL_SERVICE_H
21
+ #include FT_TRUETYPE_TABLES_H
22
+
23
+
24
+ FT_BEGIN_HEADER
25
+
26
+
27
+ #define FT_SERVICE_ID_TT_GLYF "tt-glyf"
28
+
29
+
30
+ typedef FT_ULong
31
+ (*TT_Glyf_GetLocationFunc)( FT_Face face,
32
+ FT_UInt gindex,
33
+ FT_ULong *psize );
34
+
35
+ FT_DEFINE_SERVICE( TTGlyf )
36
+ {
37
+ TT_Glyf_GetLocationFunc get_location;
38
+ };
39
+
40
+ #ifndef FT_CONFIG_OPTION_PIC
41
+
42
+ #define FT_DEFINE_SERVICE_TTGLYFREC(class_, get_location_ ) \
43
+ static const FT_Service_TTGlyfRec class_ = \
44
+ { \
45
+ get_location_ \
46
+ };
47
+
48
+ #else /* FT_CONFIG_OPTION_PIC */
49
+
50
+ #define FT_DEFINE_SERVICE_TTGLYFREC(class_, get_location_ ) \
51
+ void \
52
+ FT_Init_Class_##class_( FT_Service_TTGlyfRec* clazz ) \
53
+ { \
54
+ clazz->get_location = get_location_; \
55
+ }
56
+
57
+ #endif /* FT_CONFIG_OPTION_PIC */
58
+
59
+ /* */
60
+
61
+
62
+ FT_END_HEADER
63
+
64
+ #endif /* __SVTTGLYF_H__ */
65
+
66
+
67
+ /* END */
@@ -0,0 +1,50 @@
1
+ /***************************************************************************/
2
+ /* */
3
+ /* svwinfnt.h */
4
+ /* */
5
+ /* The FreeType Windows FNT/FONT service (specification). */
6
+ /* */
7
+ /* Copyright 2003 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 __SVWINFNT_H__
20
+ #define __SVWINFNT_H__
21
+
22
+ #include FT_INTERNAL_SERVICE_H
23
+ #include FT_WINFONTS_H
24
+
25
+
26
+ FT_BEGIN_HEADER
27
+
28
+
29
+ #define FT_SERVICE_ID_WINFNT "winfonts"
30
+
31
+ typedef FT_Error
32
+ (*FT_WinFnt_GetHeaderFunc)( FT_Face face,
33
+ FT_WinFNT_HeaderRec *aheader );
34
+
35
+
36
+ FT_DEFINE_SERVICE( WinFnt )
37
+ {
38
+ FT_WinFnt_GetHeaderFunc get_header;
39
+ };
40
+
41
+ /* */
42
+
43
+
44
+ FT_END_HEADER
45
+
46
+
47
+ #endif /* __SVWINFNT_H__ */
48
+
49
+
50
+ /* END */
@@ -0,0 +1,55 @@
1
+ /***************************************************************************/
2
+ /* */
3
+ /* svxf86nm.h */
4
+ /* */
5
+ /* The FreeType XFree86 services (specification only). */
6
+ /* */
7
+ /* Copyright 2003 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 __SVXF86NM_H__
20
+ #define __SVXF86NM_H__
21
+
22
+ #include FT_INTERNAL_SERVICE_H
23
+
24
+
25
+ FT_BEGIN_HEADER
26
+
27
+
28
+ /*
29
+ * A trivial service used to return the name of a face's font driver,
30
+ * according to the XFree86 nomenclature. Note that the service data
31
+ * is a simple constant string pointer.
32
+ */
33
+
34
+ #define FT_SERVICE_ID_XF86_NAME "xf86-driver-name"
35
+
36
+ #define FT_XF86_FORMAT_TRUETYPE "TrueType"
37
+ #define FT_XF86_FORMAT_TYPE_1 "Type 1"
38
+ #define FT_XF86_FORMAT_BDF "BDF"
39
+ #define FT_XF86_FORMAT_PCF "PCF"
40
+ #define FT_XF86_FORMAT_TYPE_42 "Type 42"
41
+ #define FT_XF86_FORMAT_CID "CID Type 1"
42
+ #define FT_XF86_FORMAT_CFF "CFF"
43
+ #define FT_XF86_FORMAT_PFR "PFR"
44
+ #define FT_XF86_FORMAT_WINFNT "Windows FNT"
45
+
46
+ /* */
47
+
48
+
49
+ FT_END_HEADER
50
+
51
+
52
+ #endif /* __SVXF86NM_H__ */
53
+
54
+
55
+ /* END */
@@ -0,0 +1,897 @@
1
+ /***************************************************************************/
2
+ /* */
3
+ /* sfnt.h */
4
+ /* */
5
+ /* High-level `sfnt' driver interface (specification). */
6
+ /* */
7
+ /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 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 __SFNT_H__
20
+ #define __SFNT_H__
21
+
22
+
23
+ #include <ft2build.h>
24
+ #include FT_INTERNAL_DRIVER_H
25
+ #include FT_INTERNAL_TRUETYPE_TYPES_H
26
+
27
+
28
+ FT_BEGIN_HEADER
29
+
30
+
31
+ /*************************************************************************/
32
+ /* */
33
+ /* <FuncType> */
34
+ /* TT_Init_Face_Func */
35
+ /* */
36
+ /* <Description> */
37
+ /* First part of the SFNT face object initialization. This finds */
38
+ /* the face in a SFNT file or collection, and load its format tag in */
39
+ /* face->format_tag. */
40
+ /* */
41
+ /* <Input> */
42
+ /* stream :: The input stream. */
43
+ /* */
44
+ /* face :: A handle to the target face object. */
45
+ /* */
46
+ /* face_index :: The index of the TrueType font, if we are opening a */
47
+ /* collection. */
48
+ /* */
49
+ /* num_params :: The number of additional parameters. */
50
+ /* */
51
+ /* params :: Optional additional parameters. */
52
+ /* */
53
+ /* <Return> */
54
+ /* FreeType error code. 0 means success. */
55
+ /* */
56
+ /* <Note> */
57
+ /* The stream cursor must be at the font file's origin. */
58
+ /* */
59
+ /* This function recognizes fonts embedded in a `TrueType */
60
+ /* collection'. */
61
+ /* */
62
+ /* Once the format tag has been validated by the font driver, it */
63
+ /* should then call the TT_Load_Face_Func() callback to read the rest */
64
+ /* of the SFNT tables in the object. */
65
+ /* */
66
+ typedef FT_Error
67
+ (*TT_Init_Face_Func)( FT_Stream stream,
68
+ TT_Face face,
69
+ FT_Int face_index,
70
+ FT_Int num_params,
71
+ FT_Parameter* params );
72
+
73
+
74
+ /*************************************************************************/
75
+ /* */
76
+ /* <FuncType> */
77
+ /* TT_Load_Face_Func */
78
+ /* */
79
+ /* <Description> */
80
+ /* Second part of the SFNT face object initialization. This loads */
81
+ /* the common SFNT tables (head, OS/2, maxp, metrics, etc.) in the */
82
+ /* face object. */
83
+ /* */
84
+ /* <Input> */
85
+ /* stream :: The input stream. */
86
+ /* */
87
+ /* face :: A handle to the target face object. */
88
+ /* */
89
+ /* face_index :: The index of the TrueType font, if we are opening a */
90
+ /* collection. */
91
+ /* */
92
+ /* num_params :: The number of additional parameters. */
93
+ /* */
94
+ /* params :: Optional additional parameters. */
95
+ /* */
96
+ /* <Return> */
97
+ /* FreeType error code. 0 means success. */
98
+ /* */
99
+ /* <Note> */
100
+ /* This function must be called after TT_Init_Face_Func(). */
101
+ /* */
102
+ typedef FT_Error
103
+ (*TT_Load_Face_Func)( FT_Stream stream,
104
+ TT_Face face,
105
+ FT_Int face_index,
106
+ FT_Int num_params,
107
+ FT_Parameter* params );
108
+
109
+
110
+ /*************************************************************************/
111
+ /* */
112
+ /* <FuncType> */
113
+ /* TT_Done_Face_Func */
114
+ /* */
115
+ /* <Description> */
116
+ /* A callback used to delete the common SFNT data from a face. */
117
+ /* */
118
+ /* <Input> */
119
+ /* face :: A handle to the target face object. */
120
+ /* */
121
+ /* <Note> */
122
+ /* This function does NOT destroy the face object. */
123
+ /* */
124
+ typedef void
125
+ (*TT_Done_Face_Func)( TT_Face face );
126
+
127
+
128
+ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
129
+
130
+ /*************************************************************************/
131
+ /* */
132
+ /* <FuncType> */
133
+ /* TT_Load_SFNT_HeaderRec_Func */
134
+ /* */
135
+ /* <Description> */
136
+ /* Loads the header of a SFNT font file. Supports collections. */
137
+ /* */
138
+ /* <Input> */
139
+ /* face :: A handle to the target face object. */
140
+ /* */
141
+ /* stream :: The input stream. */
142
+ /* */
143
+ /* face_index :: The index of the TrueType font, if we are opening a */
144
+ /* collection. */
145
+ /* */
146
+ /* <Output> */
147
+ /* sfnt :: The SFNT header. */
148
+ /* */
149
+ /* <Return> */
150
+ /* FreeType error code. 0 means success. */
151
+ /* */
152
+ /* <Note> */
153
+ /* The stream cursor must be at the font file's origin. */
154
+ /* */
155
+ /* This function recognizes fonts embedded in a `TrueType */
156
+ /* collection'. */
157
+ /* */
158
+ /* This function checks that the header is valid by looking at the */
159
+ /* values of `search_range', `entry_selector', and `range_shift'. */
160
+ /* */
161
+ typedef FT_Error
162
+ (*TT_Load_SFNT_HeaderRec_Func)( TT_Face face,
163
+ FT_Stream stream,
164
+ FT_Long face_index,
165
+ SFNT_Header sfnt );
166
+
167
+
168
+ /*************************************************************************/
169
+ /* */
170
+ /* <FuncType> */
171
+ /* TT_Load_Directory_Func */
172
+ /* */
173
+ /* <Description> */
174
+ /* Loads the table directory into a face object. */
175
+ /* */
176
+ /* <Input> */
177
+ /* face :: A handle to the target face object. */
178
+ /* */
179
+ /* stream :: The input stream. */
180
+ /* */
181
+ /* sfnt :: The SFNT header. */
182
+ /* */
183
+ /* <Return> */
184
+ /* FreeType error code. 0 means success. */
185
+ /* */
186
+ /* <Note> */
187
+ /* The stream cursor must be on the first byte after the 4-byte font */
188
+ /* format tag. This is the case just after a call to */
189
+ /* TT_Load_Format_Tag(). */
190
+ /* */
191
+ typedef FT_Error
192
+ (*TT_Load_Directory_Func)( TT_Face face,
193
+ FT_Stream stream,
194
+ SFNT_Header sfnt );
195
+
196
+ #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
197
+
198
+
199
+ /*************************************************************************/
200
+ /* */
201
+ /* <FuncType> */
202
+ /* TT_Load_Any_Func */
203
+ /* */
204
+ /* <Description> */
205
+ /* Load any font table into client memory. */
206
+ /* */
207
+ /* <Input> */
208
+ /* face :: The face object to look for. */
209
+ /* */
210
+ /* tag :: The tag of table to load. Use the value 0 if you want */
211
+ /* to access the whole font file, else set this parameter */
212
+ /* to a valid TrueType table tag that you can forge with */
213
+ /* the MAKE_TT_TAG macro. */
214
+ /* */
215
+ /* offset :: The starting offset in the table (or the file if */
216
+ /* tag == 0). */
217
+ /* */
218
+ /* length :: The address of the decision variable: */
219
+ /* */
220
+ /* If length == NULL: */
221
+ /* Loads the whole table. Returns an error if */
222
+ /* `offset' == 0! */
223
+ /* */
224
+ /* If *length == 0: */
225
+ /* Exits immediately; returning the length of the given */
226
+ /* table or of the font file, depending on the value of */
227
+ /* `tag'. */
228
+ /* */
229
+ /* If *length != 0: */
230
+ /* Loads the next `length' bytes of table or font, */
231
+ /* starting at offset `offset' (in table or font too). */
232
+ /* */
233
+ /* <Output> */
234
+ /* buffer :: The address of target buffer. */
235
+ /* */
236
+ /* <Return> */
237
+ /* TrueType error code. 0 means success. */
238
+ /* */
239
+ typedef FT_Error
240
+ (*TT_Load_Any_Func)( TT_Face face,
241
+ FT_ULong tag,
242
+ FT_Long offset,
243
+ FT_Byte *buffer,
244
+ FT_ULong* length );
245
+
246
+
247
+ /*************************************************************************/
248
+ /* */
249
+ /* <FuncType> */
250
+ /* TT_Find_SBit_Image_Func */
251
+ /* */
252
+ /* <Description> */
253
+ /* Check whether an embedded bitmap (an `sbit') exists for a given */
254
+ /* glyph, at a given strike. */
255
+ /* */
256
+ /* <Input> */
257
+ /* face :: The target face object. */
258
+ /* */
259
+ /* glyph_index :: The glyph index. */
260
+ /* */
261
+ /* strike_index :: The current strike index. */
262
+ /* */
263
+ /* <Output> */
264
+ /* arange :: The SBit range containing the glyph index. */
265
+ /* */
266
+ /* astrike :: The SBit strike containing the glyph index. */
267
+ /* */
268
+ /* aglyph_offset :: The offset of the glyph data in `EBDT' table. */
269
+ /* */
270
+ /* <Return> */
271
+ /* FreeType error code. 0 means success. Returns */
272
+ /* SFNT_Err_Invalid_Argument if no sbit exists for the requested */
273
+ /* glyph. */
274
+ /* */
275
+ typedef FT_Error
276
+ (*TT_Find_SBit_Image_Func)( TT_Face face,
277
+ FT_UInt glyph_index,
278
+ FT_ULong strike_index,
279
+ TT_SBit_Range *arange,
280
+ TT_SBit_Strike *astrike,
281
+ FT_ULong *aglyph_offset );
282
+
283
+
284
+ /*************************************************************************/
285
+ /* */
286
+ /* <FuncType> */
287
+ /* TT_Load_SBit_Metrics_Func */
288
+ /* */
289
+ /* <Description> */
290
+ /* Get the big metrics for a given embedded bitmap. */
291
+ /* */
292
+ /* <Input> */
293
+ /* stream :: The input stream. */
294
+ /* */
295
+ /* range :: The SBit range containing the glyph. */
296
+ /* */
297
+ /* <Output> */
298
+ /* big_metrics :: A big SBit metrics structure for the glyph. */
299
+ /* */
300
+ /* <Return> */
301
+ /* FreeType error code. 0 means success. */
302
+ /* */
303
+ /* <Note> */
304
+ /* The stream cursor must be positioned at the glyph's offset within */
305
+ /* the `EBDT' table before the call. */
306
+ /* */
307
+ /* If the image format uses variable metrics, the stream cursor is */
308
+ /* positioned just after the metrics header in the `EBDT' table on */
309
+ /* function exit. */
310
+ /* */
311
+ typedef FT_Error
312
+ (*TT_Load_SBit_Metrics_Func)( FT_Stream stream,
313
+ TT_SBit_Range range,
314
+ TT_SBit_Metrics metrics );
315
+
316
+
317
+ /*************************************************************************/
318
+ /* */
319
+ /* <FuncType> */
320
+ /* TT_Load_SBit_Image_Func */
321
+ /* */
322
+ /* <Description> */
323
+ /* Load a given glyph sbit image from the font resource. This also */
324
+ /* returns its metrics. */
325
+ /* */
326
+ /* <Input> */
327
+ /* face :: */
328
+ /* The target face object. */
329
+ /* */
330
+ /* strike_index :: */
331
+ /* The strike index. */
332
+ /* */
333
+ /* glyph_index :: */
334
+ /* The current glyph index. */
335
+ /* */
336
+ /* load_flags :: */
337
+ /* The current load flags. */
338
+ /* */
339
+ /* stream :: */
340
+ /* The input stream. */
341
+ /* */
342
+ /* <Output> */
343
+ /* amap :: */
344
+ /* The target pixmap. */
345
+ /* */
346
+ /* ametrics :: */
347
+ /* A big sbit metrics structure for the glyph image. */
348
+ /* */
349
+ /* <Return> */
350
+ /* FreeType error code. 0 means success. Returns an error if no */
351
+ /* glyph sbit exists for the index. */
352
+ /* */
353
+ /* <Note> */
354
+ /* The `map.buffer' field is always freed before the glyph is loaded. */
355
+ /* */
356
+ typedef FT_Error
357
+ (*TT_Load_SBit_Image_Func)( TT_Face face,
358
+ FT_ULong strike_index,
359
+ FT_UInt glyph_index,
360
+ FT_UInt load_flags,
361
+ FT_Stream stream,
362
+ FT_Bitmap *amap,
363
+ TT_SBit_MetricsRec *ametrics );
364
+
365
+
366
+ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
367
+
368
+ /*************************************************************************/
369
+ /* */
370
+ /* <FuncType> */
371
+ /* TT_Set_SBit_Strike_OldFunc */
372
+ /* */
373
+ /* <Description> */
374
+ /* Select an sbit strike for a given size request. */
375
+ /* */
376
+ /* <Input> */
377
+ /* face :: The target face object. */
378
+ /* */
379
+ /* req :: The size request. */
380
+ /* */
381
+ /* <Output> */
382
+ /* astrike_index :: The index of the sbit strike. */
383
+ /* */
384
+ /* <Return> */
385
+ /* FreeType error code. 0 means success. Returns an error if no */
386
+ /* sbit strike exists for the selected ppem values. */
387
+ /* */
388
+ typedef FT_Error
389
+ (*TT_Set_SBit_Strike_OldFunc)( TT_Face face,
390
+ FT_UInt x_ppem,
391
+ FT_UInt y_ppem,
392
+ FT_ULong* astrike_index );
393
+
394
+
395
+ /*************************************************************************/
396
+ /* */
397
+ /* <FuncType> */
398
+ /* TT_CharMap_Load_Func */
399
+ /* */
400
+ /* <Description> */
401
+ /* Loads a given TrueType character map into memory. */
402
+ /* */
403
+ /* <Input> */
404
+ /* face :: A handle to the parent face object. */
405
+ /* */
406
+ /* stream :: A handle to the current stream object. */
407
+ /* */
408
+ /* <InOut> */
409
+ /* cmap :: A pointer to a cmap object. */
410
+ /* */
411
+ /* <Return> */
412
+ /* FreeType error code. 0 means success. */
413
+ /* */
414
+ /* <Note> */
415
+ /* The function assumes that the stream is already in use (i.e., */
416
+ /* opened). In case of error, all partially allocated tables are */
417
+ /* released. */
418
+ /* */
419
+ typedef FT_Error
420
+ (*TT_CharMap_Load_Func)( TT_Face face,
421
+ void* cmap,
422
+ FT_Stream input );
423
+
424
+
425
+ /*************************************************************************/
426
+ /* */
427
+ /* <FuncType> */
428
+ /* TT_CharMap_Free_Func */
429
+ /* */
430
+ /* <Description> */
431
+ /* Destroys a character mapping table. */
432
+ /* */
433
+ /* <Input> */
434
+ /* face :: A handle to the parent face object. */
435
+ /* */
436
+ /* cmap :: A handle to a cmap object. */
437
+ /* */
438
+ /* <Return> */
439
+ /* FreeType error code. 0 means success. */
440
+ /* */
441
+ typedef FT_Error
442
+ (*TT_CharMap_Free_Func)( TT_Face face,
443
+ void* cmap );
444
+
445
+ #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
446
+
447
+
448
+ /*************************************************************************/
449
+ /* */
450
+ /* <FuncType> */
451
+ /* TT_Set_SBit_Strike_Func */
452
+ /* */
453
+ /* <Description> */
454
+ /* Select an sbit strike for a given size request. */
455
+ /* */
456
+ /* <Input> */
457
+ /* face :: The target face object. */
458
+ /* */
459
+ /* req :: The size request. */
460
+ /* */
461
+ /* <Output> */
462
+ /* astrike_index :: The index of the sbit strike. */
463
+ /* */
464
+ /* <Return> */
465
+ /* FreeType error code. 0 means success. Returns an error if no */
466
+ /* sbit strike exists for the selected ppem values. */
467
+ /* */
468
+ typedef FT_Error
469
+ (*TT_Set_SBit_Strike_Func)( TT_Face face,
470
+ FT_Size_Request req,
471
+ FT_ULong* astrike_index );
472
+
473
+
474
+ /*************************************************************************/
475
+ /* */
476
+ /* <FuncType> */
477
+ /* TT_Load_Strike_Metrics_Func */
478
+ /* */
479
+ /* <Description> */
480
+ /* Load the metrics of a given strike. */
481
+ /* */
482
+ /* <Input> */
483
+ /* face :: The target face object. */
484
+ /* */
485
+ /* strike_index :: The strike index. */
486
+ /* */
487
+ /* <Output> */
488
+ /* metrics :: the metrics of the strike. */
489
+ /* */
490
+ /* <Return> */
491
+ /* FreeType error code. 0 means success. Returns an error if no */
492
+ /* such sbit strike exists. */
493
+ /* */
494
+ typedef FT_Error
495
+ (*TT_Load_Strike_Metrics_Func)( TT_Face face,
496
+ FT_ULong strike_index,
497
+ FT_Size_Metrics* metrics );
498
+
499
+
500
+ /*************************************************************************/
501
+ /* */
502
+ /* <FuncType> */
503
+ /* TT_Get_PS_Name_Func */
504
+ /* */
505
+ /* <Description> */
506
+ /* Get the PostScript glyph name of a glyph. */
507
+ /* */
508
+ /* <Input> */
509
+ /* idx :: The glyph index. */
510
+ /* */
511
+ /* PSname :: The address of a string pointer. Will be NULL in case */
512
+ /* of error, otherwise it is a pointer to the glyph name. */
513
+ /* */
514
+ /* You must not modify the returned string! */
515
+ /* */
516
+ /* <Output> */
517
+ /* FreeType error code. 0 means success. */
518
+ /* */
519
+ typedef FT_Error
520
+ (*TT_Get_PS_Name_Func)( TT_Face face,
521
+ FT_UInt idx,
522
+ FT_String** PSname );
523
+
524
+
525
+ /*************************************************************************/
526
+ /* */
527
+ /* <FuncType> */
528
+ /* TT_Load_Metrics_Func */
529
+ /* */
530
+ /* <Description> */
531
+ /* Load a metrics table, which is a table with a horizontal and a */
532
+ /* vertical version. */
533
+ /* */
534
+ /* <Input> */
535
+ /* face :: A handle to the target face object. */
536
+ /* */
537
+ /* stream :: The input stream. */
538
+ /* */
539
+ /* vertical :: A boolean flag. If set, load the vertical one. */
540
+ /* */
541
+ /* <Return> */
542
+ /* FreeType error code. 0 means success. */
543
+ /* */
544
+ typedef FT_Error
545
+ (*TT_Load_Metrics_Func)( TT_Face face,
546
+ FT_Stream stream,
547
+ FT_Bool vertical );
548
+
549
+
550
+ /*************************************************************************/
551
+ /* */
552
+ /* <FuncType> */
553
+ /* TT_Get_Metrics_Func */
554
+ /* */
555
+ /* <Description> */
556
+ /* Load the horizontal or vertical header in a face object. */
557
+ /* */
558
+ /* <Input> */
559
+ /* face :: A handle to the target face object. */
560
+ /* */
561
+ /* stream :: The input stream. */
562
+ /* */
563
+ /* vertical :: A boolean flag. If set, load vertical metrics. */
564
+ /* */
565
+ /* <Return> */
566
+ /* FreeType error code. 0 means success. */
567
+ /* */
568
+ typedef FT_Error
569
+ (*TT_Get_Metrics_Func)( TT_Face face,
570
+ FT_Bool vertical,
571
+ FT_UInt gindex,
572
+ FT_Short* abearing,
573
+ FT_UShort* aadvance );
574
+
575
+
576
+ /*************************************************************************/
577
+ /* */
578
+ /* <FuncType> */
579
+ /* TT_Load_Table_Func */
580
+ /* */
581
+ /* <Description> */
582
+ /* Load a given TrueType table. */
583
+ /* */
584
+ /* <Input> */
585
+ /* face :: A handle to the target face object. */
586
+ /* */
587
+ /* stream :: The input stream. */
588
+ /* */
589
+ /* <Return> */
590
+ /* FreeType error code. 0 means success. */
591
+ /* */
592
+ /* <Note> */
593
+ /* The function uses `face->goto_table' to seek the stream to the */
594
+ /* start of the table, except while loading the font directory. */
595
+ /* */
596
+ typedef FT_Error
597
+ (*TT_Load_Table_Func)( TT_Face face,
598
+ FT_Stream stream );
599
+
600
+
601
+ /*************************************************************************/
602
+ /* */
603
+ /* <FuncType> */
604
+ /* TT_Free_Table_Func */
605
+ /* */
606
+ /* <Description> */
607
+ /* Free a given TrueType table. */
608
+ /* */
609
+ /* <Input> */
610
+ /* face :: A handle to the target face object. */
611
+ /* */
612
+ typedef void
613
+ (*TT_Free_Table_Func)( TT_Face face );
614
+
615
+
616
+ /*
617
+ * @functype:
618
+ * TT_Face_GetKerningFunc
619
+ *
620
+ * @description:
621
+ * Return the horizontal kerning value between two glyphs.
622
+ *
623
+ * @input:
624
+ * face :: A handle to the source face object.
625
+ * left_glyph :: The left glyph index.
626
+ * right_glyph :: The right glyph index.
627
+ *
628
+ * @return:
629
+ * The kerning value in font units.
630
+ */
631
+ typedef FT_Int
632
+ (*TT_Face_GetKerningFunc)( TT_Face face,
633
+ FT_UInt left_glyph,
634
+ FT_UInt right_glyph );
635
+
636
+
637
+ /*************************************************************************/
638
+ /* */
639
+ /* <Struct> */
640
+ /* SFNT_Interface */
641
+ /* */
642
+ /* <Description> */
643
+ /* This structure holds pointers to the functions used to load and */
644
+ /* free the basic tables that are required in a `sfnt' font file. */
645
+ /* */
646
+ /* <Fields> */
647
+ /* Check the various xxx_Func() descriptions for details. */
648
+ /* */
649
+ typedef struct SFNT_Interface_
650
+ {
651
+ TT_Loader_GotoTableFunc goto_table;
652
+
653
+ TT_Init_Face_Func init_face;
654
+ TT_Load_Face_Func load_face;
655
+ TT_Done_Face_Func done_face;
656
+ FT_Module_Requester get_interface;
657
+
658
+ TT_Load_Any_Func load_any;
659
+
660
+ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
661
+ TT_Load_SFNT_HeaderRec_Func load_sfnt_header;
662
+ TT_Load_Directory_Func load_directory;
663
+ #endif
664
+
665
+ /* these functions are called by `load_face' but they can also */
666
+ /* be called from external modules, if there is a need to do so */
667
+ TT_Load_Table_Func load_head;
668
+ TT_Load_Metrics_Func load_hhea;
669
+ TT_Load_Table_Func load_cmap;
670
+ TT_Load_Table_Func load_maxp;
671
+ TT_Load_Table_Func load_os2;
672
+ TT_Load_Table_Func load_post;
673
+
674
+ TT_Load_Table_Func load_name;
675
+ TT_Free_Table_Func free_name;
676
+
677
+ /* optional tables */
678
+ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
679
+ TT_Load_Table_Func load_hdmx_stub;
680
+ TT_Free_Table_Func free_hdmx_stub;
681
+ #endif
682
+
683
+ /* this field was called `load_kerning' up to version 2.1.10 */
684
+ TT_Load_Table_Func load_kern;
685
+
686
+ TT_Load_Table_Func load_gasp;
687
+ TT_Load_Table_Func load_pclt;
688
+
689
+ /* see `ttload.h'; this field was called `load_bitmap_header' up to */
690
+ /* version 2.1.10 */
691
+ TT_Load_Table_Func load_bhed;
692
+
693
+ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
694
+
695
+ /* see `ttsbit.h' */
696
+ TT_Set_SBit_Strike_OldFunc set_sbit_strike_stub;
697
+ TT_Load_Table_Func load_sbits_stub;
698
+
699
+ /*
700
+ * The following two fields appeared in version 2.1.8, and were placed
701
+ * between `load_sbits' and `load_sbit_image'. We support them as a
702
+ * special exception since they are used by Xfont library within the
703
+ * X.Org xserver, and because the probability that other rogue clients
704
+ * use the other version 2.1.7 fields below is _extremely_ low.
705
+ *
706
+ * Note that this forces us to disable an interesting memory-saving
707
+ * optimization though...
708
+ */
709
+
710
+ TT_Find_SBit_Image_Func find_sbit_image;
711
+ TT_Load_SBit_Metrics_Func load_sbit_metrics;
712
+
713
+ #endif
714
+
715
+ TT_Load_SBit_Image_Func load_sbit_image;
716
+
717
+ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
718
+ TT_Free_Table_Func free_sbits_stub;
719
+ #endif
720
+
721
+ /* see `ttpost.h' */
722
+ TT_Get_PS_Name_Func get_psname;
723
+ TT_Free_Table_Func free_psnames;
724
+
725
+ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
726
+ TT_CharMap_Load_Func load_charmap_stub;
727
+ TT_CharMap_Free_Func free_charmap_stub;
728
+ #endif
729
+
730
+ /* starting here, the structure differs from version 2.1.7 */
731
+
732
+ /* this field was introduced in version 2.1.8, named `get_psname' */
733
+ TT_Face_GetKerningFunc get_kerning;
734
+
735
+ /* new elements introduced after version 2.1.10 */
736
+
737
+ /* load the font directory, i.e., the offset table and */
738
+ /* the table directory */
739
+ TT_Load_Table_Func load_font_dir;
740
+ TT_Load_Metrics_Func load_hmtx;
741
+
742
+ TT_Load_Table_Func load_eblc;
743
+ TT_Free_Table_Func free_eblc;
744
+
745
+ TT_Set_SBit_Strike_Func set_sbit_strike;
746
+ TT_Load_Strike_Metrics_Func load_strike_metrics;
747
+
748
+ TT_Get_Metrics_Func get_metrics;
749
+
750
+ } SFNT_Interface;
751
+
752
+
753
+ /* transitional */
754
+ typedef SFNT_Interface* SFNT_Service;
755
+
756
+ #ifndef FT_CONFIG_OPTION_PIC
757
+
758
+ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
759
+ #define FT_DEFINE_DRIVERS_OLD_INTERNAL(a) \
760
+ a,
761
+ #else
762
+ #define FT_DEFINE_DRIVERS_OLD_INTERNAL(a)
763
+ #endif
764
+ #define FT_INTERNAL(a) \
765
+ a,
766
+
767
+ #define FT_DEFINE_SFNT_INTERFACE(class_, \
768
+ goto_table_, init_face_, load_face_, done_face_, get_interface_, \
769
+ load_any_, load_sfnt_header_, load_directory_, load_head_, \
770
+ load_hhea_, load_cmap_, load_maxp_, load_os2_, load_post_, \
771
+ load_name_, free_name_, load_hdmx_stub_, free_hdmx_stub_, \
772
+ load_kern_, load_gasp_, load_pclt_, load_bhed_, \
773
+ set_sbit_strike_stub_, load_sbits_stub_, find_sbit_image_, \
774
+ load_sbit_metrics_, load_sbit_image_, free_sbits_stub_, \
775
+ get_psname_, free_psnames_, load_charmap_stub_, free_charmap_stub_, \
776
+ get_kerning_, load_font_dir_, load_hmtx_, load_eblc_, free_eblc_, \
777
+ set_sbit_strike_, load_strike_metrics_, get_metrics_ ) \
778
+ static const SFNT_Interface class_ = \
779
+ { \
780
+ FT_INTERNAL(goto_table_) \
781
+ FT_INTERNAL(init_face_) \
782
+ FT_INTERNAL(load_face_) \
783
+ FT_INTERNAL(done_face_) \
784
+ FT_INTERNAL(get_interface_) \
785
+ FT_INTERNAL(load_any_) \
786
+ FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sfnt_header_) \
787
+ FT_DEFINE_DRIVERS_OLD_INTERNAL(load_directory_) \
788
+ FT_INTERNAL(load_head_) \
789
+ FT_INTERNAL(load_hhea_) \
790
+ FT_INTERNAL(load_cmap_) \
791
+ FT_INTERNAL(load_maxp_) \
792
+ FT_INTERNAL(load_os2_) \
793
+ FT_INTERNAL(load_post_) \
794
+ FT_INTERNAL(load_name_) \
795
+ FT_INTERNAL(free_name_) \
796
+ FT_DEFINE_DRIVERS_OLD_INTERNAL(load_hdmx_stub_) \
797
+ FT_DEFINE_DRIVERS_OLD_INTERNAL(free_hdmx_stub_) \
798
+ FT_INTERNAL(load_kern_) \
799
+ FT_INTERNAL(load_gasp_) \
800
+ FT_INTERNAL(load_pclt_) \
801
+ FT_INTERNAL(load_bhed_) \
802
+ FT_DEFINE_DRIVERS_OLD_INTERNAL(set_sbit_strike_stub_) \
803
+ FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbits_stub_) \
804
+ FT_DEFINE_DRIVERS_OLD_INTERNAL(find_sbit_image_) \
805
+ FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbit_metrics_) \
806
+ FT_INTERNAL(load_sbit_image_) \
807
+ FT_DEFINE_DRIVERS_OLD_INTERNAL(free_sbits_stub_) \
808
+ FT_INTERNAL(get_psname_) \
809
+ FT_INTERNAL(free_psnames_) \
810
+ FT_DEFINE_DRIVERS_OLD_INTERNAL(load_charmap_stub_) \
811
+ FT_DEFINE_DRIVERS_OLD_INTERNAL(free_charmap_stub_) \
812
+ FT_INTERNAL(get_kerning_) \
813
+ FT_INTERNAL(load_font_dir_) \
814
+ FT_INTERNAL(load_hmtx_) \
815
+ FT_INTERNAL(load_eblc_) \
816
+ FT_INTERNAL(free_eblc_) \
817
+ FT_INTERNAL(set_sbit_strike_) \
818
+ FT_INTERNAL(load_strike_metrics_) \
819
+ FT_INTERNAL(get_metrics_) \
820
+ };
821
+
822
+ #else /* FT_CONFIG_OPTION_PIC */
823
+
824
+ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
825
+ #define FT_DEFINE_DRIVERS_OLD_INTERNAL(a, a_) \
826
+ clazz->a = a_;
827
+ #else
828
+ #define FT_DEFINE_DRIVERS_OLD_INTERNAL(a, a_)
829
+ #endif
830
+ #define FT_INTERNAL(a, a_) \
831
+ clazz->a = a_;
832
+
833
+ #define FT_DEFINE_SFNT_INTERFACE(class_, \
834
+ goto_table_, init_face_, load_face_, done_face_, get_interface_, \
835
+ load_any_, load_sfnt_header_, load_directory_, load_head_, \
836
+ load_hhea_, load_cmap_, load_maxp_, load_os2_, load_post_, \
837
+ load_name_, free_name_, load_hdmx_stub_, free_hdmx_stub_, \
838
+ load_kern_, load_gasp_, load_pclt_, load_bhed_, \
839
+ set_sbit_strike_stub_, load_sbits_stub_, find_sbit_image_, \
840
+ load_sbit_metrics_, load_sbit_image_, free_sbits_stub_, \
841
+ get_psname_, free_psnames_, load_charmap_stub_, free_charmap_stub_, \
842
+ get_kerning_, load_font_dir_, load_hmtx_, load_eblc_, free_eblc_, \
843
+ set_sbit_strike_, load_strike_metrics_, get_metrics_ ) \
844
+ void \
845
+ FT_Init_Class_##class_( FT_Library library, SFNT_Interface* clazz ) \
846
+ { \
847
+ FT_UNUSED(library); \
848
+ FT_INTERNAL(goto_table,goto_table_) \
849
+ FT_INTERNAL(init_face,init_face_) \
850
+ FT_INTERNAL(load_face,load_face_) \
851
+ FT_INTERNAL(done_face,done_face_) \
852
+ FT_INTERNAL(get_interface,get_interface_) \
853
+ FT_INTERNAL(load_any,load_any_) \
854
+ FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sfnt_header,load_sfnt_header_) \
855
+ FT_DEFINE_DRIVERS_OLD_INTERNAL(load_directory,load_directory_) \
856
+ FT_INTERNAL(load_head,load_head_) \
857
+ FT_INTERNAL(load_hhea,load_hhea_) \
858
+ FT_INTERNAL(load_cmap,load_cmap_) \
859
+ FT_INTERNAL(load_maxp,load_maxp_) \
860
+ FT_INTERNAL(load_os2,load_os2_) \
861
+ FT_INTERNAL(load_post,load_post_) \
862
+ FT_INTERNAL(load_name,load_name_) \
863
+ FT_INTERNAL(free_name,free_name_) \
864
+ FT_DEFINE_DRIVERS_OLD_INTERNAL(load_hdmx_stub,load_hdmx_stub_) \
865
+ FT_DEFINE_DRIVERS_OLD_INTERNAL(free_hdmx_stub,free_hdmx_stub_) \
866
+ FT_INTERNAL(load_kern,load_kern_) \
867
+ FT_INTERNAL(load_gasp,load_gasp_) \
868
+ FT_INTERNAL(load_pclt,load_pclt_) \
869
+ FT_INTERNAL(load_bhed,load_bhed_) \
870
+ FT_DEFINE_DRIVERS_OLD_INTERNAL(set_sbit_strike_stub,set_sbit_strike_stub_) \
871
+ FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbits_stub,load_sbits_stub_) \
872
+ FT_DEFINE_DRIVERS_OLD_INTERNAL(find_sbit_image,find_sbit_image_) \
873
+ FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbit_metrics,load_sbit_metrics_) \
874
+ FT_INTERNAL(load_sbit_image,load_sbit_image_) \
875
+ FT_DEFINE_DRIVERS_OLD_INTERNAL(free_sbits_stub,free_sbits_stub_) \
876
+ FT_INTERNAL(get_psname,get_psname_) \
877
+ FT_INTERNAL(free_psnames,free_psnames_) \
878
+ FT_DEFINE_DRIVERS_OLD_INTERNAL(load_charmap_stub,load_charmap_stub_) \
879
+ FT_DEFINE_DRIVERS_OLD_INTERNAL(free_charmap_stub,free_charmap_stub_) \
880
+ FT_INTERNAL(get_kerning,get_kerning_) \
881
+ FT_INTERNAL(load_font_dir,load_font_dir_) \
882
+ FT_INTERNAL(load_hmtx,load_hmtx_) \
883
+ FT_INTERNAL(load_eblc,load_eblc_) \
884
+ FT_INTERNAL(free_eblc,free_eblc_) \
885
+ FT_INTERNAL(set_sbit_strike,set_sbit_strike_) \
886
+ FT_INTERNAL(load_strike_metrics,load_strike_metrics_) \
887
+ FT_INTERNAL(get_metrics,get_metrics_) \
888
+ }
889
+
890
+ #endif /* FT_CONFIG_OPTION_PIC */
891
+
892
+ FT_END_HEADER
893
+
894
+ #endif /* __SFNT_H__ */
895
+
896
+
897
+ /* END */