app_server: Fall back to style "Regular" before style 0

Most notably in noto sans cjk style 0 seems be thin or light, and not Regular
this should make the fallback try Regular and only fall back to 0
if no font has a regular variant for the requested glyph

Change-Id: Ib152a50e6cace032278a60f664c2569fa9fe82fc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2887
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
This commit is contained in:
Pascal Abresch 2020-06-06 13:31:49 +00:00 committed by Axel Dörfler
parent 82f985c036
commit 6ffd243dbc

View File

@ -341,10 +341,12 @@ GlyphLayoutEngine::_WriteLockAndAcquireFallbackEntry(
fallbackEntry = NULL;
// Try to get the glyph from the fallback fonts.
for (int c = 0; c < 2; c++) {
for (int c = 0; c < 3; c++) {
const char* fontStyle;
if (c == 0)
fontStyle = font.Style();
else if (c == 1)
fontStyle = "Regular";
else
fontStyle = NULL;