RE: https://typo.social/@fontra/116183028572020334
This is quite an interesting and clever way to use #HarfBuzz to do shaping on the fly.
Here comes the neat trick; #Fontra registers a message callback function, which gets called before and after each lookup is applied, and whenever #HarfBuzz is about to apply a lookup that the generated code would have been inserted before, Fontra steps in and modifies the glyph buffer and apply its own positioning logic. Then later lookups will be applied by HarfBuzz and modify the glyph positions as it would have happened with a fully compiled font.
OK, it is a super nerdy and maybe a very few people can get why I’m so excited about it, but I’m really proud about it.
However, #Fontra does not generate positioning feature code during live preview, as it does the glyph positioning itself, while the rest of the shaping is done by #HarfBuzz (as explained in the blogpost).
So how would it do this emulation in the middle of lookup application by HarfBuzz?
HarfBuzz has a so-called message callback that allows caller to get a message about what HarfBuzz is doing and the HarfBuzz glyph buffer before each shaping step (this is what https://www.corvelsoftware.co.uk/crowbar/ uses to debug OpenType layout).
RE: https://typo.social/@fontra/116183028572020334
This is quite an interesting and clever way to use #HarfBuzz to do shaping on the fly.
> CFF2 fonts are still drawn as graphics, but next of version of HarfBuzz will support downgrading CFF2 to CFF after instancing, and I plan to use that when it is available.
#LibreOffice now uses the new support in #HarfBuzz 13.0.0 for downgrading CFF2 table to CFF when instancing variable fonts with CFF2 table.
CFF table is still concerted to Type 1 fonts by LibreOffice when embedding such fonts in PDF. Making it embed CFF table directly is left for another day...
I started working on #LibreOffice again, two new developments:
It now instances variable fonts when embedding in PDF instead of drawing the outlines as PDF vectors (using PDF Type 3 fonts), which is more efficient and allows the text to be rendered as fonts not graphics.
This uses #HarfBuzz subsetter under the hood, so while at it, I replaced most of LibreOffice’s ancient (CVE-happy) low-level font subsetting code, with HarfBuzz subsetter.
CFF2 fonts are still drawn as graphics, but next of version of HarfBuzz will support downgrading CFF2 to CFF after instancing, and I plan to use that when it is available.
"2025Q4 Fonts Quarterly": What I worked on so far this quarter: HarfBust solution, #HarfBuzz changes, logos, etc.
https://docs.google.com/document/d/1o9C7anw5_NHujvkamyjEqvzH4Xy3yUnJb2nt7A56D3w/preview
Thanks Google Fonts for financially supporting my work.
2025Q4 Fonts Quarterly behdadDecember 1, 2025 HarfBust HarfBuzz Sanitizer change Disable kern table for most shapers Backtrack/lookahead per-syllable matcher changes Mega-var-font drawing speedups HarfRust GoogleSansFlex / Roboto-Delta drawing perf measurements beyond-64k layout-ng Technical pr...
#HarfBuzz 12.0.0 is released with Variable Composites / Components (`VARC` table) technology enabled by default. Read more:
Evolution of #HarfBuzz shaping speed over four years, for four benchmarks. Lower is better.
https://docs.google.com/spreadsheets/d/1_sxJS6zmdpI_sNz5aUdsjThk40OB1Twjvqh4UORJWQg/preview
#HarfBuzz 11.5.0 is released, with support for Unicode 17.0.0.