From 62bd26dda3950bb879c1cf9907bb7e6f1b8a7b2c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 24 Dec 2022 11:01:32 -0700 Subject: [PATCH] [ft] Pick largest bitmap size --- src/hb-ft.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hb-ft.cc b/src/hb-ft.cc index ad224966c..de53936f6 100644 --- a/src/hb-ft.cc +++ b/src/hb-ft.cc @@ -159,9 +159,9 @@ static void _hb_ft_hb_font_changed (hb_font_t *font, FT_Face ft_face) { #ifdef HAVE_FT_GET_TRANSFORM /* Bitmap font, eg. bitmap color emoji. */ - /* TODO Pick largest size? */ - int x_scale = ft_face->available_sizes[0].x_ppem; - int y_scale = ft_face->available_sizes[0].y_ppem; + /* Pick largest size? */ + int x_scale = ft_face->available_sizes[ft_face->num_fixed_sizes - 1].x_ppem; + int y_scale = ft_face->available_sizes[ft_face->num_fixed_sizes - 1].y_ppem; FT_Set_Char_Size (ft_face, x_scale, y_scale, 0, 0);