[squeak-dev] The Trunk: Graphics-mt.460.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jan 17 16:05:15 UTC 2022


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

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

Name: Graphics-mt.460
Author: mt
Time: 17 January 2022, 5:04:49.794958 pm
UUID: 7c21607f-9ee6-c943-bcda-bb33c4e60f20
Ancestors: Graphics-mt.459

Update cached font metrics in text style when setting a new default font.

=============== Diff against Graphics-mt.459 ===============

Item was removed:
- ----- Method: TextStyle class>>new (in category 'instance creation') -----
- new
- 	^ super new leading: 2!

Item was changed:
  ----- Method: TextStyle>>defaultFontIndex: (in category 'default font') -----
  defaultFontIndex: anIndex
+ 
+ 	defaultFontIndex := anIndex.
+ 	lineGrid := (fontArray at: defaultFontIndex) height + leading.
+ 	baseline := (fontArray at: defaultFontIndex) ascent + leading.!
- 	defaultFontIndex := anIndex!

Item was added:
+ ----- Method: TextStyle>>initialize (in category 'initialize-release') -----
+ initialize
+ 
+ 	super initialize.
+ 	self leading: 2.!

Item was changed:
  ----- Method: TextStyle>>newFontArray: (in category 'private') -----
  newFontArray: anArray
  	"Currently there is no supporting protocol for changing these arrays. If an editor wishes to implement margin setting, then a copy of the default should be stored with these instance variables.  
  	, Make size depend on first font."
  
  	fontArray := anArray.
+ 	self defaultFontIndex: 1.
- 	lineGrid := (fontArray at: 1) height + leading.	"For whole family"
- 	baseline := (fontArray at: 1) ascent + leading.
  	alignment := 0.
  	firstIndent := 0.
  	restIndent := 0.
  	rightIndent := 0.
  	tabsArray := DefaultTabsArray.
  	marginTabsArray := DefaultMarginTabsArray
  "
  TextStyle allInstancesDo: [:ts | ts newFontArray: TextStyle default fontArray].
  "!



More information about the Squeak-dev mailing list