The core implementation of the TTF parsing and drawing is in L1526-L1846 with another small bit at L3205-L3274 of src/canvas_ity.hpp.
It's something of a toy implementation that only supports western left-to-right text, and doesn't do any hinting at all, nor kerning, nor shaping. But it's enough to draw a basic "Hello world!" using any typical TTF file.
The test suite in test/test.cpp L84-304 embeds a few custom Base64-encoded TTF files. They're small and only have a few glyphs but they do exercise a number of interesting edge cases in the OpenType TTF spec [2]. Have a look at the HTML5 port of the test suite at test/test.html in different browsers to see how their canvas implementations render those fonts.
[0] https://github.com/a-e-k/canvas_ity
[1] https://www.w3.org/TR/2015/REC-2dcontext-20151119/
[2] https://standards.iso.org/ittf/PubliclyAvailableStandards/c0...
In terms of the actual TTF bit, if you pull out everything needed it's probably somewhat bigger than what I already have, but that's because libschrift and my Ruby translation does tesselation and rasterisation that's doing the very barest minimum needed for the basic TTF rendering and yours is far more generic (and let's face it: fancier/more featureful in a good way) rendering of the polylines.
I've already half-wanted to pull that out of my Ruby port anyway and doing a basic canvas, so I might just look to yours for inspiration on doing that in a way that can be reused if I get the urge to extend it further later.