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.
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:
- TText & text -The text object whose font information is to be updated.
- const TTextRange & range -The range within the text object within which to update font information. Defaults to the entire text object.
- const TStyleSet * paragraphStyles -Defaults to NIL; if not NIL, used to determine the default font for this text object; any font information already associated with the text object is used first. If NIL, the default font is assumed to be the system font.
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.
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:
- TText & text -The text object whose font information is to be updated.
- const TTextRange & range -The range within the text object within which to update font information. Defaults to the entire text object.
- const TStyleSet * paragraphStyles -Defaults to NIL; if not NIL, used to determine the default font for this text object; any font information already associated with the text object is used first. If NIL, the default font is assumed to be the system font.
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.
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:
- const TFontFamilyStyle & fontStyle -The font to which the text should be set (where possible).
- TText & text -The text object whose font information is to be updated.
- const TTextRange & range -The range within the text object within which to update font information. Defaults to the entire text object.
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.
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:
- const TFontFamilyStyle & fontStyle -The font to which the text should be set (where possible).
- TText & text -The text object whose font information is to be updated.
- const TTextRange & range -The range within the text object within which font information is to be updated. Defaults to the entire text object.
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.
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.
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.