diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ftcrfont.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ftcrfont.c b/src/ftcrfont.c index 39ea068556b..d5d3e440af6 100644 --- a/src/ftcrfont.c +++ b/src/ftcrfont.c | |||
| @@ -568,7 +568,11 @@ ftcrhbfont_begin_hb_font (struct font *font, double *position_unit) | |||
| 568 | 568 | ||
| 569 | ftcrfont_info->ft_size = ft_face->size; | 569 | ftcrfont_info->ft_size = ft_face->size; |
| 570 | hb_font_t *hb_font = fthbfont_begin_hb_font (font, position_unit); | 570 | hb_font_t *hb_font = fthbfont_begin_hb_font (font, position_unit); |
| 571 | if (ftcrfont_info->bitmap_position_unit) | 571 | /* HarfBuzz 5 correctly scales bitmap-only fonts without position |
| 572 | unit adjustment. | ||
| 573 | (https://github.com/harfbuzz/harfbuzz/issues/489) */ | ||
| 574 | if (!hb_version_atleast (5, 0, 0) | ||
| 575 | && ftcrfont_info->bitmap_position_unit) | ||
| 572 | *position_unit = ftcrfont_info->bitmap_position_unit; | 576 | *position_unit = ftcrfont_info->bitmap_position_unit; |
| 573 | 577 | ||
| 574 | return hb_font; | 578 | return hb_font; |