Write bitmap text


The jit.gl.text2d 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.text2d object lets you draw bitmap text in the named drawing context. 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, each row of the matrix is interpreted as one line of text.


Due to differences in implementation, the rotate, scale, screenmode, classic, and interp attributes are currently only supported on Macintosh. On PC, it behaves similar to when classic mode on Macintosh is turned on.

On Macintosh, this object interprets the input text as Unicode, allowing the display of non-Roman fonts. The Unicode encoding to use is determined based on the current font, set using the font message, and the operating system's script system and region code settings.

Note: The Windows version of this object does not suport Unicode.

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


append text-to-append [list]
Appends the specified symbol or list to the stored text string.
classic classic [int]
Macintosh only
When classic mode is enabled, the characters are drawn using the glBitmap mechanism in the OpenGL machine. This produces characters which are not antialiased and cannot be rotated or scaled. On PC, this is the only supported behavior, and there is no possibility to turn on/off.
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, and italic. Note that some fonts do not contain different faces.
font fontname [symbol]
size [int]
Specifies the font in which to draw. An optional size parameter can follow the font.
size size [int]
Specifies the size in which to draw.
text text [list]
Replaces the current text string with a symbol or list of symbols.


Name Type g/s Description
align int Alignment for rows of text. (default = 0 (left))
0 = left
1 = center
2 = right
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.
interp int Macintosh only
Controls whether interpolation is used to draw textures when not in classic mode. (default = 1)
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)
screenmode int Macintosh only
If screenmode = 1, some 3D transformations are skipped so that pixel-accurate text can be drawn. The origin of the text on screen is determined by the usual projection of the object's position, but the text remains the same size. Rotation is only applied around the z axis. Screenmode is useful for making fixed-size labels which follow objects in space. With screenmode off, the text is transformed in space in the usual way for an OB3D-group object. (default = 1)
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


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.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.text3d Write vector text
jit.gl.texture Manages a GL texture
jit.gl.videoplane GL accelerated video plane
jit.gl.volume Creates a GL accelerated volume vizualization