summaryrefslogtreecommitdiff
path: root/vcl/inc/impfont.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/inc/impfont.hxx')
-rw-r--r--vcl/inc/impfont.hxx21
1 files changed, 20 insertions, 1 deletions
diff --git a/vcl/inc/impfont.hxx b/vcl/inc/impfont.hxx
index 5e7e75a69246..624707839f40 100644
--- a/vcl/inc/impfont.hxx
+++ b/vcl/inc/impfont.hxx
@@ -62,7 +62,18 @@ public:
void SetWidthType( const FontWidth eWidthType ) { meWidthType = eWidthType; }
void SetAlignment( const TextAlign eAlignment ) { meAlign = eAlignment; }
void SetCharSet( const rtl_TextEncoding eCharSet ) { meCharSet = eCharSet; }
- void SetFontSize( const Size& rSize ) { maAverageFontSize = rSize; }
+ void SetFontSize( const Size& rSize )
+ {
+#ifndef _WIN32
+ if(rSize.Height() != maAverageFontSize.Height())
+ {
+ // reset evtl. buffered calculated AverageFontSize, it depends
+ // on Font::Height
+ mnCalculatedAverageFontWidth = 0;
+ }
+#endif
+ maAverageFontSize = rSize;
+ }
void SetSymbolFlag( const bool bSymbolFlag ) { mbSymbolFlag = bSymbolFlag; }
@@ -80,6 +91,11 @@ public:
void IncreaseQualityBy( int nQualityAmount ) { mnQuality += nQualityAmount; }
void DecreaseQualityBy( int nQualityAmount ) { mnQuality -= nQualityAmount; }
+#ifndef _WIN32
+ long GetCalculatedAverageFontWidth() const { return mnCalculatedAverageFontWidth; }
+ void SetCalculatedAverageFontWidth(long nNew) { mnCalculatedAverageFontWidth = nNew; }
+#endif
+
bool operator==( const ImplFont& ) const;
private:
@@ -130,6 +146,9 @@ private:
int mnQuality;
+#ifndef _WIN32
+ long mnCalculatedAverageFontWidth;
+#endif
};
#endif // INCLUDED_VCL_INC_IMPFONT_HXX