diff options
-rw-r--r-- | vcl/inc/fontinstance.hxx | 4 | ||||
-rw-r--r-- | vcl/source/font/fontinstance.cxx | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/vcl/inc/fontinstance.hxx b/vcl/inc/fontinstance.hxx index 4f216df0389b..5cb05b1d3804 100644 --- a/vcl/inc/fontinstance.hxx +++ b/vcl/inc/fontinstance.hxx @@ -100,9 +100,9 @@ public: // TODO: make data members private bool GetGlyphBoundRect(sal_GlyphId, tools::Rectangle&, bool) const; virtual bool GetGlyphOutline(sal_GlyphId, basegfx::B2DPolyPolygon&, bool) const = 0; - int GetKashidaWidth(); + int GetKashidaWidth() const; - void GetScale(double* nXScale, double* nYScale); + void GetScale(double* nXScale, double* nYScale) const; static inline void DecodeOpenTypeTag(const uint32_t nTableTag, char* pTagName); protected: diff --git a/vcl/source/font/fontinstance.cxx b/vcl/source/font/fontinstance.cxx index 5c63338b75a1..0907d657ad02 100644 --- a/vcl/source/font/fontinstance.cxx +++ b/vcl/source/font/fontinstance.cxx @@ -63,9 +63,9 @@ hb_font_t* LogicalFontInstance::InitHbFont(hb_face_t* pHbFace) return pHbFont; } -int LogicalFontInstance::GetKashidaWidth() +int LogicalFontInstance::GetKashidaWidth() const { - hb_font_t* pHbFont = GetHbFont(); + hb_font_t* pHbFont = const_cast<LogicalFontInstance*>(this)->GetHbFont(); hb_position_t nWidth = 0; hb_codepoint_t nIndex = 0; @@ -79,9 +79,9 @@ int LogicalFontInstance::GetKashidaWidth() return nWidth; } -void LogicalFontInstance::GetScale(double* nXScale, double* nYScale) +void LogicalFontInstance::GetScale(double* nXScale, double* nYScale) const { - hb_face_t* pHbFace = hb_font_get_face(GetHbFont()); + hb_face_t* pHbFace = hb_font_get_face(const_cast<LogicalFontInstance*>(this)->GetHbFont()); unsigned int nUPEM = hb_face_get_upem(pHbFace); double nHeight(m_aFontSelData.mnHeight); |