XeTeX ported to HarfBuzz (and more)
XeTeX is an modern extension of TeX typesetting engine that supports Unicode, modern font technologies (OpenType and Graphite, plus AAT on Mac OS X) and many other goodies for multilingual and complex script typesetting.
XeTeX was written and maintained by Jonathan Kew, but lately he had less time for maintaining it. Last year I started to partially maintain XeTeX, supported by TUG, originally intending to mainly look after issues in OpenType math support, and my first release was 0.9998 (for TeX Live 2012) with fixes to some long standing OpenType math issues.
Late last year, after giving up on my attempt to port LibreOffice to HarfBuzz, I decided to port XeTeX instead. Both LibreOffice (and OpenOffice before it) and XeTeX were using the ICU LayoutEngine library to do OpenType layout, but it is no longer being maintained for quite sometime now, with bugs and even regressions left unfixed, not to mention support for new features. XeTeX was even used a locally patched version of it to handle many features not supported upstream. HarfBuzz, on the other hand, is an actively maintained, feature rich library with a versatile API and a very cooperative developers (I got at least a couple new API calls for my XeTeX needs, not to mention regular bug fixes), and is used by many high profile free software projects (though it lacks documentation, but hey, who needs documentation, one can always read the code or ask on the mailing list
:)). The HarfBuzz port went smooth and in a few weeks we had a new version of XeTeX no longer using a patched ICU library (we still use ICU for other stuff like input encodings, bidirectional algorithm and locale sensetive line breaking), followed by a few months of bug fixes, re-factoring and code removal, so we ended up with more functionality and less code (yay).
XeTeX also supports Graphite font technology, but it was using the first generation Graphite engine, but in the meantime a new faster and more robust engine has been developed. While working on the HarfBuzz port, Martin Hosken (Graphite developer) approached me about upgrading XeTeX to the new library, and since HarfBuzz already have a Graphite2 backend I found it would be easier to use it, so I did just that, and ported our other uses of the old Graphite API (line breaking, querying font features etc.) to directly use the new Graphite2 API, with big help from Martin and other Graphite hackers.
Few months earlier to all this, Jiang Jiang started porting XeTeX on Mac from the long deprecated ATS/ATSUI font APIs (which Apple didn’t even provide on their 64-bit systems) to the new Core Text ones, and I kept bothering him asking when the port will be finished so he finished it, probably just to get rid of me. Since I didn’t have a Mac machine (not being a fan of Apple), I couldn’t do much work on the Mac code except remotely which boiled down to just making sure that XeTeX keeps building on Mac. After knowing about the long awaited Core Text port, TUG offered to buy me a Mac machine through the MacTeX fund so that I can maintain XeTeX on Mac, I wasn’t very enthusiastic about idea at the beginning (naturally), but after all XeTeX started on Mac and has a large user base there and, like it or not, I have to support them, so I sold out and acquired a so-called “MacBook Pro” laptop with a so-called “Retina” display (which I’m not using to write this blog post).
So at last I have a TeX engine that can showcase all features of Amiri font (time to find something serious to typeset).
Sources can be downloaded from SourceForge page, users of TeX Live can install binaries for several platforms from TLContrib repository, and final versions should be included in the upcoming TeX Live 2013 release.