Font class to allow for easy font manipulation.
More...
#include <hdicoreFont.h>
|
class | Info |
| Describes style information for an individual font. More...
|
|
|
typedef std::unique_ptr< Info > | InfoUP |
|
typedef std::shared_ptr< Info > | InfoSP |
|
typedef std::weak_ptr< Info > | InfoWP |
|
|
| Font () |
| Creates a Font object with the default native script (e.g. roman, cyrillic, etc.)
|
|
| Font (const Font &f_) |
| Font copy constructor.
|
|
| Font (const AIFontKey aiFont_) |
| Constructs a new Font object from an AIFontKey.
|
|
virtual | ~Font () |
| Destructs a Font object.
|
|
virtual Font & | operator= (const Font &rhs_) |
| Overloaded assignment operator for Font objects.
|
|
virtual bool | operator== (const Font &rhs_) const |
| Tests whether a given Font object is the same as another.
|
|
virtual bool | operator!= (const Font &rhs_) const |
| Tests whether a given Font object is not 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.
|
|
virtual bool | typefaceAndStyle (Typeface &tf__, int32_t &style__) |
| Gets the typeface (family) and style variant of the target font.
|
|
virtual bool | substituted () const |
| Gets whether the target font is substituted or not.
|
|
virtual std::string | name () const |
| Gets the name of the font.
|
|
virtual std::string | familyName () const |
| Gets the name of the family for the target font.
|
|
virtual std::string | styleName () const |
| Gets the name of the style for the target font.
|
|
virtual std::string | postScriptName () const |
| Gets the PostScript name of the font.
|
|
virtual PlatformFontPtr | platformFont (const double size_) const |
| Gets the platform font for the target Adobe app font, if available.
|
|
|
aip::Font * | __accessImpl (const Font &) |
|
Font | __accessCtor (const aip::Font &) |
|
Font class to allow for easy font manipulation.
◆ Font() [1/3]
hdi::core::Font::Font |
( |
| ) |
|
Creates a Font object with the default native script (e.g. roman, cyrillic, etc.)
- Author
- GW
- Date
- 08/2013
- Returns
- A unique Font object for the default script
◆ Font() [2/3]
hdi::core::Font::Font |
( |
const Font & |
f_ | ) |
|
Font copy constructor.
- Author
- GW
- Date
- 08/2013
- Parameters
-
f_ | Font object to copy values from |
◆ Font() [3/3]
hdi::core::Font::Font |
( |
const AIFontKey |
aiFont_ | ) |
|
Constructs a new Font object from an AIFontKey.
- Author
- GW
- Date
- 08/2015
- Parameters
-
◆ ~Font()
virtual hdi::core::Font::~Font |
( |
| ) |
|
|
virtual |
Destructs a Font object.
- Author
- GW
- Date
- 08/2013
◆ aiFontKey()
virtual AIFontKey hdi::core::Font::aiFontKey |
( |
| ) |
const |
|
virtual |
Gets the font key around which the target object is wrapped.
- Author
- GW
- Date
- 11/2013
- Returns
- AIFontKey for this object
- Note
- Generally, you shouldn't need to call this method. Only use it if you know what you're doing. If a specific piece of functionality provided by Illustrator is not handled by this class (or related classes), then it should probably be added to the hdi_core library.
◆ familyName()
virtual std::string hdi::core::Font::familyName |
( |
| ) |
const |
|
virtual |
Gets the name of the family for the target font.
- Author
- GW
- Date
- 08/2014
- Returns
- The family name of the font, as UTF-8
◆ info()
virtual Info hdi::core::Font::info |
( |
| ) |
const |
|
virtual |
Gets the font's style info.
- Author
- GW
- Date
- 08/2013
- Returns
- An Info object describing the font's style info
◆ name()
virtual std::string hdi::core::Font::name |
( |
| ) |
const |
|
virtual |
Gets the name of the font.
- Author
- GW
- Date
- 08/2013
- Returns
- The name of the font, as UTF-8
◆ operator!=()
virtual bool hdi::core::Font::operator!= |
( |
const Font & |
rhs_ | ) |
const |
|
virtual |
Tests whether a given Font object is not the same as another.
- Author
- GW
- Date
- 08/2013
- Parameters
-
rhs_ | Font to compare against (righthand side of inequality operator) |
- Returns
- true for the target and rhs_ being different fonts, false otherwise
◆ operator=()
virtual Font & hdi::core::Font::operator= |
( |
const Font & |
rhs_ | ) |
|
|
virtual |
Overloaded assignment operator for Font objects.
- Author
- GW
- Date
- 08/2013
- Parameters
-
rhs_ | Righthand side of the assignment operator; existing Font object to copy values from |
- Returns
- The lefthand side of the assignment operator, but with its values updated
◆ operator==()
virtual bool hdi::core::Font::operator== |
( |
const Font & |
rhs_ | ) |
const |
|
virtual |
Tests whether a given Font object is the same as another.
- Author
- GW
- Date
- 08/2013
- Parameters
-
rhs_ | Font to compare against (righthand side of equality operator) |
- Returns
- true for the target and rhs_ being the same font, false otherwise
◆ platformFont()
virtual PlatformFontPtr hdi::core::Font::platformFont |
( |
const double |
size_ | ) |
const |
|
virtual |
Gets the platform font for the target Adobe app font, if available.
- Author
- GW
- Date
- 06/2018
- Parameters
-
- Returns
- A pointer to the platform/OS font, or NULL if none/unavailable
- Warning
- On Windows, it is the caller's responsibility to cleanup the returned font pointer when no longer needed by passing it to the DeleteObject() function.
◆ postScriptName()
virtual std::string hdi::core::Font::postScriptName |
( |
| ) |
const |
|
virtual |
Gets the PostScript name of the font.
- Author
- GW
- Date
- 12/2017
- Returns
- The name of the font
◆ styleName()
virtual std::string hdi::core::Font::styleName |
( |
| ) |
const |
|
virtual |
Gets the name of the style for the target font.
- Author
- GW
- Date
- 08/2014
- Returns
- The style name of the font, as UTF-8
◆ substituted()
virtual bool hdi::core::Font::substituted |
( |
| ) |
const |
|
virtual |
Gets whether the target font is substituted or not.
- Author
- GW
- Date
- 08/2014
- Returns
- true if substituted, false otherwise
◆ typefaceAndStyle()
virtual bool hdi::core::Font::typefaceAndStyle |
( |
Typeface & |
tf__, |
|
|
int32_t & |
style__ |
|
) |
| |
|
virtual |
Gets the typeface (family) and style variant of the target font.
- Author
- GW
- Date
- 08/2014
- Parameters
-
tf__ | Return-by-reference for the typeface |
style__ | Return-by-reference for the index position of the style variant |
- Returns
- true if the typeface and style index could be acquired, false otherwise