Skip to main content
otter-render records drawing commands and rasterizes them on the CPU. Import leaf modules such as otter_render.surface, otter_render.command_list, and otter_render.quad_renderer.

Rendering boundary

  • Surface owns pixels or a mapped pixel region.
  • CommandList(N, M) owns bounded commands and string storage.
  • ImageHandle identifies an image in an ImageSource; it is not a pointer.
  • TextContext lends the font and optional shaping resources during rasterization.
  • Scale carries exact Q8 scale independently of the integer ceiling.
Fonts use FreeType and HarfBuzz. otter_render.bidi implements bidirectional layout without itijah.

Lua

otter_render_lua registers otter.render with no capability requirement. measure(text, size, scale?) measures logical text width. image_size(bytes) inspects encoded image dimensions. This module does not load files or expose a native command-list object to Lua; drawing uses the UI/SD bindings.

Reference pages

Source reference

otr/otr.toml, otr/ in the component repository.