Previous:Surface of Revolution   Main Index   Next:Torus



Text

A text object creates 3-D text as an extruded block letter. Currently only TrueType fonts are supported but the syntax allows for other font types to be added in the future. The syntax is:

TEXT_OBECT:
text { ttf "fontname.ttf" "String_of_Text" Thickness, <Offset> [OBJECT_MODIFIERS...] }

Where fontname.ttf is the name of the TrueType font file. It is a quoted string literal or string expression. The string expression which follows is the actual text of the string object. It too may be a quoted string literal or string expression. See section "Strings" for more on string expressions.

The text will start with the origin at the lower left, front of the first character and will extend in the +x-direction. The baseline of the text follows the x-axis and decenders drop into the -y-direction. The front of the character sits in the x-y-plane and the text is extruded in the +z-direction. The front-to-back thickness is specified by the required value Thickness.

Characters are generally sized so that 1 unit of vertical spacing is correct. The characters are about 0.5 to 0.75 units tall.

The horizontal spacing is handled by POV-Ray internally including any kerning information stored in the font. The required vector <Offset> defines any extra translation between each character. Normally you should specify a zero for this value. Specifying 0.1*x would put additional 0.1 units of space between each character. Here is an example:

  text { ttf "timrom.ttf" "POV-Ray 3.1" 1, 0

    pigment { Red }

  }

Only printable characters are allowed in text objects. Characters such as return, line feed, tabs, backspace etc. are not supported.



Previous:Surface of Revolution   Main Index   Next:Torus