[squeak-dev] The Trunk: Morphic-mt.1847.mcz

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Tue Jan 18 15:34:12 UTC 2022

Thank you, Marcel! :-)

Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von commits at source.squeak.org <commits at source.squeak.org>
Gesendet: Dienstag, 18. Januar 2022 09:13:42
An: squeak-dev at lists.squeakfoundation.org; packages at lists.squeakfoundation.org
Betreff: [squeak-dev] The Trunk: Morphic-mt.1847.mcz

Marcel Taeumel uploaded a new version of Morphic to project The Trunk:

==================== Summary ====================

Name: Morphic-mt.1847
Author: mt
Time: 18 January 2022, 9:13:23.199362 am
UUID: 0a674705-b986-c24b-95a5-139cb07c243a
Ancestors: Morphic-mt.1846

Fixes regression from last commit. Shift+Red on window labels works again.

=============== Diff against Morphic-mt.1846 ===============

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. 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).
-        newTextStyle defaultFontIndex: (newTextStyle fontIndexOf: aFont).

+        aFont emphasis ~= 0 ifTrue: [
+                self text addAttribute: (TextEmphasis new emphasisCode: aFont emphasis; yourself)].
         self textStyle: newTextStyle.!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220118/775a217c/attachment.html>

More information about the Squeak-dev mailing list