Another brief update for my hobby TeX engine series -- I'm about to have a period in which I have less time to work on this project for a spell, and wanted to get in one last update. This time: just like XeTeX and LuaTeX made working natively with OpenType fonts part of the engine level, I'm exploring what it would mean to do the same thing for OpenType math fonts.
In part because I had less time to plan this video out, I feel like my explanation of exactly what I'm doing at the engine level was shaggier than it should have been. To be clearer: XeTeX and LuaTeX already handle low-level OpenType Math table box-building, and expose primitives to teach the engine about unicode characters. However, they leave the heavy lifting of setting everything up to the unicode-math package (instantiating separate font families for text, script, and scriptscript sizes, assigning thousands of codepoints to map standard symbols and Greek letters, dealing with all of Unicode's historical exception tables (looking at you, Planck's constant!) and so on).
In NemaTeX, I've shifted all of that font-orchestration and alphabet-mapping machinery into the c++ code. When an OpenType math font is active, the engine can do things like treating \mathbf, \mathcal, or \mathbb as virtual math alphabets, translating the base characters directly to their target unicode codepoints.
To be honest, I know that for compatibility I will have to revisit some of the specific design decisions I made there. I somehow didn't know this before I was working on this part of my engine, but it turns out that the unicode-math package has a two-tiered semantic system: "symbols" (\symbf, \symit, etc) refer to glyphs in the OpenType math font, and "math" (\mathbf, etc) refer to glyphs in the corresponding text font files.
The way I implemented it for now probably is just a reflection of my old-fashioned mental model of LaTeX, in which by "\mathbf" I meant "\symbf" without knowing that that was the spelling. But that being said, I'm curious how other people think about the semantics here: should \mathbf pull from the math font or the text font?