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/unx/generic/glyphs | |
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/unx/generic/glyphs')
-rw-r--r-- | vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx index 86b7213e7ad7..5ed232cf4ebd 100644 --- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx +++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx @@ -532,15 +532,7 @@ void FreetypeFont::GetFontMetric(ImplFontMetricDataRef const & rxTo) const FT_Activate_Size( maSizeFT ); - sal_uLong nHhea = 0; - const uint8_t* pHheaBuf = mpFontInfo->GetTable("hhea", &nHhea); - const std::vector<uint8_t> rHhea(pHheaBuf, pHheaBuf + nHhea); - - sal_uLong nOS2 = 0; - const uint8_t* pOS2Buf = mpFontInfo->GetTable("OS/2", &nOS2); - const std::vector<uint8_t> rOS2(pOS2Buf, pOS2Buf + nOS2); - - rxTo->ImplCalcLineSpacing(rHhea, rOS2, maFaceFT->units_per_EM); + rxTo->ImplCalcLineSpacing(mpFontInstance.get()); rxTo->SetSlant( 0 ); rxTo->SetWidth( mnWidth ); |