LibreOffice Module vcl (master)  1
Qt5FontFace.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #pragma once
21 
22 #include <PhysicalFontFace.hxx>
23 
24 #include <tools/ref.hxx>
25 #include <vcl/fontcapabilities.hxx>
26 #include <vcl/fontcharmap.hxx>
27 
28 #include <QtCore/QString>
29 
30 class FontAttributes;
31 class FontSelectPattern;
32 class QFont;
33 
35 {
36 public:
37  static Qt5FontFace* fromQFont(const QFont& rFont);
38  static Qt5FontFace* fromQFontDatabase(const QString& aFamily, const QString& aStyle);
39  static void fillAttributesFromQFont(const QFont& rFont, FontAttributes& rFA);
40 
41  sal_IntPtr GetFontId() const override;
42 
43  int GetFontTable(const char pTagName[5], unsigned char*) const;
44 
45  const FontCharMapRef& GetFontCharMap() const;
46  bool GetFontCapabilities(vcl::FontCapabilities& rFontCapabilities) const;
47  bool HasChar(sal_uInt32 cChar) const;
48 
50  CreateFontInstance(const FontSelectPattern& rFSD) const override;
51 
52 protected:
53  Qt5FontFace(const Qt5FontFace&);
54  Qt5FontFace(const FontAttributes& rFA, const QString& rFontID);
55 
56 private:
57  const QString m_aFontId;
61 };
62 
63 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl::FontCapabilities m_aFontCapabilities
Definition: Qt5FontFace.hxx:59
bool HasChar(sal_uInt32 cChar) const
const FontCharMapRef & GetFontCharMap() const
FontCharMapRef m_xCharMap
Definition: Qt5FontFace.hxx:58
int GetFontTable(const char pTagName[5], unsigned char *) const
static void fillAttributesFromQFont(const QFont &rFont, FontAttributes &rFA)
abstract base class for physical font faces
rtl::Reference< LogicalFontInstance > CreateFontInstance(const FontSelectPattern &rFSD) const override
static Qt5FontFace * fromQFont(const QFont &rFont)
bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const
sal_IntPtr GetFontId() const override
bool m_bFontCapabilitiesRead
Definition: Qt5FontFace.hxx:60
Qt5FontFace(const Qt5FontFace &)
const QString m_aFontId
Definition: Qt5FontFace.hxx:57
static Qt5FontFace * fromQFontDatabase(const QString &aFamily, const QString &aStyle)