Typeface class to allow for easy typeface manipulation.
More...
#include <hdicoreFont.h>
|
| Typeface () |
| Constructs an empty Typeface object.
|
|
| Typeface (const Typeface &tf_) |
| Constructs a new Typeface object from an existing Typeface object (copy constructor)
|
|
| Typeface (const AITypefaceKey aiTF_) |
| Constructs a new Typeface object from an AITypefaceKey.
|
|
virtual | ~Typeface () |
| Typeface object destructor.
|
|
virtual Typeface & | operator= (const Typeface &rhs_) |
| Assigns one Typeface object to another.
|
|
virtual bool | isEmpty () const |
| Gets whether the target Typeface object is empty (constructed with the default ctor)
|
|
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 the same as another.
|
|
virtual bool | operator!= (const Typeface &rhs_) const |
| Tests whether a given Typeface object is not the same as another.
|
|
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 class to allow for easy typeface manipulation.
◆ Typeface() [1/3]
hdi::core::Typeface::Typeface |
( |
| ) |
|
Constructs an empty Typeface object.
- Author
- GW
- Date
- 08/2014
- Note
- To test if a Typeface object is empty, call isEmpty() on it
-
Empty Typeface objects do not relate to any actual Illustrator typefaces; they are designed to be "receivers" of some other Typeface object via the overloaded assignment operator. Empty Typeface objects are useless until such time (though it is safe to call any of their methods)
◆ Typeface() [2/3]
hdi::core::Typeface::Typeface |
( |
const Typeface & |
tf_ | ) |
|
Constructs a new Typeface object from an existing Typeface object (copy constructor)
- Author
- GW
- Date
- 08/2014
- Parameters
-
◆ Typeface() [3/3]
hdi::core::Typeface::Typeface |
( |
const AITypefaceKey |
aiTF_ | ) |
|
Constructs a new Typeface object from an AITypefaceKey.
- Author
- GW
- Date
- 08/2015
- Parameters
-
◆ ~Typeface()
virtual hdi::core::Typeface::~Typeface |
( |
| ) |
|
|
virtual |
Typeface object destructor.
- Author
- GW
- Date
- 08/2014
◆ aiTypefaceKey()
virtual AITypefaceKey hdi::core::Typeface::aiTypefaceKey |
( |
| ) |
const |
|
virtual |
Gets the typeface key around which the target object is wrapped.
- Author
- GW
- Date
- 08/2014
- Returns
- AITypefaceKey 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.
◆ isEmpty()
virtual bool hdi::core::Typeface::isEmpty |
( |
| ) |
const |
|
virtual |
Gets whether the target Typeface object is empty (constructed with the default ctor)
- Author
- GW
- Date
- 08/2014
- Returns
- true if the target Typeface object is empty, false otherwise
◆ name()
virtual std::string hdi::core::Typeface::name |
( |
| ) |
const |
|
virtual |
Gets the name of the typeface.
- Author
- GW
- Date
- 08/2014
- Returns
- The typeface name, as UTF-8
◆ operator!=()
virtual bool hdi::core::Typeface::operator!= |
( |
const Typeface & |
rhs_ | ) |
const |
|
virtual |
Tests whether a given Typeface object is not the same as another.
- Author
- GW
- Date
- 08/2014
- Parameters
-
rhs_ | Typeface to compare against (righthand side of inequality operator) |
- Returns
- true for the target and rhs_ being different typefaces, false otherwise
◆ operator=()
Assigns one Typeface object to another.
- Author
- GW
- Date
- 08/2014
- Parameters
-
rhs_ | Existing Typeface object to copy values from |
- Returns
- The target Typeface object, but with its values updated to match that of the rhs_ argument
◆ operator==()
virtual bool hdi::core::Typeface::operator== |
( |
const Typeface & |
rhs_ | ) |
const |
|
virtual |
Tests whether a given Typeface object is the same as another.
- Author
- GW
- Date
- 08/2014
- Parameters
-
rhs_ | Typeface to compare against (righthand side of equality operator) |
- Returns
- true for the target and rhs_ being the same typefaces, false otherwise
◆ styleAtIndex()
virtual std::unique_ptr< Font > hdi::core::Typeface::styleAtIndex |
( |
const int32_t |
index_ | ) |
|
|
virtual |
Gets a variant of a font family by index position.
- Author
- GW
- Date
- 08/2014
- Parameters
-
index_ | Index of the style in question |
- Returns
- The font at index_, or NULL for none
◆ styleCount()
virtual int32_t hdi::core::Typeface::styleCount |
( |
| ) |
const |
|
virtual |
Gets the total number of variants (such as bold and italic) of a font family.
- Author
- GW
- Date
- 08/2014
- Returns
- The number of style variants, or -1 for error