gdi32: Try Fontconfig substitutions when the font face is missing.
commit11ab9ff7b3c43bb41c0325fe9417b1d7f44ad516
authorAkihiro Sagawa <sagawa.aki@gmail.com>
Tue, 27 Nov 2018 15:50:20 +0000 (28 00:50 +0900)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 29 Nov 2018 09:04:49 +0000 (29 10:04 +0100)
tree70f47a9aaa1b04be26911a5afb24f6117850a03e
parentda2e51b3a6b725d0ba75952843d72d0a8d35785f
gdi32: Try Fontconfig substitutions when the font face is missing.

This improves font selection. With this patch, we can choose a decent
font family by Fontconfig.

Otherwise, Wine chooses some fonts based on supported charset, e.g. Droid
Sans Fallback. Droid Sans Fallback supports various scripts including
Japanese. However, as it's a fallback font, it doesn't have Latin alphabet
glyphs. If the font is chosen, typically Japanese Ubuntu environment, users
see a lot of squares instead of Latin alphabets.

This patch asks Fontconfig for the best font for the current locale. If the
font is returned and matches requested charset, the font is used. If failure,
it fallbacks to existing procedure.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/gdi32/freetype.c