Status Update: February 2025

Published on to joshleeb's blog

G’day!

This post marks one year of writing monthly status updates. That also means it’s been a year since starting this journey to create Ica, my own graphical code editor, and it’s precursor, Tera.

Last week I published a post with notes from my interview with Marcus Sterz, the creator of the MonoLisa font. It was a very interesting chat about font design and the design of MonoLisa specifically. Again, a huge thank you to Marcus for taking the time to have a chat.

On Tera, I completed the shaping, layout, and general clean up of the text module. This included adding a cache to store the shaping and layout results between frames which saw a very satisfying increase in FPS.

For text styling, I didn’t get to spend as much time as I would’ve liked this month so this will be one of my focuses for March. However, a milestone was a reached with the development of a spike to explore syntax highlighting.

Figure 1. Spike of Tera rendering text with syntax highlighting.

Color selection and determining what to highlight is handled by the syntect crate which produces a sequence of styles for each line. These styles are mapped into scene primitives which are rendered by the GPU.

The spike only supports colors even though syntect will provide details on whether a region should use bold and/or italic fonts. To support this I will need to make some changes to the shaping API.

Currently font selection in Tera is configured with a single primary font and a list of fallback fonts (e.g. emojis, math symbols, etc). If the primary font is missing a glyph, such as the Pride Rainbow Flag, then the fallback fonts are checked and a glyph from one of these is substituted in.

We still want this behavior, but we also want to allow selecting fonts for a region of each line in the buffer. This will make caching slightly more complicated but I really do want to render code comments in italics.

I’ve also spent some time this month playing around with OCaml. In particular, I’ve been exploring approaches to achieve ad-hoc polymorphism given the lack of type classes. This has ended up being a bit of a rabbit hole into programming-language and type theories that deserves a dedicated series.

That’s all for now, see you next month!