Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-11 10:26:10

0001 //========================================================================
0002 //
0003 // SplashFTFontFile.h
0004 //
0005 //========================================================================
0006 
0007 //========================================================================
0008 //
0009 // Modified under the Poppler project - http://poppler.freedesktop.org
0010 //
0011 // All changes made under the Poppler project to this file are licensed
0012 // under GPL version 2 or later
0013 //
0014 // Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
0015 // Copyright (C) 2017, 2018 Oliver Sander <oliver.sander@tu-dresden.de>
0016 // Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com>
0017 // Copyright (C) 2019 Albert Astals Cid <aacid@kde.org>
0018 //
0019 // To see a description of the changes please see the Changelog file that
0020 // came with your tarball or type make ChangeLog if you are building from git
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 // SplashFTFontFile
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     // Create a new SplashFTFont, i.e., a scaled instance of this font
0048     // file.
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