LibreOffice Module vcl (master)  1
OpenTypeFeatureDefinitionList.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 
10 #pragma once
11 
12 #include <vcl/dllapi.h>
13 #include <vcl/font/Feature.hxx>
14 #include <rtl/instance.hxx>
15 #include <vector>
16 #include <unordered_map>
17 
18 namespace vcl::font
19 {
21 {
22 private:
23  std::vector<FeatureDefinition> m_aFeatureDefinition;
24  std::unordered_map<sal_uInt32, size_t> m_aCodeToIndex;
25  std::vector<sal_uInt32> m_aRequiredFeatures;
26 
27  void init();
28 
29  static bool isSpecialFeatureCode(sal_uInt32 nFeatureCode);
30  static FeatureDefinition handleSpecialFeatureCode(sal_uInt32 nFeatureCode);
31 
32 public:
34  FeatureDefinition getDefinition(sal_uInt32 nFeatureCode);
35  bool isRequired(sal_uInt32 nFeatureCode);
36 };
37 
39  : public rtl::Static<OpenTypeFeatureDefinitionListPrivate, OpenTypeFeatureDefinitionList>
40 {
41 };
42 
43 } // namespace vcl::font
44 
45 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
static FeatureDefinition handleSpecialFeatureCode(sal_uInt32 nFeatureCode)
FeatureDefinition getDefinition(sal_uInt32 nFeatureCode)
std::unordered_map< sal_uInt32, size_t > m_aCodeToIndex