Closed pavel-krivanek closed 5 years ago
Comment by bergel
Tuesday Apr 18, 2017 at 17:05 GMT
A bit more on the font.
font := FreeTypeFont fromFile: '/Library/Fonts/Bodoni Ornaments.ttf' pointSize: 42 index: 0.
morph := StringMorph contents: 'Hello World' font: font.
morph openInWindow
We can now do:
v := RTView new.
('/Library/Fonts/' asFileReference children first: 15) do: [ :fr |
rawFont := FreeTypeFont fromFile: fr fullName pointSize: 10 index: 0.
v add: (RTLabel new height: 4; rawFont: rawFont; elementOn: fr basename) ].
RTVerticalLineLayout on: v elements.
v @ RTDraggableView.
v
Consider the following code:
It produces what is shown on the screenshot.
However, what is displayed is not DejaVu Sans. E.g., compare the "e" with https://www.fontsquirrel.com/fonts/dejavu-sans![ejwvyesogyaqanc7sjdhhl_xgj2aiujarmhaugp696zv-t7igadyrww-5wqwhzp1scvjfcsszem9ndnex5spxxczy6pxbjybsbtccszbvcee5uarhqid18qtqm8wwdunnnusnbd_lcos-nqqplxsanm3ir4_wtuogw](https://cloud.githubusercontent.com/assets/393742/25142111/2351225c-243c-11e7-84e5-aee278e86782.png)