fonts

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).

So this week a beta version of XeTeX 0.99991 series have been released including the HarfBuzz, Graphite2 and Core Text ports and many other bug fixes (check the release notes).

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.


  1. XeTeX version numbers are asymptotic to 1 (just like TeX version numbers being asymptotic to π), so the next stable version will not be 1.0 but rather 0.99991 :) 

Amiri font v0.103

A new bug fix release of Amiri font. Release note: English, Arabic.

Amiri font v0.102

Another Amiri font release:

Amiri font v0.101

Another Amiri font release in less than month (release early, release often ;). The main feature of this release is brand new bold and bold slanted fonts, so now we cover the four common styles, though more work on polishing them still needed. Check News file for more detailed changes of this release (Arabic, English)

Amiri font v0.100

Yet another Amiri font release with yet another jump in version number, this time to mark the move from alpha stage to beta stage :) (my versioning scheme makes no sense, but so is life).

Amiri font v0.016

Yet another developmental release of Amiri font, this time featuring a, more or less, complete Quranic support, which fixes the last major issue with the font, and I think it is only a couple of more alpha releases before it is ready to enter beta stage.

The start of Baqara chapter

KacstOne font v5.0

Just released version 5.0 of KacstOne font, the new release features a new bold version of the font, it should also be possible now to copy text from PDF files using KacstOne, also the problematic kern feature have been removed as it was causing more problems (both Qt and OpenOffice have bugs in handling of right to left kerning) and a simplistic font like KacstOne can do without kerning at all (I had to fix the advance widths of certain glyphs the needed kerning more). Download it from SourceForge.

FF embolden v. mine II

FF embolden v. mine II

FF embolden v. mine

FF embolden v. mine

Amiri font v0.015

Another developmental release of Amiri font, marking a major developmental milestone.

Amiri was developed using a novel, and natural, approach of separating dots from base of the glyph and treating them as diacritical marks (which what they really are), this allowed much more flexibility than the more conventional approach of treating the dot and its base as a whole.

In the early developmental stages things were fine, but as the need for more complex tasks surfaced, things were getting exponentially harder and harder and it become clear that OpenType is not ready for this kind of development, and in the last few months I've been hitting the limits of OpenType as spec'd as well as hitting bugs in almost all OpenType implementation, essentially tying my hands from using more advanced (but less tasted) parts of the spec.

So I, regrettably, decided to revert to more conventional and well tried OpenType techniques. As a side effect there is now a one to one mapping between characters and glyphs in its various contextual forms (I'm still avoiding ligatures like plague). This fixes a whole lot of bugs and allows the font to work with more OpenType implementation, on the other hand number of glyphs grew by a factor of 7 and file size got tripled.

With this new turn, the font is ready to move into beta stage, and next release is likely to be the last alpha.

لَقِّم المحتوى