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 #ifndef SPLASHFONTFILE_H
0024 #define SPLASHFONTFILE_H
0025
0026 #include <string>
0027 #include <vector>
0028
0029 #include "SplashTypes.h"
0030 #include "poppler_private_export.h"
0031
0032 class SplashFontEngine;
0033 class SplashFont;
0034 class SplashFontFileID;
0035
0036
0037
0038
0039
0040 class POPPLER_PRIVATE_EXPORT SplashFontSrc
0041 {
0042 public:
0043 SplashFontSrc();
0044
0045 SplashFontSrc(const SplashFontSrc &) = delete;
0046 SplashFontSrc &operator=(const SplashFontSrc &) = delete;
0047
0048 void setFile(const std::string &file);
0049 void setBuf(char *bufA, int buflenA);
0050 void setBuf(std::vector<unsigned char> &&bufA);
0051
0052 void ref();
0053 void unref();
0054
0055 bool isFile;
0056 std::string fileName;
0057 std::vector<unsigned char> buf;
0058
0059 private:
0060 ~SplashFontSrc();
0061 int refcnt;
0062 };
0063
0064 class SplashFontFile
0065 {
0066 public:
0067 virtual ~SplashFontFile();
0068
0069 SplashFontFile(const SplashFontFile &) = delete;
0070 SplashFontFile &operator=(const SplashFontFile &) = delete;
0071
0072
0073
0074 virtual SplashFont *makeFont(SplashCoord *mat, const SplashCoord *textMat) = 0;
0075
0076
0077 SplashFontFileID *getID() { return id; }
0078
0079
0080 void incRefCnt();
0081
0082
0083
0084 void decRefCnt();
0085
0086 bool doAdjustMatrix;
0087
0088 protected:
0089 SplashFontFile(SplashFontFileID *idA, SplashFontSrc *srcA);
0090
0091 SplashFontFileID *id;
0092 SplashFontSrc *src;
0093 int refCnt;
0094
0095 friend class SplashFontEngine;
0096 };
0097
0098 #endif