Fix wrong metrics for bitmap-only fonts with HarfBuzz 5
* src/ftcrfont.c (ftcrhbfont_begin_hb_font): Always use the standard position unit value on HarfBuzz 5 and later regardless of whether the font is bitmap-only or not. (Bug#57066)
This commit is contained in:
parent
648acc8848
commit
ae348b719e
1 changed files with 5 additions and 1 deletions
|
@ -568,7 +568,11 @@ ftcrhbfont_begin_hb_font (struct font *font, double *position_unit)
|
|||
|
||||
ftcrfont_info->ft_size = ft_face->size;
|
||||
hb_font_t *hb_font = fthbfont_begin_hb_font (font, position_unit);
|
||||
if (ftcrfont_info->bitmap_position_unit)
|
||||
/* HarfBuzz 5 correctly scales bitmap-only fonts without position
|
||||
unit adjustment.
|
||||
(https://github.com/harfbuzz/harfbuzz/issues/489) */
|
||||
if (!hb_version_atleast (5, 0, 0)
|
||||
&& ftcrfont_info->bitmap_position_unit)
|
||||
*position_unit = ftcrfont_info->bitmap_position_unit;
|
||||
|
||||
return hb_font;
|
||||
|
|
Loading…
Add table
Reference in a new issue