]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix shaping with bitmap-only fonts on HarfBuzz 5.2.0 (Bug#57976)
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Fri, 23 Sep 2022 05:17:12 +0000 (14:17 +0900)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Fri, 23 Sep 2022 05:17:49 +0000 (14:17 +0900)
* src/ftcrfont.c (ftcrhbfont_begin_hb_font): Undo last change for
HarfBuzz 5.2.0.

src/ftcrfont.c

index d5d3e440af6dc195c5bcd1273c5d8b1e4ce63a15..97b68ac0137760e4617926c648c058d6c2192a1a 100644 (file)
@@ -570,8 +570,12 @@ ftcrhbfont_begin_hb_font (struct font *font, double *position_unit)
   hb_font_t *hb_font = fthbfont_begin_hb_font (font, 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)
+     (https://github.com/harfbuzz/harfbuzz/issues/489)
+
+     Update: HarfBuzz 5.2.0 no longer does this for an hb_font_t font
+     object created from a given FT_Face.
+     (https://github.com/harfbuzz/harfbuzz/issues/3788) */
+  if ((hb_version_atleast (5, 2, 0) || !hb_version_atleast (5, 0, 0))
       && ftcrfont_info->bitmap_position_unit)
     *position_unit = ftcrfont_info->bitmap_position_unit;