Falk Joensson's
Eas (Easy Application Script)

Rendering 2D Drawings:09. Drawing Text

DRAW'TEXT:t x y sz ff st ra lh ta DRAW'TEXT:t x y (sz ff st ra lh ta) draws the text t centered at the point given by x and y with the font size sz either given in pixels or as a negative percentage relative to the current coordinate box in the font family ff (comma-separated list) optionally using a special style st st is a string /^[ibc]+$/i i = italic b = bold c = small-caps at the rotation angle ra, given in clockwise degrees with a line height factor of 0.5≤lh≤2 (only line breaks are supported) using the text alignment ta for multiline text (case-insensitive) "l" = left-aligned "c" = centered (default) "r" = right-aligned
DRAW'TEXT:t h x y ... before x,y you can use a relativeness prefix, see the last option under S Drawing Shapes DRAW'TEXT:t x y p ... after x,y you can change the text position by p p is a string /^([lcr][tmb]?|[tmb][lcr]?)$/i l = x is the left edge of the text c = x marks the horizontal center of the text r = x is the right edge of the text t = y is the top edge of the text m = y marks the vertical middle of the text b = y is the bottom edge of the text DRAW'TEXT defaults: t "Hello World!" x 0 y 0 p "cm" (i.e. centered, vertical middle) sz -90 (i.e. 90 %) ff "Verdana" st "" (i.e. no special styling) ra 0 (i.e. no rotation) lh 1 (i.e. standard line height) ta "c" (i.e. centered) DRAW'TEXT'WH:t sz ff st ra lh DRAW'TEXT'WH:t (sz ff st ra lh) returns ("w":width "h":height) in pixels for the text t (mandatory) formatted as described for DRAW'TEXT above, except that the size sz must be given in pixels (no relative percentage supported here) and cannot be omitted use DRAW'TEXT'WH to set the width and height of DRAW'TO when rendering text effects
09. Drawing Text
D Download Eas 4B
O Donate
C Contact
Esc Search / Table of Contents