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

commits at source.squeak.org commits at source.squeak.org
Tue Mar 15 09:25:07 UTC 2022


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

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

Name: Graphics-mt.500
Author: mt
Time: 15 March 2022, 10:25:00.646283 am
UUID: 24f9d780-c835-1445-a447-80097ee72a15
Ancestors: Graphics-mt.499

When installing a font family as fallback, to not instantiate arbitrary point sizes but rely on lazy init via #fallbackFont. This way, you can save a lot of space allocated to each instance's glyph-form cache.

See TTCFont >> #createCache for the construction site. :-)

=============== Diff against Graphics-mt.499 ===============

Item was changed:
  ----- Method: AbstractFont>>fallbackFont (in category 'accessing') -----
  fallbackFont
+ 	"Answers the fallbackFont for the receiver. Try to use the #defaultFallback but for itself use a synthetic font that maps all characters to question marks."
- 	"Answers the fallbackFont for the receiver. The fallback font must be some derivative of the receiver since it will not be asked to install itself properly on the target BitBlt so rendering a completely different font here is simply not possible. The default implementation uses a synthetic font that maps all characters to question marks."
  
+ 	^ TextStyle defaultFallback textStyleName = self textStyleName
+ 		ifTrue: [
+ 			FixedFaceFont new errorFont baseFont: self]
+ 		ifFalse: [
+ 			(TextStyle defaultFallbackFont
+ 				emphasized: self emphasis)
+ 				asPointSize: self pointSize]!
- 	^ FixedFaceFont new errorFont baseFont: self!

Item was changed:
  ----- Method: AbstractFont>>privateFallbackTextStyle: (in category 'initialize-release') -----
  privateFallbackTextStyle: aTextStyleOrNil
  
+ 	self fallbackFont: nil. "Rely on lazy initialization of #fallbackFont."!
- 	self fallbackFont: (aTextStyleOrNil ifNotNil: [:ts | ts addNewFontSize: self pointSize]).!

Item was added:
+ ----- Method: TextStyle>>textStyleName (in category 'accessing - default font') -----
+ textStyleName
+ 	^ self defaultFont textStyleName!



More information about the Squeak-dev mailing list