The Trunk: TrueType-nice.10.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: TrueType-nice.10.mcz

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

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

Name: TrueType-nice.10
Author: nice
Time: 20 October 2009, 12:05:08 pm
UUID: 46980172-3f5a-a442-a343-197f64547381
Ancestors: TrueType-enno.9

use fasterKeys

=============== Diff against TrueType-enno.9 ===============

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 fasterKeys sort.
- fontNames := self allFontsAndFiles keys asArray 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
  !