Add a new function LSL function named
llRenderText
or similar, which allows users to dynamically render text, with limited but flexible formatting, onto the face of their choosing.
Concept:
// Signature
llRenderText(integer face, string text, list params);
// Basic example
llRenderText(ALL_FACES, "Lorem ipsum...", [
FONT_ALIGN, "right",
FONT_WEIGHT, "bold",
FONT_FAMILY, "sans serif"
]);
Rationale
Text is ubiquitous, yet Second Life has no way for users to display text other than uploading a texture, setting floating text using
llSetText
, or using relatively resource intensive solution such as XyText/Furware/et al. This absence precludes interesting features, such as being able to create a responsive interactive terminal in Second Life, HUDs with dynamic text, etc.
A scripted and efficient text solution that displays on the face of a prim/mesh would give Second Life the biggest bang for the buck:
  • Limited in scope (easier to implement than grand UI-creation ideas)
  • Easy to kitbash into existing and new creations
For inspiration, you can look to how the Text Display widget is implemented in the Playstation game Dreams. It has limited options: a finite number of fonts and formatting options, but the fact that it can be combined with other content makes it rather powerful.
Other details
  • Font color, opacity, glow, etc are controlled by prim properties (Example: setting face color to red sets font color to red)
Questions
  • Should the background always be transparent? Creators could put another prim behind the text display face to give it a background, or it could be a property of the render params.
Possible Parameters
FONT_WEIGHT
FONT_STYLE
FONT_FAMILY
FONT_VERTICAL_ALIGN
FONT_HORIZONTAL_ALIGN
FONT_TEXT_WRAP
FONT_LINE_HEIGHT
FONT_SIZE
Possible Features
  • Markdown / rich text