[squeak-dev] The Trunk: TrueType-mt.74.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Feb 25 09:40:12 UTC 2022


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

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

Name: TrueType-mt.74
Author: mt
Time: 25 February 2022, 10:40:11.78063 am
UUID: ab1c5dc9-3363-e448-9bfa-c3c33f4a73fe
Ancestors: TrueType-mt.73

Step 3 of 2 :-D ... remove unused code.

=============== Diff against TrueType-mt.73 ===============

Item was changed:
  Object subclass: #TTFileDescription
+ 	instanceVariableNames: 'fileName fileOffset familyName subfamilyName copyright ascender descender lineGap unitsPerEm numGlyphs indexToLocOffset indexToLocFormat glyphTableOffset cmapType cmapOffset numHMetrics hmtxTableOffset sTypoAscender sTypoDescender sTypoLineGap'
- 	instanceVariableNames: 'fileName fileOffset familyName subfamilyName copyright ascender descender lineGap unitsPerEm numGlyphs indexToLocOffset indexToLocFormat glyphTableOffset cmapType cmapOffset numHMetrics hmtxTableOffset sTypoAscender sTypoDescender sTypoLineGap extraScale extraGap'
  	classVariableNames: 'AllFontsAndFiles FontPaths OfferNonPortableFonts'
  	poolDictionaries: ''
  	category: 'TrueType-Fonts'!
  
  !TTFileDescription commentStamp: 'ar 7/29/2009 22:18' prior: 0!
  Contrary to TTFontDescritption, this class leaves true type files on disk and only reads the required portions when constructing glyphs. This avoids the need of reading the entire font into memory at the cost of having to hit disk whenever a glyph is requested.!

Item was removed:
- ----- Method: TTFileDescription>>extraGap (in category 'accessing') -----
- extraGap
- 	"See commenetary in TTFontDescription"
- 	
- 	^ extraGap ifNil: [extraGap := TTFontDescription extraGapFor: self]!

Item was removed:
- ----- Method: TTFileDescription>>extraGap: (in category 'accessing') -----
- extraGap: anIntegerOrNil
- 	"Increase or decrease the receivers line gap"
- 
- 	extraGap = anIntegerOrNil ifTrue: [^ self].
- 	extraGap := anIntegerOrNil.
- 	TTCFont allSubInstancesDo: [:font |
- 		font ttcDescription == self ifTrue: [font reset "keep glyph cache"]].
- 	TextStyle allInstancesDo: [:style | style reset].!

Item was removed:
- ----- Method: TTFileDescription>>extraScale (in category 'accessing') -----
- extraScale
- 
- 	^ extraScale ifNil: [extraScale := TTFontDescription extraScaleFor: self]!

Item was removed:
- ----- Method: TTFileDescription>>extraScale: (in category 'accessing') -----
- extraScale: aFloatOrNil
- 	"EXPERIMENTAL. See commentary in TTFontDescription"
- 
- 	self extraScale = aFloatOrNil ifTrue: [^ self].
- 	extraScale := aFloatOrNil.
- 	TTCFont allSubInstancesDo: [:font |
- 		font ttcDescription == self ifTrue: [font flushCache]].!

Item was changed:
  Object subclass: #TTFontDescription
+ 	instanceVariableNames: 'glyphTable glyphs kernPairs copyright familyName fullName subfamilyName uniqueName versionName postscriptName trademark bounds unitsPerEm ascender descender lineGap sTypoAscender sTypoDescender sTypoLineGap'
- 	instanceVariableNames: 'glyphTable glyphs kernPairs copyright familyName fullName subfamilyName uniqueName versionName postscriptName trademark bounds unitsPerEm ascender descender lineGap sTypoAscender sTypoDescender sTypoLineGap extraScale extraGap'
  	classVariableNames: 'Default Descriptions'
  	poolDictionaries: ''
  	category: 'TrueType-Fonts'!
  
  !TTFontDescription commentStamp: '<historical>' prior: 0!
  Holds a TrueType font in memory.  Is used by TTSampleStringMorph as its font.  
  
  Class owns a default example.  !

Item was removed:
- ----- Method: TTFontDescription class>>extraGapFor: (in category 'defaults') -----
- extraGapFor: ttcDescription
- 
- 	^ ttcDescription typographicLineGap = 0
- 		ifFalse: [0 "The font already provides. Users may override manually."]
- 		ifTrue: [(ttcDescription internalLeading * 0.5) truncated]!

Item was removed:
- ----- Method: TTFontDescription class>>extraScaleFor: (in category 'defaults') -----
- extraScaleFor: ttcDescription
- 	"Answers a factor for #extraScale for selected font families. They represent a trade-off between legibility and correctness. For now, use up about 50% of the room reserved for glyph features, i.e. #internalLeading. Our goal is to render comparable glyphs from different fonts in a similar size so that the system's readability of text is not impaired when mixing largely different fonts. In the end, glyphs sizes may still differ, but not as much."
- 
- 	(ttcDescription familyName beginsWith: 'Bitstream Vera')
- 		ifTrue: [^ 1.059 "Squeak's optimized default TrueType font for scale factors 75% to 150%. The benchmark is whether the underscore glyph $_ is legible."].
- 	
- 	^ 1.0 + ((ttcDescription internalLeading / ttcDescription unitsPerEm) * 0.5)!

Item was removed:
- ----- Method: TTFontDescription>>extraGap (in category 'accessing - metrics') -----
- extraGap
- 	"Answer the extra lineGap for the receiver. In combination with #extraScale, this property can be used to balance the legibility of different fonts used side-by-side with the same #pointSize."
- 	
- 	^ extraGap ifNil: [extraGap := self class extraGapFor: self]!

Item was removed:
- ----- Method: TTFontDescription>>extraGap: (in category 'accessing - metrics') -----
- extraGap: anIntegerOrNil
- 	"Increase or decrease the receivers line gap"
- 
- 	extraGap = anIntegerOrNil ifTrue: [^ self].
- 	extraGap := anIntegerOrNil.
- 	TTCFont allSubInstancesDo: [:font |
- 		font ttcDescription == self ifTrue: [font reset "keep glyph cache"]].
- 	TextStyle allInstancesDo: [:style | style reset].!

Item was removed:
- ----- Method: TTFontDescription>>extraScale (in category 'accessing - metrics') -----
- extraScale
- 	"
- 	TTCFont allSubInstancesDo: [:f | f ttcDescription extraScale: nil]
- 	"
- 	^ extraScale ifNil: [extraScale := self class extraScaleFor: self]!

Item was removed:
- ----- Method: TTFontDescription>>extraScale: (in category 'accessing - metrics') -----
- extraScale: aFloatOrNil
- 	"EXPERIMENTAL. Increase the glyph size without increasing the pixel size for a certain point size. Consequently, if the scale factor is too large, you may notice overlapping and clipping artifacts."
- 
- 	extraScale = aFloatOrNil ifTrue: [^ self].
- 	extraScale := aFloatOrNil.
- 	TTCFont allSubInstancesDo: [:font |
- 		font ttcDescription == self ifTrue: [font flushCache]].!



More information about the Squeak-dev mailing list