TextFontReference
Last updated at 4:33 am UTC on 11 May 2017
A TextFontReference encodes a font change applicable over a given range of text.
The font reference is absolute: unlike a TextFontChange, it is independent of the textStyle governing display of this text.
The Font Size Summary (Help menu) gives the list of available fonts.
Example:
(TextFontReference toFont: (StrikeFont familyName: 'Atlanta' size: 22))
TextFontReference objects are used to create instances of Text.
By sending the message #font to an instance of TextFontReference you get access to the font.
Use in creating a StringMorph
A font is what the StringMorph creation method requires
| fontRef aString |
fontRef := (TextFontReference toFont:
(StrikeFont familyName: 'BitstreamVeraSans' size: 36)).
aString := 'Aa Bc Cd Dd Ee Ff'.
((StringMorph contents: aString
font: fontRef font)
color: Color blue) openInHand