Putting text on screen usually means gluing four libraries together: one parses fonts, one shapes scripts, one rasterizes, one subsets. daegun is all four in a single crate that depends on nothing. It shapes Arabic, Devanagari, Khmer and 90+ more scripts, rasterizes on the CPU or the GPU, and cuts an 8 MB font down to 12 KB. Unsafe is forbidden in every parser and the compiler enforces it. A C ABI sits beside the Rust API, not behind it, and the whole thing is no_std.
It started from a small annoyance. Putting text on screen means assembling a stack: one library reads the font, another shapes the script, another draws it, another subsets it. Each drags in its own dependencies, and they do not always agree with each other about what a glyph is.
daegun is all four in one crate that depends on nothing at all. Unsafe code is forbidden in every parser, and the compiler enforces that rather than my discipline, because a font file is data from strangers.
Most of the work went on scripts that do not behave like Latin. Arabic letters change shape depending on their neighbours. Devanagari vowels are typed after the consonant and drawn before it. Khmer stacks subscripts underneath. Getting those right is the whole job.
One detail I am fond of: the first image in the gallery was rendered by daegun. The wordmark, the tagline, all four scripts. The poster and the product are the same thing.
If you have ever fought text rendering, I would like to hear what broke. That is most of what the last stretch has been.
Hi PH, I'm Taeha. I built daegun on my own.
It started from a small annoyance. Putting text on screen means assembling a stack: one library reads the font, another shapes the script, another draws it, another subsets it. Each drags in its own dependencies, and they do not always agree with each other about what a glyph is.
daegun is all four in one crate that depends on nothing at all. Unsafe code is forbidden in every parser, and the compiler enforces that rather than my discipline, because a font file is data from strangers.
Most of the work went on scripts that do not behave like Latin. Arabic letters change shape depending on their neighbours. Devanagari vowels are typed after the consonant and drawn before it. Khmer stacks subscripts underneath. Getting those right is the whole job.
One detail I am fond of: the first image in the gallery was rendered by daegun. The wordmark, the tagline, all four scripts. The poster and the product are the same thing.
If you have ever fought text rendering, I would like to hear what broke. That is most of what the last stretch has been.