[squeak-dev] The Trunk: System-mt.1292.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jan 24 09:32:03 UTC 2022


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

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

Name: System-mt.1292
Author: mt
Time: 24 January 2022, 10:31:54.545852 am
UUID: dabf2b16-ddcb-c540-98f5-97858275e0a0
Ancestors: System-mt.1291

Adds support for 75% (i.e., low ppi) scale factor since we have suitable pre-rendered, legible fonts for that size.

=============== Diff against System-mt.1291 ===============

Item was changed:
  ----- Method: UserInterfaceTheme>>canFakeScaleFactor: (in category 'private - display scale') -----
  canFakeScaleFactor: aFloat
  	"Answer whether we can fake the given scale factor with pre-rendered fonts."
  
  	self isTTCBased ifFalse: [^ true "Need to #makeTTCBased anyway."].
  	(self lookupScaleFactor: 1.0) ifNil: [^ false "Without a fake 100%, we go all-in with TrueType fonts."].
  
+ 	aFloat = 0.75 ifTrue: [^ true].
  	aFloat = 1.0 ifTrue: [^ true].
  	aFloat = 1.25 ifTrue: [^ true].
  	aFloat = 1.5 ifTrue: [^ true].
  	
  	^ false!

Item was added:
+ ----- Method: UserInterfaceTheme>>doScale075 (in category 'private - display scale') -----
+ doScale075
+ 	"Private. Use #applyScaled:. This is actually about 71% because of which font sizes we have available."
+ 	
+ 	self flag: #hack. "mt: A different scale factor should not result in different point sizes being selected BUT the same point size resulting in a different pixel height."
+ 	
+ 	self setFonts: #(
+ 		standardSystemFont 7.5
+ 		standardFixedFont 7.5
+ 
+ 		standardCodeFont 7.5
+ 		standardListFont 7.5
+ 		standardButtonFont 7.5
+ 		standardMenuFont 7.5
+ 		standardFlapFont 7.5
+ 			
+ 		windowTitleFont 7.5
+ 		balloonHelpFont 7.5
+ 		haloLabelFont 7.5
+ 		
+ 		wizardStandardFont 10.5
+ 		wizardButtonFont 10.5
+ 		wizardHelpFont 7.5
+ 		wizardTitleFont 16.5) forceTTC: false.
+ 
+ 	self apply.
+ 	TextStyle pixelsPerInch: 96.0. "Restore Squeak's default PPI for 100%."!

Item was changed:
  ----- Method: UserInterfaceTheme>>setScaleFactor: (in category 'private - display scale') -----
  setScaleFactor: aFloat
  	"Private. Use #applyScaled:. In the receiver, change the fonts to have a scale of aFloat. Change all fonts to be TrueType fonts if no pre-rendered fonts exist. Never change the 100% reference theme but make a copy. Apply the receiver to the system."
  
  	(self isTTCBased not and: [aFloat = self localScaleFactor])
  		ifTrue: [self apply. ^ self].
  
  	(self isTTCBased not and: [self localScaleFactor = 1.0]) "!!!! Never change the reference theme !!!!"
  		ifTrue: [^ self lookupSimilar ifNil: [self copyWithScaleFactor: aFloat] ifNotNil: [:other | other setScaleFactorPreApply: aFloat]].
  	
+ 	aFloat = 0.75 ifTrue: [^ self doScale075].
  	aFloat = 1.0 ifTrue: [^ self doScale100].
  	aFloat = 1.25 ifTrue: [^ self doScale125].
  	aFloat = 1.5 ifTrue: [^ self doScale150].
  
  	"And now transition from the pre-rendered world into the TrueType world. Or re-use an existing TrueType-based theme with new values. See #lookupSimilar above."
  	TextStyle pixelsPerInch: 96.0 * RealEstateAgent scaleFactor "current, based on pixels".
  	self makeTTCBased.
  	self applyAfter: [TextStyle pixelsPerInch: 96.0 * aFloat "new, not rounded"].!



More information about the Squeak-dev mailing list