FreeBSD Manual Pages
render_text(3) Arcan Lua API render_text(3) NAME render_text - Convert a format string to a new video object. SYNOPSIS vid, lineheights, width, height, ascent render_text( dststore, message, vspacing, tspacing, tabs ) DESCRIPTION Render a format string into a texture assigned to a new video object. Return this object along with a table of individual line-heights. The optional dststore can be used to update a previous result from ren- der_text, which cuts down on costs for dynamic allocation and recreat- ing or rebuilding related vid hierarchies, with the caveat that custom texture coordinates from cropping and similar operations may still need to be reapplied. Render behavior varies with the type of message , which can be string or a n-indexed table of strings. Anything else is a terminal state transition. If message is a string, all contents will be treated as a format string which is dangerous with user supplied content as escaping and dynamic string construction is costly. If mes- sage is a table of strings, strings at odd indices will be treated as format strings and even indices are treated as raw UTF 8. Vspacing in- dicates the default padding between lines, and tspacing the horizontal spacing between tabs. If vspacing is set to nil or 0, the added padding will be taken from the font. Each formatting sequence is initi- ated with a single backslash, followed with a command code (see table below). Stateful commands (b, i, u) can be negated with a preluding ex- clamation point. NOTES 1 Some format string states carry over between render_text calls, such as the currently active font/size (to cut down on ont- file.ttf,num style preludes. 2 returned width and height does not necessarily match the values returned by text_dimensions 3 Pfname,w,h function clamp to a built in limit (typically 256x256). SEE ALSO: text_dimensions(3) image April 2025 render_text(3)
NAME | SYNOPSIS | DESCRIPTION | NOTES | SEE ALSO:
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=render_text&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>