Pharo 9, Spec 2 -- I have a Spec 2 presenter with a text widget:
initializePresenters
text := self newText.
super initializePresenters
As I understand its type is SpTextPresenter. How to change the font of this text? Font face, size of the all shown text in this widget... For example, to "Courier New", 9.
EDIT 1:
Also I tried:
text addStyle: { SpStyleSTONReader fromString:
'
Font {
#name: "Source Sans Pro",
#size: 12,
#bold: false,
#italic: true
}' }.
but it does not work, the error is: Improper store into indexable object.
EDIT 2:
Also I found this documentation. It seems that the scenario must be:
- Read styles as STON
- Set styles somwhere (where?) for the all application. They are described under its names in the STON so they can be referred under its names in the application.
- Call
addStyle: 'the-name'so the widget with a namethe-namewill refer own styles from the loaded STON.
The problem is in 2. - I have not application, just one presenter which I open with openWithSpec.