-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a hack for wrong text width with emphasis
- Loading branch information
1 parent
b751462
commit 576c3f2
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
repository/OpenPonk-ClassEditor/OPRSCairoMetricsProvider.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Class { | ||
#name : 'OPRSCairoMetricsProvider', | ||
#superclass : 'RSCairoMetricsProvider', | ||
#category : 'OpenPonk-ClassEditor-Shapes', | ||
#package : 'OpenPonk-ClassEditor', | ||
#tag : 'Shapes' | ||
} | ||
|
||
{ #category : 'hooks' } | ||
OPRSCairoMetricsProvider >> extentsOf: aRSLabel [ | ||
"This entire class exists to overcome | ||
https://github.com/pharo-graphics/Roassal/issues/64" | ||
|
||
| copy | | ||
self flag: 'https://github.com/pharo-graphics/Roassal/issues/64'. | ||
aRSLabel isNormal ifTrue: [ ^ super extentsOf: aRSLabel ]. | ||
copy := RSLabel new | ||
font: aRSLabel font; | ||
text: aRSLabel text , '.'; | ||
yourself. | ||
^ copy textExtents | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters