2005-12-15 21:34:10 +00:00
|
|
|
// -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; c-brace-offset: 0; -*-
|
2005-10-19 22:43:24 +00:00
|
|
|
// TeXFont_PFB.h
|
2003-03-14 17:09:06 +00:00
|
|
|
//
|
2005-10-19 22:43:24 +00:00
|
|
|
// Part of KDVI - A DVI previewer for the KDE desktop environment
|
2003-03-14 17:09:06 +00:00
|
|
|
//
|
2021-05-24 07:25:56 +00:00
|
|
|
// SPDX-FileCopyrightText: 2003 Stefan Kebekus
|
2021-05-24 12:00:50 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2003-03-14 17:09:06 +00:00
|
|
|
|
2003-03-21 09:28:51 +00:00
|
|
|
// This file is compiled only if the FreeType library is present on
|
|
|
|
// the system
|
|
|
|
|
2003-03-14 17:09:06 +00:00
|
|
|
#ifndef _TEXFONT_PFB_H
|
|
|
|
#define _TEXFONT_PFB_H
|
|
|
|
|
2005-09-21 18:10:56 +00:00
|
|
|
#include "TeXFont.h"
|
2003-03-21 09:28:51 +00:00
|
|
|
|
|
|
|
#include <ft2build.h>
|
|
|
|
#include FT_FREETYPE_H
|
2003-03-14 17:09:06 +00:00
|
|
|
|
2005-09-21 18:10:56 +00:00
|
|
|
class fontEncoding;
|
2003-03-14 17:09:06 +00:00
|
|
|
class glyph;
|
|
|
|
|
|
|
|
class TeXFont_PFB : public TeXFont
|
|
|
|
{
|
|
|
|
public:
|
2021-08-21 23:14:34 +00:00
|
|
|
explicit TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc = nullptr, double slant = 0.0);
|
2019-12-18 11:51:13 +00:00
|
|
|
~TeXFont_PFB() override;
|
2020-07-10 22:15:05 +00:00
|
|
|
|
2017-03-02 19:38:50 +00:00
|
|
|
glyph *getGlyph(quint16 character, bool generateCharacterPixmap = false, const QColor &color = Qt::black) override;
|
2020-07-10 22:15:05 +00:00
|
|
|
|
2003-03-14 17:09:06 +00:00
|
|
|
private:
|
2003-06-17 06:42:22 +00:00
|
|
|
FT_Face face;
|
|
|
|
bool fatalErrorInFontLoading;
|
2005-11-14 10:23:21 +00:00
|
|
|
quint16 charMap[256];
|
2020-07-10 22:15:05 +00:00
|
|
|
|
2004-10-05 12:21:37 +00:00
|
|
|
// This matrix is used internally to describes the slant, if
|
|
|
|
// nonzero. Otherwise, this is undefined.
|
|
|
|
FT_Matrix transformationMatrix;
|
2003-03-14 17:09:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|