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


إنجاز رائع

كشخص أستخدم XeTeX في أحد الأعمال الأدبية التي أعدها للنشر، أريد أن أشكرك على الاهتمام بتطوير XeTeX ودعمه ليدعم اللغة العربية بشكل أفضل.
إني أتطلع لاستخدام الإصدارة الجديدة فهل توجد طريقة لتثبيته على أوبنتو 12.04 من دون الحاجة إلى تثبيته من المصدر؟
كذلك هل توجد خطة لتطوير دعم العربية في الحزم لاتك من مثل في حزم تنسيق العناوين و التنسيقات العامة والتي تتوفر بشكل أفضل للغة الإنجليزية؟

إذا كنت تستخدم TeX Live من

إذا كنت تستخدم TeX Live من TUG بدلا من حزم التوزيعة (و هذا ما أنصح به فحزم أوبونتو أحيانا تكون متأخرة عدة سنوات)، فيمكنك استخدام مستودع TLContrib المشار إليه في المقالة لتثبيت حزم جاهزة (يستخدم TeX Live مدير حزم خاص به مستقل عن التوزيعة و نظام التشغيل).

لا أستخدم لاتك شخصيا هذه الأيام، لكن أظن الإصدارات الأخيرة من حزمة bidi تدعم الكثير من حزم لاتك، و لو واجهتك أي مشكلة راسلني فقد يكون حلها سهلا.

من المشاكل المتعلقة بالعربية التي لم تحل في هذه الإصدارة مشاكل تلوين النص العربي و استخدام الروابط فيه، كنت طورت حلا للمشكلة لكن قررت ألا أدرجه في هذه الإصدارة إذ كانت له مشاكل جانبية أخرى، و نعمل حاليا على حل أفضل.

أوه، كنت أظن أن مشكلة الروابط

أوه، كنت أظن أن مشكلة الروابط قد حلت في هذه الإصدارة، وكنت متشوق لاستخدامها. على العموم أتمنى لك مزيد التقدم في مسعاك.

يمكن أن أرسل لك النسخة التي

يمكن أن أرسل لك النسخة التي تحل هذه المشكلة إن كنت تحتاجها `:)`

كبير يا كبير!

كبير يا كبير!

شكر الله لك مساعيك في خدمة

شكر الله لك مساعيك في خدمة اللغة العربيّة...
هل تحلّ هذه الإصدارة مشكلة الـتّشكيل المتعدّد التي توجد في الخطوط المصحفيّة والتي أشرت إليها في موضوع قديم؟؟؟
شكرا مرة أخرى

شكرًا لك. آسف، لا أذكر مشكلة

شكرًا لك.

آسف، لا أذكر مشكلة التشكيل، أيمكن أن تذكرني بها؟

Hebrew support

Hey Khaled,
Can you please help me test it with Hebrew?

Kind regards,
Yaron Shahrabani.

What kind of testing you are

What kind of testing you are interested in?


محتويات هذا الحقل سرية ولن تظهر للآخرين.
هذا السؤال للتأكد من أنك زائر حقيقي ولمنع السخام.
1 + 6 =
حل هذه المعادلة الرياضية البسيطة وأدخل الناتج. مثلا: إذا كان السؤال 1+3 أدخل 4.