1//========================================================================
2//
3// FoFiType1.h
4//
5// Copyright 1999-2003 Glyph & Cog, LLC
6//
7//========================================================================
8
9//========================================================================
10//
11// Modified under the Poppler project - http://poppler.freedesktop.org
12//
13// All changes made under the Poppler project to this file are licensed
14// under GPL version 2 or later
15//
16// Copyright (C) 2018, 2022, 2023 Albert Astals Cid <aacid@kde.org>
17// Copyright (C) 2022 Oliver Sander <oliver.sander@tu-dresden.de>
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 FOFITYPE1_H
25#define FOFITYPE1_H
26
27#include "FoFiBase.h"
28
29#include <string>
30
31//------------------------------------------------------------------------
32// FoFiType1
33//------------------------------------------------------------------------
34
35class FoFiType1 : public FoFiBase
36{
37public:
38 // Create a FoFiType1 object from a memory buffer.
39 static FoFiType1 *make(const unsigned char *fileA, int lenA);
40
41 ~FoFiType1() override;
42
43 // Return the font name.
44 std::string getName();
45
46 // Return the encoding, as an array of 256 names (any of which may
47 // be NULL).
48 char **getEncoding();
49
50 // Write a version of the Type 1 font file with a new encoding.
51 void writeEncoded(const char **newEncoding, FoFiOutputFunc outputFunc, void *outputStream) const;
52
53private:
54 FoFiType1(const unsigned char *fileA, int lenA, bool freeFileDataA);
55
56 char *getNextLine(char *line) const;
57 void parse();
58 void undoPFB();
59
60 std::string name;
61 char **encoding;
62 bool parsed;
63};
64
65#endif
66

source code of poppler/fofi/FoFiType1.h