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

commits at source.squeak.org commits at source.squeak.org
Thu Jan 20 13:19:08 UTC 2022


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

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

Name: TrueType-mt.57
Author: mt
Time: 20 January 2022, 2:19:07.578835 pm
UUID: dc0a4093-2be0-5248-960d-959fe5e1c7f8
Ancestors: TrueType-mt.56

Complements Graphics-mt.464

=============== Diff against TrueType-mt.56 ===============

Item was changed:
  ----- Method: TTCFont>>fallbackFont (in category 'accessing') -----
  fallbackFont
+ 	"Overwritten to add a cache."
+ 	
+ 	^ fallbackFont ifNil: [fallbackFont := super fallbackFont]!
- 	"Answers the fallbackFont for the receiver. The fallback font must be some derivative of the receiver since it will not be asked to install itself properly on the target BitBlt so rendering a completely different font here is simply not possible. The default implementation uses a synthetic font that maps all characters to question marks."
- 	^ fallbackFont
- 		ifNil: [fallbackFont := FixedFaceFont new errorFont baseFont: self]!

Item was changed:
  ----- Method: TTCFont>>glyphInfoOf:into: (in category 'private') -----
  glyphInfoOf: aCharacter into: glyphInfoArray
  	"return the glyph info for aCharacter; if I don't have such a character, try my fallback font"
  
  	| form |
  	(self hasGlyphOf: aCharacter) ifFalse: [
  		^ self fallbackFont glyphInfoOf: aCharacter into: glyphInfoArray.
  	].
  	form := self formOf: aCharacter.
  	glyphInfoArray at: 1 put: form;
  		at: 2 put: 0;
  		at: 3 put: form width;
+ 		at: 4 put: self ascent "(self ascentOf: aCharacter)";
- 		at: 4 put: ascent "(self ascentOf: aCharacter)";
  		at: 5 put: self.
  	^ glyphInfoArray.
  !

Item was removed:
- ----- Method: TTCFont>>setupDefaultFallbackFont (in category 'emphasis') -----
- setupDefaultFallbackFont
- 
- 	| fonts f |
- 	fonts := TextStyle default fontArray.
- 	f := fonts first.
- 	1 to: fonts size do: [:i |
- 		self height > (fonts at: i) height ifTrue: [f := fonts at: i].
- 	].
- 	(f == self)
- 		ifFalse:[ self fallbackFont: f ].
- 	self reset.
- !

Item was removed:
- ----- Method: TTCFont>>setupDefaultFallbackFontTo: (in category 'friend') -----
- setupDefaultFallbackFontTo: aTextStyleOrNil
- "
- 	TTCFont allInstances do: [:i | i setupDefaultFallbackFontTo: (TextStyle named: 'MultiMSMincho')].
- "
- 
- 	| fonts f |
- 	aTextStyleOrNil ifNil: [
- 		self fallbackFont: nil.
- 		^ self.
- 	].
- 	fonts := aTextStyleOrNil fontArray.
- 	(aTextStyleOrNil defaultFont familyName endsWith: self familyName) ifTrue: [fallbackFont := nil. ^ self].
- 
- 	f := fonts first.
- 	1 to: fonts size do: [:i |
- 		self height >= (fonts at: i) height ifTrue: [f := fonts at: i].
- 	].
- 	self fallbackFont: f.
- 	self reset.
- 
- !



More information about the Squeak-dev mailing list