/** This file is part of Shapes. ** ** Shapes is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** any later version. ** ** Shapes is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with Shapes. If not, see . ** ** Copyright 2008, 2014 Henrik Tidefelt **/ ##lookin ..Shapes ##lookin ..Shapes..Text ##lookin ..Shapes..Geometry myFont: @font:Font..HELVETICA & @size:2cm bbdraw: \ •dst obj → { •dst << obj << Traits..@stroking:[Traits..gray 0.5] & Traits..@width:0.3bp | [Graphics..stroke [Layout..bbox obj]] } [bbdraw IO..•page [[shift (20cm,0)]()[rotate 5°] myFont | (newText << `ÖöÅåÄäÉé´ )]] [bbdraw IO..•page [[shift (20cm,~5cm)] myFont | (newText << [kerning `AU´+"{n}+`ÄU´+"{n} [kern `AU´+"{n}+`ÄU´]] )]] [bbdraw IO..•page [[shift (0,~3cm)]*[rotate ~15°] myFont | (newText << `Hej´ << @rise:0.5 | [kerning `mar´] << [kerning `d´ ~0.5 `u bra?´] )]] [bbdraw IO..•page [[shift (2.5cm,2cm)] myFont | (newText << [shift (6cm,~3cm)]*[rotate 30°] << [kerning `brY´ 0.3 `n´+"{n}+`RadX´] )]] [bbdraw IO..•page [[shift (0,~7cm)]*[rotate ~5°] myFont & @leading:1.5 | (newText << `Rad1 e lång´+"{n}+`Rad2´ )]] [bbdraw IO..•page [[shift (4cm,3cm)] myFont & @horizontalscaling:0.8 & @characterspacing:10bp & @wordspacing:50bp | (newText << [kerning `sparse words´] )]] [bbdraw IO..•page [[shift (4cm,5cm)] myFont | (newText << [kern `AUTOMATIC (automatic kerning)´] )]] [bbdraw IO..•page [[shift (4cm,7cm)] myFont | (newText << [kerning `AUTOMATIC (no kerning)´] )]]