From 23c5125148a8110d88385b29570bf0b7d4400458 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Thu, 10 May 2018 15:46:06 +0200 Subject: Use HarfBuzz to get Kashida width One less platform-specific piece of code. Change-Id: Ib04c5f1434046e26ead2aaedace67127a5513e55 Reviewed-on: https://gerrit.libreoffice.org/54098 Tested-by: Jenkins Reviewed-by: Khaled Hosny --- vcl/win/gdi/salfont.cxx | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'vcl/win') diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index 62d9f7d85dd7..e1c26ed902a2 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -997,15 +997,7 @@ void WinSalGraphics::GetFontMetric( ImplFontMetricDataRef& rxFontMetric, int nFa const RawFontData aHheaRawData(getHDC(), nHheaTag); const RawFontData aOS2RawData(getHDC(), nOS2Tag); - WCHAR nKashidaCh = 0x0640; - WORD nKashidaGid; - DWORD ret = GetGlyphIndicesW(getHDC(), &nKashidaCh, 1, &nKashidaGid, GGI_MARK_NONEXISTING_GLYPHS); - if (ret != GDI_ERROR && nKashidaGid != 0xFFFF) - { - int nKashidaWidth = 0; - if (GetCharWidthI(getHDC(), nKashidaGid, 1, nullptr, &nKashidaWidth)) - rxFontMetric->SetMinKashida(static_cast(mfFontScale[nFallbackLevel] * nKashidaWidth)); - } + rxFontMetric->SetMinKashida(mpWinFontEntry[nFallbackLevel]->GetKashidaWidth()); // get the font metric OUTLINETEXTMETRICW aOutlineMetric; -- cgit