Skip to content

Improve and fix building font features on Windows (was: Fix builds without PangoFT2)

Chun-wei Fan requested to merge fix-build-no-pangoft into main

Hi,

This is a follow-up MR for fixing builds after commit 80328e8a, when PangoFT2 is not available, as well as improvements to use the native Windows NLS APIs rather than the iso-codes package, which is not shipped with Windows at all and could be hard to obtain on Windows.

This will also enable building the font explorer demo even when PangoFT2 is not found, since it is already ported to the newer Pango/HarfBuzz APIs and really no longer depends on PangoFT2 (other than a #include which really became unneeded)

Realistically, this sort of pulls in a runtime dependency on the iso-codes package for the language/script names, so perhaps I will look at reviving the port I had that used Windows APIs, or perhaps follow what was done in Tepl where Sébastien Wilmet used ICU instead.

The use of the Windows APIs may not be an exhaustive match for what we could get from the iso-codes package, but should cover most of the cases that we need. Windows do not have APIs for dealing with the script names that result from the ISO15924 tags, so these are left intact (and, they don't rely on the iso-codes package by themselves, as it seems).

Fixes #4605 (closed).

With blessings, thank you!

Edited by Chun-wei Fan

Merge request reports