summaryrefslogtreecommitdiff
path: root/vcl/inc/impfontcharmap.hxx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2020-09-11 22:07:12 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2020-09-15 06:42:33 +0200
commitc7482bc2904401e7d975b5721ec861b8589253f9 (patch)
treedbb52861749112e67b338f0c6348a541f7b83d2a /vcl/inc/impfontcharmap.hxx
parenta88c9752c6251dceb77c809b4592f2516e10f3e6 (diff)
Replace FindCmap with ParseCMAP
This introduces a potential performance regression, because FindCmap works on the existing font tables and just sets up a lookup function, while ParseCMAP creates some optimized, in-memory lookup table, which needs a bit more work, but is faster in its usage, I think. At least the initial usage is faster the old way, as the CMAPs aren't decoded at all. As you can see, the old code is just used on Windows and MacOS / iOS. Deep in the bowels of the PrintFontManager, the CMAP is also decoded using ParseCMAP... So I'm not sure this potential regression really exists. Most fonts will already have a decoded CMAP, so my guess is this is actually faster in the end. No idea, how to measure. Change-Id: I52caac1264cd3ff11a2a3fa6e9c800f67f146a79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102685 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/inc/impfontcharmap.hxx')
-rw-r--r--vcl/inc/impfontcharmap.hxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/vcl/inc/impfontcharmap.hxx b/vcl/inc/impfontcharmap.hxx
index eaa99dbe2d4d..287b663b4820 100644
--- a/vcl/inc/impfontcharmap.hxx
+++ b/vcl/inc/impfontcharmap.hxx
@@ -49,6 +49,7 @@ private:
const sal_uInt16* mpGlyphIds; // individual glyphid mappings
int mnRangeCount;
int mnCharCount; // covered codepoints
+ const bool m_bSymbolic;
};
bool VCL_DLLPUBLIC ParseCMAP( const unsigned char* pRawData, int nRawLength, CmapResult& );