[drape] Set Harfbuzz language to map language

Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
This commit is contained in:
x7z4w
2025-12-15 21:07:02 +00:00
committed by Konstantin Pastbin
parent d2fee9ff8e
commit b39631fe51
4 changed files with 11 additions and 30 deletions

View File

@@ -372,7 +372,7 @@ void TextureManager::Init(ref_ptr<dp::GraphicsContext> context, Params const & p
m_maxGlypsCount = static_cast<uint32_t>(ceil(kGlyphAreaCoverage * textureSquare / averageGlyphSquare));
std::string_view constexpr kSpace{" "};
m_spaceGlyph = m_glyphManager->ShapeText(kSpace, dp::kBaseFontSizePixels, "en").m_glyphs.front().m_key;
m_spaceGlyph = m_glyphManager->ShapeText(kSpace, dp::kBaseFontSizePixels).m_glyphs.front().m_key;
LOG(LDEBUG, ("Glyphs texture size =", kGlyphsTextureSize, "with max glyphs count =", m_maxGlypsCount));
@@ -467,8 +467,7 @@ text::TextMetrics TextureManager::ShapeSingleTextLine(float fontPixelHeight, std
// TODO(AB): Is this mutex too slow?
std::lock_guard lock(m_calcGlyphsMutex);
// TODO(AB): Fix hard-coded lang.
auto textMetrics = m_glyphManager->ShapeText(utf8, fontPixelHeight, "en");
auto textMetrics = m_glyphManager->ShapeText(utf8, fontPixelHeight);
auto const & glyphs = textMetrics.m_glyphs;