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

commits at source.squeak.org commits at source.squeak.org
Thu Jan 20 13:20:55 UTC 2022


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

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

Name: System-mt.1291
Author: mt
Time: 20 January 2022, 2:20:43.390835 pm
UUID: a714e014-0b8c-fb4e-bce1-1b7bcad3954c
Ancestors: System-mt.1290

Complements Graphics-mt.464

=============== Diff against System-mt.1290 ===============

Item was changed:
  ----- Method: Locale class>>switchAndInstallFontToID:gently: (in category 'accessing') -----
  switchAndInstallFontToID: localeID gently: gentlyFlag
  	| locale result env envFound ret fontInImage menu |
  	"Logic:
  		- not in Rainbow, 
  			- if the font is in the image, use the font.
  			- if the font is not in the image,
  				- ask to choose:
  					- load font
  					- try to enable pango, if pango is available
  					- or cancel.
  			- if the previous step fails, notify the user that you cannot switch to the language.
  	Details:
  		- how to check non-pango font is available:
  			- if the language environment for the locale doesn't exist, the font is not available.
  			- if font loading fails, it is not available.
  		- how to check if the language environment doesn't exist:
  			- if the locales languageEnvironment is Latin1 but the locale isn't it is not available.
  	"	
  	locale := Locale localeID: localeID.
  	env := locale languageEnvironment.
  	result := true.
  	envFound := (Latin1Environment supportedLanguages includes: locale isoLanguage) or: [(env isMemberOf: Latin1Environment) not].
  	fontInImage := envFound and: [env isFontAvailable].
  	fontInImage ifFalse: [
  		menu := MenuMorph new.
  		menu defaultTarget: menu.
  		envFound ifTrue: [menu add: 'load font' translated selector: #modalSelection: argument: #loadFont].
  		menu add:  'cancel' translated selector: #modalSelection: argument: #cancel.
  		menu addTitle: 'This language needs additional fonts.
  Do you want to install the fonts?' translated.
  		ret := menu invokeModal.
+ 		ret = #loadFont ifTrue: [result := env installFont. result ifTrue: [AbstractFont setupDefaultFallbackTextStyle]].
- 		ret = #loadFont ifTrue: [result := env installFont. result ifTrue: [StrikeFont setupDefaultFallbackTextStyle]].
  		(ret ~~ #loadFont and: [ret ~~ #enablePango]) ifTrue: [result := false]].
  	result ifFalse: [self inform: 'Cannot load additional fonts' translated] ifTrue: [self switchTo: locale gently: gentlyFlag].
  !

Item was removed:
- ----- Method: StrikeFont class>>setupDefaultFallbackFont (in category '*System-Fonts') -----
- setupDefaultFallbackFont
- "
- 	StrikeFont setupDefaultFallbackFont
- "
- 
- 	(#(#Accuat #Accujen #Accula #Accumon #Accusf #Accushi #Accuve #Atlanta) collect: [:e | TextStyle named: e]) do: [:style |
- 		style fontArray do: [:e |
- 			e reset.
- 			e setupDefaultFallbackFont.
- 		].
- 	].
- 	TTCFont allSubInstances
- 		do: [:font | font reset.
- 			font setupDefaultFallbackFont]
- 
- !

Item was changed:
+ (PackageInfo named: 'System') postscript: 'SystemNavigation initializeAuthors.
+ AbstractFont setupDefaultFallbackTextStyle.'!
- (PackageInfo named: 'System') postscript: 'SystemNavigation initializeAuthors.'!



More information about the Squeak-dev mailing list