A newer version of Max is available. Click here to access the latest version of this document.

jit.gl.text3d

Write vector text

Description

The jit.gl.text3d object requires one argument: the name of a drawing context. A named drawing context is a named instance of a jit.window, jit.pwindow, or jit.matrix object that has an instance of the jit.gl.render object associated with it. This value may also be set via the OB3D drawto attribute.

The jit.gl.text3d object lets you draw 3D text in the named drawing context. According to the OB3D attributes, the text can be drawn solid or wireframe, with different colors and textures, etc. The text which is drawn can be sent as a symbol, a list of symbols, or as a jit.matrix containing char data. When a jit.matrix is used to send the text, each row of the matrix is interpreted as one line of text.

Because jit.gl.text3d creates GL geometry by reading the TrueType glyphs directly, only fonts which are stored explicitly in the TrueType format will draw. Attempting to read Type1 fonts and bitmap fonts will generate an error.

Notes:

Setting the depth attribute and sending the methods font and face each cause the font to be rebuilt from the TrueType outlines, which is a slow operation, on the order of a second.

Only True Type outline fonts are supported

Information for Jitter 3D Object (OB3D) messages and attributes to this object

Messages

append text-to-append [list]
Appends the specified symbol or list to the stored text string.
face face-variant [list]
Specifies the face variant of the current font. One or more face variants may be specified. The Supported font faces are normal, bold, italic, underline, outline, shadow, condense, and extend.
font fontname [symbol]
size [int]
Specifies the font and size in which to draw.
style Equivalent to face.
text text [list]
Replace the current text string with a symbol or list of symbols.

Attributes

Name Type g/s Description
align int Text alignment mode (default = 0 (left))
0 = left
1 = center
2 = right
depth float The depth (z extent) of the 3D geometry relative to the height of the font (default = 0.) If a depth of 0 is used, no extruded character sides are generated, which will draw much faster.
floatchomp int Toggles floating-point precision rounding.
floatplaces int When float point precision rounding is enabled set via the floatchomp attribute, this value sets the precision of the number.
leadscale float The leading between multiple rows of text as a multiple of the standard leading. (default = 1.)
plane int The plane of a multi-plane char input matrix which will be interpreted as text. (default = 0)
precision float Sets the precision of the quadratic curve calculation [0 ->inf], The default is 1.0
tracking float The tracking (intra-character spacing) as a multiple of the standard tracking for the face. (default = 1.)

Information for box attributes common to all objects

Examples

See Also

Name Description
jit.gl.graph Open GL floating-point data visualization
jit.gl.gridshape Generate simple geometric shapes as a connected grid
jit.gl.handle Use mouse movement to control position/rotation
jit.gl.isosurf Generates a GL based surface extraction
jit.gl.mesh Generates GL geometry from existing data
jit.gl.isosurf Generates a GL based surface extraction
jit.gl.mesh Generates GL geometry from existing data
jit.gl.model Read and draw Wavefront .obj models
jit.gl.nurbs Generate NURBS surface
jit.gl.plato Generate platonic solids
jit.gl.render Render Open GL
jit.gl.shader Manages a GL shader
jit.gl.sketch GL parallel to lcd
jit.gl.slab Performs a GL accelerated grid-based evaluation
jit.gl.text2d Write bitmap text
jit.gl.texture Manages a GL texture
jit.gl.videoplane GL accelerated video plane
jit.gl.volume Creates a GL accelerated volume vizualization
Tutorial 30: Drawing 3D text Tutorial 30: Drawing 3D text