[squeak-dev] The Trunk: Graphics-mt.470.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Jan 30 20:01:09 UTC 2022


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

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

Name: Graphics-mt.470
Author: mt
Time: 30 January 2022, 9:01:03.368695 pm
UUID: 263add45-e829-e84c-9775-f897d442a107
Ancestors: Graphics-mt.469

Fixes another issue with fall-back fonts in StrikeFonts. Watch out that you use a fall-back character that can actually be rendered. I suppose that the only remaining issue now would be that you cannot use a StrikeFont that cannot render even a single character... We could use line-breaks then ... :-D

=============== Diff against Graphics-mt.469 ===============

Item was changed:
  ----- Method: FixedFaceFont>>baseFont: (in category 'accessing') -----
  baseFont: aFont
+ 	baseFont := aFont.
+ 	substitutionCharacter ifNotNil: [
+ 		substitutionCharacter := substitutionCharacter max: self minSubstitutionCharacter].!
- 	baseFont := aFont!

Item was added:
+ ----- Method: FixedFaceFont>>errorCharacter (in category 'accessing') -----
+ errorCharacter
+ 	^$?!

Item was changed:
  ----- Method: FixedFaceFont>>errorFont (in category 'initialize-release') -----
  errorFont
  	displaySelector := #displayErrorOn:length:at:kern:baselineY:.
+ 	substitutionCharacter := self errorCharacter max: self minSubstitutionCharacter.!
- 	substitutionCharacter := $?.!

Item was added:
+ ----- Method: FixedFaceFont>>minSubstitutionCharacter (in category 'private') -----
+ minSubstitutionCharacter
+ 
+ 	^ Character value: (baseFont ifNil: [0] ifNotNil: [baseFont minCodePoint])!

Item was changed:
  ----- Method: FixedFaceFont>>passwordFont (in category 'initialize-release') -----
  passwordFont
  	displaySelector := #displayPasswordOn:length:at:kern:baselineY:.
+ 	substitutionCharacter := self passwordCharacter max: self minSubstitutionCharacter.!
- 	substitutionCharacter := self passwordCharacter!

Item was changed:
  ----- Method: StrikeFont>>glyphOf: (in category 'accessing') -----
  glyphOf: aCharacter 
  	"Answer the width of the argument as a character in the receiver."
  
  	| code |
+ 	(self hasGlyphOf: aCharacter)
+ 		ifFalse: [^ self fallbackFont glyphOf: aCharacter].
- 	(self hasGlyphOf: aCharacter) ifFalse: [
- 		fallbackFont ifNotNil: [
- 			^ fallbackFont glyphOf: aCharacter.
- 		].
- 		^ (Form extent: 1 at self height) fillColor: Color white
- 	].
  	code := self codeForCharacter: aCharacter.
  	^ glyphs copy: (((xTable at: code + 1)@0) corner: (xTable at: code +2)@self height).
  !



More information about the Squeak-dev mailing list