Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //========================================================================
0002 //
0003 // SplashFTFontEngine.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) 2009 Petr Gajdos <pgajdos@novell.com>
0016 // Copyright (C) 2009, 2018, 2022 Albert Astals Cid <aacid@kde.org>
0017 // Copyright (C) 2011 Andreas Hartmetz <ahartmetz@gmail.com>
0018 // Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
0019 // Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com>
0020 //
0021 // To see a description of the changes please see the Changelog file that
0022 // came with your tarball or type make ChangeLog if you are building from git
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 // SplashFTFontEngine
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     // Load fonts.
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