Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
Public Member Functions | Friends | List of all members
hdi::core::Typeface Class Reference

Typeface class to allow for easy typeface manipulation. More...

#include <hdicoreFont.h>

Public Member Functions

 Typeface ()
 Constructs an empty Typeface object. More...
 
 Typeface (const Typeface &tf_)
 Constructs a new Typeface object from an existing Typeface object (copy constructor) More...
 
 Typeface (const AITypefaceKey aiTF_)
 Constructs a new Typeface object from an AITypefaceKey. More...
 
virtual ~Typeface ()
 Typeface object destructor. More...
 
virtual Typefaceoperator= (const Typeface &rhs_)
 Assigns one Typeface object to another. More...
 
virtual bool isEmpty () const
 Gets whether the target Typeface object is empty (constructed with the default ctor) More...
 
virtual AITypefaceKey aiTypefaceKey () const
 Gets the typeface key around which the target object is wrapped. More...
 
virtual bool operator== (const Typeface &rhs_) const
 Tests whether a given Typeface object is the same as another. More...
 
virtual bool operator!= (const Typeface &rhs_) const
 Tests whether a given Typeface object is not the same as another. More...
 
virtual int32_t styleCount () const
 Gets the total number of variants (such as bold and italic) of a font family. More...
 
virtual std::auto_ptr< FontstyleAtIndex (const int32_t index_)
 Gets a variant of a font family by index position. More...
 
virtual std::string name () const
 Gets the name of the typeface. More...
 

Friends

void * __accessImpl (const Typeface &)
 

Detailed Description

Typeface class to allow for easy typeface manipulation.

Constructor & Destructor Documentation

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)
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
tf_Existing Typeface object
hdi::core::Typeface::Typeface ( const AITypefaceKey  aiTF_)

Constructs a new Typeface object from an AITypefaceKey.

Author
GW
Date
08/2015
Parameters
aiTF_Raw Illustrator AITypefaceKey
virtual hdi::core::Typeface::~Typeface ( )
virtual

Typeface object destructor.

Author
GW
Date
08/2014

Member Function Documentation

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.
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
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
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
virtual Typeface& hdi::core::Typeface::operator= ( const Typeface rhs_)
virtual

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
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
virtual std::auto_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
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