[squeak-dev] The Trunk: Morphic-mt.1873.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Feb 6 08:41:42 UTC 2022


Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1873.mcz

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

Name: Morphic-mt.1873
Author: mt
Time: 6 February 2022, 9:41:36.973117 am
UUID: 24c5c327-234a-ce45-afa7-3362bc6cb38a
Ancestors: Morphic-mt.1872

Complements TrueType-mt.64

=============== Diff against Morphic-mt.1872 ===============

Item was changed:
  ----- Method: FontImporterTool>>browseImported (in category 'actions') -----
  browseImported
  
  	| filenames fonts ttcFonts |
  	fonts := self currentSelection.
  	filenames := fonts allFilenames.
  	
+ 	ttcFonts := (filenames gather: [:ea | TTFontReader parseFileNamed: ea])
+ 		collect: [:descr | TTCFont new ttcDescription: descr; pointSize: TextStyle defaultFont pointSize; yourself].
- 	ttcFonts := filenames gather: [:ea | 
- 		(TTCFontReader readTTFFrom: (FileStream readOnlyFileNamed: ea))
- 			collect: [:descr | TTCFont new ttcDescription: descr; pointSize: TextStyle defaultFont pointSize; yourself]].
  	
  	ttcFonts do: [:ea | ea browseAllGlyphs].!

Item was changed:
  ----- Method: FontImporterTool>>import (in category 'actions') -----
  import
  	| megaSize filenames fonts |
  	fonts := self currentSelection.
  	filenames := fonts allFilenames.
  	megaSize := ((filenames inject: 0 into: [ :sum :fn |
  		sum + (FileStream readOnlyFileNamed: fn do: [:file | file size])]) / (1024 * 1024)) asFloat.
  	(UIManager default confirm: (
  'About to import {1}{2}.\\This is at least {3} MB of space required in the image.\
  Please respect the copyright and embedding restrictions of the font.\
  Proceed?' 
  		translated withCRs format: {
  			self currentParent 
  				ifNotNil: [:p| p fontname, ' ', self currentSelection fontname]
  				ifNil: [self currentSelection fontname].
  			filenames size > 1 ifTrue: [' ({1} font files)' translated format: {filenames size}] ifFalse: [''].
  			megaSize printShowingDecimalPlaces: 2}))
  		ifTrue: [ 
  			filenames do: [:filename | | readFonts |
+ 				readFonts := TTFontDescription addFromTTFile: filename.
- 				readFonts := TTCFontDescription addFromTTFile: filename.
  				readFonts isCollection
  					ifFalse: [TTCFont newTextStyleFromTT: readFonts]
  					ifTrue: [self importFontFamily: readFonts]]].
  	self allFonts: nil. "force redraw"
  	TTCFont registerAll.!



More information about the Squeak-dev mailing list