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