Text positioning

The text= renderer positions text fundamentally different than the textPs= renderer when applied to pre-sized layers (i.e. when size= is specified as well).

Self-sizing text=and textPs= layers have similar appearance and positioning.

The textPs= aligns the top of the character cell with the top of the text box (assuming \vertalt), even if it results in parts of the rendered text glyphs extending partially outside the text box boundary. Rendered glyphs of certain fonts may also protrude slightly beyond the left and right edges of the text box. For applications requiring all rendered text to be contained within the layer rectangle, the RTF \marg* commands or textFlowPath= can be used to adjust the text render area.

In contrast, text= shifts the rendered text as needed and guarantee that all rendered glyphs fit completely within the specified text box.

While text= may be slightly easier to use for simple applications, textPs= offers precise positioning independent of font faces and text effects.


The following examples are for pre-sized text. Behavior for self-sizing text is different.

** Text= always provides a narrow margin at the top:**

Text positioning example one image


** textPs= renders text tightly aligned to the top of the text box, which results in slight clipping, even for common fonts such as Arial®:**

Text positioning example two image


** text= automatically shifts rendered text down to avoid clipping:**

Text positioning example three image


** textPs= does not move text containing raised portions, resulting in significant clipping if the text is on layer 0:**

Text positioning example four image


A 10 pt (200 twips) margin at the top renders this text without clipping:

Text positioning example five image


Rendered glyphs of certain script fonts may significantly extend outside the text box:

Text positioning example six image


On this page