Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
hdicoreFont.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_FONT__
8 #define __HDI_CORE_FONT__
9 
10 #include "hdicoreTypes.h"
11 
12 namespace hdi
13 {
14  namespace plugin
15  {
16  class Font;
17  }
18 
19  namespace core
20  {
21  class Font;
22 
26  class Typeface
27  {
28  public:
40  Typeface();
41 
49  Typeface(const Typeface& tf_);
50 
58  Typeface(const AITypefaceKey aiTF_);
59 
65  virtual ~Typeface();
66 
76  virtual Typeface& operator=(const Typeface& rhs_);
77 
85  virtual bool isEmpty() const;
86 
98  virtual AITypefaceKey aiTypefaceKey() const;
99 
108  virtual bool operator==(const Typeface& rhs_) const;
109 
118  virtual bool operator!=(const Typeface& rhs_) const;
119 
127  virtual int32_t styleCount() const;
128 
137  virtual std::auto_ptr<Font> styleAtIndex(const int32_t index_);
138 
146  virtual std::string name() const;
147 
148 
149  private:
150  friend void* __accessImpl(const Typeface&);
151 
155  void* __data;
156 
162  void* __impl() const;
163  };
164 
165  typedef std::auto_ptr<Typeface> TypefaceAP;
166 
170  class Font
171  {
172  public:
176  class Info
177  {
178  public:
182  enum Format
183  {
184  UnknownFormat = 0,
185  TypeOneFormat = 10,
186  TrueTypeFormat = 20
187  };
188 
192  enum Encoding
193  {
194  UnknownEncoding = 0,
195  DontCareEncoding = 10,
196  StandardEncoding = 20,
197  SpecialEncoding = 30
198  };
199 
203  enum Script
204  {
205  UnknownScript = 0,
206  NativeScript = 10,
207  RomanScript = 20,
208  JapaneseScript = 30,
209  ChineseTraditionalScript = 40,
210  ChineseSimplifiedScript = 50,
211  KoreanScript = 60,
212  ArabicScript = 70,
213  HebrewScript = 80,
214  GreekScript = 90,
215  CyrillicScript = 100,
216  EastEuropeanRomanScript = 110,
217  TurkishScript = 120,
218  BalticScript = 130,
219  SymbolScript = 140
220  };
221 
226  {
227  MojiZumeUnknown = 0,
228  MojiZumeNone = 10,
229  MojiZumeGXTrueType = 20,
230  MojiZumePageMakerJ = 30,
231  MojiZumeSfntATM = 40
232  };
233 
238 
243 
248 
253 
258 
263 
267  bool isCID;
268 
273 
277  bool isOTF;
278 
282  bool isBitmap;
283 
287  bool isOCF;
288 
292  bool isATC;
293 
300 
306  Info();
307 
313  virtual ~Info();
314  };
315 
316  typedef std::auto_ptr<Info> InfoAP;
317 
325  Font();
326 
334  Font(const Font& f_);
335 
343  Font(const AIFontKey aiFont_);
344 
350  virtual ~Font();
351 
360  virtual Font& operator=(const Font& rhs_);
361 
370  virtual bool operator==(const Font& rhs_) const;
371 
380  virtual bool operator!=(const Font& rhs_) const;
381 
393  virtual AIFontKey aiFontKey() const;
394 
402  virtual Info info() const;
403 
411  virtual std::string name() const;
412 
420  virtual std::string familyName() const;
421 
429  virtual std::string styleName() const;
430 
440  virtual bool typefaceAndStyle(Typeface& tf__, int32_t& style__);
441 
442  #if HDI_CORE_COMPILE_AI17_PLUS
443 
450  virtual bool substituted() const;
451  #endif
452 
453 
454  private:
455  friend plugin::Font* __accessImpl(const Font&);
456  friend Font __accessCtor(const plugin::Font&);
457 
461  plugin::Font* __impl;
462 
468  Font(const plugin::Font&);
469  };
470 
471  typedef std::auto_ptr<Font> FontAP;
472 
473  extern void* __accessImpl(const Typeface&);
474  extern plugin::Font* __accessImpl(const Font&);
475  extern Font __accessCtor(const plugin::Font&);
476  }
477 }
478 
479 #endif
480 // __HDI_CORE_FONT__
Format
Describes the font format.
Definition: hdicoreFont.h:182
virtual std::auto_ptr< Font > styleAtIndex(const int32_t index_)
Gets a variant of a font family by index position.
virtual bool operator==(const Typeface &rhs_) const
Tests whether a given Typeface object is the same as another.
virtual AIFontKey aiFontKey() const
Gets the font key around which the target object is wrapped.
virtual Info info() const
Gets the font's style info.
bool isATC
Is the font Adobe Type Composer?
Definition: hdicoreFont.h:292
virtual bool operator==(const Font &rhs_) const
Tests whether a given Font object is the same as another.
virtual ~Font()
Destructs a Font object.
virtual Font & operator=(const Font &rhs_)
Overloaded assignment operator for Font objects.
virtual std::string familyName() const
Gets the name of the family for the target font.
virtual Typeface & operator=(const Typeface &rhs_)
Assigns one Typeface object to another.
virtual bool substituted() const
Gets whether the target font is substituted or not.
virtual bool operator!=(const Typeface &rhs_) const
Tests whether a given Typeface object is not the same as another.
virtual bool isEmpty() const
Gets whether the target Typeface object is empty (constructed with the default ctor) ...
Typeface class to allow for easy typeface manipulation.
Definition: hdicoreFont.h:26
Encoding
Describes the font encoding.
Definition: hdicoreFont.h:192
bool fauxedInstalled
Is the font fauxed for another missing font?
Definition: hdicoreFont.h:262
Encoding encoding
Font face encoding.
Definition: hdicoreFont.h:242
virtual std::string styleName() const
Gets the name of the style for the target font.
bool originalEncoding
Is the font the original encoding?
Definition: hdicoreFont.h:252
Describes style information for an individual font.
Definition: hdicoreFont.h:176
Script script
Font face script.
Definition: hdicoreFont.h:247
virtual int32_t styleCount() const
Gets the total number of variants (such as bold and italic) of a font family.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
Font class to allow for easy font manipulation.
Definition: hdicoreFont.h:170
bool isBitmap
Is the font bitmap?
Definition: hdicoreFont.h:282
virtual ~Info()
Destructs an Info object.
bool isOCF
Is the font Original Composer Format?
Definition: hdicoreFont.h:287
Format format
Font face formatting.
Definition: hdicoreFont.h:237
Definition: hdicoreaiArray.h:12
bool isOTF
Is the font OpenType?
Definition: hdicoreFont.h:277
MojiZumeType mojiZumeType
MojiZume type of the font.
Definition: hdicoreFont.h:272
Font()
Creates a Font object with the default native script (e.g. roman, cyrillic, etc.) ...
virtual AITypefaceKey aiTypefaceKey() const
Gets the typeface key around which the target object is wrapped.
bool familyInstalled
Is the font family installed?
Definition: hdicoreFont.h:257
Typeface()
Constructs an empty Typeface object.
virtual std::string name() const
Gets the name of the font.
virtual bool typefaceAndStyle(Typeface &tf__, int32_t &style__)
Gets the typeface (family) and style variant of the target font.
MojiZumeType
Describes the font MojiZume type.
Definition: hdicoreFont.h:225
virtual ~Typeface()
Typeface object destructor.
bool isMultipleMaster
Is the font Adobe Multiple Master?
Definition: hdicoreFont.h:299
virtual std::string name() const
Gets the name of the typeface.
Script
Describes the font script.
Definition: hdicoreFont.h:203
bool isCID
Is the font character ID-keyed?
Definition: hdicoreFont.h:267
virtual bool operator!=(const Font &rhs_) const
Tests whether a given Font object is not the same as another.
Info()
Constructs an Info object with default values.