1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #include <sal/config.h>
12 #include <com/sun/star/rendering/FontMetrics.hpp>
13 #include <canvas/canvastools.hxx>
16 #include "ogl_canvasfont.hxx"
17 #include "ogl_textlayout.hxx"
19 using namespace ::com::sun::star
;
23 CanvasFont::CanvasFont( rendering::FontRequest aFontRequest
,
24 const uno::Sequence
< beans::PropertyValue
>& extraFontProperties
,
25 const geometry::Matrix2D
& fontMatrix
) :
26 maFontRequest(std::move( aFontRequest
)),
28 maFontMatrix( fontMatrix
)
30 ::canvas::tools::extractExtraFontProperties(extraFontProperties
, mnEmphasisMark
);
33 uno::Reference
< rendering::XTextLayout
> SAL_CALL
CanvasFont::createTextLayout( const rendering::StringContext
& aText
,
35 sal_Int64 nRandomSeed
)
37 std::unique_lock
aGuard( m_aMutex
);
39 return new TextLayout( aText
, nDirection
, nRandomSeed
, ImplRef( this ) );
42 uno::Sequence
< double > SAL_CALL
CanvasFont::getAvailableSizes( )
45 return uno::Sequence
< double >();
48 uno::Sequence
< beans::PropertyValue
> SAL_CALL
CanvasFont::getExtraFontProperties( )
51 return uno::Sequence
< beans::PropertyValue
>();
54 rendering::FontRequest SAL_CALL
CanvasFont::getFontRequest( )
59 rendering::FontMetrics SAL_CALL
CanvasFont::getFontMetrics( )
62 return rendering::FontMetrics();
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */