summaryrefslogtreecommitdiff
path: root/vcl/inc/fontinstance.hxx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2018-10-27 15:37:39 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2018-10-30 11:42:49 +0100
commit7b0f2ee441b0cbcb88f3020df40c49e7cd6f9fb1 (patch)
tree2382b66e9a92907934e891cded6497c8ea7186ef /vcl/inc/fontinstance.hxx
parenta4b60b78ea36d55a2abf0e5efccd8530568d2209 (diff)
Rely on the font instance of the glyph
The FreetypeFont might already have released the font instance of the glyph, but the glyphs font instance must still be valid, so use this instead to cache glyph bound rect. For whatever reason the Windows compiler doesn't accept inline functions in the GlyphItem struct and wants to export them in the DLL, even when declared VCL_DLLPRIVATE, so this just uses static inlines as a workaround. Change-Id: I4539d91a846a54a05f9648638494e1e99f704b0a Reviewed-on: https://gerrit.libreoffice.org/62425 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/inc/fontinstance.hxx')
-rw-r--r--vcl/inc/fontinstance.hxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/inc/fontinstance.hxx b/vcl/inc/fontinstance.hxx
index eaad4d3d1f42..6f171ce72e49 100644
--- a/vcl/inc/fontinstance.hxx
+++ b/vcl/inc/fontinstance.hxx
@@ -70,8 +70,8 @@ public: // TODO: make data members private
const PhysicalFontFace* GetFontFace() const { return m_pFontFace.get(); }
const ImplFontCache* GetFontCache() const { return mpFontCache; }
- bool GetCachedGlyphBoundRect(sal_GlyphId, tools::Rectangle &);
- void CacheGlyphBoundRect(sal_GlyphId nID, tools::Rectangle &);
+ bool GetCachedGlyphBoundRect(sal_GlyphId, tools::Rectangle &) const;
+ void CacheGlyphBoundRect(sal_GlyphId nID, tools::Rectangle &) const;
int GetKashidaWidth();
@@ -92,7 +92,7 @@ private:
// TODO: at least the ones which just differ in orientation, stretching or height
typedef ::std::unordered_map< ::std::pair<sal_UCS4,FontWeight>, OUString > UnicodeFallbackList;
std::unique_ptr<UnicodeFallbackList> mpUnicodeFallbackList;
- ImplFontCache * mpFontCache;
+ mutable ImplFontCache * mpFontCache;
const FontSelectPattern m_aFontSelData;
hb_font_t* m_pHbFont;
double m_nAveWidthFactor;