[squeak-dev] The Trunk: Graphics-fbs.212.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Jun 4 09:51:03 UTC 2013


Frank Shearar uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-fbs.212.mcz

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

Name: Graphics-fbs.212
Author: fbs
Time: 3 June 2013, 11:06:29.054 pm
UUID: 15a251c4-586f-4e5c-bf18-151dd7a896db
Ancestors: Graphics-fbs.211

Prefer using UIManager default to the proxying Utilities class.

=============== Diff against Graphics-fbs.211 ===============

Item was changed:
  ----- Method: BDFFontReader class>>convertFilesNamed:toFamilyNamed:inDirectoryNamed: (in category 'file creation') -----
  convertFilesNamed: fileName toFamilyNamed: familyName inDirectoryNamed: dirName
  		"BDFFontReader convertFilesNamed: 'helvR' toFamilyNamed: 'Helvetica' inDirectoryNamed: '' "
  
  	"This utility converts X11 BDF font files to Squeak .sf2 StrikeFont files."
  
  	"For this utility to work as is, the BDF files must be named 'familyNN.bdf',
  	and must reside in the directory named by dirName (use '' for the current directory).
  	The output StrikeFont files will be named familyNN.sf2, and will be placed in the
  	current directory."
  
  	| allFontNames dir |
  	"Check for matching file names."
  	dir := dirName isEmpty
  		ifTrue: [FileDirectory default]
  		ifFalse: [FileDirectory default directoryNamed: dirName].
  	allFontNames := dir fileNamesMatching: fileName , '##.bdf'.
  	allFontNames isEmpty ifTrue: [^ self error: 'No files found like ' , fileName , 'NN.bdf'].
  	
+ 	UIManager default informUserDuring: [:info |
- 	Utilities informUserDuring: [:info |
  		allFontNames do: [:fname | | f sizeChars | 
  			info value: 'Converting ', familyName, ' BDF file ', fname, ' to SF2 format'.
  			sizeChars := (fname copyFrom: fileName size + 1 to: fname size) copyUpTo: $. .
  
  			f := StrikeFont new readBDFFromFile: (dir fullNameFor: fname) name: familyName, sizeChars.
  			f writeAsStrike2named: familyName, sizeChars, '.sf2'.
  		].
  	]!



More information about the Squeak-dev mailing list