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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include <sal/config.h>
24 #include <font/PhysicalFontFace.hxx>
25 #include <font/LogicalFontInstance.hxx>
32 OUString m_aStyleName
;
33 const char* m_pPSName
;
36 FontFamily
const m_eFamily
;
37 rtl_TextEncoding
const m_eCharSet
;
38 FontPitch
const m_ePitch
;
39 FontWidth
const m_eWidthType
;
40 FontWeight
const m_eWeight
;
41 FontItalic
const m_eItalic
;
42 int const m_aWidths
[256];
43 mutable FontCharMapRef m_xFontCharMap
;
45 OString
getNameObject() const;
46 const FontCharMapRef
& GetFontCharMap() const;
47 FontAttributes
GetFontAttributes() const;
50 class BuildinFontInstance final
: public LogicalFontInstance
53 BuildinFontInstance(const vcl::font::PhysicalFontFace
&, const vcl::font::FontSelectPattern
&);
55 bool GetGlyphOutline(sal_GlyphId nId
, basegfx::B2DPolyPolygon
& rPoly
, bool) const override
;
58 class BuildinFontFace final
: public vcl::font::PhysicalFontFace
60 static const BuildinFont m_aBuildinFonts
[14];
61 const BuildinFont
& mrBuildin
;
63 rtl::Reference
<LogicalFontInstance
>
64 CreateFontInstance(const vcl::font::FontSelectPattern
& rFSD
) const override
;
67 explicit BuildinFontFace(int nId
);
69 const BuildinFont
& GetBuildinFont() const { return mrBuildin
; }
70 sal_IntPtr
GetFontId() const override
{ return reinterpret_cast<sal_IntPtr
>(&mrBuildin
); }
71 FontCharMapRef
GetFontCharMap() const override
{ return mrBuildin
.GetFontCharMap(); }
72 bool GetFontCapabilities(vcl::FontCapabilities
&) const override
{ return false; }
74 static const BuildinFont
& Get(int nId
) { return m_aBuildinFonts
[nId
]; }
77 } // namespace vcl::pdf
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */