diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2019-08-25 14:12:15 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2019-08-27 20:38:19 +0200 |
commit | 60d4be99383b6fe13ca55572c43fd022bdc73ce8 (patch) | |
tree | 356ce7bd448e3f93a59f9c47e108b87c5ac58838 /vcl/win/gdi/salfont.cxx | |
parent | a5cafe5d7e87c0f5ecdcffbbe58c66abcb97ac8e (diff) |
Consolidate ImplCalcLineSpacing()
Move getting UPEM and font tables to the functions and use HarfBuzz API
to get them. In the future we might stop reading the tables ourselves
and use HarfBuzz metrics API instead.
Change-Id: I3f4511628fd33200bae94cdcd96479ba3e6d2fba
Reviewed-on: https://gerrit.libreoffice.org/78081
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl/win/gdi/salfont.cxx')
-rw-r--r-- | vcl/win/gdi/salfont.cxx | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index 8a83a29d567b..343e3f8b6208 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -950,12 +950,8 @@ void WinSalGraphics::GetFontMetric( ImplFontMetricDataRef& rxFontMetric, int nFa if( GetTextFaceW( getHDC(), SAL_N_ELEMENTS(aFaceName), aFaceName ) ) rxFontMetric->SetFamilyName(o3tl::toU(aFaceName)); - const DWORD nHheaTag = CalcTag("hhea"); - const DWORD nOS2Tag = CalcTag("OS/2"); - const RawFontData aHheaRawData(getHDC(), nHheaTag); - const RawFontData aOS2RawData(getHDC(), nOS2Tag); - rxFontMetric->SetMinKashida(pFontInstance->GetKashidaWidth()); + rxFontMetric->ImplCalcLineSpacing(pFontInstance.get()); // get the font metric OUTLINETEXTMETRICW aOutlineMetric; @@ -977,10 +973,6 @@ void WinSalGraphics::GetFontMetric( ImplFontMetricDataRef& rxFontMetric, int nFa // transformation dependent font metrics rxFontMetric->SetWidth(static_cast<int>(pFontInstance->GetScale() * aWinMetric.tmAveCharWidth)); - - const std::vector<uint8_t> rHhea(aHheaRawData.get(), aHheaRawData.get() + aHheaRawData.size()); - const std::vector<uint8_t> rOS2(aOS2RawData.get(), aOS2RawData.get() + aOS2RawData.size()); - rxFontMetric->ImplCalcLineSpacing(rHhea, rOS2, aOutlineMetric.otmEMSquare); } FontCharMapRef WinSalGraphics::GetFontCharMap() const |