Poppler CPP 24.05.0
poppler-font.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2009, Pino Toscano <pino@kde.org>
3 * Copyright (C) 2020, Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
4 * Copyright (C) 2021, Albert Astals Cid <aacid@kde.org>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20
21#ifndef POPPLER_FONT_H
22#define POPPLER_FONT_H
23
24#include "poppler-global.h"
25
26#include <vector>
27
28namespace poppler {
29
30class document;
31class document_private;
32class font_info_private;
33class font_iterator;
34class font_iterator_private;
35
36class POPPLER_CPP_EXPORT font_info
37{
38public:
40 {
41 unknown,
42 type1,
43 type1c,
44 type1c_ot,
45 type3,
46 truetype,
47 truetype_ot,
48 cid_type0,
49 cid_type0c,
50 cid_type0c_ot,
51 cid_truetype,
52 cid_truetype_ot
53 };
54
55 font_info();
56 font_info(const font_info &fi);
57 ~font_info();
58
59 std::string name() const;
60 std::string file() const;
61 bool is_embedded() const;
62 bool is_subset() const;
63 type_enum type() const;
64
65 font_info &operator=(const font_info &fi);
66
67private:
68 explicit font_info(font_info_private &dd);
69
70 font_info_private *d;
71 friend class font_iterator;
72 friend class page;
73};
74
75class POPPLER_CPP_EXPORT font_iterator : public poppler::noncopyable
76{
77public:
79
80 std::vector<font_info> next();
81 bool has_next() const;
82 int current_page() const;
83
84private:
85 font_iterator(int, document_private *dd);
86
87 font_iterator_private *d;
88 friend class document;
89 friend class page;
90 friend class page_private;
91};
92
93}
94
95#endif
Represents a PDF document.
Definition poppler-document.h:39
The information about a font used in a PDF document.
Definition poppler-font.h:37
type_enum
The various types of fonts available in a PDF document.
Definition poppler-font.h:40
Reads the fonts in the PDF document page by page.
Definition poppler-font.h:76
A page in a PDF document.
Definition poppler-page.h:143
Single namespace containing all the classes and functions of poppler-cpp.
Definition poppler-destination.h:27