1//========================================================================
2//
3// SplashFTFontFile.h
4//
5//========================================================================
6
7//========================================================================
8//
9// Modified under the Poppler project - http://poppler.freedesktop.org
10//
11// All changes made under the Poppler project to this file are licensed
12// under GPL version 2 or later
13//
14// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
15// Copyright (C) 2017, 2018 Oliver Sander <oliver.sander@tu-dresden.de>
16// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com>
17// Copyright (C) 2019 Albert Astals Cid <aacid@kde.org>
18//
19// To see a description of the changes please see the Changelog file that
20// came with your tarball or type make ChangeLog if you are building from git
21//
22//========================================================================
23
24#ifndef SPLASHFTFONTFILE_H
25#define SPLASHFTFONTFILE_H
26
27#include <ft2build.h>
28#include FT_FREETYPE_H
29#include "SplashFontFile.h"
30
31class SplashFontFileID;
32class SplashFTFontEngine;
33
34//------------------------------------------------------------------------
35// SplashFTFontFile
36//------------------------------------------------------------------------
37
38class SplashFTFontFile : public SplashFontFile
39{
40public:
41 static SplashFontFile *loadType1Font(SplashFTFontEngine *engineA, SplashFontFileID *idA, SplashFontSrc *src, const char **encA);
42 static SplashFontFile *loadCIDFont(SplashFTFontEngine *engineA, SplashFontFileID *idA, SplashFontSrc *src, int *codeToGIDA, int codeToGIDLenA);
43 static SplashFontFile *loadTrueTypeFont(SplashFTFontEngine *engineA, SplashFontFileID *idA, SplashFontSrc *src, int *codeToGIDA, int codeToGIDLenA, int faceIndexA = 0);
44
45 ~SplashFTFontFile() override;
46
47 // Create a new SplashFTFont, i.e., a scaled instance of this font
48 // file.
49 SplashFont *makeFont(SplashCoord *mat, const SplashCoord *textMat) override;
50
51private:
52 SplashFTFontFile(SplashFTFontEngine *engineA, SplashFontFileID *idA, SplashFontSrc *src, FT_Face faceA, int *codeToGIDA, int codeToGIDLenA, bool trueTypeA, bool type1A);
53
54 SplashFTFontEngine *engine;
55 FT_Face face;
56 int *codeToGID;
57 int codeToGIDLen;
58 bool trueType;
59 bool type1;
60
61 friend class SplashFTFont;
62};
63
64#endif
65

source code of poppler/splash/SplashFTFontFile.h