Ticket #295: poppler-font.h

File poppler-font.h, 2.0 KB (added by Gregg Young, 8 years ago)
Line 
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
26namespace poppler
27{
28
29class document;
30class document_private;
31class font_info_private;
32class font_iterator;
33class font_iterator_private;
34
35class POPPLER_CPP_EXPORT font_info
36{
37public:
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
65private:
66    font_info(font_info_private &dd);
67
68    font_info_private *d;
69    friend class font_iterator;
70};
71
72
73class POPPLER_CPP_EXPORT font_iterator : public poppler::noncopyable
74{
75public:
76    ~font_iterator();
77
78    std::vector<font_info> next();
79    bool has_next() const;
80    int current_page() const;
81
82private:
83    font_iterator(int, document_private *dd);
84
85    font_iterator_private *d;
86    friend class document;
87};
88
89}
90
91#endif