summaryrefslogtreecommitdiff
path: root/vcl/win
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2018-05-10 15:46:06 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2018-05-12 02:08:59 +0200
commit23c5125148a8110d88385b29570bf0b7d4400458 (patch)
treec28974ca633350e81f8f96375b5b4b439197d735 /vcl/win
parent1a3deaa7f7ff1d7e6ab5f5d551bcbc8c00d84052 (diff)
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 <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl/win')
-rw-r--r--vcl/win/gdi/salfont.cxx10
1 files changed, 1 insertions, 9 deletions
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<int>(mfFontScale[nFallbackLevel] * nKashidaWidth));
- }
+ rxFontMetric->SetMinKashida(mpWinFontEntry[nFallbackLevel]->GetKashidaWidth());
// get the font metric
OUTLINETEXTMETRICW aOutlineMetric;