# HG changeset patch # User Patric Stout # Date 2024-01-18 08:34:56 # Node ID 922ec220613a1aa15fd459b7d7d1041fe71ec51d # Parent 4b34363e7f476798c9fd89b38a252ff0d8a6629f Fix: [HarfBuzz] make HarfBuzz use the same glyphs as we render diff --git a/src/gfx_layout_icu.cpp b/src/gfx_layout_icu.cpp --- a/src/gfx_layout_icu.cpp +++ b/src/gfx_layout_icu.cpp @@ -157,6 +157,8 @@ ICUParagraphLayout::ICUVisualRun::ICUVis void ICURun::Shape(UChar *buff, size_t buff_length) { auto hbfont = hb_ft_font_create_referenced(*(static_cast(font->fc->GetOSHandle()))); + /* Match the flags with how we render the glyphs. */ + hb_ft_font_set_load_flags(hbfont, GetFontAAState(this->font->fc->GetSize()) ? FT_LOAD_TARGET_NORMAL : FT_LOAD_TARGET_MONO); /* ICU buffer is in UTF-16. */ auto hbbuf = hb_buffer_create();