Hot Door CORE 0.8.4
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreFont.h
Go to the documentation of this file.
1
6
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
340
348 Font(const Font& f_);
349
350 #if defined(HDI_CORE_AIP_MODE)
358 Font(const AIFontKey aiFont_);
359 #endif
360 // HDI_CORE_AIP_MODE
361
367 virtual ~Font();
368
377 virtual Font& operator=(const Font& rhs_);
378
387 virtual bool operator==(const Font& rhs_) const;
388
397 virtual bool operator!=(const Font& rhs_) const;
398
399 #if defined(HDI_CORE_AIP_MODE)
411 virtual AIFontKey aiFontKey() const;
412
420 virtual Info info() const;
421
431 virtual bool typefaceAndStyle(Typeface& tf__, int32_t& style__);
432
440 virtual bool substituted() const;
441 #endif
442 // HDI_CORE_AIP_MODE
443
451 virtual std::string name() const;
452
460 virtual std::string familyName() const;
461
469 virtual std::string styleName() const;
470
478 virtual std::string postScriptName() const;
479
491 virtual PlatformFontPtr platformFont(const double size_) const;
492
493
494 private:
495 #if defined(HDI_CORE_AIP_MODE)
496 friend aip::Font* __accessImpl(const Font&);
497 friend Font __accessCtor(const aip::Font&);
498
502 aip::Font* __impl;
503
509 Font(const aip::Font&);
510 #elif defined(HDI_CORE_PSP_MODE)
511 friend psp::Font* __accessImpl(const Font&);
512 friend Font __accessCtor(const psp::Font&);
513
517 psp::Font* __impl;
518
524 Font(const psp::Font&);
525 #endif
526 };
527
528 typedef std::unique_ptr<Font> FontUP;
529 typedef std::shared_ptr<Font> FontSP;
530 typedef std::weak_ptr<Font> FontWP;
531
532 #if defined(HDI_CORE_AIP_MODE)
533 extern void* __accessImpl(const Typeface&);
534 extern aip::Font* __accessImpl(const Font&);
535 extern Font __accessCtor(const aip::Font&);
536 #elif defined(HDI_CORE_PSP_MODE)
537 extern psp::Font* __accessImpl(const Font&);
538 extern Font __accessCtor(const psp::Font&);
539 #endif
540 }
541}
542
543#endif
544// __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.