File indexing completed on 2025-12-11 10:26:10
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026 #ifndef SPLASHFTFONTENGINE_H
0027 #define SPLASHFTFONTENGINE_H
0028
0029 #include <ft2build.h>
0030 #include FT_FREETYPE_H
0031
0032 class SplashFontFile;
0033 class SplashFontFileID;
0034 class SplashFontSrc;
0035
0036
0037
0038
0039
0040 class SplashFTFontEngine
0041 {
0042 public:
0043 static SplashFTFontEngine *init(bool aaA, bool enableFreeTypeHintingA, bool enableSlightHinting);
0044
0045 ~SplashFTFontEngine();
0046
0047 SplashFTFontEngine(const SplashFTFontEngine &) = delete;
0048 SplashFTFontEngine &operator=(const SplashFTFontEngine &) = delete;
0049
0050
0051 SplashFontFile *loadType1Font(SplashFontFileID *idA, SplashFontSrc *src, const char **enc);
0052 SplashFontFile *loadType1CFont(SplashFontFileID *idA, SplashFontSrc *src, const char **enc);
0053 SplashFontFile *loadOpenTypeT1CFont(SplashFontFileID *idA, SplashFontSrc *src, const char **enc);
0054 SplashFontFile *loadCIDFont(SplashFontFileID *idA, SplashFontSrc *src);
0055 SplashFontFile *loadOpenTypeCFFFont(SplashFontFileID *idA, SplashFontSrc *src, int *codeToGID, int codeToGIDLen);
0056 SplashFontFile *loadTrueTypeFont(SplashFontFileID *idA, SplashFontSrc *src, int *codeToGID, int codeToGIDLen, int faceIndex = 0);
0057 bool getAA() { return aa; }
0058 void setAA(bool aaA) { aa = aaA; }
0059
0060 private:
0061 SplashFTFontEngine(bool aaA, bool enableFreeTypeHintingA, bool enableSlightHintingA, FT_Library libA);
0062
0063 bool aa;
0064 bool enableFreeTypeHinting;
0065 bool enableSlightHinting;
0066 FT_Library lib;
0067
0068 friend class SplashFTFontFile;
0069 friend class SplashFTFont;
0070 };
0071
0072 #endif