sillsdev / sillsdev/ptx2pdf

Warning: Harfbuzz library versions before 8.0.0 gives rendering/layout issues with font Annapurna SIL (maybe others)

Open
#964 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

No action
Dominant language
Python
Stars
33
Forks
15
PR merge metrics
No merged PRs in 30d

Description

XeTeX uses the harfbuzz library "behind the scenes" in producing the text.
We've identified a problem with the way that Annapurna is handled in harfbuzz versions 7.3.0 and lower, as found in Ubuntu 22.04, and 20.04 and at least some windows machines. Other fonts and scripts may be affected also. The bug seems to result in an under-reporting to XeTeX of how wide some words will be and/or extra or lost spaces, resulting in excursions into the margins, and layout changes. It seems to only be triggered a few times per page (maybe certain words or letter combinations), but the effects on layout can be significant.

The good news for users of ubuntu-based linux distributions is that 24.04 has a significantly updated harfbuzz library which does not show the problem.

[ Edit: it used to be unclear which version between 8.3 and 6.0 had the issue. We now know that harfbuzz 8.0.0 is the first release that does not have the issue.]

It is also possible to compile and install a new harfbuzz version (In tracking down the version I tried with multiple versions of the library on ubuntu 22.04; there are a couple of changes but its not too tricky to build) and installing the relevant .deb packages solves the problem.

Unfortunately, there are various dependencies that make it hard to try compiling a version of harfbuzz without this bug on ubuntu 20.04

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin with the Annapurna SIL/XeTeX reproduction described for Ubuntu 20.04 and 22.04, comparing HarfBuzz versions before and after 8.0.0. No file, test, entry point, or concrete repository change is named, so the completion criteria remain undefined.

Written by the indexing model from the issue text.

Assessment

Tech stack
tex
Domain
computer-graphics
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.