Skip to content

Commit a84be87

Browse files
Simplify nil guard in font kerning
Co-authored-by: Codex <codex@openai.com>
1 parent cacf7f8 commit a84be87

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/ArrowSyntaxRendering/ASRSubstitutionFont.class.st

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,9 @@ ASRSubstitutionFont >> installOn: aDisplayContext foregroundColor: foregroundCol
246246
{ #category : 'measuring' }
247247
ASRSubstitutionFont >> kerningLeft: leftCharacter right: rightCharacter [
248248

249-
((self hides: leftCharacter) or: [
250-
rightCharacter notNil and: [ self hides: rightCharacter ] ])
251-
ifTrue: [ ^ 0 ].
249+
(self hides: leftCharacter) ifTrue: [ ^ 0 ].
252250
rightCharacter ifNil: [ ^ 0 ].
251+
(self hides: rightCharacter) ifTrue: [ ^ 0 ].
253252
^ self baseFont
254253
kerningLeft: (self displayCharacterFor: leftCharacter)
255254
right: (self displayCharacterFor: rightCharacter)

0 commit comments

Comments
 (0)