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/inc | |
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/inc')
-rw-r--r-- | vcl/inc/impfontmetricdata.hxx | 5 | ||||
-rw-r--r-- | vcl/inc/sft.hxx | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/vcl/inc/impfontmetricdata.hxx b/vcl/inc/impfontmetricdata.hxx index 73beb59722db..6250c9155436 100644 --- a/vcl/inc/impfontmetricdata.hxx +++ b/vcl/inc/impfontmetricdata.hxx @@ -32,6 +32,7 @@ typedef tools::SvRef<ImplFontMetricData> ImplFontMetricDataRef; class OutputDevice; class FontSelectPattern; +class LogicalFontInstance; class VCL_DLLPUBLIC ImplFontMetricData : public FontAttributes, public SvRefBase { @@ -92,9 +93,7 @@ public: void ImplInitTextLineSize( const OutputDevice* pDev ); void ImplInitAboveTextLineSize(); void ImplInitFlags( const OutputDevice* pDev ); - void ImplCalcLineSpacing(const std::vector<uint8_t>& rHhea, - const std::vector<uint8_t>& rOS_2, - int nUPEM); + void ImplCalcLineSpacing(LogicalFontInstance *pFontInstance); private: bool ShouldUseWinMetrics(const vcl::TTGlobalFontInfo& rInfo); diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx index fbf570b27adb..aa81dcd151cb 100644 --- a/vcl/inc/sft.hxx +++ b/vcl/inc/sft.hxx @@ -419,8 +419,8 @@ namespace vcl * @ingroup sft * */ - void GetTTFontMetrics(const std::vector<uint8_t>& hhea, - const std::vector<uint8_t>& os2, + void GetTTFontMetrics(const uint8_t *pHhea, size_t nHhea, + const uint8_t *pOs2, size_t nOs2, TTGlobalFontInfo *info); /** |