Last updated at 3:12 pm UTC on 7 September 2016
Answer the names of the known text styles, sorted in alphabetical order
(TextConstants select: [:t | t isKindOf: TextStyle]) keys asArray sort
Question February 20, 2004: I wanted to know something about a method you implemented in the past. I was implementing this method:
"Answer the names of the known text styles, sorted in
alphabetical order without default"
| result |
result := self knownTextStyles asOrderedCollection.
result remove: #DefaultFixedTextStyle.
result remove: #DefaultTextStyle.
so that I can query all the styles and after I saw that you defined
| aDict |
"Answer dictionary whose keys are the names of styles in the
system and whose values are the actual styles"
aDict _ TextConstants select: [:thang | thang isKindOf: self ].
aDict removeKey: #DefaultTextStyle.
aDict removeKey: #DefaultFixedTextStyle.
And now I'm confused because the dictionary that you return only contains one font (for example Accuat12 but not the ones that are possible for example Accuat18). So can you let me know the differences?
Answer Ned Konz You're getting confused between TextStyle and Font: TextStyles have one or more fonts in them.