[squeak-dev] The Trunk: TrueType-nice.11.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Oct 20 23:05:43 UTC 2009


Nicolas Cellier uploaded a new version of TrueType to project The Trunk:
http://source.squeak.org/trunk/TrueType-nice.11.mcz

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

Name: TrueType-nice.11
Author: nice
Time: 21 October 2009, 1:05:20 am
UUID: eecd482a-a7a9-43f1-a0f1-1bbfc4bf0ce3
Ancestors: TrueType-nice.10

Use #keys rather than #fasterKeys
Note that pattern (x keys asArray sort) could as well be written (x keys sort) now that keys returns an Array...
This #asArray is here solely for cross-dialect/fork compatibility.

=============== Diff against TrueType-nice.10 ===============

Item was changed:
  ----- Method: TTFileDescription class>>fontFromUser:allowKeyboard: (in category 'user interaction') -----
  fontFromUser: priorFont allowKeyboard: aBoolean
  	"TTFileDescription fontFromUser"
  	| fontMenu active ptMenu label fontNames builder resultBlock result item style font widget |
  	builder := ToolBuilder default.
+ 	fontNames := self allFontsAndFiles keys asArray sort.
- 	fontNames := self allFontsAndFiles fasterKeys sort.
  	fontMenu := builder pluggableMenuSpec new.
  	fontMenu label: 'Non-portable fonts'.
  	resultBlock := [:value| result := value].
  	fontNames do: [:fontName |
  		active := priorFont familyName sameAs: fontName.
  		ptMenu := builder pluggableMenuSpec new.
  		TTCFont pointSizes do: [:pt |
  			label := pt printString, ' pt'.
  			item := ptMenu add: label 
  				target: resultBlock
  				selector: #value:
  				argumentList: {{fontName. pt}}.
  			item checked: (active and:[pt = priorFont pointSize]).
  		].
  		item := fontMenu add: fontName action: nil.
  		item subMenu: ptMenu.
  		item checked: active.
  	].
  	widget := builder open: fontMenu.
  	builder runModal: widget.
  	result ifNil:[^nil].
  	style := (TextStyle named: result first) ifNil:[self installFamilyNamed: result first].
  	style ifNil: [^ self].
  	font := style fonts detect: [:any | any pointSize = result last] ifNone: [nil].
  	^ font
  !




More information about the Squeak-dev mailing list