/src/libreoffice/vcl/inc/font/FeatureCollector.hxx
Line | Count | Source |
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 | | */ |
10 | | |
11 | | #pragma once |
12 | | |
13 | | #include <vcl/font/Feature.hxx> |
14 | | #include <hb.h> |
15 | | #include <i18nlangtag/languagetag.hxx> |
16 | | |
17 | | #include <font/PhysicalFontFace.hxx> |
18 | | |
19 | | namespace vcl::font |
20 | | { |
21 | | class FeatureCollector |
22 | | { |
23 | | private: |
24 | | const PhysicalFontFace* m_pFace; |
25 | | hb_face_t* m_pHbFace; |
26 | | std::vector<vcl::font::Feature>& m_rFontFeatures; |
27 | | const LanguageTag& m_rLanguageTag; |
28 | | |
29 | | public: |
30 | | FeatureCollector(const PhysicalFontFace* pFace, std::vector<vcl::font::Feature>& rFontFeatures, |
31 | | const LanguageTag& rLanguageTag) |
32 | 0 | : m_pFace(pFace) |
33 | 0 | , m_pHbFace(pFace->GetHbFace()) |
34 | 0 | , m_rFontFeatures(rFontFeatures) |
35 | 0 | , m_rLanguageTag(rLanguageTag) |
36 | 0 | { |
37 | 0 | } |
38 | | |
39 | | private: |
40 | | void collectForTable(hb_tag_t aTableTag); |
41 | | bool collectGraphite(); |
42 | | |
43 | | public: |
44 | | bool collect(); |
45 | | }; |
46 | | |
47 | | } // namespace vcl::font |
48 | | |
49 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |