summaryrefslogtreecommitdiff
path: root/vcl/quartz
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2020-09-11 22:31:51 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2020-09-15 06:42:56 +0200
commit2967e7a87986b59fe48119749525d4084ac6a568 (patch)
tree3c8f27ddc5278903639f5f7c09e1d028b6be0103 /vcl/quartz
parentc7482bc2904401e7d975b5721ec861b8589253f9 (diff)
Forward existing FontCharMap from PhysicalFontFace
Since removed code in the previous commit is primary used in CreateFontSubset and GetGlyphWidths, you have a high chance, that the CMAP was already used for displaying a font, so it's already decoded and can be forwarded. Also the lookup should be faster in general this way. Change-Id: Icf4d8a1a84ff6ccdaccb7e870abe5df3837f9541 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102686 Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Tested-by: Jenkins
Diffstat (limited to 'vcl/quartz')
-rw-r--r--vcl/quartz/salgdi.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index 2c1fdff16eec..1501043924b6 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -759,7 +759,8 @@ void AquaSalGraphics::GetGlyphWidths( const PhysicalFontFace* pFontData, bool bV
// use the font subsetter to get the widths
TrueTypeFont* pSftFont = nullptr;
- SFErrCodes nRC = ::OpenTTFontBuffer( static_cast<void*>(aBuffer.data()), aBuffer.size(), 0, &pSftFont);
+ SFErrCodes nRC = ::OpenTTFontBuffer(static_cast<void*>(aBuffer.data()), aBuffer.size(), 0, &pSftFont,
+ pFontData->GetFontCharMap());
if( nRC != SFErrCodes::Ok )
return;