1 /* poppler-qt.h: qt interface to poppler
2  * Copyright (C) 2005, Albert Astals Cid <aacid@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 #include "poppler-qt.h"
20 
21 namespace Poppler {
22 
23 class FontInfoData
24 {
25 	public:
26 		QString fontName;
27 		bool isEmbedded;
28 		bool isSubset;
29 		FontInfo::Type type;
30 };
31 
FontInfo(const QString & fontName,const bool isEmbedded,const bool isSubset,Type type)32 FontInfo::FontInfo( const QString &fontName, const bool isEmbedded, const bool isSubset, Type type )
33 {
34 	data = new FontInfoData();
35 	data->fontName = fontName;
36 	data->isEmbedded = isEmbedded;
37 	data->isSubset = isSubset;
38 	data->type = type;
39 }
40 
FontInfo(const FontInfo & fi)41 FontInfo::FontInfo( const FontInfo &fi )
42 {
43 	data = new FontInfoData();
44 	data->fontName = fi.data->fontName;
45 	data->isEmbedded = fi.data->isEmbedded;
46 	data->isSubset = fi.data->isSubset;
47 	data->type = fi.data->type;
48 }
49 
FontInfo()50 FontInfo::FontInfo()
51 {
52 	data = new FontInfoData();
53 	data->isEmbedded = false;
54 	data->isSubset = false;
55 	data->type = unknown;
56 }
57 
~FontInfo()58 FontInfo::~FontInfo()
59 {
60 	delete data;
61 }
62 
name() const63 const QString &FontInfo::name() const
64 {
65 	return data->fontName;
66 }
67 
isEmbedded() const68 bool FontInfo::isEmbedded() const
69 {
70 	return data->isEmbedded;
71 }
72 
isSubset() const73 bool FontInfo::isSubset() const
74 {
75 	return data->isSubset;
76 }
77 
type() const78 FontInfo::Type FontInfo::type() const
79 {
80 	return data->type;
81 }
82 
83 }
84