4 ms·
Allsorts: font parser and shaping engine implemented in Rust
- j88439h84 7y agoCool. Are you in contact with the Runebender devs at all? https://github.com/linebender/runebender https://github.com/linebender/runebender
- chrismorgan 7y agoYes, they’re in contact on https://xi.zulipchat.com/ https://xi.zulipchat.com/.
- raphlinus 7y agoYes, we've been in touch, and I'm really excited to see this.
- riquito 7y agoSo cool, I was going to ask what was the relationship with something like pathfinder [1], but you already addressed it in your github README. Thanks for contributing in this space [1] https://github.com/servo/pathfinder/blob/master/README.md https://github.com/servo/pathfinder/blob/master/README.md
- imoldfella 7y agoHow does this compare to harfbuzz?
- mikeday 7y agoHarfBuzz is more complete (supports more scripts) and higher performance (we assume, haven't benchmarked yet), but the large C++ codebase can be a little intimidating to dive into. We plan to extend Allsorts to reach feature parity with HarfBuzz, so it will be an interesting comparison of tackling a complex problem in Rust!
- xvilka 7y agoThis would certainly be beneficial for the XeTeX "oxidation" efforts[1] for fonts parsing and shaping[2]. There is also a number of existing alternatives: font-kit[3], Skribo[4], RustType[5], ttf-parser[6]. Some of them are just parsers, some - font shapers. Still all of them are relevant to the subject. [1] https://github.com/crlf0710/tectonic https://github.com/crlf0710/tectonic [2] https://github.com/crlf0710/tectonic/issues/117 https://github.com/crlf0710/tectonic/issues/117 [3] https://github.com/servo/font-kit https://github.com/servo/font-kit [4] https://github.com/linebender/skribo https://github.com/linebender/skribo [5] https://gitlab.redox-os.org/redox-os/rusttype/ https://gitlab.redox-os.org/redox-os/rusttype/ [6] https://github.com/RazrFalcon/ttf-parser https://github.com/RazrFalcon/ttf-parser
- pcwalton 7y agoGreat to see more work in this space. Diversity of font parsing and shaping engines is important to make sure the ecosystem doesn't become reliant on bug-for-bug compatibility with the existing engines. (It's dangerously close already, due to the quirks of DirectWrite, GDI, and FreeType.)
- wezm 7y agoYes, this was definitely part of the motivation for embarking on this project.
- bjz_ 7y agoYeah! This was a big reason why we've invested in funding the work on https://github.com/n8willis/opentype-shaping-documents/ https://github.com/n8willis/opentype-shaping-documents/ - hopefully this makes the barrier to entry to building font shaping engines a little lower for newcomers, and gives us a place to document findings, separate from any single implementation.
- jeltz 7y agoHave any bugs been discovered and reported in the other implementations due to this work?
- adrianwongy 7y agoNot bugs per se, but a couple of improvements were fed back to HarfBuzz's Indic shaper. The first was a minor optimisation to the final reordering of pre-base matras; the second was an adjustment to the output of the Indic table generator.
- pcr910303 7y agoObligatory article: Text Rendering Hates You [0][1] [0] https://gankra.github.io/blah/text-hates-you/ https://gankra.github.io/blah/text-hates-you/ [1] https://news.ycombinator.com/item?id=21105625 https://news.ycombinator.com/item?id=21105625
- devit 7y agoI'm curious about why they decided to develop Allsorts instead of just using Harfbuzz.
- wezm 7y agopcwalton captures it pretty well in a comment above: https://news.ycombinator.com/item?id=21580718 https://news.ycombinator.com/item?id=21580718 that and wanting to have an implementation in a memory safe language that might prove useful to others.
- earthboundkid 7y agoI used Prince for everything I wrote in grad school. A truly beautiful PDF maker. It's cool that they're releasing part of it.