iText

Release pdfCalligraph 5.1.0

Release date: 

pdfCalligraph is our iText Core add-on for Java and .NET that provides advanced typography for complex writing systems, enabling correct shaping, positioning, and line-breaking for non-Latin scripts.

This is a significant release for pdfCalligraph — three new writing systems are now supported, and Arabic script rendering has been substantially improved. These additions are part of our ongoing initiative to broaden pdfCalligraph's regional coverage for enterprises with global presence but local adoption needs.

As noted in the iText Core 9.7.0 release notes, we also added an informational warning log message when text requires the pdfCalligraph add-on for correct rendering but pdfCalligraph is not available. This will help developers identify rendering issues early in development.

Sinhala Script Support

Sinhala is the writing system used for the official language of Sri Lanka, spoken by over 16 million people. Despite being an Indic script with processing similarities to other scripts we already support, Sinhala has its own unique reordering and shaping rules that required dedicated implementation work.

pdfCalligraph now correctly handles Sinhala glyph clustering, reordering, and the application of required OpenType GSUB/GPOS features. The implementation has been validated against the latest HarfBuzz shaping engine output using both Noto Sans Sinhala and Noto Serif Sinhala fonts.

Tibetan Script Support

Tibetan is used for writing the Tibetan language as well as Dzongkha (Bhutan) and several other Himalayan languages. This was a customer-requested feature. While Tibetan doesn't require complex Unicode sequence pre/post-processing, it relies heavily on diacritics/marks and requires several OpenType GSUB/GPOS features (ccmp, blwf, abvs, blws, abvm, blwm, mkmk) to be applied in the correct order, along with custom line-breaking rules.

The implementation includes:

  • Full OpenType feature application for correct glyph shaping

  • Tibetan-specific line-breaking rules (breaks permitted after the tsheg ༌ separator and shad ། punctuation marks)

  • Correct text extraction with /ActualText inline marked content sequences

S'gaw Karen Language (Mon-Burmese Script)

S'gaw Karen is a Sino-Tibetan language spoken by approximately 3 million people, primarily in Myanmar and Thailand. This was originally requested by a customer. While S'gaw Karen uses the Mon-Burmese script family (which overlaps with Myanmar), it has its own diacritic placement rules that were not previously handled correctly.

The implementation includes proper glyph clustering and reordering, correct GPOS lookup table application (including Type 1 Single Adjustment and Type 3 Cursive Attachment), and ICU-based line breaking for the Myanmar script family.

Arabic Script Improvements

A long-standing collection of Arabic rendering issues has been resolved in this release:

  • ccmp (Composition/Decomposition) feature support: Arabic shaping now correctly applies the ccmp OpenType feature, which is a prerequisite for many Arabic fonts to render correctly. Previously, this feature was not being applied for Arabic scripts.

  • Multiple lookup table processing: Only the first lookup table for fina, medi, and init features was being applied. All lookup tables are now processed in order, as required by the OpenType specification.

  • Diacritic positioning fixes: Several long-standing bugs with Arabic diacritic placement have been resolved — including incorrect positioning of the double consonant (shadda), damma, and fathatan marks. The rlig and Arabic positioning features are now applied on the whole glyph line rather than word-by-word.

  • Urdu font exceptions: An IllegalArgumentException and ArrayIndexOutOfBoundsException that could occur with certain Urdu fonts (including newer versions of Noto Naskh Arabic from Google Fonts) have been fixed.

GPOS Lookup Table Extensions

Support for GPOS lookup table Type 1 (Single Adjustment) subformat 2 and Type 3 (Cursive Attachment) has been added. These table types are used by many complex scripts for precise glyph positioning, particularly in cursive and connecting scripts.

Don't forget that aside from being a very useful add-on to iText Core by itself, you can also use pdfCalligraph in combination with pdfHTML.

Downloads

Changelog

New features

  • DEVSIX-9354 – Support Sinhala script

  • DEVSIX-9904 – Support Tibetan script

  • DEVSIX-9356 – Support S'gaw Karen language in Mon-Burmese script

  • DEVSIX-2010 – Support GPOS lookup table Type 1 (Single Adjustment) subformat 2 and Type 3 (Cursive Attachment)

Improvements

  • DEVSIX-9255: (iText Core) Let the user know that typography (pdfCalligraph) is required to process certain scripts

Bug fixes

  • DEVSIX-8613 – Arabic shaping doesn't take ccmp OpenType feature into account; only first lookup table for fina/medi/init applied

  • DEVSIX-2655 – Arabic: double consonant and damma diacritics placed incorrectly

  • DEVSIX-2663 – Arabic: glyph overlapped by arabic fathatan isolated form diacritic

  • DEVSIX-2665 – Arabic: FATHA ISOLATED FORM diacritic positioned below instead of above

  • DEVSIX-2712 – Arabic: doubled FATHA doesn't render correctly with some fonts

  • DEVSIX-6314 – Exceptions thrown when adding Urdu text with certain fonts

Installation Instructions

Examples (latest ones)

FAQ (latest ones)