pdf2json 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,1313 @@
|
|
1
|
+
/***************************************************************************/
|
2
|
+
/* */
|
3
|
+
/* ftimage.h */
|
4
|
+
/* */
|
5
|
+
/* FreeType glyph image formats and default raster interface */
|
6
|
+
/* (specification). */
|
7
|
+
/* */
|
8
|
+
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
|
9
|
+
/* 2010 by */
|
10
|
+
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
11
|
+
/* */
|
12
|
+
/* This file is part of the FreeType project, and may only be used, */
|
13
|
+
/* modified, and distributed under the terms of the FreeType project */
|
14
|
+
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
15
|
+
/* this file you indicate that you have read the license and */
|
16
|
+
/* understand and accept it fully. */
|
17
|
+
/* */
|
18
|
+
/***************************************************************************/
|
19
|
+
|
20
|
+
/*************************************************************************/
|
21
|
+
/* */
|
22
|
+
/* Note: A `raster' is simply a scan-line converter, used to render */
|
23
|
+
/* FT_Outlines into FT_Bitmaps. */
|
24
|
+
/* */
|
25
|
+
/*************************************************************************/
|
26
|
+
|
27
|
+
|
28
|
+
#ifndef __FTIMAGE_H__
|
29
|
+
#define __FTIMAGE_H__
|
30
|
+
|
31
|
+
|
32
|
+
/* _STANDALONE_ is from ftgrays.c */
|
33
|
+
#ifndef _STANDALONE_
|
34
|
+
#include <ft2build.h>
|
35
|
+
#endif
|
36
|
+
|
37
|
+
|
38
|
+
FT_BEGIN_HEADER
|
39
|
+
|
40
|
+
|
41
|
+
/*************************************************************************/
|
42
|
+
/* */
|
43
|
+
/* <Section> */
|
44
|
+
/* basic_types */
|
45
|
+
/* */
|
46
|
+
/*************************************************************************/
|
47
|
+
|
48
|
+
|
49
|
+
/*************************************************************************/
|
50
|
+
/* */
|
51
|
+
/* <Type> */
|
52
|
+
/* FT_Pos */
|
53
|
+
/* */
|
54
|
+
/* <Description> */
|
55
|
+
/* The type FT_Pos is used to store vectorial coordinates. Depending */
|
56
|
+
/* on the context, these can represent distances in integer font */
|
57
|
+
/* units, or 16.16, or 26.6 fixed float pixel coordinates. */
|
58
|
+
/* */
|
59
|
+
typedef signed long FT_Pos;
|
60
|
+
|
61
|
+
|
62
|
+
/*************************************************************************/
|
63
|
+
/* */
|
64
|
+
/* <Struct> */
|
65
|
+
/* FT_Vector */
|
66
|
+
/* */
|
67
|
+
/* <Description> */
|
68
|
+
/* A simple structure used to store a 2D vector; coordinates are of */
|
69
|
+
/* the FT_Pos type. */
|
70
|
+
/* */
|
71
|
+
/* <Fields> */
|
72
|
+
/* x :: The horizontal coordinate. */
|
73
|
+
/* y :: The vertical coordinate. */
|
74
|
+
/* */
|
75
|
+
typedef struct FT_Vector_
|
76
|
+
{
|
77
|
+
FT_Pos x;
|
78
|
+
FT_Pos y;
|
79
|
+
|
80
|
+
} FT_Vector;
|
81
|
+
|
82
|
+
|
83
|
+
/*************************************************************************/
|
84
|
+
/* */
|
85
|
+
/* <Struct> */
|
86
|
+
/* FT_BBox */
|
87
|
+
/* */
|
88
|
+
/* <Description> */
|
89
|
+
/* A structure used to hold an outline's bounding box, i.e., the */
|
90
|
+
/* coordinates of its extrema in the horizontal and vertical */
|
91
|
+
/* directions. */
|
92
|
+
/* */
|
93
|
+
/* <Fields> */
|
94
|
+
/* xMin :: The horizontal minimum (left-most). */
|
95
|
+
/* */
|
96
|
+
/* yMin :: The vertical minimum (bottom-most). */
|
97
|
+
/* */
|
98
|
+
/* xMax :: The horizontal maximum (right-most). */
|
99
|
+
/* */
|
100
|
+
/* yMax :: The vertical maximum (top-most). */
|
101
|
+
/* */
|
102
|
+
/* <Note> */
|
103
|
+
/* The bounding box is specified with the coordinates of the lower */
|
104
|
+
/* left and the upper right corner. In PostScript, those values are */
|
105
|
+
/* often called (llx,lly) and (urx,ury), respectively. */
|
106
|
+
/* */
|
107
|
+
/* If `yMin' is negative, this value gives the glyph's descender. */
|
108
|
+
/* Otherwise, the glyph doesn't descend below the baseline. */
|
109
|
+
/* Similarly, if `ymax' is positive, this value gives the glyph's */
|
110
|
+
/* ascender. */
|
111
|
+
/* */
|
112
|
+
/* `xMin' gives the horizontal distance from the glyph's origin to */
|
113
|
+
/* the left edge of the glyph's bounding box. If `xMin' is negative, */
|
114
|
+
/* the glyph extends to the left of the origin. */
|
115
|
+
/* */
|
116
|
+
typedef struct FT_BBox_
|
117
|
+
{
|
118
|
+
FT_Pos xMin, yMin;
|
119
|
+
FT_Pos xMax, yMax;
|
120
|
+
|
121
|
+
} FT_BBox;
|
122
|
+
|
123
|
+
|
124
|
+
/*************************************************************************/
|
125
|
+
/* */
|
126
|
+
/* <Enum> */
|
127
|
+
/* FT_Pixel_Mode */
|
128
|
+
/* */
|
129
|
+
/* <Description> */
|
130
|
+
/* An enumeration type used to describe the format of pixels in a */
|
131
|
+
/* given bitmap. Note that additional formats may be added in the */
|
132
|
+
/* future. */
|
133
|
+
/* */
|
134
|
+
/* <Values> */
|
135
|
+
/* FT_PIXEL_MODE_NONE :: */
|
136
|
+
/* Value~0 is reserved. */
|
137
|
+
/* */
|
138
|
+
/* FT_PIXEL_MODE_MONO :: */
|
139
|
+
/* A monochrome bitmap, using 1~bit per pixel. Note that pixels */
|
140
|
+
/* are stored in most-significant order (MSB), which means that */
|
141
|
+
/* the left-most pixel in a byte has value 128. */
|
142
|
+
/* */
|
143
|
+
/* FT_PIXEL_MODE_GRAY :: */
|
144
|
+
/* An 8-bit bitmap, generally used to represent anti-aliased glyph */
|
145
|
+
/* images. Each pixel is stored in one byte. Note that the number */
|
146
|
+
/* of `gray' levels is stored in the `num_grays' field of the */
|
147
|
+
/* @FT_Bitmap structure (it generally is 256). */
|
148
|
+
/* */
|
149
|
+
/* FT_PIXEL_MODE_GRAY2 :: */
|
150
|
+
/* A 2-bit per pixel bitmap, used to represent embedded */
|
151
|
+
/* anti-aliased bitmaps in font files according to the OpenType */
|
152
|
+
/* specification. We haven't found a single font using this */
|
153
|
+
/* format, however. */
|
154
|
+
/* */
|
155
|
+
/* FT_PIXEL_MODE_GRAY4 :: */
|
156
|
+
/* A 4-bit per pixel bitmap, representing embedded anti-aliased */
|
157
|
+
/* bitmaps in font files according to the OpenType specification. */
|
158
|
+
/* We haven't found a single font using this format, however. */
|
159
|
+
/* */
|
160
|
+
/* FT_PIXEL_MODE_LCD :: */
|
161
|
+
/* An 8-bit bitmap, representing RGB or BGR decimated glyph images */
|
162
|
+
/* used for display on LCD displays; the bitmap is three times */
|
163
|
+
/* wider than the original glyph image. See also */
|
164
|
+
/* @FT_RENDER_MODE_LCD. */
|
165
|
+
/* */
|
166
|
+
/* FT_PIXEL_MODE_LCD_V :: */
|
167
|
+
/* An 8-bit bitmap, representing RGB or BGR decimated glyph images */
|
168
|
+
/* used for display on rotated LCD displays; the bitmap is three */
|
169
|
+
/* times taller than the original glyph image. See also */
|
170
|
+
/* @FT_RENDER_MODE_LCD_V. */
|
171
|
+
/* */
|
172
|
+
typedef enum FT_Pixel_Mode_
|
173
|
+
{
|
174
|
+
FT_PIXEL_MODE_NONE = 0,
|
175
|
+
FT_PIXEL_MODE_MONO,
|
176
|
+
FT_PIXEL_MODE_GRAY,
|
177
|
+
FT_PIXEL_MODE_GRAY2,
|
178
|
+
FT_PIXEL_MODE_GRAY4,
|
179
|
+
FT_PIXEL_MODE_LCD,
|
180
|
+
FT_PIXEL_MODE_LCD_V,
|
181
|
+
|
182
|
+
FT_PIXEL_MODE_MAX /* do not remove */
|
183
|
+
|
184
|
+
} FT_Pixel_Mode;
|
185
|
+
|
186
|
+
|
187
|
+
/*************************************************************************/
|
188
|
+
/* */
|
189
|
+
/* <Enum> */
|
190
|
+
/* ft_pixel_mode_xxx */
|
191
|
+
/* */
|
192
|
+
/* <Description> */
|
193
|
+
/* A list of deprecated constants. Use the corresponding */
|
194
|
+
/* @FT_Pixel_Mode values instead. */
|
195
|
+
/* */
|
196
|
+
/* <Values> */
|
197
|
+
/* ft_pixel_mode_none :: See @FT_PIXEL_MODE_NONE. */
|
198
|
+
/* ft_pixel_mode_mono :: See @FT_PIXEL_MODE_MONO. */
|
199
|
+
/* ft_pixel_mode_grays :: See @FT_PIXEL_MODE_GRAY. */
|
200
|
+
/* ft_pixel_mode_pal2 :: See @FT_PIXEL_MODE_GRAY2. */
|
201
|
+
/* ft_pixel_mode_pal4 :: See @FT_PIXEL_MODE_GRAY4. */
|
202
|
+
/* */
|
203
|
+
#define ft_pixel_mode_none FT_PIXEL_MODE_NONE
|
204
|
+
#define ft_pixel_mode_mono FT_PIXEL_MODE_MONO
|
205
|
+
#define ft_pixel_mode_grays FT_PIXEL_MODE_GRAY
|
206
|
+
#define ft_pixel_mode_pal2 FT_PIXEL_MODE_GRAY2
|
207
|
+
#define ft_pixel_mode_pal4 FT_PIXEL_MODE_GRAY4
|
208
|
+
|
209
|
+
/* */
|
210
|
+
|
211
|
+
#if 0
|
212
|
+
|
213
|
+
/*************************************************************************/
|
214
|
+
/* */
|
215
|
+
/* <Enum> */
|
216
|
+
/* FT_Palette_Mode */
|
217
|
+
/* */
|
218
|
+
/* <Description> */
|
219
|
+
/* THIS TYPE IS DEPRECATED. DO NOT USE IT! */
|
220
|
+
/* */
|
221
|
+
/* An enumeration type to describe the format of a bitmap palette, */
|
222
|
+
/* used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8. */
|
223
|
+
/* */
|
224
|
+
/* <Values> */
|
225
|
+
/* ft_palette_mode_rgb :: The palette is an array of 3-byte RGB */
|
226
|
+
/* records. */
|
227
|
+
/* */
|
228
|
+
/* ft_palette_mode_rgba :: The palette is an array of 4-byte RGBA */
|
229
|
+
/* records. */
|
230
|
+
/* */
|
231
|
+
/* <Note> */
|
232
|
+
/* As ft_pixel_mode_pal2, pal4 and pal8 are currently unused by */
|
233
|
+
/* FreeType, these types are not handled by the library itself. */
|
234
|
+
/* */
|
235
|
+
typedef enum FT_Palette_Mode_
|
236
|
+
{
|
237
|
+
ft_palette_mode_rgb = 0,
|
238
|
+
ft_palette_mode_rgba,
|
239
|
+
|
240
|
+
ft_palette_mode_max /* do not remove */
|
241
|
+
|
242
|
+
} FT_Palette_Mode;
|
243
|
+
|
244
|
+
/* */
|
245
|
+
|
246
|
+
#endif
|
247
|
+
|
248
|
+
|
249
|
+
/*************************************************************************/
|
250
|
+
/* */
|
251
|
+
/* <Struct> */
|
252
|
+
/* FT_Bitmap */
|
253
|
+
/* */
|
254
|
+
/* <Description> */
|
255
|
+
/* A structure used to describe a bitmap or pixmap to the raster. */
|
256
|
+
/* Note that we now manage pixmaps of various depths through the */
|
257
|
+
/* `pixel_mode' field. */
|
258
|
+
/* */
|
259
|
+
/* <Fields> */
|
260
|
+
/* rows :: The number of bitmap rows. */
|
261
|
+
/* */
|
262
|
+
/* width :: The number of pixels in bitmap row. */
|
263
|
+
/* */
|
264
|
+
/* pitch :: The pitch's absolute value is the number of bytes */
|
265
|
+
/* taken by one bitmap row, including padding. */
|
266
|
+
/* However, the pitch is positive when the bitmap has */
|
267
|
+
/* a `down' flow, and negative when it has an `up' */
|
268
|
+
/* flow. In all cases, the pitch is an offset to add */
|
269
|
+
/* to a bitmap pointer in order to go down one row. */
|
270
|
+
/* */
|
271
|
+
/* Note that `padding' means the alignment of a */
|
272
|
+
/* bitmap to a byte border, and FreeType functions */
|
273
|
+
/* normally align to the smallest possible integer */
|
274
|
+
/* value. */
|
275
|
+
/* */
|
276
|
+
/* For the B/W rasterizer, `pitch' is always an even */
|
277
|
+
/* number. */
|
278
|
+
/* */
|
279
|
+
/* To change the pitch of a bitmap (say, to make it a */
|
280
|
+
/* multiple of 4), use @FT_Bitmap_Convert. */
|
281
|
+
/* Alternatively, you might use callback functions to */
|
282
|
+
/* directly render to the application's surface; see */
|
283
|
+
/* the file `example2.cpp' in the tutorial for a */
|
284
|
+
/* demonstration. */
|
285
|
+
/* */
|
286
|
+
/* buffer :: A typeless pointer to the bitmap buffer. This */
|
287
|
+
/* value should be aligned on 32-bit boundaries in */
|
288
|
+
/* most cases. */
|
289
|
+
/* */
|
290
|
+
/* num_grays :: This field is only used with */
|
291
|
+
/* @FT_PIXEL_MODE_GRAY; it gives the number of gray */
|
292
|
+
/* levels used in the bitmap. */
|
293
|
+
/* */
|
294
|
+
/* pixel_mode :: The pixel mode, i.e., how pixel bits are stored. */
|
295
|
+
/* See @FT_Pixel_Mode for possible values. */
|
296
|
+
/* */
|
297
|
+
/* palette_mode :: This field is intended for paletted pixel modes; */
|
298
|
+
/* it indicates how the palette is stored. Not */
|
299
|
+
/* used currently. */
|
300
|
+
/* */
|
301
|
+
/* palette :: A typeless pointer to the bitmap palette; this */
|
302
|
+
/* field is intended for paletted pixel modes. Not */
|
303
|
+
/* used currently. */
|
304
|
+
/* */
|
305
|
+
/* <Note> */
|
306
|
+
/* For now, the only pixel modes supported by FreeType are mono and */
|
307
|
+
/* grays. However, drivers might be added in the future to support */
|
308
|
+
/* more `colorful' options. */
|
309
|
+
/* */
|
310
|
+
typedef struct FT_Bitmap_
|
311
|
+
{
|
312
|
+
int rows;
|
313
|
+
int width;
|
314
|
+
int pitch;
|
315
|
+
unsigned char* buffer;
|
316
|
+
short num_grays;
|
317
|
+
char pixel_mode;
|
318
|
+
char palette_mode;
|
319
|
+
void* palette;
|
320
|
+
|
321
|
+
} FT_Bitmap;
|
322
|
+
|
323
|
+
|
324
|
+
/*************************************************************************/
|
325
|
+
/* */
|
326
|
+
/* <Section> */
|
327
|
+
/* outline_processing */
|
328
|
+
/* */
|
329
|
+
/*************************************************************************/
|
330
|
+
|
331
|
+
|
332
|
+
/*************************************************************************/
|
333
|
+
/* */
|
334
|
+
/* <Struct> */
|
335
|
+
/* FT_Outline */
|
336
|
+
/* */
|
337
|
+
/* <Description> */
|
338
|
+
/* This structure is used to describe an outline to the scan-line */
|
339
|
+
/* converter. */
|
340
|
+
/* */
|
341
|
+
/* <Fields> */
|
342
|
+
/* n_contours :: The number of contours in the outline. */
|
343
|
+
/* */
|
344
|
+
/* n_points :: The number of points in the outline. */
|
345
|
+
/* */
|
346
|
+
/* points :: A pointer to an array of `n_points' @FT_Vector */
|
347
|
+
/* elements, giving the outline's point coordinates. */
|
348
|
+
/* */
|
349
|
+
/* tags :: A pointer to an array of `n_points' chars, giving */
|
350
|
+
/* each outline point's type. */
|
351
|
+
/* */
|
352
|
+
/* If bit~0 is unset, the point is `off' the curve, */
|
353
|
+
/* i.e., a Bézier control point, while it is `on' if */
|
354
|
+
/* set. */
|
355
|
+
/* */
|
356
|
+
/* Bit~1 is meaningful for `off' points only. If set, */
|
357
|
+
/* it indicates a third-order Bézier arc control point; */
|
358
|
+
/* and a second-order control point if unset. */
|
359
|
+
/* */
|
360
|
+
/* If bit~2 is set, bits 5-7 contain the drop-out mode */
|
361
|
+
/* (as defined in the OpenType specification; the value */
|
362
|
+
/* is the same as the argument to the SCANMODE */
|
363
|
+
/* instruction). */
|
364
|
+
/* */
|
365
|
+
/* Bits 3 and~4 are reserved for internal purposes. */
|
366
|
+
/* */
|
367
|
+
/* contours :: An array of `n_contours' shorts, giving the end */
|
368
|
+
/* point of each contour within the outline. For */
|
369
|
+
/* example, the first contour is defined by the points */
|
370
|
+
/* `0' to `contours[0]', the second one is defined by */
|
371
|
+
/* the points `contours[0]+1' to `contours[1]', etc. */
|
372
|
+
/* */
|
373
|
+
/* flags :: A set of bit flags used to characterize the outline */
|
374
|
+
/* and give hints to the scan-converter and hinter on */
|
375
|
+
/* how to convert/grid-fit it. See @FT_OUTLINE_FLAGS. */
|
376
|
+
/* */
|
377
|
+
/* <Note> */
|
378
|
+
/* The B/W rasterizer only checks bit~2 in the `tags' array for the */
|
379
|
+
/* first point of each contour. The drop-out mode as given with */
|
380
|
+
/* @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, and */
|
381
|
+
/* @FT_OUTLINE_INCLUDE_STUBS in `flags' is then overridden. */
|
382
|
+
/* */
|
383
|
+
typedef struct FT_Outline_
|
384
|
+
{
|
385
|
+
short n_contours; /* number of contours in glyph */
|
386
|
+
short n_points; /* number of points in the glyph */
|
387
|
+
|
388
|
+
FT_Vector* points; /* the outline's points */
|
389
|
+
char* tags; /* the points flags */
|
390
|
+
short* contours; /* the contour end points */
|
391
|
+
|
392
|
+
int flags; /* outline masks */
|
393
|
+
|
394
|
+
} FT_Outline;
|
395
|
+
|
396
|
+
/* Following limits must be consistent with */
|
397
|
+
/* FT_Outline.{n_contours,n_points} */
|
398
|
+
#define FT_OUTLINE_CONTOURS_MAX SHRT_MAX
|
399
|
+
#define FT_OUTLINE_POINTS_MAX SHRT_MAX
|
400
|
+
|
401
|
+
|
402
|
+
/*************************************************************************/
|
403
|
+
/* */
|
404
|
+
/* <Enum> */
|
405
|
+
/* FT_OUTLINE_FLAGS */
|
406
|
+
/* */
|
407
|
+
/* <Description> */
|
408
|
+
/* A list of bit-field constants use for the flags in an outline's */
|
409
|
+
/* `flags' field. */
|
410
|
+
/* */
|
411
|
+
/* <Values> */
|
412
|
+
/* FT_OUTLINE_NONE :: */
|
413
|
+
/* Value~0 is reserved. */
|
414
|
+
/* */
|
415
|
+
/* FT_OUTLINE_OWNER :: */
|
416
|
+
/* If set, this flag indicates that the outline's field arrays */
|
417
|
+
/* (i.e., `points', `flags', and `contours') are `owned' by the */
|
418
|
+
/* outline object, and should thus be freed when it is destroyed. */
|
419
|
+
/* */
|
420
|
+
/* FT_OUTLINE_EVEN_ODD_FILL :: */
|
421
|
+
/* By default, outlines are filled using the non-zero winding rule. */
|
422
|
+
/* If set to 1, the outline will be filled using the even-odd fill */
|
423
|
+
/* rule (only works with the smooth rasterizer). */
|
424
|
+
/* */
|
425
|
+
/* FT_OUTLINE_REVERSE_FILL :: */
|
426
|
+
/* By default, outside contours of an outline are oriented in */
|
427
|
+
/* clock-wise direction, as defined in the TrueType specification. */
|
428
|
+
/* This flag is set if the outline uses the opposite direction */
|
429
|
+
/* (typically for Type~1 fonts). This flag is ignored by the scan */
|
430
|
+
/* converter. */
|
431
|
+
/* */
|
432
|
+
/* FT_OUTLINE_IGNORE_DROPOUTS :: */
|
433
|
+
/* By default, the scan converter will try to detect drop-outs in */
|
434
|
+
/* an outline and correct the glyph bitmap to ensure consistent */
|
435
|
+
/* shape continuity. If set, this flag hints the scan-line */
|
436
|
+
/* converter to ignore such cases. See below for more information. */
|
437
|
+
/* */
|
438
|
+
/* FT_OUTLINE_SMART_DROPOUTS :: */
|
439
|
+
/* Select smart dropout control. If unset, use simple dropout */
|
440
|
+
/* control. Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See */
|
441
|
+
/* below for more information. */
|
442
|
+
/* */
|
443
|
+
/* FT_OUTLINE_INCLUDE_STUBS :: */
|
444
|
+
/* If set, turn pixels on for `stubs', otherwise exclude them. */
|
445
|
+
/* Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See below for */
|
446
|
+
/* more information. */
|
447
|
+
/* */
|
448
|
+
/* FT_OUTLINE_HIGH_PRECISION :: */
|
449
|
+
/* This flag indicates that the scan-line converter should try to */
|
450
|
+
/* convert this outline to bitmaps with the highest possible */
|
451
|
+
/* quality. It is typically set for small character sizes. Note */
|
452
|
+
/* that this is only a hint that might be completely ignored by a */
|
453
|
+
/* given scan-converter. */
|
454
|
+
/* */
|
455
|
+
/* FT_OUTLINE_SINGLE_PASS :: */
|
456
|
+
/* This flag is set to force a given scan-converter to only use a */
|
457
|
+
/* single pass over the outline to render a bitmap glyph image. */
|
458
|
+
/* Normally, it is set for very large character sizes. It is only */
|
459
|
+
/* a hint that might be completely ignored by a given */
|
460
|
+
/* scan-converter. */
|
461
|
+
/* */
|
462
|
+
/* <Note> */
|
463
|
+
/* The flags @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, */
|
464
|
+
/* and @FT_OUTLINE_INCLUDE_STUBS are ignored by the smooth */
|
465
|
+
/* rasterizer. */
|
466
|
+
/* */
|
467
|
+
/* There exists a second mechanism to pass the drop-out mode to the */
|
468
|
+
/* B/W rasterizer; see the `tags' field in @FT_Outline. */
|
469
|
+
/* */
|
470
|
+
/* Please refer to the description of the `SCANTYPE' instruction in */
|
471
|
+
/* the OpenType specification (in file `ttinst1.doc') how simple */
|
472
|
+
/* drop-outs, smart drop-outs, and stubs are defined. */
|
473
|
+
/* */
|
474
|
+
#define FT_OUTLINE_NONE 0x0
|
475
|
+
#define FT_OUTLINE_OWNER 0x1
|
476
|
+
#define FT_OUTLINE_EVEN_ODD_FILL 0x2
|
477
|
+
#define FT_OUTLINE_REVERSE_FILL 0x4
|
478
|
+
#define FT_OUTLINE_IGNORE_DROPOUTS 0x8
|
479
|
+
#define FT_OUTLINE_SMART_DROPOUTS 0x10
|
480
|
+
#define FT_OUTLINE_INCLUDE_STUBS 0x20
|
481
|
+
|
482
|
+
#define FT_OUTLINE_HIGH_PRECISION 0x100
|
483
|
+
#define FT_OUTLINE_SINGLE_PASS 0x200
|
484
|
+
|
485
|
+
|
486
|
+
/*************************************************************************
|
487
|
+
*
|
488
|
+
* @enum:
|
489
|
+
* ft_outline_flags
|
490
|
+
*
|
491
|
+
* @description:
|
492
|
+
* These constants are deprecated. Please use the corresponding
|
493
|
+
* @FT_OUTLINE_FLAGS values.
|
494
|
+
*
|
495
|
+
* @values:
|
496
|
+
* ft_outline_none :: See @FT_OUTLINE_NONE.
|
497
|
+
* ft_outline_owner :: See @FT_OUTLINE_OWNER.
|
498
|
+
* ft_outline_even_odd_fill :: See @FT_OUTLINE_EVEN_ODD_FILL.
|
499
|
+
* ft_outline_reverse_fill :: See @FT_OUTLINE_REVERSE_FILL.
|
500
|
+
* ft_outline_ignore_dropouts :: See @FT_OUTLINE_IGNORE_DROPOUTS.
|
501
|
+
* ft_outline_high_precision :: See @FT_OUTLINE_HIGH_PRECISION.
|
502
|
+
* ft_outline_single_pass :: See @FT_OUTLINE_SINGLE_PASS.
|
503
|
+
*/
|
504
|
+
#define ft_outline_none FT_OUTLINE_NONE
|
505
|
+
#define ft_outline_owner FT_OUTLINE_OWNER
|
506
|
+
#define ft_outline_even_odd_fill FT_OUTLINE_EVEN_ODD_FILL
|
507
|
+
#define ft_outline_reverse_fill FT_OUTLINE_REVERSE_FILL
|
508
|
+
#define ft_outline_ignore_dropouts FT_OUTLINE_IGNORE_DROPOUTS
|
509
|
+
#define ft_outline_high_precision FT_OUTLINE_HIGH_PRECISION
|
510
|
+
#define ft_outline_single_pass FT_OUTLINE_SINGLE_PASS
|
511
|
+
|
512
|
+
/* */
|
513
|
+
|
514
|
+
#define FT_CURVE_TAG( flag ) ( flag & 3 )
|
515
|
+
|
516
|
+
#define FT_CURVE_TAG_ON 1
|
517
|
+
#define FT_CURVE_TAG_CONIC 0
|
518
|
+
#define FT_CURVE_TAG_CUBIC 2
|
519
|
+
|
520
|
+
#define FT_CURVE_TAG_HAS_SCANMODE 4
|
521
|
+
|
522
|
+
#define FT_CURVE_TAG_TOUCH_X 8 /* reserved for the TrueType hinter */
|
523
|
+
#define FT_CURVE_TAG_TOUCH_Y 16 /* reserved for the TrueType hinter */
|
524
|
+
|
525
|
+
#define FT_CURVE_TAG_TOUCH_BOTH ( FT_CURVE_TAG_TOUCH_X | \
|
526
|
+
FT_CURVE_TAG_TOUCH_Y )
|
527
|
+
|
528
|
+
#define FT_Curve_Tag_On FT_CURVE_TAG_ON
|
529
|
+
#define FT_Curve_Tag_Conic FT_CURVE_TAG_CONIC
|
530
|
+
#define FT_Curve_Tag_Cubic FT_CURVE_TAG_CUBIC
|
531
|
+
#define FT_Curve_Tag_Touch_X FT_CURVE_TAG_TOUCH_X
|
532
|
+
#define FT_Curve_Tag_Touch_Y FT_CURVE_TAG_TOUCH_Y
|
533
|
+
|
534
|
+
|
535
|
+
/*************************************************************************/
|
536
|
+
/* */
|
537
|
+
/* <FuncType> */
|
538
|
+
/* FT_Outline_MoveToFunc */
|
539
|
+
/* */
|
540
|
+
/* <Description> */
|
541
|
+
/* A function pointer type used to describe the signature of a `move */
|
542
|
+
/* to' function during outline walking/decomposition. */
|
543
|
+
/* */
|
544
|
+
/* A `move to' is emitted to start a new contour in an outline. */
|
545
|
+
/* */
|
546
|
+
/* <Input> */
|
547
|
+
/* to :: A pointer to the target point of the `move to'. */
|
548
|
+
/* */
|
549
|
+
/* user :: A typeless pointer which is passed from the caller of the */
|
550
|
+
/* decomposition function. */
|
551
|
+
/* */
|
552
|
+
/* <Return> */
|
553
|
+
/* Error code. 0~means success. */
|
554
|
+
/* */
|
555
|
+
typedef int
|
556
|
+
(*FT_Outline_MoveToFunc)( const FT_Vector* to,
|
557
|
+
void* user );
|
558
|
+
|
559
|
+
#define FT_Outline_MoveTo_Func FT_Outline_MoveToFunc
|
560
|
+
|
561
|
+
|
562
|
+
/*************************************************************************/
|
563
|
+
/* */
|
564
|
+
/* <FuncType> */
|
565
|
+
/* FT_Outline_LineToFunc */
|
566
|
+
/* */
|
567
|
+
/* <Description> */
|
568
|
+
/* A function pointer type used to describe the signature of a `line */
|
569
|
+
/* to' function during outline walking/decomposition. */
|
570
|
+
/* */
|
571
|
+
/* A `line to' is emitted to indicate a segment in the outline. */
|
572
|
+
/* */
|
573
|
+
/* <Input> */
|
574
|
+
/* to :: A pointer to the target point of the `line to'. */
|
575
|
+
/* */
|
576
|
+
/* user :: A typeless pointer which is passed from the caller of the */
|
577
|
+
/* decomposition function. */
|
578
|
+
/* */
|
579
|
+
/* <Return> */
|
580
|
+
/* Error code. 0~means success. */
|
581
|
+
/* */
|
582
|
+
typedef int
|
583
|
+
(*FT_Outline_LineToFunc)( const FT_Vector* to,
|
584
|
+
void* user );
|
585
|
+
|
586
|
+
#define FT_Outline_LineTo_Func FT_Outline_LineToFunc
|
587
|
+
|
588
|
+
|
589
|
+
/*************************************************************************/
|
590
|
+
/* */
|
591
|
+
/* <FuncType> */
|
592
|
+
/* FT_Outline_ConicToFunc */
|
593
|
+
/* */
|
594
|
+
/* <Description> */
|
595
|
+
/* A function pointer type used to describe the signature of a `conic */
|
596
|
+
/* to' function during outline walking or decomposition. */
|
597
|
+
/* */
|
598
|
+
/* A `conic to' is emitted to indicate a second-order Bézier arc in */
|
599
|
+
/* the outline. */
|
600
|
+
/* */
|
601
|
+
/* <Input> */
|
602
|
+
/* control :: An intermediate control point between the last position */
|
603
|
+
/* and the new target in `to'. */
|
604
|
+
/* */
|
605
|
+
/* to :: A pointer to the target end point of the conic arc. */
|
606
|
+
/* */
|
607
|
+
/* user :: A typeless pointer which is passed from the caller of */
|
608
|
+
/* the decomposition function. */
|
609
|
+
/* */
|
610
|
+
/* <Return> */
|
611
|
+
/* Error code. 0~means success. */
|
612
|
+
/* */
|
613
|
+
typedef int
|
614
|
+
(*FT_Outline_ConicToFunc)( const FT_Vector* control,
|
615
|
+
const FT_Vector* to,
|
616
|
+
void* user );
|
617
|
+
|
618
|
+
#define FT_Outline_ConicTo_Func FT_Outline_ConicToFunc
|
619
|
+
|
620
|
+
|
621
|
+
/*************************************************************************/
|
622
|
+
/* */
|
623
|
+
/* <FuncType> */
|
624
|
+
/* FT_Outline_CubicToFunc */
|
625
|
+
/* */
|
626
|
+
/* <Description> */
|
627
|
+
/* A function pointer type used to describe the signature of a `cubic */
|
628
|
+
/* to' function during outline walking or decomposition. */
|
629
|
+
/* */
|
630
|
+
/* A `cubic to' is emitted to indicate a third-order Bézier arc. */
|
631
|
+
/* */
|
632
|
+
/* <Input> */
|
633
|
+
/* control1 :: A pointer to the first Bézier control point. */
|
634
|
+
/* */
|
635
|
+
/* control2 :: A pointer to the second Bézier control point. */
|
636
|
+
/* */
|
637
|
+
/* to :: A pointer to the target end point. */
|
638
|
+
/* */
|
639
|
+
/* user :: A typeless pointer which is passed from the caller of */
|
640
|
+
/* the decomposition function. */
|
641
|
+
/* */
|
642
|
+
/* <Return> */
|
643
|
+
/* Error code. 0~means success. */
|
644
|
+
/* */
|
645
|
+
typedef int
|
646
|
+
(*FT_Outline_CubicToFunc)( const FT_Vector* control1,
|
647
|
+
const FT_Vector* control2,
|
648
|
+
const FT_Vector* to,
|
649
|
+
void* user );
|
650
|
+
|
651
|
+
#define FT_Outline_CubicTo_Func FT_Outline_CubicToFunc
|
652
|
+
|
653
|
+
|
654
|
+
/*************************************************************************/
|
655
|
+
/* */
|
656
|
+
/* <Struct> */
|
657
|
+
/* FT_Outline_Funcs */
|
658
|
+
/* */
|
659
|
+
/* <Description> */
|
660
|
+
/* A structure to hold various function pointers used during outline */
|
661
|
+
/* decomposition in order to emit segments, conic, and cubic Béziers. */
|
662
|
+
/* */
|
663
|
+
/* <Fields> */
|
664
|
+
/* move_to :: The `move to' emitter. */
|
665
|
+
/* */
|
666
|
+
/* line_to :: The segment emitter. */
|
667
|
+
/* */
|
668
|
+
/* conic_to :: The second-order Bézier arc emitter. */
|
669
|
+
/* */
|
670
|
+
/* cubic_to :: The third-order Bézier arc emitter. */
|
671
|
+
/* */
|
672
|
+
/* shift :: The shift that is applied to coordinates before they */
|
673
|
+
/* are sent to the emitter. */
|
674
|
+
/* */
|
675
|
+
/* delta :: The delta that is applied to coordinates before they */
|
676
|
+
/* are sent to the emitter, but after the shift. */
|
677
|
+
/* */
|
678
|
+
/* <Note> */
|
679
|
+
/* The point coordinates sent to the emitters are the transformed */
|
680
|
+
/* version of the original coordinates (this is important for high */
|
681
|
+
/* accuracy during scan-conversion). The transformation is simple: */
|
682
|
+
/* */
|
683
|
+
/* { */
|
684
|
+
/* x' = (x << shift) - delta */
|
685
|
+
/* y' = (x << shift) - delta */
|
686
|
+
/* } */
|
687
|
+
/* */
|
688
|
+
/* Set the values of `shift' and `delta' to~0 to get the original */
|
689
|
+
/* point coordinates. */
|
690
|
+
/* */
|
691
|
+
typedef struct FT_Outline_Funcs_
|
692
|
+
{
|
693
|
+
FT_Outline_MoveToFunc move_to;
|
694
|
+
FT_Outline_LineToFunc line_to;
|
695
|
+
FT_Outline_ConicToFunc conic_to;
|
696
|
+
FT_Outline_CubicToFunc cubic_to;
|
697
|
+
|
698
|
+
int shift;
|
699
|
+
FT_Pos delta;
|
700
|
+
|
701
|
+
} FT_Outline_Funcs;
|
702
|
+
|
703
|
+
|
704
|
+
/*************************************************************************/
|
705
|
+
/* */
|
706
|
+
/* <Section> */
|
707
|
+
/* basic_types */
|
708
|
+
/* */
|
709
|
+
/*************************************************************************/
|
710
|
+
|
711
|
+
|
712
|
+
/*************************************************************************/
|
713
|
+
/* */
|
714
|
+
/* <Macro> */
|
715
|
+
/* FT_IMAGE_TAG */
|
716
|
+
/* */
|
717
|
+
/* <Description> */
|
718
|
+
/* This macro converts four-letter tags to an unsigned long type. */
|
719
|
+
/* */
|
720
|
+
/* <Note> */
|
721
|
+
/* Since many 16-bit compilers don't like 32-bit enumerations, you */
|
722
|
+
/* should redefine this macro in case of problems to something like */
|
723
|
+
/* this: */
|
724
|
+
/* */
|
725
|
+
/* { */
|
726
|
+
/* #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value */
|
727
|
+
/* } */
|
728
|
+
/* */
|
729
|
+
/* to get a simple enumeration without assigning special numbers. */
|
730
|
+
/* */
|
731
|
+
#ifndef FT_IMAGE_TAG
|
732
|
+
#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) \
|
733
|
+
value = ( ( (unsigned long)_x1 << 24 ) | \
|
734
|
+
( (unsigned long)_x2 << 16 ) | \
|
735
|
+
( (unsigned long)_x3 << 8 ) | \
|
736
|
+
(unsigned long)_x4 )
|
737
|
+
#endif /* FT_IMAGE_TAG */
|
738
|
+
|
739
|
+
|
740
|
+
/*************************************************************************/
|
741
|
+
/* */
|
742
|
+
/* <Enum> */
|
743
|
+
/* FT_Glyph_Format */
|
744
|
+
/* */
|
745
|
+
/* <Description> */
|
746
|
+
/* An enumeration type used to describe the format of a given glyph */
|
747
|
+
/* image. Note that this version of FreeType only supports two image */
|
748
|
+
/* formats, even though future font drivers will be able to register */
|
749
|
+
/* their own format. */
|
750
|
+
/* */
|
751
|
+
/* <Values> */
|
752
|
+
/* FT_GLYPH_FORMAT_NONE :: */
|
753
|
+
/* The value~0 is reserved. */
|
754
|
+
/* */
|
755
|
+
/* FT_GLYPH_FORMAT_COMPOSITE :: */
|
756
|
+
/* The glyph image is a composite of several other images. This */
|
757
|
+
/* format is _only_ used with @FT_LOAD_NO_RECURSE, and is used to */
|
758
|
+
/* report compound glyphs (like accented characters). */
|
759
|
+
/* */
|
760
|
+
/* FT_GLYPH_FORMAT_BITMAP :: */
|
761
|
+
/* The glyph image is a bitmap, and can be described as an */
|
762
|
+
/* @FT_Bitmap. You generally need to access the `bitmap' field of */
|
763
|
+
/* the @FT_GlyphSlotRec structure to read it. */
|
764
|
+
/* */
|
765
|
+
/* FT_GLYPH_FORMAT_OUTLINE :: */
|
766
|
+
/* The glyph image is a vectorial outline made of line segments */
|
767
|
+
/* and Bézier arcs; it can be described as an @FT_Outline; you */
|
768
|
+
/* generally want to access the `outline' field of the */
|
769
|
+
/* @FT_GlyphSlotRec structure to read it. */
|
770
|
+
/* */
|
771
|
+
/* FT_GLYPH_FORMAT_PLOTTER :: */
|
772
|
+
/* The glyph image is a vectorial path with no inside and outside */
|
773
|
+
/* contours. Some Type~1 fonts, like those in the Hershey family, */
|
774
|
+
/* contain glyphs in this format. These are described as */
|
775
|
+
/* @FT_Outline, but FreeType isn't currently capable of rendering */
|
776
|
+
/* them correctly. */
|
777
|
+
/* */
|
778
|
+
typedef enum FT_Glyph_Format_
|
779
|
+
{
|
780
|
+
FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ),
|
781
|
+
|
782
|
+
FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ),
|
783
|
+
FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP, 'b', 'i', 't', 's' ),
|
784
|
+
FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE, 'o', 'u', 't', 'l' ),
|
785
|
+
FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER, 'p', 'l', 'o', 't' )
|
786
|
+
|
787
|
+
} FT_Glyph_Format;
|
788
|
+
|
789
|
+
|
790
|
+
/*************************************************************************/
|
791
|
+
/* */
|
792
|
+
/* <Enum> */
|
793
|
+
/* ft_glyph_format_xxx */
|
794
|
+
/* */
|
795
|
+
/* <Description> */
|
796
|
+
/* A list of deprecated constants. Use the corresponding */
|
797
|
+
/* @FT_Glyph_Format values instead. */
|
798
|
+
/* */
|
799
|
+
/* <Values> */
|
800
|
+
/* ft_glyph_format_none :: See @FT_GLYPH_FORMAT_NONE. */
|
801
|
+
/* ft_glyph_format_composite :: See @FT_GLYPH_FORMAT_COMPOSITE. */
|
802
|
+
/* ft_glyph_format_bitmap :: See @FT_GLYPH_FORMAT_BITMAP. */
|
803
|
+
/* ft_glyph_format_outline :: See @FT_GLYPH_FORMAT_OUTLINE. */
|
804
|
+
/* ft_glyph_format_plotter :: See @FT_GLYPH_FORMAT_PLOTTER. */
|
805
|
+
/* */
|
806
|
+
#define ft_glyph_format_none FT_GLYPH_FORMAT_NONE
|
807
|
+
#define ft_glyph_format_composite FT_GLYPH_FORMAT_COMPOSITE
|
808
|
+
#define ft_glyph_format_bitmap FT_GLYPH_FORMAT_BITMAP
|
809
|
+
#define ft_glyph_format_outline FT_GLYPH_FORMAT_OUTLINE
|
810
|
+
#define ft_glyph_format_plotter FT_GLYPH_FORMAT_PLOTTER
|
811
|
+
|
812
|
+
|
813
|
+
/*************************************************************************/
|
814
|
+
/*************************************************************************/
|
815
|
+
/*************************************************************************/
|
816
|
+
/***** *****/
|
817
|
+
/***** R A S T E R D E F I N I T I O N S *****/
|
818
|
+
/***** *****/
|
819
|
+
/*************************************************************************/
|
820
|
+
/*************************************************************************/
|
821
|
+
/*************************************************************************/
|
822
|
+
|
823
|
+
|
824
|
+
/*************************************************************************/
|
825
|
+
/* */
|
826
|
+
/* A raster is a scan converter, in charge of rendering an outline into */
|
827
|
+
/* a a bitmap. This section contains the public API for rasters. */
|
828
|
+
/* */
|
829
|
+
/* Note that in FreeType 2, all rasters are now encapsulated within */
|
830
|
+
/* specific modules called `renderers'. See `freetype/ftrender.h' for */
|
831
|
+
/* more details on renderers. */
|
832
|
+
/* */
|
833
|
+
/*************************************************************************/
|
834
|
+
|
835
|
+
|
836
|
+
/*************************************************************************/
|
837
|
+
/* */
|
838
|
+
/* <Section> */
|
839
|
+
/* raster */
|
840
|
+
/* */
|
841
|
+
/* <Title> */
|
842
|
+
/* Scanline Converter */
|
843
|
+
/* */
|
844
|
+
/* <Abstract> */
|
845
|
+
/* How vectorial outlines are converted into bitmaps and pixmaps. */
|
846
|
+
/* */
|
847
|
+
/* <Description> */
|
848
|
+
/* This section contains technical definitions. */
|
849
|
+
/* */
|
850
|
+
/*************************************************************************/
|
851
|
+
|
852
|
+
|
853
|
+
/*************************************************************************/
|
854
|
+
/* */
|
855
|
+
/* <Type> */
|
856
|
+
/* FT_Raster */
|
857
|
+
/* */
|
858
|
+
/* <Description> */
|
859
|
+
/* A handle (pointer) to a raster object. Each object can be used */
|
860
|
+
/* independently to convert an outline into a bitmap or pixmap. */
|
861
|
+
/* */
|
862
|
+
typedef struct FT_RasterRec_* FT_Raster;
|
863
|
+
|
864
|
+
|
865
|
+
/*************************************************************************/
|
866
|
+
/* */
|
867
|
+
/* <Struct> */
|
868
|
+
/* FT_Span */
|
869
|
+
/* */
|
870
|
+
/* <Description> */
|
871
|
+
/* A structure used to model a single span of gray (or black) pixels */
|
872
|
+
/* when rendering a monochrome or anti-aliased bitmap. */
|
873
|
+
/* */
|
874
|
+
/* <Fields> */
|
875
|
+
/* x :: The span's horizontal start position. */
|
876
|
+
/* */
|
877
|
+
/* len :: The span's length in pixels. */
|
878
|
+
/* */
|
879
|
+
/* coverage :: The span color/coverage, ranging from 0 (background) */
|
880
|
+
/* to 255 (foreground). Only used for anti-aliased */
|
881
|
+
/* rendering. */
|
882
|
+
/* */
|
883
|
+
/* <Note> */
|
884
|
+
/* This structure is used by the span drawing callback type named */
|
885
|
+
/* @FT_SpanFunc which takes the y~coordinate of the span as a */
|
886
|
+
/* a parameter. */
|
887
|
+
/* */
|
888
|
+
/* The coverage value is always between 0 and 255. If you want less */
|
889
|
+
/* gray values, the callback function has to reduce them. */
|
890
|
+
/* */
|
891
|
+
typedef struct FT_Span_
|
892
|
+
{
|
893
|
+
short x;
|
894
|
+
unsigned short len;
|
895
|
+
unsigned char coverage;
|
896
|
+
|
897
|
+
} FT_Span;
|
898
|
+
|
899
|
+
|
900
|
+
/*************************************************************************/
|
901
|
+
/* */
|
902
|
+
/* <FuncType> */
|
903
|
+
/* FT_SpanFunc */
|
904
|
+
/* */
|
905
|
+
/* <Description> */
|
906
|
+
/* A function used as a call-back by the anti-aliased renderer in */
|
907
|
+
/* order to let client applications draw themselves the gray pixel */
|
908
|
+
/* spans on each scan line. */
|
909
|
+
/* */
|
910
|
+
/* <Input> */
|
911
|
+
/* y :: The scanline's y~coordinate. */
|
912
|
+
/* */
|
913
|
+
/* count :: The number of spans to draw on this scanline. */
|
914
|
+
/* */
|
915
|
+
/* spans :: A table of `count' spans to draw on the scanline. */
|
916
|
+
/* */
|
917
|
+
/* user :: User-supplied data that is passed to the callback. */
|
918
|
+
/* */
|
919
|
+
/* <Note> */
|
920
|
+
/* This callback allows client applications to directly render the */
|
921
|
+
/* gray spans of the anti-aliased bitmap to any kind of surfaces. */
|
922
|
+
/* */
|
923
|
+
/* This can be used to write anti-aliased outlines directly to a */
|
924
|
+
/* given background bitmap, and even perform translucency. */
|
925
|
+
/* */
|
926
|
+
/* Note that the `count' field cannot be greater than a fixed value */
|
927
|
+
/* defined by the `FT_MAX_GRAY_SPANS' configuration macro in */
|
928
|
+
/* `ftoption.h'. By default, this value is set to~32, which means */
|
929
|
+
/* that if there are more than 32~spans on a given scanline, the */
|
930
|
+
/* callback is called several times with the same `y' parameter in */
|
931
|
+
/* order to draw all callbacks. */
|
932
|
+
/* */
|
933
|
+
/* Otherwise, the callback is only called once per scan-line, and */
|
934
|
+
/* only for those scanlines that do have `gray' pixels on them. */
|
935
|
+
/* */
|
936
|
+
typedef void
|
937
|
+
(*FT_SpanFunc)( int y,
|
938
|
+
int count,
|
939
|
+
const FT_Span* spans,
|
940
|
+
void* user );
|
941
|
+
|
942
|
+
#define FT_Raster_Span_Func FT_SpanFunc
|
943
|
+
|
944
|
+
|
945
|
+
/*************************************************************************/
|
946
|
+
/* */
|
947
|
+
/* <FuncType> */
|
948
|
+
/* FT_Raster_BitTest_Func */
|
949
|
+
/* */
|
950
|
+
/* <Description> */
|
951
|
+
/* THIS TYPE IS DEPRECATED. DO NOT USE IT. */
|
952
|
+
/* */
|
953
|
+
/* A function used as a call-back by the monochrome scan-converter */
|
954
|
+
/* to test whether a given target pixel is already set to the drawing */
|
955
|
+
/* `color'. These tests are crucial to implement drop-out control */
|
956
|
+
/* per-se the TrueType spec. */
|
957
|
+
/* */
|
958
|
+
/* <Input> */
|
959
|
+
/* y :: The pixel's y~coordinate. */
|
960
|
+
/* */
|
961
|
+
/* x :: The pixel's x~coordinate. */
|
962
|
+
/* */
|
963
|
+
/* user :: User-supplied data that is passed to the callback. */
|
964
|
+
/* */
|
965
|
+
/* <Return> */
|
966
|
+
/* 1~if the pixel is `set', 0~otherwise. */
|
967
|
+
/* */
|
968
|
+
typedef int
|
969
|
+
(*FT_Raster_BitTest_Func)( int y,
|
970
|
+
int x,
|
971
|
+
void* user );
|
972
|
+
|
973
|
+
|
974
|
+
/*************************************************************************/
|
975
|
+
/* */
|
976
|
+
/* <FuncType> */
|
977
|
+
/* FT_Raster_BitSet_Func */
|
978
|
+
/* */
|
979
|
+
/* <Description> */
|
980
|
+
/* THIS TYPE IS DEPRECATED. DO NOT USE IT. */
|
981
|
+
/* */
|
982
|
+
/* A function used as a call-back by the monochrome scan-converter */
|
983
|
+
/* to set an individual target pixel. This is crucial to implement */
|
984
|
+
/* drop-out control according to the TrueType specification. */
|
985
|
+
/* */
|
986
|
+
/* <Input> */
|
987
|
+
/* y :: The pixel's y~coordinate. */
|
988
|
+
/* */
|
989
|
+
/* x :: The pixel's x~coordinate. */
|
990
|
+
/* */
|
991
|
+
/* user :: User-supplied data that is passed to the callback. */
|
992
|
+
/* */
|
993
|
+
/* <Return> */
|
994
|
+
/* 1~if the pixel is `set', 0~otherwise. */
|
995
|
+
/* */
|
996
|
+
typedef void
|
997
|
+
(*FT_Raster_BitSet_Func)( int y,
|
998
|
+
int x,
|
999
|
+
void* user );
|
1000
|
+
|
1001
|
+
|
1002
|
+
/*************************************************************************/
|
1003
|
+
/* */
|
1004
|
+
/* <Enum> */
|
1005
|
+
/* FT_RASTER_FLAG_XXX */
|
1006
|
+
/* */
|
1007
|
+
/* <Description> */
|
1008
|
+
/* A list of bit flag constants as used in the `flags' field of a */
|
1009
|
+
/* @FT_Raster_Params structure. */
|
1010
|
+
/* */
|
1011
|
+
/* <Values> */
|
1012
|
+
/* FT_RASTER_FLAG_DEFAULT :: This value is 0. */
|
1013
|
+
/* */
|
1014
|
+
/* FT_RASTER_FLAG_AA :: This flag is set to indicate that an */
|
1015
|
+
/* anti-aliased glyph image should be */
|
1016
|
+
/* generated. Otherwise, it will be */
|
1017
|
+
/* monochrome (1-bit). */
|
1018
|
+
/* */
|
1019
|
+
/* FT_RASTER_FLAG_DIRECT :: This flag is set to indicate direct */
|
1020
|
+
/* rendering. In this mode, client */
|
1021
|
+
/* applications must provide their own span */
|
1022
|
+
/* callback. This lets them directly */
|
1023
|
+
/* draw or compose over an existing bitmap. */
|
1024
|
+
/* If this bit is not set, the target */
|
1025
|
+
/* pixmap's buffer _must_ be zeroed before */
|
1026
|
+
/* rendering. */
|
1027
|
+
/* */
|
1028
|
+
/* Note that for now, direct rendering is */
|
1029
|
+
/* only possible with anti-aliased glyphs. */
|
1030
|
+
/* */
|
1031
|
+
/* FT_RASTER_FLAG_CLIP :: This flag is only used in direct */
|
1032
|
+
/* rendering mode. If set, the output will */
|
1033
|
+
/* be clipped to a box specified in the */
|
1034
|
+
/* `clip_box' field of the */
|
1035
|
+
/* @FT_Raster_Params structure. */
|
1036
|
+
/* */
|
1037
|
+
/* Note that by default, the glyph bitmap */
|
1038
|
+
/* is clipped to the target pixmap, except */
|
1039
|
+
/* in direct rendering mode where all spans */
|
1040
|
+
/* are generated if no clipping box is set. */
|
1041
|
+
/* */
|
1042
|
+
#define FT_RASTER_FLAG_DEFAULT 0x0
|
1043
|
+
#define FT_RASTER_FLAG_AA 0x1
|
1044
|
+
#define FT_RASTER_FLAG_DIRECT 0x2
|
1045
|
+
#define FT_RASTER_FLAG_CLIP 0x4
|
1046
|
+
|
1047
|
+
/* deprecated */
|
1048
|
+
#define ft_raster_flag_default FT_RASTER_FLAG_DEFAULT
|
1049
|
+
#define ft_raster_flag_aa FT_RASTER_FLAG_AA
|
1050
|
+
#define ft_raster_flag_direct FT_RASTER_FLAG_DIRECT
|
1051
|
+
#define ft_raster_flag_clip FT_RASTER_FLAG_CLIP
|
1052
|
+
|
1053
|
+
|
1054
|
+
/*************************************************************************/
|
1055
|
+
/* */
|
1056
|
+
/* <Struct> */
|
1057
|
+
/* FT_Raster_Params */
|
1058
|
+
/* */
|
1059
|
+
/* <Description> */
|
1060
|
+
/* A structure to hold the arguments used by a raster's render */
|
1061
|
+
/* function. */
|
1062
|
+
/* */
|
1063
|
+
/* <Fields> */
|
1064
|
+
/* target :: The target bitmap. */
|
1065
|
+
/* */
|
1066
|
+
/* source :: A pointer to the source glyph image (e.g., an */
|
1067
|
+
/* @FT_Outline). */
|
1068
|
+
/* */
|
1069
|
+
/* flags :: The rendering flags. */
|
1070
|
+
/* */
|
1071
|
+
/* gray_spans :: The gray span drawing callback. */
|
1072
|
+
/* */
|
1073
|
+
/* black_spans :: The black span drawing callback. UNIMPLEMENTED! */
|
1074
|
+
/* */
|
1075
|
+
/* bit_test :: The bit test callback. UNIMPLEMENTED! */
|
1076
|
+
/* */
|
1077
|
+
/* bit_set :: The bit set callback. UNIMPLEMENTED! */
|
1078
|
+
/* */
|
1079
|
+
/* user :: User-supplied data that is passed to each drawing */
|
1080
|
+
/* callback. */
|
1081
|
+
/* */
|
1082
|
+
/* clip_box :: An optional clipping box. It is only used in */
|
1083
|
+
/* direct rendering mode. Note that coordinates here */
|
1084
|
+
/* should be expressed in _integer_ pixels (and not in */
|
1085
|
+
/* 26.6 fixed-point units). */
|
1086
|
+
/* */
|
1087
|
+
/* <Note> */
|
1088
|
+
/* An anti-aliased glyph bitmap is drawn if the @FT_RASTER_FLAG_AA */
|
1089
|
+
/* bit flag is set in the `flags' field, otherwise a monochrome */
|
1090
|
+
/* bitmap is generated. */
|
1091
|
+
/* */
|
1092
|
+
/* If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the */
|
1093
|
+
/* raster will call the `gray_spans' callback to draw gray pixel */
|
1094
|
+
/* spans, in the case of an aa glyph bitmap, it will call */
|
1095
|
+
/* `black_spans', and `bit_test' and `bit_set' in the case of a */
|
1096
|
+
/* monochrome bitmap. This allows direct composition over a */
|
1097
|
+
/* pre-existing bitmap through user-provided callbacks to perform the */
|
1098
|
+
/* span drawing/composition. */
|
1099
|
+
/* */
|
1100
|
+
/* Note that the `bit_test' and `bit_set' callbacks are required when */
|
1101
|
+
/* rendering a monochrome bitmap, as they are crucial to implement */
|
1102
|
+
/* correct drop-out control as defined in the TrueType specification. */
|
1103
|
+
/* */
|
1104
|
+
typedef struct FT_Raster_Params_
|
1105
|
+
{
|
1106
|
+
const FT_Bitmap* target;
|
1107
|
+
const void* source;
|
1108
|
+
int flags;
|
1109
|
+
FT_SpanFunc gray_spans;
|
1110
|
+
FT_SpanFunc black_spans; /* doesn't work! */
|
1111
|
+
FT_Raster_BitTest_Func bit_test; /* doesn't work! */
|
1112
|
+
FT_Raster_BitSet_Func bit_set; /* doesn't work! */
|
1113
|
+
void* user;
|
1114
|
+
FT_BBox clip_box;
|
1115
|
+
|
1116
|
+
} FT_Raster_Params;
|
1117
|
+
|
1118
|
+
|
1119
|
+
/*************************************************************************/
|
1120
|
+
/* */
|
1121
|
+
/* <FuncType> */
|
1122
|
+
/* FT_Raster_NewFunc */
|
1123
|
+
/* */
|
1124
|
+
/* <Description> */
|
1125
|
+
/* A function used to create a new raster object. */
|
1126
|
+
/* */
|
1127
|
+
/* <Input> */
|
1128
|
+
/* memory :: A handle to the memory allocator. */
|
1129
|
+
/* */
|
1130
|
+
/* <Output> */
|
1131
|
+
/* raster :: A handle to the new raster object. */
|
1132
|
+
/* */
|
1133
|
+
/* <Return> */
|
1134
|
+
/* Error code. 0~means success. */
|
1135
|
+
/* */
|
1136
|
+
/* <Note> */
|
1137
|
+
/* The `memory' parameter is a typeless pointer in order to avoid */
|
1138
|
+
/* un-wanted dependencies on the rest of the FreeType code. In */
|
1139
|
+
/* practice, it is an @FT_Memory object, i.e., a handle to the */
|
1140
|
+
/* standard FreeType memory allocator. However, this field can be */
|
1141
|
+
/* completely ignored by a given raster implementation. */
|
1142
|
+
/* */
|
1143
|
+
typedef int
|
1144
|
+
(*FT_Raster_NewFunc)( void* memory,
|
1145
|
+
FT_Raster* raster );
|
1146
|
+
|
1147
|
+
#define FT_Raster_New_Func FT_Raster_NewFunc
|
1148
|
+
|
1149
|
+
|
1150
|
+
/*************************************************************************/
|
1151
|
+
/* */
|
1152
|
+
/* <FuncType> */
|
1153
|
+
/* FT_Raster_DoneFunc */
|
1154
|
+
/* */
|
1155
|
+
/* <Description> */
|
1156
|
+
/* A function used to destroy a given raster object. */
|
1157
|
+
/* */
|
1158
|
+
/* <Input> */
|
1159
|
+
/* raster :: A handle to the raster object. */
|
1160
|
+
/* */
|
1161
|
+
typedef void
|
1162
|
+
(*FT_Raster_DoneFunc)( FT_Raster raster );
|
1163
|
+
|
1164
|
+
#define FT_Raster_Done_Func FT_Raster_DoneFunc
|
1165
|
+
|
1166
|
+
|
1167
|
+
/*************************************************************************/
|
1168
|
+
/* */
|
1169
|
+
/* <FuncType> */
|
1170
|
+
/* FT_Raster_ResetFunc */
|
1171
|
+
/* */
|
1172
|
+
/* <Description> */
|
1173
|
+
/* FreeType provides an area of memory called the `render pool', */
|
1174
|
+
/* available to all registered rasters. This pool can be freely used */
|
1175
|
+
/* during a given scan-conversion but is shared by all rasters. Its */
|
1176
|
+
/* content is thus transient. */
|
1177
|
+
/* */
|
1178
|
+
/* This function is called each time the render pool changes, or just */
|
1179
|
+
/* after a new raster object is created. */
|
1180
|
+
/* */
|
1181
|
+
/* <Input> */
|
1182
|
+
/* raster :: A handle to the new raster object. */
|
1183
|
+
/* */
|
1184
|
+
/* pool_base :: The address in memory of the render pool. */
|
1185
|
+
/* */
|
1186
|
+
/* pool_size :: The size in bytes of the render pool. */
|
1187
|
+
/* */
|
1188
|
+
/* <Note> */
|
1189
|
+
/* Rasters can ignore the render pool and rely on dynamic memory */
|
1190
|
+
/* allocation if they want to (a handle to the memory allocator is */
|
1191
|
+
/* passed to the raster constructor). However, this is not */
|
1192
|
+
/* recommended for efficiency purposes. */
|
1193
|
+
/* */
|
1194
|
+
typedef void
|
1195
|
+
(*FT_Raster_ResetFunc)( FT_Raster raster,
|
1196
|
+
unsigned char* pool_base,
|
1197
|
+
unsigned long pool_size );
|
1198
|
+
|
1199
|
+
#define FT_Raster_Reset_Func FT_Raster_ResetFunc
|
1200
|
+
|
1201
|
+
|
1202
|
+
/*************************************************************************/
|
1203
|
+
/* */
|
1204
|
+
/* <FuncType> */
|
1205
|
+
/* FT_Raster_SetModeFunc */
|
1206
|
+
/* */
|
1207
|
+
/* <Description> */
|
1208
|
+
/* This function is a generic facility to change modes or attributes */
|
1209
|
+
/* in a given raster. This can be used for debugging purposes, or */
|
1210
|
+
/* simply to allow implementation-specific `features' in a given */
|
1211
|
+
/* raster module. */
|
1212
|
+
/* */
|
1213
|
+
/* <Input> */
|
1214
|
+
/* raster :: A handle to the new raster object. */
|
1215
|
+
/* */
|
1216
|
+
/* mode :: A 4-byte tag used to name the mode or property. */
|
1217
|
+
/* */
|
1218
|
+
/* args :: A pointer to the new mode/property to use. */
|
1219
|
+
/* */
|
1220
|
+
typedef int
|
1221
|
+
(*FT_Raster_SetModeFunc)( FT_Raster raster,
|
1222
|
+
unsigned long mode,
|
1223
|
+
void* args );
|
1224
|
+
|
1225
|
+
#define FT_Raster_Set_Mode_Func FT_Raster_SetModeFunc
|
1226
|
+
|
1227
|
+
|
1228
|
+
/*************************************************************************/
|
1229
|
+
/* */
|
1230
|
+
/* <FuncType> */
|
1231
|
+
/* FT_Raster_RenderFunc */
|
1232
|
+
/* */
|
1233
|
+
/* <Description> */
|
1234
|
+
/* Invoke a given raster to scan-convert a given glyph image into a */
|
1235
|
+
/* target bitmap. */
|
1236
|
+
/* */
|
1237
|
+
/* <Input> */
|
1238
|
+
/* raster :: A handle to the raster object. */
|
1239
|
+
/* */
|
1240
|
+
/* params :: A pointer to an @FT_Raster_Params structure used to */
|
1241
|
+
/* store the rendering parameters. */
|
1242
|
+
/* */
|
1243
|
+
/* <Return> */
|
1244
|
+
/* Error code. 0~means success. */
|
1245
|
+
/* */
|
1246
|
+
/* <Note> */
|
1247
|
+
/* The exact format of the source image depends on the raster's glyph */
|
1248
|
+
/* format defined in its @FT_Raster_Funcs structure. It can be an */
|
1249
|
+
/* @FT_Outline or anything else in order to support a large array of */
|
1250
|
+
/* glyph formats. */
|
1251
|
+
/* */
|
1252
|
+
/* Note also that the render function can fail and return a */
|
1253
|
+
/* `FT_Err_Unimplemented_Feature' error code if the raster used does */
|
1254
|
+
/* not support direct composition. */
|
1255
|
+
/* */
|
1256
|
+
/* XXX: For now, the standard raster doesn't support direct */
|
1257
|
+
/* composition but this should change for the final release (see */
|
1258
|
+
/* the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c' */
|
1259
|
+
/* for examples of distinct implementations which support direct */
|
1260
|
+
/* composition). */
|
1261
|
+
/* */
|
1262
|
+
typedef int
|
1263
|
+
(*FT_Raster_RenderFunc)( FT_Raster raster,
|
1264
|
+
const FT_Raster_Params* params );
|
1265
|
+
|
1266
|
+
#define FT_Raster_Render_Func FT_Raster_RenderFunc
|
1267
|
+
|
1268
|
+
|
1269
|
+
/*************************************************************************/
|
1270
|
+
/* */
|
1271
|
+
/* <Struct> */
|
1272
|
+
/* FT_Raster_Funcs */
|
1273
|
+
/* */
|
1274
|
+
/* <Description> */
|
1275
|
+
/* A structure used to describe a given raster class to the library. */
|
1276
|
+
/* */
|
1277
|
+
/* <Fields> */
|
1278
|
+
/* glyph_format :: The supported glyph format for this raster. */
|
1279
|
+
/* */
|
1280
|
+
/* raster_new :: The raster constructor. */
|
1281
|
+
/* */
|
1282
|
+
/* raster_reset :: Used to reset the render pool within the raster. */
|
1283
|
+
/* */
|
1284
|
+
/* raster_render :: A function to render a glyph into a given bitmap. */
|
1285
|
+
/* */
|
1286
|
+
/* raster_done :: The raster destructor. */
|
1287
|
+
/* */
|
1288
|
+
typedef struct FT_Raster_Funcs_
|
1289
|
+
{
|
1290
|
+
FT_Glyph_Format glyph_format;
|
1291
|
+
FT_Raster_NewFunc raster_new;
|
1292
|
+
FT_Raster_ResetFunc raster_reset;
|
1293
|
+
FT_Raster_SetModeFunc raster_set_mode;
|
1294
|
+
FT_Raster_RenderFunc raster_render;
|
1295
|
+
FT_Raster_DoneFunc raster_done;
|
1296
|
+
|
1297
|
+
} FT_Raster_Funcs;
|
1298
|
+
|
1299
|
+
|
1300
|
+
/* */
|
1301
|
+
|
1302
|
+
|
1303
|
+
FT_END_HEADER
|
1304
|
+
|
1305
|
+
#endif /* __FTIMAGE_H__ */
|
1306
|
+
|
1307
|
+
|
1308
|
+
/* END */
|
1309
|
+
|
1310
|
+
|
1311
|
+
/* Local Variables: */
|
1312
|
+
/* coding: utf-8 */
|
1313
|
+
/* End: */
|