$height » History » Version 2
Per Amundsen, 04/02/2020 04:36 PM
1 | 1 | Per Amundsen | _Added in 1.9.1_ |
---|---|---|---|
2 | |||
3 | 2 | Per Amundsen | *$height(text,font,size,[B],[C],[D])* |
4 | 1 | Per Amundsen | |
5 | Returns height of text in pixels for the specified font. |
||
6 | |||
7 | _If you use a negative number for the font size, it will match the size of fonts in the font dialogs._ |
||
8 | |||
9 | *Parameters* |
||
10 | |||
11 | text - Text to measure. |
||
12 | font - Font to measure. |
||
13 | size - Font size to measure. |
||
14 | 2 | Per Amundsen | [B] - If B is non-zero, the font is bold. (optional) |
15 | [C] - If C is non-zero, control codes are processed. (optional) |
||
16 | [D] - TODO |
||
17 | 1 | Per Amundsen | |
18 | *Example* |
||
19 | |||
20 | <pre> |
||
21 | ; Measure the height of text 'Hello World' using font 'Verdana 9'. |
||
22 | //echo -ag $height(Hello world, Verdana, 9) |
||
23 | </pre> |