[squeak-dev] The Trunk: ReleaseBuilder-mt.229.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Mar 1 16:37:29 UTC 2022


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

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

Name: ReleaseBuilder-mt.229
Author: mt
Time: 1 March 2022, 5:37:28.624136 pm
UUID: 5f6536e8-f210-4749-9b1a-8fd47e4e8ae5
Ancestors: ReleaseBuilder-mt.228

Complements TrueType-mt.78

=============== Diff against ReleaseBuilder-mt.228 ===============

Item was changed:
  ----- Method: ReleaseBuilder class>>cleanUpBitstreamVeraSans (in category 'scripts - support') -----
  cleanUpBitstreamVeraSans
  
+ 	| descriptions styleNames default handles |
+ 	descriptions := OrderedCollection new.
+ 	styleNames := Set new.
+ 	default := TTFontDescription descriptionNamed: #BitstreamVeraSans.
- 	| descriptions |
- 	descriptions := Dictionary new.
  
+ 	"1) Collect the font descriptions we want to keep."
+ 	TTFontDescription allSubInstancesDo: [:tt |
+ 		styleNames add: tt name.
- 	TTFontDescription allInstancesDo: [:tt |
  		(tt familyName beginsWith: 'Bitstream Vera')
+ 			ifTrue: [descriptions add: tt]].
+ 	styleNames addAll: (TextStyle actualTextStyles select: [:ea | ea isTTCStyle]) keys. "Also aliases"
- 			ifTrue: [(descriptions at: tt name ifAbsentPut: [Set new]) add: tt]].
  	
+ 	"2) Uninstall *all* TrueType font descriptions from the system."
  	TTCFont registry removeAll.
  	TTFontDescription clearDefault; clearDescriptions.
+ 	styleNames do: [:styleName | TextConstants removeKey: styleName ifAbsent: []].
  	
+ 	"3) Install the fonts we want to have."	
+ 	handles := TTFontFileHandle allHandlesFromFontDescriptions: descriptions.
+ 	handles do: [:handle | handle installFont].
+ 	TTFontDescription setDefault: default. "Must do this only now. See #addAllFromFont: ... Sigh."
- 	descriptions keysAndValuesDo: [:name :tts |
- 		TextConstants removeKey: name ifAbsent: [].
- 		tts do: [:ea | TTFontDescription addToDescription: ea]].
  	
+ 	"3*) Alias Bitstream Bold as ComicSansMS"
+ 	TextConstants at: #ComicSansMS put: (TextStyle fontArray: {(TextStyle named: #BitstreamVeraSans) defaultFont emphasized: 1 "bold"}).
+ 
+ 	"4) Configure the properties we want to use in the Squeak UI. Slightly larger glyphs to improve legibility for lower PPI. Note that such extra scaling typically does not match 0.5 points and should thus not be expressed with using a larger point size. We have glyph caches for each point size."
+ 	#(	BitstreamVeraSans 1.059 24 'Bitstream Vera Sans For Squeak'
+ 		BitstreamVeraSansMono 1.059 24 'Bitstream Vera Sans Mono For Squeak' )
+ 			groupsDo: [:name :scale :gap :customName | 
+ 				(TextStyle named: name) asHandle
+ 					rename: customName;
+ 					ttExtraScale: scale; ttExtraGap: gap;
+ 					installFont].!
- 	TTFontDescription setDefault.
- 		
- 	descriptions valuesDo: [:tts |
- 		(FontImporterTool new importFontFamily: tts) in: [:textStyle |
- 			TTCFont
- 				register: textStyle fontArray
- 				at: textStyle defaultFont name asSymbol]].!



More information about the Squeak-dev mailing list