[Pkg] The Trunk: TrueType-mt.94.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Jun 14 08:23:41 UTC 2022
Marcel Taeumel uploaded a new version of TrueType to project The Trunk:
http://source.squeak.org/trunk/TrueType-mt.94.mcz
==================== Summary ====================
Name: TrueType-mt.94
Author: mt
Time: 14 June 2022, 10:23:38.783907 am
UUID: b7f0850c-fff8-eb47-a78e-d02db1372e5b
Ancestors: TrueType-mt.93
Restores backwards compatibility of deprecated font-loading/installing interface.
=============== Diff against TrueType-mt.93 ===============
Item was added:
+ ----- Method: TTCFont class>>installFromFontDescriptions: (in category 'installation') -----
+ installFromFontDescriptions: someFontDescriptions
+ "See commentary in #installFromFileNames:."
+
+ | handles |
+ handles := TTFontFileHandle allHandlesFromFontDescriptions: someFontDescriptions.
+ handles do: [:ea | ea normalize; installFont].
+ ^ handles collect: [:ea | ea font textStyleName] as: Array!
Item was changed:
----- Method: TTCFont class>>newTextStyleFromTTFile: (in category 'instance creation') -----
newTextStyleFromTTFile: fileName
+ self deprecated: 'Use #installFromFileNames: instead.'.
+ ^ (self installFromFileNames: {fileName})
+ ifEmpty: [nil "No fonts found."]
+ ifNotEmpty: [:styleNames | TextStyle named: styleNames first]!
- self flag: #deprecated.
- ^ self installFromFileNames: {fileName}!
Item was changed:
----- Method: TTCFont class>>newTextStyleFromTTStream: (in category 'instance creation') -----
+ newTextStyleFromTTStream: binaryStream
- newTextStyleFromTTStream: fileStream
+ self deprecated: 'Use #installFromFontDescriptions: instead.'.
+ ^ (self installFromFontDescriptions: (TTFontReader readFrom: binaryStream))
+ ifEmpty: [nil "No fonts found."]
+ ifNotEmpty: [:styleNames | TextStyle named: styleNames first]!
- self flag: #deprecated.
- ^ self installFromFileNames: {fileStream name}!
Item was changed:
----- Method: TTFontDescription class>>addFromTTFile: (in category 'instance registration') -----
addFromTTFile: fileName
+ self deprecated: 'Use #addFromFileNamed: instead.'.
+ ^ (self addFromFileNamed: fileName)
+ ifEmpty: [nil]
+ ifNotEmpty: [:descriptions | descriptions size = 1
+ ifTrue: [descriptions first]
+ ifFalse: [descriptions]]!
- self flag: #deprecated.
- ^ self addFromFileNamed: fileName!
Item was changed:
----- Method: TTFontDescription class>>addFromTTStream: (in category 'instance registration') -----
addFromTTStream: readStream
+ self deprecated: 'Use #addFromBinaryStream: instead.'.
+ ^ (self addFromBinaryStream: readStream)
+ ifEmpty: [nil]
+ ifNotEmpty: [:descriptions | descriptions size = 1
+ ifTrue: [descriptions first]
+ ifFalse: [descriptions]]!
- self flag: #deprecated.
- ^ self addToDescription: (self fromBinaryStream: readStream)!
More information about the Packages
mailing list