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 <vector>
15 #include <unordered_map>
16 
17 namespace vcl::font
18 {
20 {
21 private:
22  std::vector<FeatureDefinition> m_aFeatureDefinition;
23  std::unordered_map<sal_uInt32, size_t> m_aCodeToIndex;
24  std::vector<sal_uInt32> m_aRequiredFeatures;
25 
26  void init();
27 
28  static bool isSpecialFeatureCode(sal_uInt32 nFeatureCode);
29  static FeatureDefinition handleSpecialFeatureCode(sal_uInt32 nFeatureCode);
30 
31 public:
33  FeatureDefinition getDefinition(sal_uInt32 nFeatureCode);
34  bool isRequired(sal_uInt32 nFeatureCode);
35 };
36 
38 
39 } // namespace vcl::font
40 
41 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OpenTypeFeatureDefinitionListPrivate & OpenTypeFeatureDefinitionList()
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
static FeatureDefinition handleSpecialFeatureCode(sal_uInt32 nFeatureCode)
FeatureDefinition getDefinition(sal_uInt32 nFeatureCode)
A PhysicalFontFaceCollection is created by a PhysicalFontCollection and becomes invalid when original...
std::unordered_map< sal_uInt32, size_t > m_aCodeToIndex