summaryrefslogtreecommitdiff
path: root/vcl/quartz
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2016-01-03 18:17:44 +1100
committerChris Sherlock <chris.sherlock79@gmail.com>2016-01-03 08:23:05 +0000
commitd7d2c6b53eacfe4e0270d6f61b3ae20047e99d35 (patch)
tree12b32a72a1ef66540538187e3797b0527ffc7208 /vcl/quartz
parent7b974e056df3ad023b18592bc01394943305dc41 (diff)
vcl: rename variables from metric names to font attribute names
Change-Id: Ib0a3d82af858304bf63a20bcb30b8de741491935 Reviewed-on: https://gerrit.libreoffice.org/21054 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'vcl/quartz')
-rw-r--r--vcl/quartz/ctfonts.cxx18
-rw-r--r--vcl/quartz/salgdi.cxx4
2 files changed, 11 insertions, 11 deletions
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index 7e97cae775e6..531b23e52d8d 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -116,7 +116,7 @@ CoreTextStyle::~CoreTextStyle()
CFRelease( mpStyleDict );
}
-void CoreTextStyle::GetFontMetric( ImplFontAttributes& rMetric ) const
+void CoreTextStyle::GetFontAttributes( ImplFontAttributes& rFontAttributes ) const
{
// get the matching CoreText font handle
// TODO: is it worth it to cache the CTFontRef in SetFont() and reuse it here?
@@ -124,20 +124,20 @@ void CoreTextStyle::GetFontMetric( ImplFontAttributes& rMetric ) const
const CGFloat fAscent = CTFontGetAscent( aCTFontRef );
const CGFloat fCapHeight = CTFontGetCapHeight( aCTFontRef );
- rMetric.SetAscent( lrint( fAscent ) );
- rMetric.SetDescent( lrint( CTFontGetDescent( aCTFontRef )) );
- rMetric.SetExternalLeading( lrint( CTFontGetLeading( aCTFontRef )) );
- rMetric.SetInternalLeading( lrint( fAscent - fCapHeight ) );
+ rFontAttributes.SetAscent( lrint( fAscent ) );
+ rFontAttributes.SetDescent( lrint( CTFontGetDescent( aCTFontRef )) );
+ rFontAttributes.SetExternalLeading( lrint( CTFontGetLeading( aCTFontRef )) );
+ rFontAttributes.SetInternalLeading( lrint( fAscent - fCapHeight ) );
// since ImplFontAttributes::mnWidth is only used for stretching/squeezing fonts
// setting this width to the pixel height of the fontsize is good enough
// it also makes the calculation of the stretch factor simple
- rMetric.SetWidth( lrint( CTFontGetSize( aCTFontRef ) * mfFontStretch) );
+ rFontAttributes.SetWidth( lrint( CTFontGetSize( aCTFontRef ) * mfFontStretch) );
// all CoreText fonts are scalable
- rMetric.SetScalableFlag( true );
- rMetric.SetTrueTypeFlag( true ); // Not sure, but this field is used only for Windows so far
- rMetric.SetKernableFlag( true );
+ rFontAttributes.SetScalableFlag( true );
+ rFontAttributes.SetTrueTypeFlag( true ); // Not sure, but this field is used only for Windows so far
+ rFontAttributes.SetKernableFlag( true );
}
bool CoreTextStyle::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect ) const
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index ad373cef3c84..c36eacf1da08 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -305,9 +305,9 @@ void AquaSalGraphics::SetTextColor( SalColor nSalColor )
// SAL_ DEBUG(std::hex << nSalColor << std::dec << "={" << maTextColor.GetRed() << ", " << maTextColor.GetGreen() << ", " << maTextColor.GetBlue() << ", " << maTextColor.GetAlpha() << "}");
}
-void AquaSalGraphics::GetFontMetric( ImplFontAttributes* pMetric, int /*nFallbackLevel*/ )
+void AquaSalGraphics::GetFontAttributes( ImplFontAttributes* pFontAttributes, int /*nFallbackLevel*/ )
{
- mpTextStyle->GetFontMetric( *pMetric );
+ mpTextStyle->GetFontAttributes( *pFontAttributes );
}
static bool AddTempDevFont(const OUString& rFontFileURL)