OgEx.Renderer.Takumi (og_ex v0.3.0)

Copy Markdown View Source

Native Takumi implementation of OgEx.Renderer.

Filesystem and HTTP work happen before this module is called. The renderer receives verified image buffers under the source strings used in the HTML. Native layout and encoding run on Rustler's dirty CPU scheduler.

Summary

Functions

Renders an HTML document using Takumi.

Functions

render(html, options)

Renders an HTML document using Takumi.

Options:

  • :width — required viewport width
  • :height — required viewport height
  • :format:png, :jpeg, :webp, or :svg; defaults to :png
  • :fonts — loaded font binaries; defaults to an empty list
  • :images — source strings mapped to encoded image bytes; defaults to an empty map

Takumi requires at least one valid font for generated-card rendering.