diff options
Diffstat (limited to 'canvas/source/vcl/canvasfont.cxx')
-rw-r--r-- | canvas/source/vcl/canvasfont.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx index b049e1e4f317..d5b276901594 100644 --- a/canvas/source/vcl/canvasfont.cxx +++ b/canvas/source/vcl/canvasfont.cxx @@ -127,8 +127,19 @@ namespace vclcanvas { tools::LocalGuard aGuard; - // TODO(F1) - return rendering::FontMetrics(); + OutputDevice& rOutDev = mpOutDevProvider->getOutDev(); + VirtualDevice aVDev( rOutDev ); + aVDev.SetFont(getVCLFont()); + const ::FontMetric& aMetric( aVDev.GetFontMetric() ); + + return rendering::FontMetrics( + aMetric.GetAscent(), + aMetric.GetDescent(), + aMetric.GetIntLeading(), + aMetric.GetExtLeading(), + 0, + aMetric.GetDescent() / 2.0, + aMetric.GetAscent() / 2.0); } uno::Sequence< double > SAL_CALL CanvasFont::getAvailableSizes( ) throw (uno::RuntimeException) |