Skip to content

gtkfontchooserwidget.c: Fix builds without PangoFT2

Chun-wei Fan requested to merge master.no-pango-ft into master

Hi,

From the commit message:

We need to build the bits that use PangoFT2 only if PangoFT2 is present, and for now since get_language_names() assumes the use of ISO codes and is currently only built with PangoFT2 is present, don't use it if PangoFT2 does not exist.

Add a TODO to add a Windows version of get_language_names() that uses Windows APIs instead of using ISO codes.

Unfortunately, there isn't a Windows API that I know that would tell me which language codes a font supports, but I am able to get the translated language names (albeit without the locale region) from the Windows APIs... :|

The Windows API implementation of get_language_names() will likely be along the lines of the things gspell!3 (closed), which is likely to be in an MR of its own.

With blessings, thank you!

Merge request reports