diff options
Diffstat (limited to 'canvas/source/cairo')
-rw-r--r-- | canvas/source/cairo/cairo_canvasfont.cxx | 4 | ||||
-rw-r--r-- | canvas/source/cairo/cairo_canvashelper_text.cxx | 8 | ||||
-rw-r--r-- | canvas/source/cairo/cairo_textlayout.cxx | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/canvas/source/cairo/cairo_canvasfont.cxx b/canvas/source/cairo/cairo_canvasfont.cxx index 505ebd2acf01..8aca75baa26a 100644 --- a/canvas/source/cairo/cairo_canvasfont.cxx +++ b/canvas/source/cairo/cairo_canvasfont.cxx @@ -68,7 +68,7 @@ namespace cairocanvas const bool bOldMapState( pOutDev->IsMapModeEnabled() ); pOutDev->EnableMapMode(false); - const Size aSize = pOutDev->GetFontMetric( *maFont ).GetSize(); + const Size aSize = pOutDev->GetFontMetric( *maFont ).GetFontSize(); const double fDividend( rFontMatrix.m10 + rFontMatrix.m11 ); double fStretch = (rFontMatrix.m00 + rFontMatrix.m01); @@ -78,7 +78,7 @@ namespace cairocanvas const long nNewWidth = ::basegfx::fround( aSize.Width() * fStretch ); - maFont->SetWidth( nNewWidth ); + maFont->SetAverageFontWidth( nNewWidth ); pOutDev->EnableMapMode(bOldMapState); } diff --git a/canvas/source/cairo/cairo_canvashelper_text.cxx b/canvas/source/cairo/cairo_canvashelper_text.cxx index f1c829da3126..03246f7b37a7 100644 --- a/canvas/source/cairo/cairo_canvashelper_text.cxx +++ b/canvas/source/cairo/cairo_canvashelper_text.cxx @@ -81,7 +81,7 @@ namespace cairocanvas if( !::rtl::math::approxEqual(aScale.getX(), aScale.getY()) ) { // retrieve true font width - const sal_Int32 nFontWidth( rOutDev.GetFontMetric( io_rVCLFont ).GetWidth() ); + const sal_Int32 nFontWidth( rOutDev.GetFontMetric( io_rVCLFont ).GetAverageFontWidth() ); const sal_Int32 nScaledFontWidth( ::basegfx::fround(nFontWidth * aScale.getX()) ); @@ -92,13 +92,13 @@ namespace cairocanvas return false; } - io_rVCLFont.SetWidth( nScaledFontWidth ); + io_rVCLFont.SetAverageFontWidth( nScaledFontWidth ); } if( !::rtl::math::approxEqual(aScale.getY(), 1.0) ) { - const sal_Int32 nFontHeight( io_rVCLFont.GetHeight() ); - io_rVCLFont.SetHeight( ::basegfx::fround(nFontHeight * aScale.getY()) ); + const sal_Int32 nFontHeight( io_rVCLFont.GetFontHeight() ); + io_rVCLFont.SetFontHeight( ::basegfx::fround(nFontHeight * aScale.getY()) ); } io_rVCLFont.SetOrientation( static_cast< short >( ::basegfx::fround(-fmod(nRotate, 2*M_PI)*(1800.0/M_PI)) ) ); diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx index 1e076b3f2f4d..8bb4d46cd074 100644 --- a/canvas/source/cairo/cairo_textlayout.cxx +++ b/canvas/source/cairo/cairo_textlayout.cxx @@ -430,8 +430,8 @@ namespace cairocanvas continue; vcl::Font aFont = rOutDev.GetFont(); - long nWidth = aFont.GetWidth(); - long nHeight = aFont.GetHeight(); + long nWidth = aFont.GetAverageFontWidth(); + long nHeight = aFont.GetFontHeight(); if (nWidth == 0) nWidth = nHeight; if (nWidth == 0 || nHeight == 0) @@ -487,7 +487,7 @@ namespace cairocanvas SAL_INFO( "canvas.cairo", - "Size:(" << aFont.GetWidth() << "," << aFont.GetHeight() + "Size:(" << aFont.GetAverageFontWidth() << "," << aFont.GetFontHeight() << "), Pos (" << rOutpos.X() << "," << rOutpos.Y() << "), G(" << (cairo_glyphs.size() > 0 ? cairo_glyphs[0].index : -1) @@ -507,7 +507,7 @@ namespace cairocanvas //faux bold if (rSysFontData.bFakeBold) { - double bold_dx = 0.5 * sqrt( 0.7 * aFont.GetHeight() ); + double bold_dx = 0.5 * sqrt( 0.7 * aFont.GetFontHeight() ); int total_steps = 1 * ((int) (bold_dx + 0.5)); // loop to draw the text for every half pixel of displacement |