Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
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
12namespace hdi
13{
14 #if defined(HDI_CORE_AIP_MODE)
15 namespace aip
16 {
17 class Font;
18 }
19 #elif defined(HDI_CORE_PSP_MODE)
20 namespace psp
21 {
22 class Font;
23 }
24 #endif
25
26 namespace core
27 {
28 class Font;
29
30 #if defined(HDI_CORE_AIP_MODE)
35 {
36 public:
49
57 Typeface(const Typeface& tf_);
58
66 Typeface(const AITypefaceKey aiTF_);
67
73 virtual ~Typeface();
74
84 virtual Typeface& operator=(const Typeface& rhs_);
85
93 virtual bool isEmpty() const;
94
106 virtual AITypefaceKey aiTypefaceKey() const;
107
116 virtual bool operator==(const Typeface& rhs_) const;
117
126 virtual bool operator!=(const Typeface& rhs_) const;
127
135 virtual int32_t styleCount() const;
136
145 virtual std::unique_ptr<Font> styleAtIndex(const int32_t index_);
146
154 virtual std::string name() const;
155
156
157 private:
158 friend void* __accessImpl(const Typeface&);
159
163 void* __data;
164
170 void* __impl() const;
171 };
172
173 typedef std::unique_ptr<Typeface> TypefaceUP;
174 typedef std::shared_ptr<Typeface> TypefaceSP;
175 typedef std::weak_ptr<Typeface> TypefaceWP;
176 #endif
177 // HDI_CORE_AIP_MODE
178
182 class Font
183 {
184 public:
185 #if defined(HDI_CORE_AIP_MODE)
189 class Info
190 {
191 public:
196 {
197 UnknownFormat = 0,
198 TypeOneFormat = 10,
199 TrueTypeFormat = 20
200 };
201
206 {
207 UnknownEncoding = 0,
208 DontCareEncoding = 10,
209 StandardEncoding = 20,
210 SpecialEncoding = 30
211 };
212
217 {
218 UnknownScript = 0,
219 NativeScript = 10,
220 RomanScript = 20,
221 JapaneseScript = 30,
222 ChineseTraditionalScript = 40,
223 ChineseSimplifiedScript = 50,
224 KoreanScript = 60,
225 ArabicScript = 70,
226 HebrewScript = 80,
227 GreekScript = 90,
228 CyrillicScript = 100,
229 EastEuropeanRomanScript = 110,
230 TurkishScript = 120,
231 BalticScript = 130,
232 SymbolScript = 140,
233 EmojiScript = 150
234 };
235
240 {
241 MojiZumeUnknown = 0,
242 MojiZumeNone = 10,
243 MojiZumeGXTrueType = 20,
244 MojiZumePageMakerJ = 30,
245 MojiZumeSfntATM = 40
246 };
247
252
257
262
267
272
277
281 bool isCID;
282
287
291 bool isOTF;
292
297
301 bool isOCF;
302
306 bool isATC;
307
312
319
325 virtual ~Info();
326 };
327
328 typedef std::unique_ptr<Info> InfoUP;
329 typedef std::shared_ptr<Info> InfoSP;
330 typedef std::weak_ptr<Info> InfoWP;
331 #endif
332 // HDI_CORE_AIP_MODE
333
342
350 Font(const Font& f_);
351
352 #if defined(HDI_CORE_AIP_MODE)
360 Font(const AIFontKey aiFont_);
361 #endif
362 // HDI_CORE_AIP_MODE
363
369 virtual ~Font();
370
379 virtual Font& operator=(const Font& rhs_);
380
389 virtual bool operator==(const Font& rhs_) const;
390
399 virtual bool operator!=(const Font& rhs_) const;
400
401 #if defined(HDI_CORE_AIP_MODE)
413 virtual AIFontKey aiFontKey() const;
414
422 virtual Info info() const;
423
433 virtual bool typefaceAndStyle(Typeface& tf__, int32_t& style__);
434
442 virtual bool substituted() const;
443 #endif
444 // HDI_CORE_AIP_MODE
445
453 virtual std::string name() const;
454
462 virtual std::string familyName() const;
463
471 virtual std::string styleName() const;
472
480 virtual std::string postScriptName() const;
481
493 virtual PlatformFontPtr platformFont(const double size_) const;
494
495
496 private:
497 #if defined(HDI_CORE_AIP_MODE)
498 friend aip::Font* __accessImpl(const Font&);
499 friend Font __accessCtor(const aip::Font&);
500
504 aip::Font* __impl;
505
511 Font(const aip::Font&);
512 #elif defined(HDI_CORE_PSP_MODE)
513 friend psp::Font* __accessImpl(const Font&);
514 friend Font __accessCtor(const psp::Font&);
515
519 psp::Font* __impl;
520
526 Font(const psp::Font&);
527 #endif
528 };
529
530 typedef std::unique_ptr<Font> FontUP;
531 typedef std::shared_ptr<Font> FontSP;
532 typedef std::weak_ptr<Font> FontWP;
533
534 #if defined(HDI_CORE_AIP_MODE)
535 extern void* __accessImpl(const Typeface&);
536 extern aip::Font* __accessImpl(const Font&);
537 extern Font __accessCtor(const aip::Font&);
538 #elif defined(HDI_CORE_PSP_MODE)
539 extern psp::Font* __accessImpl(const Font&);
540 extern Font __accessCtor(const psp::Font&);
541 #endif
542 }
543}
544
545#endif
546// __HDI_CORE_FONT__
Describes style information for an individual font.
Definition: hdicoreFont.h:190
Script script
Font face script.
Definition: hdicoreFont.h:261
Format
Describes the font format.
Definition: hdicoreFont.h:196
bool familyInstalled
Is the font family installed?
Definition: hdicoreFont.h:271
bool originalEncoding
Is the font the original encoding?
Definition: hdicoreFont.h:266
Encoding
Describes the font encoding.
Definition: hdicoreFont.h:206
bool fauxedInstalled
Is the font fauxed for another missing font?
Definition: hdicoreFont.h:276
Script
Describes the font script.
Definition: hdicoreFont.h:217
virtual ~Info()
Destructs an Info object.
Format format
Font face formatting.
Definition: hdicoreFont.h:251
MojiZumeType mojiZumeType
MojiZume type of the font.
Definition: hdicoreFont.h:286
bool isCID
Is the font character ID-keyed?
Definition: hdicoreFont.h:281
bool isATC
Is the font Adobe Type Composer?
Definition: hdicoreFont.h:306
bool isMultipleMaster
Is the font Adobe Multiple Master?
Definition: hdicoreFont.h:311
bool isBitmap
Is the font bitmap?
Definition: hdicoreFont.h:296
Info()
Constructs an Info object with default values.
bool isOTF
Is the font OpenType?
Definition: hdicoreFont.h:291
bool isOCF
Is the font Original Composer Format?
Definition: hdicoreFont.h:301
MojiZumeType
Describes the font MojiZume type.
Definition: hdicoreFont.h:240
Encoding encoding
Font face encoding.
Definition: hdicoreFont.h:256
Font class to allow for easy font manipulation.
Definition: hdicoreFont.h:183
Font()
Creates a Font object with the default native script (e.g. roman, cyrillic, etc.)
virtual std::string postScriptName() const
Gets the PostScript name of the font.
virtual Font & operator=(const Font &rhs_)
Overloaded assignment operator for Font objects.
Font(const AIFontKey aiFont_)
Constructs a new Font object from an AIFontKey.
virtual std::string familyName() const
Gets the name of the family for the target font.
virtual PlatformFontPtr platformFont(const double size_) const
Gets the platform font for the target Adobe app font, if available.
virtual bool substituted() const
Gets whether the target font is substituted or not.
virtual bool operator==(const Font &rhs_) const
Tests whether a given Font object is the same as another.
virtual Info info() const
Gets the font's style info.
virtual AIFontKey aiFontKey() const
Gets the font key around which the target object is wrapped.
virtual bool operator!=(const Font &rhs_) const
Tests whether a given Font object is not the same as another.
virtual std::string name() const
Gets the name of the font.
virtual ~Font()
Destructs a Font object.
Font(const Font &f_)
Font copy constructor.
virtual bool typefaceAndStyle(Typeface &tf__, int32_t &style__)
Gets the typeface (family) and style variant of the target font.
virtual std::string styleName() const
Gets the name of the style for the target font.
Typeface class to allow for easy typeface manipulation.
Definition: hdicoreFont.h:35
virtual ~Typeface()
Typeface object destructor.
Typeface(const Typeface &tf_)
Constructs a new Typeface object from an existing Typeface object (copy constructor)
virtual int32_t styleCount() const
Gets the total number of variants (such as bold and italic) of a font family.
virtual std::unique_ptr< Font > styleAtIndex(const int32_t index_)
Gets a variant of a font family by index position.
virtual std::string name() const
Gets the name of the typeface.
Typeface()
Constructs an empty Typeface object.
virtual bool isEmpty() const
Gets whether the target Typeface object is empty (constructed with the default ctor)
virtual Typeface & operator=(const Typeface &rhs_)
Assigns one Typeface object to another.
virtual bool operator==(const Typeface &rhs_) const
Tests whether a given Typeface object is the same as another.
Typeface(const AITypefaceKey aiTF_)
Constructs a new Typeface object from an AITypefaceKey.
virtual AITypefaceKey aiTypefaceKey() const
Gets the typeface key around which the target object is wrapped.
virtual bool operator!=(const Typeface &rhs_) const
Tests whether a given Typeface object is not the same as another.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.