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 #ifndef SPLASHFTFONTFILE_H
0025 #define SPLASHFTFONTFILE_H
0026
0027 #include <ft2build.h>
0028 #include FT_FREETYPE_H
0029 #include "SplashFontFile.h"
0030
0031 class SplashFontFileID;
0032 class SplashFTFontEngine;
0033
0034
0035
0036
0037
0038 class SplashFTFontFile : public SplashFontFile
0039 {
0040 public:
0041 static SplashFontFile *loadType1Font(SplashFTFontEngine *engineA, SplashFontFileID *idA, SplashFontSrc *src, const char **encA);
0042 static SplashFontFile *loadCIDFont(SplashFTFontEngine *engineA, SplashFontFileID *idA, SplashFontSrc *src, int *codeToGIDA, int codeToGIDLenA);
0043 static SplashFontFile *loadTrueTypeFont(SplashFTFontEngine *engineA, SplashFontFileID *idA, SplashFontSrc *src, int *codeToGIDA, int codeToGIDLenA, int faceIndexA = 0);
0044
0045 ~SplashFTFontFile() override;
0046
0047
0048
0049 SplashFont *makeFont(SplashCoord *mat, const SplashCoord *textMat) override;
0050
0051 private:
0052 SplashFTFontFile(SplashFTFontEngine *engineA, SplashFontFileID *idA, SplashFontSrc *src, FT_Face faceA, int *codeToGIDA, int codeToGIDLenA, bool trueTypeA, bool type1A);
0053
0054 SplashFTFontEngine *engine;
0055 FT_Face face;
0056 int *codeToGID;
0057 int codeToGIDLen;
0058 bool trueType;
0059 bool type1;
0060
0061 friend class SplashFTFont;
0062 };
0063
0064 #endif