class PFontFamily: public PObject

This class describes a font family.

Inheritance:


Public Methods

[more] PFontFamily ( const PCaselessString & face )
Construct an empty font family.
[more]virtual Comparison Compare ( const PObject & obj ) const
Determine if the two font families are the same.
[more]const PCaselessString& GetFacename () const
Get the face name of the font family eg "Courier".
[more]BOOL IsScalable () const
Determine if the font is scalable in size.
[more]const PWORDArray& GetSizes () const
Get a list of all the sizes for bitmap versions of the font.
[more]const PWORDArray& GetStyles () const
Get all of the style combinations that are physically present in the canvas.
[more]const PStringArray& GetStyleNames () const
Get the names for each of the style combinations that are physically present in the canvas.

Public

[more] Overrides from class PInteractor
[more] New methods for class

Protected Fields

[more]PCaselessString facename
Face name string for the font family.
[more]BOOL scalable
The size of the font is scalable.
[more]PWORDArray sizes
Array of possible size for font family.
[more]PWORDArray styles
Array of possible style combinations for font family.
[more]PStringArray styleNames
Array of names for possible style combinations for font family.


Inherited from PObject:

Public

Run Time Type functions

Comparison functions

I/O functions

Miscellaneous functions


Documentation

This class describes a font family. A font family are all variations of a particular face name eg Times italic 9 point and Times bold 16 point are two fonts of the Times font family.

This describes all of the variations that are possible with the font in a given device. This must be created using a canvas.

o PFontFamily( const PCaselessString & face )
Construct an empty font family. This constructor only sets the face name for the font family the other fields are meaningless.

The other contents of the font family are set by friend functions as fonts are enumerated by a canvas.

The user should never directly create instances of this class, except when an object for comparison in searches is required. For example to find the "Courier" family in the PFontFamilyList returned by a PCanvas instance a PFontFamily instance must be created for the PCollection::GetValuesIndex() function.

Parameters:
face - Name of font face.

o Overrides from class PInteractor

ovirtual Comparison Compare( const PObject & obj ) const
Determine if the two font families are the same. That is they have the same face name. This is equivalent to call compare on the face name string.

Returns:
EqualTo if fonts the same, GreaterThan if different.
Parameters:
obj - Other font to compare against.

o New methods for class

oconst PCaselessString& GetFacename() const
Get the face name of the font family eg "Courier".

Returns:
string for the font face.

oBOOL IsScalable() const
Determine if the font is scalable in size. This is true for Adobe Type 1 and True Type fonts. Old style bitmap fonts are not scalable and a list of the sizes that are present is provided by the GetSizes() function.

Returns:
TRUE if font size is fully scalable.

oconst PWORDArray& GetSizes() const
Get a list of all the sizes for bitmap versions of the font. If the font is scalable this list may be empty as only if there are bitmap fonts of the same face name are sizes returned.

Returns:
array of physical font sizes for the font family.

oconst PWORDArray& GetStyles() const
Get all of the style combinations that are physically present in the canvas. For example there may be a bold font and an italic font but no bold italic font.

Other font style combinations than the ones in this list may be possible for particular canvases but are synthesized by the system.

Returns:
array of physical style combinations in a font family.

oconst PStringArray& GetStyleNames() const
Get the names for each of the style combinations that are physically present in the canvas. There is a one to one correspondence between the string in this array and the bit masks returned by the GetStyles() funtion.

Returns:
array of names for the physical style combinations in a font family.

oPCaselessString facename
Face name string for the font family.

oBOOL scalable
The size of the font is scalable.

oPWORDArray sizes
Array of possible size for font family.

oPWORDArray styles
Array of possible style combinations for font family.

oPStringArray styleNames
Array of names for possible style combinations for font family.


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.