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 .
19 #ifndef INCLUDED_VCL_SOURCE_PDF_BUILDIN_FONTS_HXX
20 #define INCLUDED_VCL_SOURCE_PDF_BUILDIN_FONTS_HXX
22 #include <PhysicalFontFace.hxx>
23 #include <fontinstance.hxx>
32 const char* m_pStyleName
;
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];
44 OString
getNameObject() const;
45 FontAttributes
GetFontAttributes() const;
48 class BuildinFontInstance final
: public LogicalFontInstance
50 bool ImplGetGlyphBoundRect(sal_GlyphId nID
, tools::Rectangle
& rRect
, bool) const override
;
53 BuildinFontInstance(const PhysicalFontFace
&, const FontSelectPattern
&);
55 bool GetGlyphOutline(sal_GlyphId nId
, basegfx::B2DPolyPolygon
& rPoly
, bool) const override
;
58 class BuildinFontFace final
: public PhysicalFontFace
61 static const BuildinFont m_aBuildinFonts
[14];
62 const BuildinFont
& mrBuildin
;
64 rtl::Reference
<LogicalFontInstance
>
65 CreateFontInstance(const FontSelectPattern
& rFSD
) const override
;
68 explicit BuildinFontFace(int nId
);
70 const BuildinFont
& GetBuildinFont() const { return mrBuildin
; }
71 sal_IntPtr
GetFontId() const override
{ return reinterpret_cast<sal_IntPtr
>(&mrBuildin
); }
73 static const BuildinFont
& Get(int nId
) { return m_aBuildinFonts
[nId
]; }
79 #endif // INCLUDED_VCL_SOURCE_PDF_BUILDIN_FONTS_HXX
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */