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

commits at source.squeak.org commits at source.squeak.org
Wed Mar 9 08:15:36 UTC 2022


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

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

Name: TrueType-mt.86
Author: mt
Time: 9 March 2022, 9:15:34.52246 am
UUID: f92f4d82-8235-3f4c-aa15-b2456dc2c14a
Ancestors: TrueType-mt.85

Complements Graphics-mt.494

=============== Diff against TrueType-mt.85 ===============

Item was added:
+ ----- Method: TTCFont>>displayString:on:from:to:at:kern:from:baselineY: (in category 'displaying') -----
+ displayString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta from: fromFont baselineY: baselineY
+ 	"I am used as a fallback for fromFont, which is most likely a StrikeFont."
+ 	
+ 	aBitBlt installTTCFont: self.
+ 	^ self displayString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta baselineY: baselineY!

Item was changed:
  ----- Method: TTCFont>>formOf: (in category 'character shapes') -----
  formOf: char
  
  	| code form |
+ 	cache ifNil: [self foregroundColor: Color black]. "make sure we have a cache"
- 	char charCode > self maxAscii
- 		ifTrue: [^ self fallbackFont formOf: char].
  
- 	cache ifNil:[self foregroundColor: Color black]. "make sure we have a cache"
- 
  	code := char charCode.
  	form := cache at: (code + 1).
+ 
+ 	form ifNil: [
- 	"form class == Association ifTrue:[^self computeForm: code]. ""in midst of loading"
- 	form ifNil:[
  		form := self computeForm: code.
  		form ifNil:[^nil].
  		cache at: code+1 put: form.
  		GlyphCacheData at: (GlyphCacheIndex := GlyphCacheIndex \\ GlyphCacheSize + 1) put: form.
  	].
  	^form
  !

Item was changed:
  ----- Method: TTCFont>>glyphInfoOf:into: (in category 'displaying') -----
  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
+ 			foregroundColor: self foregroundColor;
+ 			glyphInfoOf: aCharacter into: glyphInfoArray].
+ 		
- 		^ self fallbackFont glyphInfoOf: aCharacter into: glyphInfoArray.
- 	].
  	form := self formOf: aCharacter.
  	glyphInfoArray at: 1 put: form;
  		at: 2 put: 0; "hereX -- relative, unlike StrikeFont"
  		at: 3 put: form advanceWidth; "nextX -- relative, unlike StrikeFont"
  		at: 4 put: self ascent "(self ascentOf: aCharacter)";
  		at: 5 put: self.
  	^ glyphInfoArray.
  !



More information about the Squeak-dev mailing list