File indexing completed on 2024-05-12 04:33:59
0001 // -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; c-brace-offset: 0; -*- 0002 // TeXFont_PFB.h 0003 // 0004 // Part of KDVI - A DVI previewer for the KDE desktop environment 0005 // 0006 // SPDX-FileCopyrightText: 2003 Stefan Kebekus 0007 // SPDX-License-Identifier: GPL-2.0-or-later 0008 0009 // This file is compiled only if the FreeType library is present on 0010 // the system 0011 0012 #ifndef _TEXFONT_PFB_H 0013 #define _TEXFONT_PFB_H 0014 0015 #include "TeXFont.h" 0016 0017 #include <ft2build.h> 0018 #include FT_FREETYPE_H 0019 0020 class fontEncoding; 0021 class glyph; 0022 0023 class TeXFont_PFB : public TeXFont 0024 { 0025 public: 0026 explicit TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc = nullptr, double slant = 0.0); 0027 ~TeXFont_PFB() override; 0028 0029 glyph *getGlyph(quint16 character, bool generateCharacterPixmap = false, const QColor &color = Qt::black) override; 0030 0031 private: 0032 FT_Face face; 0033 bool fatalErrorInFontLoading; 0034 quint16 charMap[256]; 0035 0036 // This matrix is used internally to describes the slant, if 0037 // nonzero. Otherwise, this is undefined. 0038 FT_Matrix transformationMatrix; 0039 }; 0040 0041 #endif