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

commits at source.squeak.org commits at source.squeak.org
Thu Apr 7 07:59:51 UTC 2022


Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1962.mcz

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

Name: Morphic-mt.1962
Author: mt
Time: 7 April 2022, 9:59:46.204476 am
UUID: c4d79229-4b41-7242-9398-52f0b8dd10e1
Ancestors: Morphic-ct.1961

Renames #numCharactersPerLine to #averageLineLength. Step 1 of 2.

=============== Diff against Morphic-ct.1961 ===============

Item was added:
+ ----- Method: PluggableTextMorph>>averageLineLength (in category 'accessing') -----
+ averageLineLength
+ 
+ 	^ textMorph averageLineLength!

Item was added:
+ ----- Method: PluggableTextMorph>>averageLineLength: (in category 'accessing') -----
+ averageLineLength: numCharsOrNil
+ 
+ 	textMorph averageLineLength: numCharsOrNil.!

Item was added:
+ ----- Method: TextMorph>>averageLineLength (in category 'layout') -----
+ averageLineLength
+ 	"Answers the average length per line in characters. When the entire content is composed in the receiver's #textStyle's default font, it will be an exact match only for monospaced fonts. For variable width fonts it will be an average depending on the (natural) language used, number of lines, and each glyph's advance width. Optimized for English text. Can vary greatly when combining different font faces or sizes. See commentary in #withNoLineLongerThan: and TextStyle >> #compositionWidthFor:."
+ 
+ 	^ numCharactersPerLine!

Item was added:
+ ----- Method: TextMorph>>averageLineLength: (in category 'layout') -----
+ averageLineLength: numCharsOrNil
+ 	"Reset the receiver's composition rectangle to fit approx. numChars per line. For nil, it uses a sane default for English text. See commentary in #averageLineLength."
+ 	
+ 	numCharactersPerLine = numCharsOrNil ifTrue: [^ self].
+ 	numCharactersPerLine := numCharsOrNil.
+ 	self releaseParagraph; changed.!



More information about the Squeak-dev mailing list