Skip to content

Commit

Permalink
fix merging and font size calculous
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanlm committed Nov 10, 2020
1 parent 3cf27ed commit c4869dd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Spec2-Adapters-Morphic/SpStyleFont.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ SpStyleFont >> calculateFontName [
{ #category : #private }
SpStyleFont >> calculateFontSize [

self sizeVariable ifNotNil: [ ^ self sizeVariable value ].
self sizeVariable ifNotNil: [ :aVariable |
aVariable value ifNotNil: [
^ self sizeVariable value ] ].
self nameVariable isEnvironmentVariable ifTrue: [ ^ self nameVariable pointSize ].
self hasPredefinedFont ifTrue: [ ^ self obtainPredefinedFont pointSize ].

Expand Down Expand Up @@ -246,11 +248,11 @@ SpStyleFont >> mergeWith: otherProperty [
merged := super mergeWith: otherProperty.

"Ensure predefined font will be overriden even if nil."
otherProperty name
otherProperty nameVariable
ifNotNil: [ :aName |
merged
predefinedFont: nil;
name: aName ].
writeSlotNamed: 'predefinedFont' value: nil;
writeSlotNamed: 'name' value: aName ].

^ merged
]
Expand Down

0 comments on commit c4869dd

Please sign in to comment.