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

Font class to allow for easy font manipulation. More...

#include <hdicoreFont.h>

Classes

class  Info
 Describes style information for an individual font. More...
 

Public Types

typedef std::auto_ptr< InfoInfoAP
 

Public Member Functions

 Font ()
 Creates a Font object with the default native script (e.g. roman, cyrillic, etc.) More...
 
 Font (const Font &f_)
 Font copy constructor. More...
 
 Font (const AIFontKey aiFont_)
 Constructs a new Font object from an AIFontKey. More...
 
virtual ~Font ()
 Destructs a Font object. More...
 
virtual Fontoperator= (const Font &rhs_)
 Overloaded assignment operator for Font objects. More...
 
virtual bool operator== (const Font &rhs_) const
 Tests whether a given Font object is the same as another. More...
 
virtual bool operator!= (const Font &rhs_) const
 Tests whether a given Font object is not the same as another. More...
 
virtual AIFontKey aiFontKey () const
 Gets the font key around which the target object is wrapped. More...
 
virtual Info info () const
 Gets the font's style info. More...
 
virtual std::string name () const
 Gets the name of the font. More...
 
virtual std::string familyName () const
 Gets the name of the family for the target font. More...
 
virtual std::string styleName () const
 Gets the name of the style for the target font. More...
 
virtual bool typefaceAndStyle (Typeface &tf__, int32_t &style__)
 Gets the typeface (family) and style variant of the target font. More...
 
virtual bool substituted () const
 Gets whether the target font is substituted or not. More...
 

Friends

plugin::Font * __accessImpl (const Font &)
 
Font __accessCtor (const plugin::Font &)
 

Detailed Description

Font class to allow for easy font manipulation.

Constructor & Destructor Documentation

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
hdi::core::Font::Font ( const Font f_)

Font copy constructor.

Author
GW
Date
08/2013
Parameters
f_Font object to copy values from
hdi::core::Font::Font ( const AIFontKey  aiFont_)

Constructs a new Font object from an AIFontKey.

Author
GW
Date
08/2015
Parameters
aiFont_Raw Illustrator AIFontKey
virtual hdi::core::Font::~Font ( )
virtual

Destructs a Font object.

Author
GW
Date
08/2013

Member Function Documentation

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.
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
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
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
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
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
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
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
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
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