Settings

Theme

Show HN: Tatfi – A Font Parser in Zig

sr.ht

3 points by asibahi 4 months ago · 0 comments · 1 min read

Reader

Hello

I am currently unemployed so I am filling my time porting Rust libraries to Zig. This is a port of ttf_parser [1] which is used by almost the entire Rust ecosystem.

The port is not complete yet, but I think there is enough utility there to build shapers and rasterizer on top of it just fine.

Just like the Rust original, `tatfi` is almost stateless, almost allocation-free, and aims to be completely safe and panic free. Obviously Zig does not have the same safety guarantees as Rust, but I tried my best. It does help that there is almost no allocation in the library.

There is still need to add tests (port the tests), and I will work on those as soon as I finish the API surface.

[1]:https://docs.rs/ttf-parser/latest/ttf_parser/

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection