1 |***************************************************************************
2 |** This is a file that is used to generate a particular form of the logo.
4 |** This form of the logo has bent text above and below, and looks rather
5 |** different from the other logos. It can be used in printed material like
6 |** theses, course material, and books. (The other logos are used in
7 |** presentations and posters.)
9 |** This file requires rtlogo_elements, which is not part of Shapes.
10 |***************************************************************************
11 ##author Henrik Tidefelt
13 ##needs rtlogo_elements
16 /** This is the text size, and everything related to the text should be in this unit so that it
17 ** becomes easy to change the size of the text circle relative to the regulator inside.
20 ##unit rR = 13mm |** This is the size given to makeRegulator function.
22 smallFont: @text_font:FONT_HELVETICA_BOLD & @text_size:1t & @text_horizontalscaling:1.0
24 |** The bent text is drawn along circular arcs, and we put the text in contact with the regulator's box at
25 |** the center coordinate.
26 circleCenter: (0,0.92rR)
28 charHeight: [ymax [bbox smallFont | ( newText << `X´ )]]
29 outerRadius: innerRadius + charHeight
34 •page << @nonstroking:lightGray | [fill [shift circleCenter][][circle outerRadius + graySep]]
35 •page << @nonstroking:darkGray | [fill [shift circleCenter][][circle innerRadius - graySep]]
39 & @nonstroking:GRAY_WHITE
42 /** Recall where this places the regulator...
44 [makeRegulator 1rR •page]
48 /** This is the upper banner.
49 ** Since the text is placed on the outside of the circle, no special kerning should be needed.
52 text: smallFont | [kerning `•´ ~ballSpace [kern `REGLERTEKNIK´] ~ballSpace `•´ ~ballSpace [kern `AUTOM´] 0.08 `A´ 0.13 [kern `TIC CONTROL´] ~ballSpace `•´]
53 baseline: [shift circleCenter] [] [rotate 90° + 0.5*[xmax [bbox ( newText << text )]]/innerRadius] [] reverse [] [circle innerRadius]
55 |** •page << @width:0bp & @stroking:RGB_RED | [stroke baseline]
56 |** •page << @width:0bp | [stroke (~1r,[baseline 0].p.y)--(1r,(+0r))]
58 /** At the time of writing, there is no abstraction for placing text along a path, but this is the
59 ** standard way of doing it.
65 c: ( newText << distChar.cdr )
66 sl: [baseline distChar.car + 0.5*[xmax [bbox c]]]
69 [[shift sl.p]()[rotate [angle sl.T]] [centerx c] ]
75 /** This is the lower banner.
76 ** Since the text is placed on the inside of the circle, some negative kerning must be used.
78 stdkern: charHeight/outerRadius
80 text: smallFont | ( @text_characterspacing:stdkern*@text_size | [kerning [kern `LINK´] 0.13 `Ö´ 0.03 [kern `PING´]] )
82 baseline: [shift circleCenter] [] [rotate ~90° - 0.5*([xmax [bbox (newText << text)]])/outerRadius] [] [circle outerRadius]
84 /** At the time of writing, there is no abstraction for placing text along a path, but this is the
85 ** standard way of doing it.
91 c: ( newText << distChar.cdr )
92 sl: [baseline distChar.car + 0.5*[xmax [bbox c]]]
95 [[shift sl.p]()[rotate [angle sl.T]] [centerx c] ]