Okular

fontinfo.h
1 /***************************************************************************
2  * Copyright (C) 2007 by Pino Toscano <[email protected]> *
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 of the License, or *
7  * (at your option) any later version. *
8  ***************************************************************************/
9 
10 #ifndef _OKULAR_FONTINFO_H_
11 #define _OKULAR_FONTINFO_H_
12 
13 #include <QList>
14 #include <QMetaType>
15 #include <QSharedDataPointer>
16 #include <QString>
17 
18 #include "okularcore_export.h"
19 
20 namespace Okular
21 {
22 class FontInfoPrivate;
23 
27 class OKULARCORE_EXPORT FontInfo
28 {
29 public:
30  typedef QVector<FontInfo> List;
31 
35  enum FontType {
36  Unknown,
37  Type1,
38  Type1C,
39  Type1COT,
40  Type3,
41  TrueType,
42  TrueTypeOT,
43  CIDType0,
44  CIDType0C,
45  CIDType0COT,
46  CIDTrueType,
47  CIDTrueTypeOT,
51  TeXFreeTypeHandled
52  };
53 
57  enum EmbedType { NotEmbedded, EmbeddedSubset, FullyEmbedded };
58 
62  FontInfo();
66  FontInfo(const FontInfo &fi);
70  ~FontInfo();
71 
75  QString name() const;
79  void setName(const QString &name);
80 
84  QString substituteName() const;
85 
89  void setSubstituteName(const QString &substituteName);
90 
94  FontType type() const;
98  void setType(FontType type);
99 
103  EmbedType embedType() const;
107  void setEmbedType(EmbedType type);
108 
113  QString file() const;
114  void setFile(const QString &file);
115 
121  bool canBeExtracted() const;
122 
126  void setCanBeExtracted(bool extractable);
127 
137  void setNativeId(const QVariant &id);
138 
144  QVariant nativeId() const;
145 
146  FontInfo &operator=(const FontInfo &fi);
147 
151  bool operator==(const FontInfo &fi) const;
152 
153  bool operator!=(const FontInfo &fi) const;
154 
155 private:
157  friend class FontInfoPrivate;
160 };
161 
162 }
163 
164 Q_DECLARE_METATYPE(Okular::FontInfo)
165 
166 #endif
global.h
Definition: action.h:19
A small class that represents the information of a font.
Definition: fontinfo.h:27
EmbedType
The possible kinds of embed.
Definition: fontinfo.h:57
FontType
The possible kinds of fonts.
Definition: fontinfo.h:35
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 23 2021 01:05:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.