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

commits at source.squeak.org commits at source.squeak.org
Mon Jan 18 17:18:52 UTC 2010


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

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

Name: TrueType-nice.13
Author: nice
Time: 18 January 2010, 6:18:47.592 pm
UUID: 9c0ae3bf-8eee-434b-bb69-a4cf0bda202a
Ancestors: TrueType-nice.12

Use ByteArray literals

=============== Diff against TrueType-nice.12 ===============

Item was changed:
  ----- Method: TTFileDescription class>>fontOffsetsInFile: (in category 'instance creation') -----
  fontOffsetsInFile: file
  	"Answer a collection of font offsets in the given file"
  	| tag version nFonts |
  	file position: 0.
  	tag := file next: 4.
  	tag caseOf:{
  		['true' asByteArray] -> ["Version 1.0 TTF file"
  			"http://developer.apple.com/textfonts/TTRefMan/RM06/Chap6.html
  			The values 'true' (0x74727565) and 0x00010000 are recognized by the Mac OS 
  			as referring to TrueType fonts."
  			^Array with: 0 "only one font"
  		].
+ 		[#[0 1 0 0]] -> ["Version 1.0 TTF file"
- 		[#(0 1 0 0) asByteArray] -> ["Version 1.0 TTF file"
  			^Array with: 0 "only one font"
  		].
  		['ttcf' asByteArray]	-> ["TTC file"
  			version := file next: 4.
  			version = #(0 1 0 0) asByteArray ifFalse:[^self error: 'Unsupported TTC version'].
  			nFonts := file nextNumber: 4.
  			^(1 to: nFonts) collect:[:i| file nextNumber: 4].
  		].
  	} otherwise:[
  		self error: 'This is not a valid Truetype file'.
  	].!




More information about the Squeak-dev mailing list