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.
- data/README.markdown +9 -0
- data/bin/.gitkeep +0 -0
- data/ext/extconf.rb +30 -0
- data/lib/pdf2json.rb +8 -0
- data/pdf2json-0.52-source/AUTHORS +24 -0
- data/pdf2json-0.52-source/CHANGES +11 -0
- data/pdf2json-0.52-source/Makefile +84 -0
- data/pdf2json-0.52-source/Makefile.in +84 -0
- data/pdf2json-0.52-source/aclocal.m4 +274 -0
- data/pdf2json-0.52-source/aconf-win32.h +86 -0
- data/pdf2json-0.52-source/aconf.h +42 -0
- data/pdf2json-0.52-source/aconf.h.in +41 -0
- data/pdf2json-0.52-source/autom4te.cache/output.0 +6908 -0
- data/pdf2json-0.52-source/autom4te.cache/requests +76 -0
- data/pdf2json-0.52-source/autom4te.cache/traces.0 +466 -0
- data/pdf2json-0.52-source/config.log +1259 -0
- data/pdf2json-0.52-source/config.status +1050 -0
- data/pdf2json-0.52-source/configure +6908 -0
- data/pdf2json-0.52-source/configure.ac +93 -0
- data/pdf2json-0.52-source/doc/pdffonts.1 +130 -0
- data/pdf2json-0.52-source/doc/pdffonts.cat +107 -0
- data/pdf2json-0.52-source/doc/pdffonts.hlp +117 -0
- data/pdf2json-0.52-source/doc/pdfimages.1 +102 -0
- data/pdf2json-0.52-source/doc/pdfimages.cat +92 -0
- data/pdf2json-0.52-source/doc/pdfimages.hlp +101 -0
- data/pdf2json-0.52-source/doc/pdfinfo.1 +158 -0
- data/pdf2json-0.52-source/doc/pdfinfo.cat +119 -0
- data/pdf2json-0.52-source/doc/pdfinfo.hlp +129 -0
- data/pdf2json-0.52-source/doc/pdftoppm.1 +115 -0
- data/pdf2json-0.52-source/doc/pdftoppm.cat +105 -0
- data/pdf2json-0.52-source/doc/pdftoppm.hlp +114 -0
- data/pdf2json-0.52-source/doc/pdftops.1 +229 -0
- data/pdf2json-0.52-source/doc/pdftops.cat +221 -0
- data/pdf2json-0.52-source/doc/pdftops.hlp +231 -0
- data/pdf2json-0.52-source/doc/pdftotext.1 +137 -0
- data/pdf2json-0.52-source/doc/pdftotext.cat +120 -0
- data/pdf2json-0.52-source/doc/pdftotext.hlp +133 -0
- data/pdf2json-0.52-source/doc/sample-xpdfrc +91 -0
- data/pdf2json-0.52-source/doc/xpdf.1 +513 -0
- data/pdf2json-0.52-source/doc/xpdf.cat +476 -0
- data/pdf2json-0.52-source/doc/xpdf.hlp +489 -0
- data/pdf2json-0.52-source/doc/xpdfrc.5 +480 -0
- data/pdf2json-0.52-source/doc/xpdfrc.cat +474 -0
- data/pdf2json-0.52-source/doc/xpdfrc.hlp +479 -0
- data/pdf2json-0.52-source/fofi/.DS_Store +0 -0
- data/pdf2json-0.52-source/fofi/FoFiBase.cc +156 -0
- data/pdf2json-0.52-source/fofi/FoFiBase.h +57 -0
- data/pdf2json-0.52-source/fofi/FoFiBase.o +0 -0
- data/pdf2json-0.52-source/fofi/FoFiEncodings.cc +994 -0
- data/pdf2json-0.52-source/fofi/FoFiEncodings.h +36 -0
- data/pdf2json-0.52-source/fofi/FoFiEncodings.o +0 -0
- data/pdf2json-0.52-source/fofi/FoFiTrueType.cc +2027 -0
- data/pdf2json-0.52-source/fofi/FoFiTrueType.h +174 -0
- data/pdf2json-0.52-source/fofi/FoFiTrueType.o +0 -0
- data/pdf2json-0.52-source/fofi/FoFiType1.cc +252 -0
- data/pdf2json-0.52-source/fofi/FoFiType1.h +59 -0
- data/pdf2json-0.52-source/fofi/FoFiType1.o +0 -0
- data/pdf2json-0.52-source/fofi/FoFiType1C.cc +2603 -0
- data/pdf2json-0.52-source/fofi/FoFiType1C.h +233 -0
- data/pdf2json-0.52-source/fofi/FoFiType1C.o +0 -0
- data/pdf2json-0.52-source/fofi/Makefile +70 -0
- data/pdf2json-0.52-source/fofi/Makefile.dep +0 -0
- data/pdf2json-0.52-source/fofi/Makefile.in +70 -0
- data/pdf2json-0.52-source/fofi/libfofi.a +0 -0
- data/pdf2json-0.52-source/fofi/vms_make.com +0 -0
- data/pdf2json-0.52-source/freetype.win32/.DS_Store +0 -0
- data/pdf2json-0.52-source/freetype.win32/include/.DS_Store +0 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/config/ftconfig.h +528 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/config/ftheader.h +780 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/config/ftmodule.h +32 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/config/ftoption.h +733 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/config/ftstdlib.h +173 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/freetype.h +3919 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftadvanc.h +179 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftbbox.h +94 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftbdf.h +209 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftbitmap.h +227 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftcache.h +1128 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftchapters.h +103 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftcid.h +166 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/fterrdef.h +244 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/fterrors.h +206 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftgasp.h +120 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftglyph.h +613 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftgxval.h +358 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftgzip.h +102 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftimage.h +1313 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftincrem.h +353 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftlcdfil.h +213 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftlist.h +277 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftlzw.h +99 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftmac.h +274 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftmm.h +378 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftmodapi.h +483 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftmoderr.h +155 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftotval.h +203 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftoutln.h +537 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftpfr.h +172 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftrender.h +230 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftsizes.h +159 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftsnames.h +200 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftstroke.h +716 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftsynth.h +80 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftsystem.h +347 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/fttrigon.h +350 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/fttypes.h +588 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftwinfnt.h +274 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ftxf86.h +83 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/autohint.h +231 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftcalc.h +179 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftdebug.h +250 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftdriver.h +422 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftgloadr.h +168 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftmemory.h +380 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftobjs.h +1428 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftpic.h +67 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftrfork.h +196 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftserv.h +620 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftstream.h +539 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/fttrace.h +139 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/ftvalid.h +150 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/internal.h +51 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/pcftypes.h +56 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/psaux.h +873 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/pshints.h +712 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svbdf.h +77 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svcid.h +83 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svgldict.h +82 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svgxval.h +72 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svkern.h +51 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svmm.h +104 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svotval.h +55 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svpfr.h +66 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svpostnm.h +79 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svpscmap.h +164 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svpsinfo.h +92 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svsfnt.h +102 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svttcmap.h +106 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svtteng.h +53 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svttglyf.h +67 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svwinfnt.h +50 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/services/svxf86nm.h +55 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/sfnt.h +897 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/t1types.h +270 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/internal/tttypes.h +1543 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/t1tables.h +504 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ttnameid.h +1247 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/tttables.h +759 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/tttags.h +107 -0
- data/pdf2json-0.52-source/freetype.win32/include/freetype/ttunpat.h +59 -0
- data/pdf2json-0.52-source/freetype.win32/include/ft2build.h +39 -0
- data/pdf2json-0.52-source/freetype.win32/lib/freetype_a.lib +0 -0
- data/pdf2json-0.52-source/goo/.DS_Store +0 -0
- data/pdf2json-0.52-source/goo/FixedPoint.cc +118 -0
- data/pdf2json-0.52-source/goo/FixedPoint.h +155 -0
- data/pdf2json-0.52-source/goo/FixedPoint.o +0 -0
- data/pdf2json-0.52-source/goo/GHash.cc +380 -0
- data/pdf2json-0.52-source/goo/GHash.h +78 -0
- data/pdf2json-0.52-source/goo/GHash.o +0 -0
- data/pdf2json-0.52-source/goo/GList.cc +97 -0
- data/pdf2json-0.52-source/goo/GList.h +96 -0
- data/pdf2json-0.52-source/goo/GList.o +0 -0
- data/pdf2json-0.52-source/goo/GMutex.h +49 -0
- data/pdf2json-0.52-source/goo/GString.cc +724 -0
- data/pdf2json-0.52-source/goo/GString.cc.fixed +718 -0
- data/pdf2json-0.52-source/goo/GString.h +136 -0
- data/pdf2json-0.52-source/goo/GString.o +0 -0
- data/pdf2json-0.52-source/goo/ImgWriter.o +0 -0
- data/pdf2json-0.52-source/goo/JpegWriter.o +0 -0
- data/pdf2json-0.52-source/goo/Makefile +72 -0
- data/pdf2json-0.52-source/goo/Makefile.dep +0 -0
- data/pdf2json-0.52-source/goo/Makefile.in +72 -0
- data/pdf2json-0.52-source/goo/PNGWriter.o +0 -0
- data/pdf2json-0.52-source/goo/gfile.cc +731 -0
- data/pdf2json-0.52-source/goo/gfile.h +138 -0
- data/pdf2json-0.52-source/goo/gfile.o +0 -0
- data/pdf2json-0.52-source/goo/gmem.cc +264 -0
- data/pdf2json-0.52-source/goo/gmem.h +79 -0
- data/pdf2json-0.52-source/goo/gmem.o +0 -0
- data/pdf2json-0.52-source/goo/gmempp.cc +32 -0
- data/pdf2json-0.52-source/goo/gmempp.o +0 -0
- data/pdf2json-0.52-source/goo/gtypes.h +29 -0
- data/pdf2json-0.52-source/goo/libGoo.a +0 -0
- data/pdf2json-0.52-source/goo/parseargs.c +190 -0
- data/pdf2json-0.52-source/goo/parseargs.h +71 -0
- data/pdf2json-0.52-source/goo/parseargs.o +0 -0
- data/pdf2json-0.52-source/goo/vms_directory.c +214 -0
- data/pdf2json-0.52-source/goo/vms_dirent.h +67 -0
- data/pdf2json-0.52-source/goo/vms_make.com +82 -0
- data/pdf2json-0.52-source/goo/vms_sys_dirent.h +54 -0
- data/pdf2json-0.52-source/goo/vms_unix_time.h +102 -0
- data/pdf2json-0.52-source/goo/vms_unix_times.c +42 -0
- data/pdf2json-0.52-source/goo/vms_unlink.c +22 -0
- data/pdf2json-0.52-source/ms_make.bat +199 -0
- data/pdf2json-0.52-source/splash/.DS_Store +0 -0
- data/pdf2json-0.52-source/splash/Makefile +103 -0
- data/pdf2json-0.52-source/splash/Makefile.dep +0 -0
- data/pdf2json-0.52-source/splash/Makefile.in +103 -0
- data/pdf2json-0.52-source/splash/Splash.cc +3310 -0
- data/pdf2json-0.52-source/splash/Splash.h +293 -0
- data/pdf2json-0.52-source/splash/Splash.o +0 -0
- data/pdf2json-0.52-source/splash/SplashBitmap.cc +188 -0
- data/pdf2json-0.52-source/splash/SplashBitmap.h +64 -0
- data/pdf2json-0.52-source/splash/SplashBitmap.o +0 -0
- data/pdf2json-0.52-source/splash/SplashClip.cc +382 -0
- data/pdf2json-0.52-source/splash/SplashClip.h +107 -0
- data/pdf2json-0.52-source/splash/SplashClip.o +0 -0
- data/pdf2json-0.52-source/splash/SplashErrorCodes.h +32 -0
- data/pdf2json-0.52-source/splash/SplashFTFont.cc +357 -0
- data/pdf2json-0.52-source/splash/SplashFTFont.h +58 -0
- data/pdf2json-0.52-source/splash/SplashFTFont.o +0 -0
- data/pdf2json-0.52-source/splash/SplashFTFontEngine.cc +179 -0
- data/pdf2json-0.52-source/splash/SplashFTFontEngine.h +65 -0
- data/pdf2json-0.52-source/splash/SplashFTFontEngine.o +0 -0
- data/pdf2json-0.52-source/splash/SplashFTFontFile.cc +114 -0
- data/pdf2json-0.52-source/splash/SplashFTFontFile.h +73 -0
- data/pdf2json-0.52-source/splash/SplashFTFontFile.o +0 -0
- data/pdf2json-0.52-source/splash/SplashFont.cc +176 -0
- data/pdf2json-0.52-source/splash/SplashFont.h +104 -0
- data/pdf2json-0.52-source/splash/SplashFont.o +0 -0
- data/pdf2json-0.52-source/splash/SplashFontEngine.cc +317 -0
- data/pdf2json-0.52-source/splash/SplashFontEngine.h +91 -0
- data/pdf2json-0.52-source/splash/SplashFontEngine.o +0 -0
- data/pdf2json-0.52-source/splash/SplashFontFile.cc +55 -0
- data/pdf2json-0.52-source/splash/SplashFontFile.h +60 -0
- data/pdf2json-0.52-source/splash/SplashFontFile.o +0 -0
- data/pdf2json-0.52-source/splash/SplashFontFileID.cc +23 -0
- data/pdf2json-0.52-source/splash/SplashFontFileID.h +30 -0
- data/pdf2json-0.52-source/splash/SplashFontFileID.o +0 -0
- data/pdf2json-0.52-source/splash/SplashGlyphBitmap.h +26 -0
- data/pdf2json-0.52-source/splash/SplashMath.h +89 -0
- data/pdf2json-0.52-source/splash/SplashPath.cc +184 -0
- data/pdf2json-0.52-source/splash/SplashPath.h +121 -0
- data/pdf2json-0.52-source/splash/SplashPath.o +0 -0
- data/pdf2json-0.52-source/splash/SplashPattern.cc +40 -0
- data/pdf2json-0.52-source/splash/SplashPattern.h +65 -0
- data/pdf2json-0.52-source/splash/SplashPattern.o +0 -0
- data/pdf2json-0.52-source/splash/SplashScreen.cc +383 -0
- data/pdf2json-0.52-source/splash/SplashScreen.h +56 -0
- data/pdf2json-0.52-source/splash/SplashScreen.o +0 -0
- data/pdf2json-0.52-source/splash/SplashState.cc +165 -0
- data/pdf2json-0.52-source/splash/SplashState.h +103 -0
- data/pdf2json-0.52-source/splash/SplashState.o +0 -0
- data/pdf2json-0.52-source/splash/SplashT1Font.cc +287 -0
- data/pdf2json-0.52-source/splash/SplashT1Font.h +57 -0
- data/pdf2json-0.52-source/splash/SplashT1Font.o +0 -0
- data/pdf2json-0.52-source/splash/SplashT1FontEngine.cc +124 -0
- data/pdf2json-0.52-source/splash/SplashT1FontEngine.h +53 -0
- data/pdf2json-0.52-source/splash/SplashT1FontEngine.o +0 -0
- data/pdf2json-0.52-source/splash/SplashT1FontFile.cc +97 -0
- data/pdf2json-0.52-source/splash/SplashT1FontFile.h +58 -0
- data/pdf2json-0.52-source/splash/SplashT1FontFile.o +0 -0
- data/pdf2json-0.52-source/splash/SplashTypes.h +132 -0
- data/pdf2json-0.52-source/splash/SplashXPath.cc +438 -0
- data/pdf2json-0.52-source/splash/SplashXPath.h +100 -0
- data/pdf2json-0.52-source/splash/SplashXPath.o +0 -0
- data/pdf2json-0.52-source/splash/SplashXPathScanner.cc +428 -0
- data/pdf2json-0.52-source/splash/SplashXPathScanner.h +87 -0
- data/pdf2json-0.52-source/splash/SplashXPathScanner.o +0 -0
- data/pdf2json-0.52-source/splash/libsplash.a +0 -0
- data/pdf2json-0.52-source/splash/vms_make.com +0 -0
- data/pdf2json-0.52-source/src/.DS_Store +0 -0
- data/pdf2json-0.52-source/src/GVector.h +101 -0
- data/pdf2json-0.52-source/src/ImgOutputDev.cc +1243 -0
- data/pdf2json-0.52-source/src/ImgOutputDev.h +307 -0
- data/pdf2json-0.52-source/src/ImgOutputDev.o +0 -0
- data/pdf2json-0.52-source/src/Makefile +68 -0
- data/pdf2json-0.52-source/src/Makefile.in +68 -0
- data/pdf2json-0.52-source/src/XmlFonts.cc +367 -0
- data/pdf2json-0.52-source/src/XmlFonts.h +91 -0
- data/pdf2json-0.52-source/src/XmlFonts.o +0 -0
- data/pdf2json-0.52-source/src/XmlLinks.cc +101 -0
- data/pdf2json-0.52-source/src/XmlLinks.h +54 -0
- data/pdf2json-0.52-source/src/XmlLinks.o +0 -0
- data/pdf2json-0.52-source/src/pdf2json +0 -0
- data/pdf2json-0.52-source/src/pdf2json.cc +343 -0
- data/pdf2json-0.52-source/src/pdf2json.o +0 -0
- data/pdf2json-0.52-source/src/pdf2xml.dtd +22 -0
- data/pdf2json-0.52-source/src/pdf2xmljson.dtd +9 -0
- data/pdf2json-0.52-source/xpdf/.DS_Store +0 -0
- data/pdf2json-0.52-source/xpdf/Annot.cc +1556 -0
- data/pdf2json-0.52-source/xpdf/Annot.h +142 -0
- data/pdf2json-0.52-source/xpdf/Annot.o +0 -0
- data/pdf2json-0.52-source/xpdf/Array.cc +73 -0
- data/pdf2json-0.52-source/xpdf/Array.h +58 -0
- data/pdf2json-0.52-source/xpdf/Array.o +0 -0
- data/pdf2json-0.52-source/xpdf/BuiltinFont.cc +65 -0
- data/pdf2json-0.52-source/xpdf/BuiltinFont.h +57 -0
- data/pdf2json-0.52-source/xpdf/BuiltinFont.o +0 -0
- data/pdf2json-0.52-source/xpdf/BuiltinFontTables.cc +4284 -0
- data/pdf2json-0.52-source/xpdf/BuiltinFontTables.h +23 -0
- data/pdf2json-0.52-source/xpdf/BuiltinFontTables.o +0 -0
- data/pdf2json-0.52-source/xpdf/CMap.cc +408 -0
- data/pdf2json-0.52-source/xpdf/CMap.h +102 -0
- data/pdf2json-0.52-source/xpdf/CMap.o +0 -0
- data/pdf2json-0.52-source/xpdf/Catalog.cc +374 -0
- data/pdf2json-0.52-source/xpdf/Catalog.h +97 -0
- data/pdf2json-0.52-source/xpdf/Catalog.o +0 -0
- data/pdf2json-0.52-source/xpdf/CharCodeToUnicode.cc +540 -0
- data/pdf2json-0.52-source/xpdf/CharCodeToUnicode.h +117 -0
- data/pdf2json-0.52-source/xpdf/CharCodeToUnicode.o +0 -0
- data/pdf2json-0.52-source/xpdf/CharTypes.h +24 -0
- data/pdf2json-0.52-source/xpdf/CompactFontTables.h +464 -0
- data/pdf2json-0.52-source/xpdf/CoreOutputDev.cc +61 -0
- data/pdf2json-0.52-source/xpdf/CoreOutputDev.h +61 -0
- data/pdf2json-0.52-source/xpdf/Decrypt.cc +776 -0
- data/pdf2json-0.52-source/xpdf/Decrypt.h +95 -0
- data/pdf2json-0.52-source/xpdf/Decrypt.o +0 -0
- data/pdf2json-0.52-source/xpdf/Dict.cc +95 -0
- data/pdf2json-0.52-source/xpdf/Dict.h +77 -0
- data/pdf2json-0.52-source/xpdf/Dict.o +0 -0
- data/pdf2json-0.52-source/xpdf/Error.cc +38 -0
- data/pdf2json-0.52-source/xpdf/Error.h +23 -0
- data/pdf2json-0.52-source/xpdf/Error.o +0 -0
- data/pdf2json-0.52-source/xpdf/ErrorCodes.h +36 -0
- data/pdf2json-0.52-source/xpdf/FontEncodingTables.cc +1824 -0
- data/pdf2json-0.52-source/xpdf/FontEncodingTables.h +20 -0
- data/pdf2json-0.52-source/xpdf/FontEncodingTables.o +0 -0
- data/pdf2json-0.52-source/xpdf/Function.cc +1573 -0
- data/pdf2json-0.52-source/xpdf/Function.h +229 -0
- data/pdf2json-0.52-source/xpdf/Function.o +0 -0
- data/pdf2json-0.52-source/xpdf/Gfx.cc +4187 -0
- data/pdf2json-0.52-source/xpdf/Gfx.h +312 -0
- data/pdf2json-0.52-source/xpdf/Gfx.o +0 -0
- data/pdf2json-0.52-source/xpdf/GfxFont.cc +1568 -0
- data/pdf2json-0.52-source/xpdf/GfxFont.h +320 -0
- data/pdf2json-0.52-source/xpdf/GfxFont.o +0 -0
- data/pdf2json-0.52-source/xpdf/GfxState.cc +4137 -0
- data/pdf2json-0.52-source/xpdf/GfxState.h +1244 -0
- data/pdf2json-0.52-source/xpdf/GfxState.o +0 -0
- data/pdf2json-0.52-source/xpdf/GlobalParams.cc +2924 -0
- data/pdf2json-0.52-source/xpdf/GlobalParams.cc.old +2908 -0
- data/pdf2json-0.52-source/xpdf/GlobalParams.h +466 -0
- data/pdf2json-0.52-source/xpdf/GlobalParams.h.old +463 -0
- data/pdf2json-0.52-source/xpdf/GlobalParams.o +0 -0
- data/pdf2json-0.52-source/xpdf/ImageOutputDev.cc +195 -0
- data/pdf2json-0.52-source/xpdf/ImageOutputDev.h +76 -0
- data/pdf2json-0.52-source/xpdf/ImageOutputDev.o +0 -0
- data/pdf2json-0.52-source/xpdf/JArithmeticDecoder.cc +322 -0
- data/pdf2json-0.52-source/xpdf/JArithmeticDecoder.h +109 -0
- data/pdf2json-0.52-source/xpdf/JArithmeticDecoder.o +0 -0
- data/pdf2json-0.52-source/xpdf/JBIG2Stream.cc +3413 -0
- data/pdf2json-0.52-source/xpdf/JBIG2Stream.h +145 -0
- data/pdf2json-0.52-source/xpdf/JBIG2Stream.o +0 -0
- data/pdf2json-0.52-source/xpdf/JPXStream.cc +3144 -0
- data/pdf2json-0.52-source/xpdf/JPXStream.h +351 -0
- data/pdf2json-0.52-source/xpdf/JPXStream.o +0 -0
- data/pdf2json-0.52-source/xpdf/Lexer.cc +485 -0
- data/pdf2json-0.52-source/xpdf/Lexer.h +80 -0
- data/pdf2json-0.52-source/xpdf/Lexer.o +0 -0
- data/pdf2json-0.52-source/xpdf/Link.cc +806 -0
- data/pdf2json-0.52-source/xpdf/Link.cc.old +784 -0
- data/pdf2json-0.52-source/xpdf/Link.h +415 -0
- data/pdf2json-0.52-source/xpdf/Link.h.old +369 -0
- data/pdf2json-0.52-source/xpdf/Link.o +0 -0
- data/pdf2json-0.52-source/xpdf/Makefile +232 -0
- data/pdf2json-0.52-source/xpdf/Makefile.dep +0 -0
- data/pdf2json-0.52-source/xpdf/Makefile.in +232 -0
- data/pdf2json-0.52-source/xpdf/NameToCharCode.cc +116 -0
- data/pdf2json-0.52-source/xpdf/NameToCharCode.h +42 -0
- data/pdf2json-0.52-source/xpdf/NameToCharCode.o +0 -0
- data/pdf2json-0.52-source/xpdf/NameToUnicodeTable.h +1097 -0
- data/pdf2json-0.52-source/xpdf/Object.cc +231 -0
- data/pdf2json-0.52-source/xpdf/Object.h +303 -0
- data/pdf2json-0.52-source/xpdf/Object.o +0 -0
- data/pdf2json-0.52-source/xpdf/Outline.cc +151 -0
- data/pdf2json-0.52-source/xpdf/Outline.h +76 -0
- data/pdf2json-0.52-source/xpdf/Outline.o +0 -0
- data/pdf2json-0.52-source/xpdf/OutputDev.cc +131 -0
- data/pdf2json-0.52-source/xpdf/OutputDev.h +253 -0
- data/pdf2json-0.52-source/xpdf/OutputDev.o +0 -0
- data/pdf2json-0.52-source/xpdf/PDFCore.cc +2044 -0
- data/pdf2json-0.52-source/xpdf/PDFCore.h +321 -0
- data/pdf2json-0.52-source/xpdf/PDFDoc.cc +404 -0
- data/pdf2json-0.52-source/xpdf/PDFDoc.h +183 -0
- data/pdf2json-0.52-source/xpdf/PDFDoc.o +0 -0
- data/pdf2json-0.52-source/xpdf/PDFDocEncoding.cc +44 -0
- data/pdf2json-0.52-source/xpdf/PDFDocEncoding.h +16 -0
- data/pdf2json-0.52-source/xpdf/PDFDocEncoding.o +0 -0
- data/pdf2json-0.52-source/xpdf/PSOutputDev.cc +6224 -0
- data/pdf2json-0.52-source/xpdf/PSOutputDev.h +395 -0
- data/pdf2json-0.52-source/xpdf/PSOutputDev.o +0 -0
- data/pdf2json-0.52-source/xpdf/PSTokenizer.cc +135 -0
- data/pdf2json-0.52-source/xpdf/PSTokenizer.h +41 -0
- data/pdf2json-0.52-source/xpdf/PSTokenizer.o +0 -0
- data/pdf2json-0.52-source/xpdf/Page.cc +454 -0
- data/pdf2json-0.52-source/xpdf/Page.h +187 -0
- data/pdf2json-0.52-source/xpdf/Page.o +0 -0
- data/pdf2json-0.52-source/xpdf/Parser.cc +227 -0
- data/pdf2json-0.52-source/xpdf/Parser.h +59 -0
- data/pdf2json-0.52-source/xpdf/Parser.o +0 -0
- data/pdf2json-0.52-source/xpdf/PreScanOutputDev.cc +257 -0
- data/pdf2json-0.52-source/xpdf/PreScanOutputDev.h +130 -0
- data/pdf2json-0.52-source/xpdf/PreScanOutputDev.o +0 -0
- data/pdf2json-0.52-source/xpdf/SecurityHandler.cc +390 -0
- data/pdf2json-0.52-source/xpdf/SecurityHandler.h +160 -0
- data/pdf2json-0.52-source/xpdf/SecurityHandler.o +0 -0
- data/pdf2json-0.52-source/xpdf/SplashOutputDev.cc +2845 -0
- data/pdf2json-0.52-source/xpdf/SplashOutputDev.h +247 -0
- data/pdf2json-0.52-source/xpdf/SplashOutputDev.o +0 -0
- data/pdf2json-0.52-source/xpdf/Stream-CCITT.h +459 -0
- data/pdf2json-0.52-source/xpdf/Stream.cc +4627 -0
- data/pdf2json-0.52-source/xpdf/Stream.h +858 -0
- data/pdf2json-0.52-source/xpdf/Stream.o +0 -0
- data/pdf2json-0.52-source/xpdf/TextOutputDev.cc +4090 -0
- data/pdf2json-0.52-source/xpdf/TextOutputDev.h +661 -0
- data/pdf2json-0.52-source/xpdf/TextOutputDev.o +0 -0
- data/pdf2json-0.52-source/xpdf/UTF8.h +56 -0
- data/pdf2json-0.52-source/xpdf/UnicodeMap.cc +302 -0
- data/pdf2json-0.52-source/xpdf/UnicodeMap.cc.old +293 -0
- data/pdf2json-0.52-source/xpdf/UnicodeMap.h +135 -0
- data/pdf2json-0.52-source/xpdf/UnicodeMap.h.old +123 -0
- data/pdf2json-0.52-source/xpdf/UnicodeMap.o +0 -0
- data/pdf2json-0.52-source/xpdf/UnicodeMapTables.h +361 -0
- data/pdf2json-0.52-source/xpdf/UnicodeTypeTable.cc +949 -0
- data/pdf2json-0.52-source/xpdf/UnicodeTypeTable.h +20 -0
- data/pdf2json-0.52-source/xpdf/UnicodeTypeTable.o +0 -0
- data/pdf2json-0.52-source/xpdf/XPDFApp.cc +447 -0
- data/pdf2json-0.52-source/xpdf/XPDFApp.h +114 -0
- data/pdf2json-0.52-source/xpdf/XPDFCore.cc +1655 -0
- data/pdf2json-0.52-source/xpdf/XPDFCore.h +251 -0
- data/pdf2json-0.52-source/xpdf/XPDFTree.cc +931 -0
- data/pdf2json-0.52-source/xpdf/XPDFTree.h +45 -0
- data/pdf2json-0.52-source/xpdf/XPDFTreeP.h +87 -0
- data/pdf2json-0.52-source/xpdf/XPDFViewer.cc +3488 -0
- data/pdf2json-0.52-source/xpdf/XPDFViewer.h +352 -0
- data/pdf2json-0.52-source/xpdf/XRef.cc +896 -0
- data/pdf2json-0.52-source/xpdf/XRef.h +133 -0
- data/pdf2json-0.52-source/xpdf/XRef.o +0 -0
- data/pdf2json-0.52-source/xpdf/XpdfPluginAPI.cc +262 -0
- data/pdf2json-0.52-source/xpdf/XpdfPluginAPI.h +341 -0
- data/pdf2json-0.52-source/xpdf/XpdfPluginAPI.o +0 -0
- data/pdf2json-0.52-source/xpdf/about-text.h +48 -0
- data/pdf2json-0.52-source/xpdf/about.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/backArrow.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/backArrowDis.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/config.h +112 -0
- data/pdf2json-0.52-source/xpdf/dblLeftArrow.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/dblLeftArrowDis.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/dblRightArrow.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/dblRightArrowDis.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/find.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/findDis.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/forwardArrow.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/forwardArrowDis.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/leftArrow.xbm +5 -0
- data/pdf2json-0.52-source/xpdf/leftArrowDis.xbm +5 -0
- data/pdf2json-0.52-source/xpdf/libXpdf.a +0 -0
- data/pdf2json-0.52-source/xpdf/pdffonts +0 -0
- data/pdf2json-0.52-source/xpdf/pdffonts.cc +298 -0
- data/pdf2json-0.52-source/xpdf/pdffonts.o +0 -0
- data/pdf2json-0.52-source/xpdf/pdfimages +0 -0
- data/pdf2json-0.52-source/xpdf/pdfimages.cc +155 -0
- data/pdf2json-0.52-source/xpdf/pdfimages.o +0 -0
- data/pdf2json-0.52-source/xpdf/pdfinfo +0 -0
- data/pdf2json-0.52-source/xpdf/pdfinfo.cc +387 -0
- data/pdf2json-0.52-source/xpdf/pdfinfo.o +0 -0
- data/pdf2json-0.52-source/xpdf/pdftoppm.cc +203 -0
- data/pdf2json-0.52-source/xpdf/pdftops +0 -0
- data/pdf2json-0.52-source/xpdf/pdftops.cc +344 -0
- data/pdf2json-0.52-source/xpdf/pdftops.o +0 -0
- data/pdf2json-0.52-source/xpdf/pdftotext +0 -0
- data/pdf2json-0.52-source/xpdf/pdftotext.cc +333 -0
- data/pdf2json-0.52-source/xpdf/pdftotext.o +0 -0
- data/pdf2json-0.52-source/xpdf/print.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/printDis.xbm +6 -0
- data/pdf2json-0.52-source/xpdf/rightArrow.xbm +5 -0
- data/pdf2json-0.52-source/xpdf/rightArrowDis.xbm +5 -0
- data/pdf2json-0.52-source/xpdf/vms_make.com +129 -0
- data/pdf2json-0.52-source/xpdf/xpdf.cc +344 -0
- data/pdf2json-0.52-source/xpdf/xpdfIcon.xpm +62 -0
- data/pdf2json.gemspec +29 -0
- metadata +518 -0
@@ -0,0 +1,67 @@
|
|
1
|
+
/***************************************************************************/
|
2
|
+
/* */
|
3
|
+
/* ftpic.h */
|
4
|
+
/* */
|
5
|
+
/* The FreeType position independent code services (declaration). */
|
6
|
+
/* */
|
7
|
+
/* Copyright 2009 by */
|
8
|
+
/* Oran Agra and Mickey Gabel. */
|
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
|
+
/* Modules that ordinarily have const global data that need address */
|
21
|
+
/* can instead define pointers here. */
|
22
|
+
/* */
|
23
|
+
/*************************************************************************/
|
24
|
+
|
25
|
+
|
26
|
+
#ifndef __FTPIC_H__
|
27
|
+
#define __FTPIC_H__
|
28
|
+
|
29
|
+
|
30
|
+
FT_BEGIN_HEADER
|
31
|
+
|
32
|
+
#ifdef FT_CONFIG_OPTION_PIC
|
33
|
+
|
34
|
+
typedef struct FT_PIC_Container_
|
35
|
+
{
|
36
|
+
/* pic containers for base */
|
37
|
+
void* base;
|
38
|
+
/* pic containers for modules */
|
39
|
+
void* autofit;
|
40
|
+
void* cff;
|
41
|
+
void* pshinter;
|
42
|
+
void* psnames;
|
43
|
+
void* raster;
|
44
|
+
void* sfnt;
|
45
|
+
void* smooth;
|
46
|
+
void* truetype;
|
47
|
+
} FT_PIC_Container;
|
48
|
+
|
49
|
+
/* Initialize the various function tables, structs, etc. stored in the container. */
|
50
|
+
FT_BASE( FT_Error )
|
51
|
+
ft_pic_container_init( FT_Library library );
|
52
|
+
|
53
|
+
|
54
|
+
/* Destroy the contents of the container. */
|
55
|
+
FT_BASE( void )
|
56
|
+
ft_pic_container_destroy( FT_Library library );
|
57
|
+
|
58
|
+
#endif /* FT_CONFIG_OPTION_PIC */
|
59
|
+
|
60
|
+
/* */
|
61
|
+
|
62
|
+
FT_END_HEADER
|
63
|
+
|
64
|
+
#endif /* __FTPIC_H__ */
|
65
|
+
|
66
|
+
|
67
|
+
/* END */
|
@@ -0,0 +1,196 @@
|
|
1
|
+
/***************************************************************************/
|
2
|
+
/* */
|
3
|
+
/* ftrfork.h */
|
4
|
+
/* */
|
5
|
+
/* Embedded resource forks accessor (specification). */
|
6
|
+
/* */
|
7
|
+
/* Copyright 2004, 2006, 2007 by */
|
8
|
+
/* Masatake YAMATO and Redhat K.K. */
|
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
|
+
/* Development of the code in this file is support of */
|
20
|
+
/* Information-technology Promotion Agency, Japan. */
|
21
|
+
/***************************************************************************/
|
22
|
+
|
23
|
+
|
24
|
+
#ifndef __FTRFORK_H__
|
25
|
+
#define __FTRFORK_H__
|
26
|
+
|
27
|
+
|
28
|
+
#include <ft2build.h>
|
29
|
+
#include FT_INTERNAL_OBJECTS_H
|
30
|
+
|
31
|
+
|
32
|
+
FT_BEGIN_HEADER
|
33
|
+
|
34
|
+
|
35
|
+
/* Number of guessing rules supported in `FT_Raccess_Guess'. */
|
36
|
+
/* Don't forget to increment the number if you add a new guessing rule. */
|
37
|
+
#define FT_RACCESS_N_RULES 9
|
38
|
+
|
39
|
+
|
40
|
+
/* A structure to describe a reference in a resource by its resource ID */
|
41
|
+
/* and internal offset. The `POST' resource expects to be concatenated */
|
42
|
+
/* by the order of resource IDs instead of its appearance in the file. */
|
43
|
+
|
44
|
+
typedef struct FT_RFork_Ref_
|
45
|
+
{
|
46
|
+
FT_UShort res_id;
|
47
|
+
FT_ULong offset;
|
48
|
+
|
49
|
+
} FT_RFork_Ref;
|
50
|
+
|
51
|
+
|
52
|
+
/*************************************************************************/
|
53
|
+
/* */
|
54
|
+
/* <Function> */
|
55
|
+
/* FT_Raccess_Guess */
|
56
|
+
/* */
|
57
|
+
/* <Description> */
|
58
|
+
/* Guess a file name and offset where the actual resource fork is */
|
59
|
+
/* stored. The macro FT_RACCESS_N_RULES holds the number of */
|
60
|
+
/* guessing rules; the guessed result for the Nth rule is */
|
61
|
+
/* represented as a triplet: a new file name (new_names[N]), a file */
|
62
|
+
/* offset (offsets[N]), and an error code (errors[N]). */
|
63
|
+
/* */
|
64
|
+
/* <Input> */
|
65
|
+
/* library :: */
|
66
|
+
/* A FreeType library instance. */
|
67
|
+
/* */
|
68
|
+
/* stream :: */
|
69
|
+
/* A file stream containing the resource fork. */
|
70
|
+
/* */
|
71
|
+
/* base_name :: */
|
72
|
+
/* The (base) file name of the resource fork used for some */
|
73
|
+
/* guessing rules. */
|
74
|
+
/* */
|
75
|
+
/* <Output> */
|
76
|
+
/* new_names :: */
|
77
|
+
/* An array of guessed file names in which the resource forks may */
|
78
|
+
/* exist. If `new_names[N]' is NULL, the guessed file name is */
|
79
|
+
/* equal to `base_name'. */
|
80
|
+
/* */
|
81
|
+
/* offsets :: */
|
82
|
+
/* An array of guessed file offsets. `offsets[N]' holds the file */
|
83
|
+
/* offset of the possible start of the resource fork in file */
|
84
|
+
/* `new_names[N]'. */
|
85
|
+
/* */
|
86
|
+
/* errors :: */
|
87
|
+
/* An array of FreeType error codes. `errors[N]' is the error */
|
88
|
+
/* code of Nth guessing rule function. If `errors[N]' is not */
|
89
|
+
/* FT_Err_Ok, `new_names[N]' and `offsets[N]' are meaningless. */
|
90
|
+
/* */
|
91
|
+
FT_BASE( void )
|
92
|
+
FT_Raccess_Guess( FT_Library library,
|
93
|
+
FT_Stream stream,
|
94
|
+
char* base_name,
|
95
|
+
char** new_names,
|
96
|
+
FT_Long* offsets,
|
97
|
+
FT_Error* errors );
|
98
|
+
|
99
|
+
|
100
|
+
/*************************************************************************/
|
101
|
+
/* */
|
102
|
+
/* <Function> */
|
103
|
+
/* FT_Raccess_Get_HeaderInfo */
|
104
|
+
/* */
|
105
|
+
/* <Description> */
|
106
|
+
/* Get the information from the header of resource fork. The */
|
107
|
+
/* information includes the file offset where the resource map */
|
108
|
+
/* starts, and the file offset where the resource data starts. */
|
109
|
+
/* `FT_Raccess_Get_DataOffsets' requires these two data. */
|
110
|
+
/* */
|
111
|
+
/* <Input> */
|
112
|
+
/* library :: */
|
113
|
+
/* A FreeType library instance. */
|
114
|
+
/* */
|
115
|
+
/* stream :: */
|
116
|
+
/* A file stream containing the resource fork. */
|
117
|
+
/* */
|
118
|
+
/* rfork_offset :: */
|
119
|
+
/* The file offset where the resource fork starts. */
|
120
|
+
/* */
|
121
|
+
/* <Output> */
|
122
|
+
/* map_offset :: */
|
123
|
+
/* The file offset where the resource map starts. */
|
124
|
+
/* */
|
125
|
+
/* rdata_pos :: */
|
126
|
+
/* The file offset where the resource data starts. */
|
127
|
+
/* */
|
128
|
+
/* <Return> */
|
129
|
+
/* FreeType error code. FT_Err_Ok means success. */
|
130
|
+
/* */
|
131
|
+
FT_BASE( FT_Error )
|
132
|
+
FT_Raccess_Get_HeaderInfo( FT_Library library,
|
133
|
+
FT_Stream stream,
|
134
|
+
FT_Long rfork_offset,
|
135
|
+
FT_Long *map_offset,
|
136
|
+
FT_Long *rdata_pos );
|
137
|
+
|
138
|
+
|
139
|
+
/*************************************************************************/
|
140
|
+
/* */
|
141
|
+
/* <Function> */
|
142
|
+
/* FT_Raccess_Get_DataOffsets */
|
143
|
+
/* */
|
144
|
+
/* <Description> */
|
145
|
+
/* Get the data offsets for a tag in a resource fork. Offsets are */
|
146
|
+
/* stored in an array because, in some cases, resources in a resource */
|
147
|
+
/* fork have the same tag. */
|
148
|
+
/* */
|
149
|
+
/* <Input> */
|
150
|
+
/* library :: */
|
151
|
+
/* A FreeType library instance. */
|
152
|
+
/* */
|
153
|
+
/* stream :: */
|
154
|
+
/* A file stream containing the resource fork. */
|
155
|
+
/* */
|
156
|
+
/* map_offset :: */
|
157
|
+
/* The file offset where the resource map starts. */
|
158
|
+
/* */
|
159
|
+
/* rdata_pos :: */
|
160
|
+
/* The file offset where the resource data starts. */
|
161
|
+
/* */
|
162
|
+
/* tag :: */
|
163
|
+
/* The resource tag. */
|
164
|
+
/* */
|
165
|
+
/* <Output> */
|
166
|
+
/* offsets :: */
|
167
|
+
/* The stream offsets for the resource data specified by `tag'. */
|
168
|
+
/* This array is allocated by the function, so you have to call */
|
169
|
+
/* @ft_mem_free after use. */
|
170
|
+
/* */
|
171
|
+
/* count :: */
|
172
|
+
/* The length of offsets array. */
|
173
|
+
/* */
|
174
|
+
/* <Return> */
|
175
|
+
/* FreeType error code. FT_Err_Ok means success. */
|
176
|
+
/* */
|
177
|
+
/* <Note> */
|
178
|
+
/* Normally you should use `FT_Raccess_Get_HeaderInfo' to get the */
|
179
|
+
/* value for `map_offset' and `rdata_pos'. */
|
180
|
+
/* */
|
181
|
+
FT_BASE( FT_Error )
|
182
|
+
FT_Raccess_Get_DataOffsets( FT_Library library,
|
183
|
+
FT_Stream stream,
|
184
|
+
FT_Long map_offset,
|
185
|
+
FT_Long rdata_pos,
|
186
|
+
FT_Long tag,
|
187
|
+
FT_Long **offsets,
|
188
|
+
FT_Long *count );
|
189
|
+
|
190
|
+
|
191
|
+
FT_END_HEADER
|
192
|
+
|
193
|
+
#endif /* __FTRFORK_H__ */
|
194
|
+
|
195
|
+
|
196
|
+
/* END */
|
@@ -0,0 +1,620 @@
|
|
1
|
+
/***************************************************************************/
|
2
|
+
/* */
|
3
|
+
/* ftserv.h */
|
4
|
+
/* */
|
5
|
+
/* The FreeType services (specification only). */
|
6
|
+
/* */
|
7
|
+
/* Copyright 2003, 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
|
+
/* */
|
20
|
+
/* Each module can export one or more `services'. Each service is */
|
21
|
+
/* identified by a constant string and modeled by a pointer; the latter */
|
22
|
+
/* generally corresponds to a structure containing function pointers. */
|
23
|
+
/* */
|
24
|
+
/* Note that a service's data cannot be a mere function pointer because */
|
25
|
+
/* in C it is possible that function pointers might be implemented */
|
26
|
+
/* differently than data pointers (e.g. 48 bits instead of 32). */
|
27
|
+
/* */
|
28
|
+
/*************************************************************************/
|
29
|
+
|
30
|
+
|
31
|
+
#ifndef __FTSERV_H__
|
32
|
+
#define __FTSERV_H__
|
33
|
+
|
34
|
+
|
35
|
+
FT_BEGIN_HEADER
|
36
|
+
|
37
|
+
#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
|
38
|
+
|
39
|
+
/* we disable the warning `conditional expression is constant' here */
|
40
|
+
/* in order to compile cleanly with the maximum level of warnings */
|
41
|
+
#pragma warning( disable : 4127 )
|
42
|
+
|
43
|
+
#endif /* _MSC_VER */
|
44
|
+
|
45
|
+
/*
|
46
|
+
* @macro:
|
47
|
+
* FT_FACE_FIND_SERVICE
|
48
|
+
*
|
49
|
+
* @description:
|
50
|
+
* This macro is used to look up a service from a face's driver module.
|
51
|
+
*
|
52
|
+
* @input:
|
53
|
+
* face ::
|
54
|
+
* The source face handle.
|
55
|
+
*
|
56
|
+
* id ::
|
57
|
+
* A string describing the service as defined in the service's
|
58
|
+
* header files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to
|
59
|
+
* `multi-masters'). It is automatically prefixed with
|
60
|
+
* `FT_SERVICE_ID_'.
|
61
|
+
*
|
62
|
+
* @output:
|
63
|
+
* ptr ::
|
64
|
+
* A variable that receives the service pointer. Will be NULL
|
65
|
+
* if not found.
|
66
|
+
*/
|
67
|
+
#ifdef __cplusplus
|
68
|
+
|
69
|
+
#define FT_FACE_FIND_SERVICE( face, ptr, id ) \
|
70
|
+
FT_BEGIN_STMNT \
|
71
|
+
FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \
|
72
|
+
FT_Pointer _tmp_ = NULL; \
|
73
|
+
FT_Pointer* _pptr_ = (FT_Pointer*)&(ptr); \
|
74
|
+
\
|
75
|
+
\
|
76
|
+
if ( module->clazz->get_interface ) \
|
77
|
+
_tmp_ = module->clazz->get_interface( module, FT_SERVICE_ID_ ## id ); \
|
78
|
+
*_pptr_ = _tmp_; \
|
79
|
+
FT_END_STMNT
|
80
|
+
|
81
|
+
#else /* !C++ */
|
82
|
+
|
83
|
+
#define FT_FACE_FIND_SERVICE( face, ptr, id ) \
|
84
|
+
FT_BEGIN_STMNT \
|
85
|
+
FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \
|
86
|
+
FT_Pointer _tmp_ = NULL; \
|
87
|
+
\
|
88
|
+
if ( module->clazz->get_interface ) \
|
89
|
+
_tmp_ = module->clazz->get_interface( module, FT_SERVICE_ID_ ## id ); \
|
90
|
+
ptr = _tmp_; \
|
91
|
+
FT_END_STMNT
|
92
|
+
|
93
|
+
#endif /* !C++ */
|
94
|
+
|
95
|
+
/*
|
96
|
+
* @macro:
|
97
|
+
* FT_FACE_FIND_GLOBAL_SERVICE
|
98
|
+
*
|
99
|
+
* @description:
|
100
|
+
* This macro is used to look up a service from all modules.
|
101
|
+
*
|
102
|
+
* @input:
|
103
|
+
* face ::
|
104
|
+
* The source face handle.
|
105
|
+
*
|
106
|
+
* id ::
|
107
|
+
* A string describing the service as defined in the service's
|
108
|
+
* header files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to
|
109
|
+
* `multi-masters'). It is automatically prefixed with
|
110
|
+
* `FT_SERVICE_ID_'.
|
111
|
+
*
|
112
|
+
* @output:
|
113
|
+
* ptr ::
|
114
|
+
* A variable that receives the service pointer. Will be NULL
|
115
|
+
* if not found.
|
116
|
+
*/
|
117
|
+
#ifdef __cplusplus
|
118
|
+
|
119
|
+
#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id ) \
|
120
|
+
FT_BEGIN_STMNT \
|
121
|
+
FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \
|
122
|
+
FT_Pointer _tmp_; \
|
123
|
+
FT_Pointer* _pptr_ = (FT_Pointer*)&(ptr); \
|
124
|
+
\
|
125
|
+
\
|
126
|
+
_tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \
|
127
|
+
*_pptr_ = _tmp_; \
|
128
|
+
FT_END_STMNT
|
129
|
+
|
130
|
+
#else /* !C++ */
|
131
|
+
|
132
|
+
#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id ) \
|
133
|
+
FT_BEGIN_STMNT \
|
134
|
+
FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \
|
135
|
+
FT_Pointer _tmp_; \
|
136
|
+
\
|
137
|
+
\
|
138
|
+
_tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \
|
139
|
+
ptr = _tmp_; \
|
140
|
+
FT_END_STMNT
|
141
|
+
|
142
|
+
#endif /* !C++ */
|
143
|
+
|
144
|
+
|
145
|
+
/*************************************************************************/
|
146
|
+
/*************************************************************************/
|
147
|
+
/***** *****/
|
148
|
+
/***** S E R V I C E D E S C R I P T O R S *****/
|
149
|
+
/***** *****/
|
150
|
+
/*************************************************************************/
|
151
|
+
/*************************************************************************/
|
152
|
+
|
153
|
+
/*
|
154
|
+
* The following structure is used to _describe_ a given service
|
155
|
+
* to the library. This is useful to build simple static service lists.
|
156
|
+
*/
|
157
|
+
typedef struct FT_ServiceDescRec_
|
158
|
+
{
|
159
|
+
const char* serv_id; /* service name */
|
160
|
+
const void* serv_data; /* service pointer/data */
|
161
|
+
|
162
|
+
} FT_ServiceDescRec;
|
163
|
+
|
164
|
+
typedef const FT_ServiceDescRec* FT_ServiceDesc;
|
165
|
+
|
166
|
+
/*************************************************************************/
|
167
|
+
/* */
|
168
|
+
/* <Macro> */
|
169
|
+
/* FT_DEFINE_SERVICEDESCREC1 .. FT_DEFINE_SERVICEDESCREC6 */
|
170
|
+
/* */
|
171
|
+
/* <Description> */
|
172
|
+
/* Used to initialize an array of FT_ServiceDescRec structs. */
|
173
|
+
/* */
|
174
|
+
/* When FT_CONFIG_OPTION_PIC is defined a Create funtion will need */
|
175
|
+
/* to called with a pointer where the allocated array is returned. */
|
176
|
+
/* And when it is no longer needed a Destroy function needs */
|
177
|
+
/* to be called to release that allocation. */
|
178
|
+
/* */
|
179
|
+
/* These functions should be manyally called from the pic_init and */
|
180
|
+
/* pic_free functions of your module (see FT_DEFINE_MODULE) */
|
181
|
+
/* */
|
182
|
+
/* When FT_CONFIG_OPTION_PIC is not defined the array will be */
|
183
|
+
/* allocated in the global scope (or the scope where the macro */
|
184
|
+
/* is used). */
|
185
|
+
/* */
|
186
|
+
#ifndef FT_CONFIG_OPTION_PIC
|
187
|
+
|
188
|
+
#define FT_DEFINE_SERVICEDESCREC1(class_, serv_id_1, serv_data_1) \
|
189
|
+
static const FT_ServiceDescRec class_[] = \
|
190
|
+
{ \
|
191
|
+
{serv_id_1, serv_data_1}, \
|
192
|
+
{NULL, NULL} \
|
193
|
+
};
|
194
|
+
#define FT_DEFINE_SERVICEDESCREC2(class_, serv_id_1, serv_data_1, \
|
195
|
+
serv_id_2, serv_data_2) \
|
196
|
+
static const FT_ServiceDescRec class_[] = \
|
197
|
+
{ \
|
198
|
+
{serv_id_1, serv_data_1}, \
|
199
|
+
{serv_id_2, serv_data_2}, \
|
200
|
+
{NULL, NULL} \
|
201
|
+
};
|
202
|
+
#define FT_DEFINE_SERVICEDESCREC3(class_, serv_id_1, serv_data_1, \
|
203
|
+
serv_id_2, serv_data_2, serv_id_3, serv_data_3) \
|
204
|
+
static const FT_ServiceDescRec class_[] = \
|
205
|
+
{ \
|
206
|
+
{serv_id_1, serv_data_1}, \
|
207
|
+
{serv_id_2, serv_data_2}, \
|
208
|
+
{serv_id_3, serv_data_3}, \
|
209
|
+
{NULL, NULL} \
|
210
|
+
};
|
211
|
+
#define FT_DEFINE_SERVICEDESCREC4(class_, serv_id_1, serv_data_1, \
|
212
|
+
serv_id_2, serv_data_2, serv_id_3, serv_data_3, \
|
213
|
+
serv_id_4, serv_data_4) \
|
214
|
+
static const FT_ServiceDescRec class_[] = \
|
215
|
+
{ \
|
216
|
+
{serv_id_1, serv_data_1}, \
|
217
|
+
{serv_id_2, serv_data_2}, \
|
218
|
+
{serv_id_3, serv_data_3}, \
|
219
|
+
{serv_id_4, serv_data_4}, \
|
220
|
+
{NULL, NULL} \
|
221
|
+
};
|
222
|
+
#define FT_DEFINE_SERVICEDESCREC5(class_, serv_id_1, serv_data_1, \
|
223
|
+
serv_id_2, serv_data_2, serv_id_3, serv_data_3, \
|
224
|
+
serv_id_4, serv_data_4, serv_id_5, serv_data_5) \
|
225
|
+
static const FT_ServiceDescRec class_[] = \
|
226
|
+
{ \
|
227
|
+
{serv_id_1, serv_data_1}, \
|
228
|
+
{serv_id_2, serv_data_2}, \
|
229
|
+
{serv_id_3, serv_data_3}, \
|
230
|
+
{serv_id_4, serv_data_4}, \
|
231
|
+
{serv_id_5, serv_data_5}, \
|
232
|
+
{NULL, NULL} \
|
233
|
+
};
|
234
|
+
#define FT_DEFINE_SERVICEDESCREC6(class_, serv_id_1, serv_data_1, \
|
235
|
+
serv_id_2, serv_data_2, serv_id_3, serv_data_3, \
|
236
|
+
serv_id_4, serv_data_4, serv_id_5, serv_data_5, \
|
237
|
+
serv_id_6, serv_data_6) \
|
238
|
+
static const FT_ServiceDescRec class_[] = \
|
239
|
+
{ \
|
240
|
+
{serv_id_1, serv_data_1}, \
|
241
|
+
{serv_id_2, serv_data_2}, \
|
242
|
+
{serv_id_3, serv_data_3}, \
|
243
|
+
{serv_id_4, serv_data_4}, \
|
244
|
+
{serv_id_5, serv_data_5}, \
|
245
|
+
{serv_id_6, serv_data_6}, \
|
246
|
+
{NULL, NULL} \
|
247
|
+
};
|
248
|
+
|
249
|
+
#else /* FT_CONFIG_OPTION_PIC */
|
250
|
+
|
251
|
+
#define FT_DEFINE_SERVICEDESCREC1(class_, serv_id_1, serv_data_1) \
|
252
|
+
void \
|
253
|
+
FT_Destroy_Class_##class_( FT_Library library, \
|
254
|
+
FT_ServiceDescRec* clazz ) \
|
255
|
+
{ \
|
256
|
+
FT_Memory memory = library->memory; \
|
257
|
+
if ( clazz ) \
|
258
|
+
FT_FREE( clazz ); \
|
259
|
+
} \
|
260
|
+
\
|
261
|
+
FT_Error \
|
262
|
+
FT_Create_Class_##class_( FT_Library library, \
|
263
|
+
FT_ServiceDescRec** output_class) \
|
264
|
+
{ \
|
265
|
+
FT_ServiceDescRec* clazz; \
|
266
|
+
FT_Error error; \
|
267
|
+
FT_Memory memory = library->memory; \
|
268
|
+
\
|
269
|
+
if ( FT_ALLOC( clazz, sizeof(*clazz)*2 ) ) \
|
270
|
+
return error; \
|
271
|
+
clazz[0].serv_id = serv_id_1; \
|
272
|
+
clazz[0].serv_data = serv_data_1; \
|
273
|
+
clazz[1].serv_id = NULL; \
|
274
|
+
clazz[1].serv_data = NULL; \
|
275
|
+
*output_class = clazz; \
|
276
|
+
return FT_Err_Ok; \
|
277
|
+
}
|
278
|
+
|
279
|
+
#define FT_DEFINE_SERVICEDESCREC2(class_, serv_id_1, serv_data_1, \
|
280
|
+
serv_id_2, serv_data_2) \
|
281
|
+
void \
|
282
|
+
FT_Destroy_Class_##class_( FT_Library library, \
|
283
|
+
FT_ServiceDescRec* clazz ) \
|
284
|
+
{ \
|
285
|
+
FT_Memory memory = library->memory; \
|
286
|
+
if ( clazz ) \
|
287
|
+
FT_FREE( clazz ); \
|
288
|
+
} \
|
289
|
+
\
|
290
|
+
FT_Error \
|
291
|
+
FT_Create_Class_##class_( FT_Library library, \
|
292
|
+
FT_ServiceDescRec** output_class) \
|
293
|
+
{ \
|
294
|
+
FT_ServiceDescRec* clazz; \
|
295
|
+
FT_Error error; \
|
296
|
+
FT_Memory memory = library->memory; \
|
297
|
+
\
|
298
|
+
if ( FT_ALLOC( clazz, sizeof(*clazz)*3 ) ) \
|
299
|
+
return error; \
|
300
|
+
clazz[0].serv_id = serv_id_1; \
|
301
|
+
clazz[0].serv_data = serv_data_1; \
|
302
|
+
clazz[1].serv_id = serv_id_2; \
|
303
|
+
clazz[1].serv_data = serv_data_2; \
|
304
|
+
clazz[2].serv_id = NULL; \
|
305
|
+
clazz[2].serv_data = NULL; \
|
306
|
+
*output_class = clazz; \
|
307
|
+
return FT_Err_Ok; \
|
308
|
+
}
|
309
|
+
|
310
|
+
#define FT_DEFINE_SERVICEDESCREC3(class_, serv_id_1, serv_data_1, \
|
311
|
+
serv_id_2, serv_data_2, serv_id_3, serv_data_3) \
|
312
|
+
void \
|
313
|
+
FT_Destroy_Class_##class_( FT_Library library, \
|
314
|
+
FT_ServiceDescRec* clazz ) \
|
315
|
+
{ \
|
316
|
+
FT_Memory memory = library->memory; \
|
317
|
+
if ( clazz ) \
|
318
|
+
FT_FREE( clazz ); \
|
319
|
+
} \
|
320
|
+
\
|
321
|
+
FT_Error \
|
322
|
+
FT_Create_Class_##class_( FT_Library library, \
|
323
|
+
FT_ServiceDescRec** output_class) \
|
324
|
+
{ \
|
325
|
+
FT_ServiceDescRec* clazz; \
|
326
|
+
FT_Error error; \
|
327
|
+
FT_Memory memory = library->memory; \
|
328
|
+
\
|
329
|
+
if ( FT_ALLOC( clazz, sizeof(*clazz)*4 ) ) \
|
330
|
+
return error; \
|
331
|
+
clazz[0].serv_id = serv_id_1; \
|
332
|
+
clazz[0].serv_data = serv_data_1; \
|
333
|
+
clazz[1].serv_id = serv_id_2; \
|
334
|
+
clazz[1].serv_data = serv_data_2; \
|
335
|
+
clazz[2].serv_id = serv_id_3; \
|
336
|
+
clazz[2].serv_data = serv_data_3; \
|
337
|
+
clazz[3].serv_id = NULL; \
|
338
|
+
clazz[3].serv_data = NULL; \
|
339
|
+
*output_class = clazz; \
|
340
|
+
return FT_Err_Ok; \
|
341
|
+
}
|
342
|
+
|
343
|
+
#define FT_DEFINE_SERVICEDESCREC4(class_, serv_id_1, serv_data_1, \
|
344
|
+
serv_id_2, serv_data_2, serv_id_3, serv_data_3, \
|
345
|
+
serv_id_4, serv_data_4) \
|
346
|
+
void \
|
347
|
+
FT_Destroy_Class_##class_( FT_Library library, \
|
348
|
+
FT_ServiceDescRec* clazz ) \
|
349
|
+
{ \
|
350
|
+
FT_Memory memory = library->memory; \
|
351
|
+
if ( clazz ) \
|
352
|
+
FT_FREE( clazz ); \
|
353
|
+
} \
|
354
|
+
\
|
355
|
+
FT_Error \
|
356
|
+
FT_Create_Class_##class_( FT_Library library, \
|
357
|
+
FT_ServiceDescRec** output_class) \
|
358
|
+
{ \
|
359
|
+
FT_ServiceDescRec* clazz; \
|
360
|
+
FT_Error error; \
|
361
|
+
FT_Memory memory = library->memory; \
|
362
|
+
\
|
363
|
+
if ( FT_ALLOC( clazz, sizeof(*clazz)*5 ) ) \
|
364
|
+
return error; \
|
365
|
+
clazz[0].serv_id = serv_id_1; \
|
366
|
+
clazz[0].serv_data = serv_data_1; \
|
367
|
+
clazz[1].serv_id = serv_id_2; \
|
368
|
+
clazz[1].serv_data = serv_data_2; \
|
369
|
+
clazz[2].serv_id = serv_id_3; \
|
370
|
+
clazz[2].serv_data = serv_data_3; \
|
371
|
+
clazz[3].serv_id = serv_id_4; \
|
372
|
+
clazz[3].serv_data = serv_data_4; \
|
373
|
+
clazz[4].serv_id = NULL; \
|
374
|
+
clazz[4].serv_data = NULL; \
|
375
|
+
*output_class = clazz; \
|
376
|
+
return FT_Err_Ok; \
|
377
|
+
}
|
378
|
+
|
379
|
+
#define FT_DEFINE_SERVICEDESCREC5(class_, serv_id_1, serv_data_1, \
|
380
|
+
serv_id_2, serv_data_2, serv_id_3, serv_data_3, serv_id_4, \
|
381
|
+
serv_data_4, serv_id_5, serv_data_5) \
|
382
|
+
void \
|
383
|
+
FT_Destroy_Class_##class_( FT_Library library, \
|
384
|
+
FT_ServiceDescRec* clazz ) \
|
385
|
+
{ \
|
386
|
+
FT_Memory memory = library->memory; \
|
387
|
+
if ( clazz ) \
|
388
|
+
FT_FREE( clazz ); \
|
389
|
+
} \
|
390
|
+
\
|
391
|
+
FT_Error \
|
392
|
+
FT_Create_Class_##class_( FT_Library library, \
|
393
|
+
FT_ServiceDescRec** output_class) \
|
394
|
+
{ \
|
395
|
+
FT_ServiceDescRec* clazz; \
|
396
|
+
FT_Error error; \
|
397
|
+
FT_Memory memory = library->memory; \
|
398
|
+
\
|
399
|
+
if ( FT_ALLOC( clazz, sizeof(*clazz)*6 ) ) \
|
400
|
+
return error; \
|
401
|
+
clazz[0].serv_id = serv_id_1; \
|
402
|
+
clazz[0].serv_data = serv_data_1; \
|
403
|
+
clazz[1].serv_id = serv_id_2; \
|
404
|
+
clazz[1].serv_data = serv_data_2; \
|
405
|
+
clazz[2].serv_id = serv_id_3; \
|
406
|
+
clazz[2].serv_data = serv_data_3; \
|
407
|
+
clazz[3].serv_id = serv_id_4; \
|
408
|
+
clazz[3].serv_data = serv_data_4; \
|
409
|
+
clazz[4].serv_id = serv_id_5; \
|
410
|
+
clazz[4].serv_data = serv_data_5; \
|
411
|
+
clazz[5].serv_id = NULL; \
|
412
|
+
clazz[5].serv_data = NULL; \
|
413
|
+
*output_class = clazz; \
|
414
|
+
return FT_Err_Ok; \
|
415
|
+
}
|
416
|
+
|
417
|
+
#define FT_DEFINE_SERVICEDESCREC6(class_, serv_id_1, serv_data_1, \
|
418
|
+
serv_id_2, serv_data_2, serv_id_3, serv_data_3, \
|
419
|
+
serv_id_4, serv_data_4, serv_id_5, serv_data_5, \
|
420
|
+
serv_id_6, serv_data_6) \
|
421
|
+
void \
|
422
|
+
FT_Destroy_Class_##class_( FT_Library library, \
|
423
|
+
FT_ServiceDescRec* clazz ) \
|
424
|
+
{ \
|
425
|
+
FT_Memory memory = library->memory; \
|
426
|
+
if ( clazz ) \
|
427
|
+
FT_FREE( clazz ); \
|
428
|
+
} \
|
429
|
+
\
|
430
|
+
FT_Error \
|
431
|
+
FT_Create_Class_##class_( FT_Library library, \
|
432
|
+
FT_ServiceDescRec** output_class) \
|
433
|
+
{ \
|
434
|
+
FT_ServiceDescRec* clazz; \
|
435
|
+
FT_Error error; \
|
436
|
+
FT_Memory memory = library->memory; \
|
437
|
+
\
|
438
|
+
if ( FT_ALLOC( clazz, sizeof(*clazz)*7 ) ) \
|
439
|
+
return error; \
|
440
|
+
clazz[0].serv_id = serv_id_1; \
|
441
|
+
clazz[0].serv_data = serv_data_1; \
|
442
|
+
clazz[1].serv_id = serv_id_2; \
|
443
|
+
clazz[1].serv_data = serv_data_2; \
|
444
|
+
clazz[2].serv_id = serv_id_3; \
|
445
|
+
clazz[2].serv_data = serv_data_3; \
|
446
|
+
clazz[3].serv_id = serv_id_4; \
|
447
|
+
clazz[3].serv_data = serv_data_4; \
|
448
|
+
clazz[4].serv_id = serv_id_5; \
|
449
|
+
clazz[4].serv_data = serv_data_5; \
|
450
|
+
clazz[5].serv_id = serv_id_6; \
|
451
|
+
clazz[5].serv_data = serv_data_6; \
|
452
|
+
clazz[6].serv_id = NULL; \
|
453
|
+
clazz[6].serv_data = NULL; \
|
454
|
+
*output_class = clazz; \
|
455
|
+
return FT_Err_Ok; \
|
456
|
+
}
|
457
|
+
#endif /* FT_CONFIG_OPTION_PIC */
|
458
|
+
|
459
|
+
/*
|
460
|
+
* Parse a list of FT_ServiceDescRec descriptors and look for
|
461
|
+
* a specific service by ID. Note that the last element in the
|
462
|
+
* array must be { NULL, NULL }, and that the function should
|
463
|
+
* return NULL if the service isn't available.
|
464
|
+
*
|
465
|
+
* This function can be used by modules to implement their
|
466
|
+
* `get_service' method.
|
467
|
+
*/
|
468
|
+
FT_BASE( FT_Pointer )
|
469
|
+
ft_service_list_lookup( FT_ServiceDesc service_descriptors,
|
470
|
+
const char* service_id );
|
471
|
+
|
472
|
+
|
473
|
+
/*************************************************************************/
|
474
|
+
/*************************************************************************/
|
475
|
+
/***** *****/
|
476
|
+
/***** S E R V I C E S C A C H E *****/
|
477
|
+
/***** *****/
|
478
|
+
/*************************************************************************/
|
479
|
+
/*************************************************************************/
|
480
|
+
|
481
|
+
/*
|
482
|
+
* This structure is used to store a cache for several frequently used
|
483
|
+
* services. It is the type of `face->internal->services'. You
|
484
|
+
* should only use FT_FACE_LOOKUP_SERVICE to access it.
|
485
|
+
*
|
486
|
+
* All fields should have the type FT_Pointer to relax compilation
|
487
|
+
* dependencies. We assume the developer isn't completely stupid.
|
488
|
+
*
|
489
|
+
* Each field must be named `service_XXXX' where `XXX' corresponds to
|
490
|
+
* the correct FT_SERVICE_ID_XXXX macro. See the definition of
|
491
|
+
* FT_FACE_LOOKUP_SERVICE below how this is implemented.
|
492
|
+
*
|
493
|
+
*/
|
494
|
+
typedef struct FT_ServiceCacheRec_
|
495
|
+
{
|
496
|
+
FT_Pointer service_POSTSCRIPT_FONT_NAME;
|
497
|
+
FT_Pointer service_MULTI_MASTERS;
|
498
|
+
FT_Pointer service_GLYPH_DICT;
|
499
|
+
FT_Pointer service_PFR_METRICS;
|
500
|
+
FT_Pointer service_WINFNT;
|
501
|
+
|
502
|
+
} FT_ServiceCacheRec, *FT_ServiceCache;
|
503
|
+
|
504
|
+
|
505
|
+
/*
|
506
|
+
* A magic number used within the services cache.
|
507
|
+
*/
|
508
|
+
#define FT_SERVICE_UNAVAILABLE ((FT_Pointer)-2) /* magic number */
|
509
|
+
|
510
|
+
|
511
|
+
/*
|
512
|
+
* @macro:
|
513
|
+
* FT_FACE_LOOKUP_SERVICE
|
514
|
+
*
|
515
|
+
* @description:
|
516
|
+
* This macro is used to lookup a service from a face's driver module
|
517
|
+
* using its cache.
|
518
|
+
*
|
519
|
+
* @input:
|
520
|
+
* face::
|
521
|
+
* The source face handle containing the cache.
|
522
|
+
*
|
523
|
+
* field ::
|
524
|
+
* The field name in the cache.
|
525
|
+
*
|
526
|
+
* id ::
|
527
|
+
* The service ID.
|
528
|
+
*
|
529
|
+
* @output:
|
530
|
+
* ptr ::
|
531
|
+
* A variable receiving the service data. NULL if not available.
|
532
|
+
*/
|
533
|
+
#ifdef __cplusplus
|
534
|
+
|
535
|
+
#define FT_FACE_LOOKUP_SERVICE( face, ptr, id ) \
|
536
|
+
FT_BEGIN_STMNT \
|
537
|
+
FT_Pointer svc; \
|
538
|
+
FT_Pointer* Pptr = (FT_Pointer*)&(ptr); \
|
539
|
+
\
|
540
|
+
\
|
541
|
+
svc = FT_FACE( face )->internal->services. service_ ## id; \
|
542
|
+
if ( svc == FT_SERVICE_UNAVAILABLE ) \
|
543
|
+
svc = NULL; \
|
544
|
+
else if ( svc == NULL ) \
|
545
|
+
{ \
|
546
|
+
FT_FACE_FIND_SERVICE( face, svc, id ); \
|
547
|
+
\
|
548
|
+
FT_FACE( face )->internal->services. service_ ## id = \
|
549
|
+
(FT_Pointer)( svc != NULL ? svc \
|
550
|
+
: FT_SERVICE_UNAVAILABLE ); \
|
551
|
+
} \
|
552
|
+
*Pptr = svc; \
|
553
|
+
FT_END_STMNT
|
554
|
+
|
555
|
+
#else /* !C++ */
|
556
|
+
|
557
|
+
#define FT_FACE_LOOKUP_SERVICE( face, ptr, id ) \
|
558
|
+
FT_BEGIN_STMNT \
|
559
|
+
FT_Pointer svc; \
|
560
|
+
\
|
561
|
+
\
|
562
|
+
svc = FT_FACE( face )->internal->services. service_ ## id; \
|
563
|
+
if ( svc == FT_SERVICE_UNAVAILABLE ) \
|
564
|
+
svc = NULL; \
|
565
|
+
else if ( svc == NULL ) \
|
566
|
+
{ \
|
567
|
+
FT_FACE_FIND_SERVICE( face, svc, id ); \
|
568
|
+
\
|
569
|
+
FT_FACE( face )->internal->services. service_ ## id = \
|
570
|
+
(FT_Pointer)( svc != NULL ? svc \
|
571
|
+
: FT_SERVICE_UNAVAILABLE ); \
|
572
|
+
} \
|
573
|
+
ptr = svc; \
|
574
|
+
FT_END_STMNT
|
575
|
+
|
576
|
+
#endif /* !C++ */
|
577
|
+
|
578
|
+
/*
|
579
|
+
* A macro used to define new service structure types.
|
580
|
+
*/
|
581
|
+
|
582
|
+
#define FT_DEFINE_SERVICE( name ) \
|
583
|
+
typedef struct FT_Service_ ## name ## Rec_ \
|
584
|
+
FT_Service_ ## name ## Rec ; \
|
585
|
+
typedef struct FT_Service_ ## name ## Rec_ \
|
586
|
+
const * FT_Service_ ## name ; \
|
587
|
+
struct FT_Service_ ## name ## Rec_
|
588
|
+
|
589
|
+
/* */
|
590
|
+
|
591
|
+
/*
|
592
|
+
* The header files containing the services.
|
593
|
+
*/
|
594
|
+
|
595
|
+
#define FT_SERVICE_BDF_H <freetype/internal/services/svbdf.h>
|
596
|
+
#define FT_SERVICE_CID_H <freetype/internal/services/svcid.h>
|
597
|
+
#define FT_SERVICE_GLYPH_DICT_H <freetype/internal/services/svgldict.h>
|
598
|
+
#define FT_SERVICE_GX_VALIDATE_H <freetype/internal/services/svgxval.h>
|
599
|
+
#define FT_SERVICE_KERNING_H <freetype/internal/services/svkern.h>
|
600
|
+
#define FT_SERVICE_MULTIPLE_MASTERS_H <freetype/internal/services/svmm.h>
|
601
|
+
#define FT_SERVICE_OPENTYPE_VALIDATE_H <freetype/internal/services/svotval.h>
|
602
|
+
#define FT_SERVICE_PFR_H <freetype/internal/services/svpfr.h>
|
603
|
+
#define FT_SERVICE_POSTSCRIPT_CMAPS_H <freetype/internal/services/svpscmap.h>
|
604
|
+
#define FT_SERVICE_POSTSCRIPT_INFO_H <freetype/internal/services/svpsinfo.h>
|
605
|
+
#define FT_SERVICE_POSTSCRIPT_NAME_H <freetype/internal/services/svpostnm.h>
|
606
|
+
#define FT_SERVICE_SFNT_H <freetype/internal/services/svsfnt.h>
|
607
|
+
#define FT_SERVICE_TRUETYPE_ENGINE_H <freetype/internal/services/svtteng.h>
|
608
|
+
#define FT_SERVICE_TT_CMAP_H <freetype/internal/services/svttcmap.h>
|
609
|
+
#define FT_SERVICE_WINFNT_H <freetype/internal/services/svwinfnt.h>
|
610
|
+
#define FT_SERVICE_XFREE86_NAME_H <freetype/internal/services/svxf86nm.h>
|
611
|
+
#define FT_SERVICE_TRUETYPE_GLYF_H <freetype/internal/services/svttglyf.h>
|
612
|
+
|
613
|
+
/* */
|
614
|
+
|
615
|
+
FT_END_HEADER
|
616
|
+
|
617
|
+
#endif /* __FTSERV_H__ */
|
618
|
+
|
619
|
+
|
620
|
+
/* END */
|