Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1863.mcz
==================== Summary ====================
Name: Morphic-mt.1863 Author: mt Time: 30 January 2022, 8:22:27.857695 pm UUID: 18d0ec7f-edb0-c14a-8287-fa92bcfd1b0a Ancestors: Morphic-mt.1862
Complements Graphics-mt.468 and ToolBuilder-Morphic-mt.291.
=============== Diff against Morphic-mt.1862 ===============
Item was changed: ----- Method: TextMorph>>font: (in category 'accessing') ----- font: aFont + "Change the receiver's default font, which is used to draw its contents. Remove all custom font-face-related attributes from the current contents. For a less harsh approach, just use #textStyle: instead and rely on text attributes. - "Change the receiver's default font, which is used to draw its contents. Remove all custom font-face-related attributes from the current contents. Try to lookup the matching #textStyle so that TextFontChange can be used from here on. For a less harsh approach, just use #textStyle: instead and rely on text attributes. !! It is best practice to work with #textStyle: and rely on the text attributes TextFontChange and (sometimes) TextFontReference."
- | newTextStyle | self text removeAttributesThat: [:attr | attr isTextFontChange and: [attr canFontBeSubstituted]].
- newTextStyle := aFont textStyleOrNil - ifNil: [TextStyle fontArray: {aFont}] - ifNotNil: [:style | style copy]. - newTextStyle defaultFontIndex: (newTextStyle fontIndexOfPointSize: aFont pointSize). - aFont emphasis ~= 0 ifTrue: [ self text addAttribute: (TextEmphasis new emphasisCode: aFont emphasis; yourself)].
+ self textStyle: aFont asNewTextStyle.! - self textStyle: newTextStyle.!
packages@lists.squeakfoundation.org