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/.
12 #include <sal/config.h>
14 #include <font/FontSelectPattern.hxx>
15 #include <font/PhysicalFontFace.hxx>
16 #include <font/PhysicalFontFaceCollection.hxx>
17 #include <fontattributes.hxx>
18 #include <font/LogicalFontInstance.hxx>
20 class TestFontInstance
: public LogicalFontInstance
23 TestFontInstance(vcl::font::PhysicalFontFace
const& rFontFace
,
24 vcl::font::FontSelectPattern
const& rFontSelectPattern
)
25 : LogicalFontInstance(rFontFace
, rFontSelectPattern
)
29 bool GetGlyphOutline(sal_GlyphId
, basegfx::B2DPolyPolygon
&, bool) const override
35 bool ImplGetGlyphBoundRect(sal_GlyphId
, tools::Rectangle
&, bool) const override
{ return true; }
38 class TestFontFace
: public vcl::font::PhysicalFontFace
41 TestFontFace(sal_uIntPtr nId
)
42 : vcl::font::PhysicalFontFace(FontAttributes())
47 TestFontFace(FontAttributes
const& rFontAttributes
, sal_uIntPtr nId
)
48 : vcl::font::PhysicalFontFace(rFontAttributes
)
53 rtl::Reference
<LogicalFontInstance
>
54 CreateFontInstance(vcl::font::FontSelectPattern
const& rFontSelectPattern
) const override
56 return new TestFontInstance(*this, rFontSelectPattern
);
59 sal_IntPtr
GetFontId() const override
{ return mnFontId
; }
60 FontCharMapRef
GetFontCharMap() const override
{ return FontCharMap::GetDefaultMap(false); }
61 bool GetFontCapabilities(vcl::FontCapabilities
&) const override
{ return true; }
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */