[etoys-dev] Etoys: TrueType-Richo.6.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jun 12 15:09:57 EDT 2010


Ricardo Moran uploaded a new version of TrueType to project Etoys:
http://source.squeak.org/etoys/TrueType-Richo.6.mcz

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

Name: TrueType-Richo.6
Author: Richo
Time: 12 June 2010, 4:10:02 pm
UUID: a32b2849-ab22-9841-ad70-54e66165e3c2
Ancestors: TrueType-Richo.5

* Added a preference called #usePlatformFonts to avoid looking for fonts in platform specific directories.

=============== Diff against TrueType-Richo.5 ===============

Item was changed:
  ----- Method: TTFileDescription class>>fontPathsDo: (in category 'font paths') -----
  fontPathsDo: aBlock
  	"Evaluate aBlock with all of the font paths that should be searched on the current platform"
+ 	(Preferences valueOfPreference: #usePlatformFonts ifAbsent: [false])
+ 	ifTrue: [
  
  	"Start with the current directory"
  	aBlock value: FileDirectory default pathName.
  
  	"Then subdirectory 'fonts'"
  	aBlock value: (FileDirectory default directoryNamed: 'fonts') pathName.
  
- 	aBlock value: (SmalltalkImage current imagePath, FileDirectory pathNameDelimiter asString, 'fonts').
- 
  	"Platform specific directories"
  	SmalltalkImage current platformName caseOf:{
  		['Win32']	->	[
  			"Standard Windows fonts directory"
  			aBlock value: 'C:\Windows\Fonts'.
  		].
  		['Mac OS']	->	[
  			"Standard system fonts directory"
  			aBlock value: '/Library/Fonts'.
  		].
  		['unix']		->	[ | base |
  			"Standard fonts are in /usr/share/fonts/*"
  			base := '/usr/share/fonts'.
  			(FileDirectory on: base) directoryNames 
  				do:[:dn| aBlock value: base, '/', dn].
  		].
  	} otherwise:[].
+ 	].
+ 
+ 	aBlock value: (SmalltalkImage current imagePath, FileDirectory pathNameDelimiter asString, 'fonts').!
- 	!

Item was changed:
  ----- Method: TTFileDescription class>>initialize (in category 'class initialization') -----
  initialize
  	"TTFileDescription initialize"
  	Smalltalk addToShutDownList: self.
  	FontPaths := Dictionary new.
+ 	AllFontsAndFiles := nil.
+ 	Preferences addBooleanPreference: #usePlatformFonts category: 'fonts' default: false balloonHelp: 'usePlatformFonts:
+ If true, TTFileDescription will look for fonts in platform specific directories. Otherwise, it will only look in <imagePath>/fonts'!
- 	AllFontsAndFiles := nil.!



More information about the etoys-dev mailing list