explaingit

buleeto/runa

19OdinAudience · developerComplexity · 5/5ActiveLicenseSetup · hard

TLDR

A v1.0 text rendering engine in pure Odin that shapes any-script text (Arabic, Indic, Thai, emoji) byte-for-byte against HarfBuzz with no C dependencies.

Mindmap

mindmap
  root((Runa))
    Inputs
      Unicode strings
      Font files
      Layout direction
    Outputs
      Shaped glyphs
      Bitmap or vector data
      PPM images
    Use Cases
      Render text in a game
      Support Arabic and Indic scripts
      Draw colour emoji
      Replace fontstash plus stb_truetype
    Tech Stack
      Odin
      Unicode
      COLRv1
      raylib

Things people build with this

USE CASE 1

Replace fontstash plus stb_truetype in a game or app to get proper Arabic, Indic, and Thai text rendering

USE CASE 2

Draw COLRv1 colour emoji with linear, radial, and sweep gradients in an Odin project

USE CASE 3

Wrap Thai paragraphs at correct word boundaries using the built-in 62k-entry dictionary

USE CASE 4

Render right-to-left and bidirectional text that matches the Unicode reference one hundred percent

Tech stack

OdinUnicoderaylib

Getting it running

Difficulty · hard Time to first run · 1h+

Needs an Odin toolchain plus raylib for the live demo, and there is no build script, you import the packages directly into an Odin project.

zlib license, free to use and modify in commercial or closed-source projects with minimal attribution, bundled Unicode data under the separate Unicode-DFS-2016 license.

In plain English

Runa is a text rendering engine written entirely in Odin, a relatively young systems programming language. Its job is to take a string of characters in any language, look up the right shapes from a font file, place them correctly on a line, and hand the result to a graphics renderer to draw. The project ships at version 1.0.0 and the author has frozen the public interface so callers can rely on it. The author wrote Runa first to replace the text stack inside another of their projects, a game or app called Skald, which previously combined two older C libraries called fontstash and stb_truetype. The README argues that older combination only handles Latin text at small sizes and cannot deal with Arabic letters that join together, Indian scripts that combine consonants into stacked clusters, Thai clusters, right-to-left layout, line breaking by Unicode rules, colour emoji, or modern font features like ligatures and contextual alternates. Runa is the long-term fix for all of those gaps and has no C dependencies. The v1.0 status section lists what is covered: bidirectional text matches the Unicode reference at one hundred percent, grapheme cluster handling is complete, colour emoji using the COLRv1 table works with all twenty-eight composite blend modes from the W3C specification and with linear, radial, and sweep gradients, and shaping is verified byte-for-byte against the well-known HarfBuzz library for Devanagari, Bengali, Gujarati, Kannada, Odia, Tamil, Telugu, Malayalam, Gurmukhi, Thai, Lao, Khmer, and Myanmar. A built-in Thai word-break dictionary of around sixty-two thousand entries lets Thai paragraphs wrap at word boundaries. The library is just a set of Odin packages, so there is no build script. The README shows commands to type-check the library, run parser, rasterizer, and integration tests, and run two demos: a headless one that writes a PPM image file, and a live window demo that uses the raylib library. The licence is zlib, with bundled Unicode data files under the Unicode-DFS-2016 licence.

Copy-paste prompts

Prompt 1
Walk me through importing Runa into a small Odin project and rendering one Arabic and one Devanagari paragraph
Prompt 2
Run the headless PPM demo and the raylib live-window demo, then explain what each one is testing
Prompt 3
Show me how Runa's COLRv1 colour emoji pipeline handles a gradient-filled emoji compared to a flat bitmap one
Prompt 4
Wire Runa into a raylib game loop as a drop-in replacement for fontstash and stb_truetype
Prompt 5
Verify a sample Tamil string shapes byte-for-byte against HarfBuzz using Runa's existing test harness
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.