I have been working on a text layout engine to display rich text. I'm calling it Scripz, here is a big milestone for it:

See online demo here: https://hollinwilkins.com/scriblz/example.html
Source code here: https://codeberg.org/scriblz/scriblz/src/branch/main/scripz.h

  • Fully implemented Unicode Bidirectional Algorithm: https://unicode.org/reports/tr9/
    • This includes overrides and isolates (something kb_text_shape.h does not support out of the box)
    • Everything that kb_text_shape.h supports, as that is the shaping powering this layout engine
  • Font families + fallbacks
  • Font weight
  • Italics
  • Multi-language support (part of BIDI)
  • User-defined styling of text via userdata and tag hooks (see example for lots of different painting techniques when integrated with Scriblz)
  • Fast Reflow: shaping happens only when text content changes. When width changes, no shaping needs to happen, and you still get all of the bidirectional text layout features
  • Simple API: see attached code of the examples