words on sand

from shri at drone-ah.com

07 Jun 2025

SVG To TVG

I am using dvui in a project and it uses TinyVG for its icon format.

While it sounds swell, most icons I could find were still SVG .

When I tried to use a standard SVG, I got the following errors:

warning(dvui): iconTexture Tinyvg error error.InvalidData rendering icon craft at height 16

warning(dvui): iconWidth Tinyvg error error.InvalidData parsing icon craft

I couldn’t find a lot of resources online on how to convert an SVG file into TinyVG.

On their website, under tooling , there are links with binaries for various operating systems.

I am not a fan of downloading binaries, but it seemed reasonable - maybe run it in a chroot or container to be safe.

It needed two steps:

Convert from SVG to TinyVG Text

1
./svg2tvgt <path-to-svg-file>

It will put the output in the same directory as the source file

Convert from TinyVG Text to Binary

1
./tvg-text -I tvgt -O tvg <path-to-tvgt-file>

It will output the binary tvg file in the same directory as the source

Repo & Status

The SDK Repo is using Zig 0.11 and hasn’t had an update in almost a year. There is a PR pending to update it to Zig 0.14, which has been waiting a month.

It doesn’t build on Zig 0.14 as it stands.

I worry that it might already be abandoned, but am hopeful that it will come back to life.