Class: TStandardFontSubstituter

Declaration: FontSubstitution.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TFontSubstituter

Inherited By:

None.

Purpose:

Provides the default implementation of font substitution.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Do not derive from TStandardFontSubsituter. Clients wanting to provide their own implementation of font substitution should derive from TFontSubstituter instead.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Member Function: TStandardFontSubstituter::StyleMissingCharactersOnEntry

virtual bool StyleMissingCharactersOnEntry (TText & text, const TTextRange & range =TTextRange :: GetMaximumRange (), const TStyleSet * paragraphStyles =NIL)

Interface Category:

API.

Purpose:

Updates font information for characters as they are typed in.

Calling Context:

Called by the Text Editing framework and other clients who wish to incrementally update the font information for characters in a text object as the characters are entered.

Parameters:

Return Value:

Returns true if the font information for the text parameter is changed by this function.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TStandardFontSubstituter::StyleMissingCharacters

virtual bool StyleMissingCharacters (TText & text, const TTextRange & range =TTextRange :: GetMaximumRange (), const TStyleSet * paragraphStyles =NIL)

Interface Category:

API.

Purpose:

Updates the font information for a text object. The font information for characters within the given range of the given text is updated as necessary to guarantee that they can be drawn.

Calling Context:

This is the usual function to use when updating font information, such as when a static text object is being set up.

Parameters:

Return Value:

Returns true if the font information for the text parameter has changed.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TStandardFontSubstituter::SetFont

virtual bool SetFont (const TFontFamilyStyle & fontStyle, TText & text, const TTextRange & range =TTextRange :: GetMaximumRange ())

Interface Category:

API.

Purpose:

Sets a font for characters in a text object. This function only applies the specified font to the characters in the text which can be displayed with this font.

Calling Context:

Call directly to set a specific font, for example, for a static text object such as a menu name. Should be followed by a call to StyleMissingCharacters to make sure that all the characters in the text will be displayed.

Parameters:

Return Value:

Returns true if the font information for the text parameter is changed by this function.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TStandardFontSubstituter::FancySetFont

virtual bool FancySetFont (const TFontFamilyStyle & fontStyle, TText & text, const TTextRange & range =TTextRange :: GetMaximumRange ())

Interface Category:

API.

Purpose:

A more sophisticated (and slower) version of SetFont that attempts to keep spaces and punctuation in the same font as the surrounding text.

Calling Context:

Call directly to set the font, for example, for a static text object such as a menu name. Should be followed by a call to StyleMissingCharacters to make sure that all the characters in the text will be displayed.

Parameters:

Return Value:

Returns true if the font information for the text parameter has changed.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TStandardFontSubstituter::~TStandardFontSubstituter

virtual ~ TStandardFontSubstituter ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TStandardFontSubstituter::TStandardFontSubstituter

TStandardFontSubstituter ()

Interface Category:

API.

Purpose:

Default constructor.

Calling Context:

Call directly to instantiate this class. Also called by the stream-in operators.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.