From Fedora Project Wiki

Enable HarfBuzz in FreeType

Summary

Goal of this feature is to enable usage of HarfBuzz in FreeType to improve hinting of glyphs of languages which needs more complicated text shaping.

Owner

Current status

  • Targeted release: 34
  • Last updated: 2021-01-29
  • FESCo issue: #2556
  • Tracker bug: #1922346
  • Release notes tracker: #647

Detailed Description

Hinting of glyphs could be complicated due to many different rules of how to render sequence of glyphs. Thanks to enablement of HarfBuzz in FreeType applications will display text with correct hinting of glyphs.

Usage of HarfBuzz helps us to fix some bugs which are not fixable without it. Mainly the bug #1853937.

Freetype upstream has already support for HarfBuzz for almost 6 years.

This change was proposed in the bug #1906714.

Feedback

There is the bug #1853937 which can not be solved without this.

Benefit to Fedora

Improved user experience for languages for which Unicode does not list all variants of all glyphs. These are determined by different signs or positions in string and their further processing is more difficult.

Scope

  • Proposal owners: Enabling usage of HarfBuzz in FreeType means to handle a circular dependency which is needed due to the nature of interconnection of these two packages. Maintainers of FreeType and HarfBuzz will handle this via bootstraping process.
  • Other developers: N/A (not needed for this Change)
  • Release engineering: N/A (not needed for this Change)
  • Policies and guidelines: N/A (not needed for this Change)
  • Trademark approval: N/A (not needed for this Change)
  • Alignment with Objectives: There will be new dependency of FreeType on HarfBuzz so the footprint will be a little bigger on systems which did not need HarfBuzz before.

Upgrade/compatibility impact

Updates should go smooth as this change is limited to FreeType and Harfbuzz regarding packaging point of view.

How To Test

Install "pango" and "lato-fonts". Run pango-view --markup -t "<span font_desc='Lato 8'>8pt t ti fi tt</span> <span font_desc='Lato 9'>9pt t ti fi tt</span> <span font_desc='Lato 10'>10pt t ti fi tt</span> <span font_desc='Lato 11'>11pt t ti fi tt</span> <span font_desc='Lato 14'>14pt t ti fi tt</span>" and compare the results. The horizontal stroke over "ti" does not correspond to the one over "fi" for some font sizes for FreeType without HarfBuzz support.

User Experience

This change improves hinting of glyphs which are composed from multiple characters.

Dependencies

This change does not need any involvement other than listed owners.

Contingency Plan

This change could be easily reverted if needed.

Documentation

Not needed as both FreeType and HarfBuzz are already present in Fedora and there will be no change of their code.

Release Notes

There is no need for release notes as HarfBuzz is already in Fedora, it was just not used by FreeType.