Created
April 5, 2019 15:15
-
-
Save guillep/d9929c0d684264ccecefe361d58e9509 to your computer and use it in GitHub Desktop.
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
styler := SHRBTextStyler new. | |
text := 'EEEE' asText. | |
styler classOrMetaClass: Object. | |
styler styledTextFor: text. | |
text asOrderedCollection collect: [ :each | | |
FreeTypeGlyphRenderer current | |
subGlyphOf: each | |
colorValue: 0 | |
mono: false | |
subpixelPosition: 0 | |
font: (StandardFonts codeFont instVarNamed: #boldDerivative) realFont | |
]. | |
(StandardFonts codeFont instVarNamed: #boldDerivative) realFont | |
linearKerningLeft: $m right: $e. | |
(StandardFonts codeFont instVarNamed: #boldDerivative) realFont | |
linearKerningLeft: $e right: $s. | |
StandardFonts codeFont realFont widthOf: $e. | |
FreeTypeCache current | |
atFont: StandardFonts codeFont realFont | |
charCode: $e asInteger | |
type: 200. | |
"ifAbsent: []." | |
r := RubEditingArea new. | |
r | |
setTextWith: text; | |
textFont: StandardFonts codeFont; | |
openInWindow. | |
r := RubEditingArea new. | |
r | |
setTextWith: text; | |
textFont: StandardFonts codeFont; | |
drawSubmorphsOn: (FormCanvas extent: 200@200) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment