From d1dde7d04e5244179735592adc11d2a6f0af64ac Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sat, 20 Apr 2019 12:43:45 +0900 Subject: Use bitmap strikes as fallbacks for ftcr font backend * src/ftfont.h (struct font_info): New member bitmap_strike_index. * src/ftfont.c (ftfont_open2): Try bitmap strikes as fallbacks. (ftfont_open): Discard bitmap strikes. * src/ftcrfont.c (ftcrfont_open): Recalculate metrics for bitmap strikes. (ftcrfont_get_bitmap, ftcrfont_anchor_point, ftcrfont_shape): New functions. (struct font_driver): Use them. --- src/ftfont.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ftfont.h') diff --git a/src/ftfont.h b/src/ftfont.h index 327cd085acf..adbda49ff1c 100644 --- a/src/ftfont.h +++ b/src/ftfont.h @@ -54,6 +54,10 @@ struct font_info #endif /* HAVE_LIBOTF */ FT_Size ft_size; int index; + /* Index of the bitmap strike used as a fallback for + FT_Set_Pixel_Sizes failure. If the value is non-negative, then + ft_size is not of the requested size. Otherwise it is -1. */ + FT_Int bitmap_strike_index; FT_Matrix matrix; #ifdef USE_CAIRO -- cgit v1.2.3