Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Open a Workspace with text content
Last updated at 9:53 am UTC on 30 October 2018
TextStyle default font sizes.png

 | currentFont fa string textStream |
 "Prepare the text object"
 textStream := TextStream on: (Text new: 5000).

 string := 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
 currentFont := TextStyle default.
 
 fa := currentFont fontArray.
 fa do: [:font | 
 textStream withAttribute: 
                (TextFontReference toFont: font)
                    do: [textStream nextPutAll: font pointSize asString, ': ', string; cr].
 ].	




 "Display the text object in a Workspace SystemWindow"

   Workspace new
    contents: textStream contents;
    openLabel: 'TextStyle default font sizes'