LibreOffice Module vcl (master)  1
OpenTypeFeatureDefinitonList.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 #ifndef INCLUDED_VCL_INC_FONT_OPENTYPEFEATUREDEFINITONLIST_HXX
11 #define INCLUDED_VCL_INC_FONT_OPENTYPEFEATUREDEFINITONLIST_HXX
12 
13 #include <vcl/dllapi.h>
14 #include <vcl/font/Feature.hxx>
15 #include <rtl/instance.hxx>
16 #include <vector>
17 #include <unordered_map>
18 
19 namespace vcl
20 {
21 namespace font
22 {
24 {
25 private:
26  std::vector<FeatureDefinition> m_aFeatureDefinition;
27  std::unordered_map<sal_uInt32, size_t> m_aCodeToIndex;
28  std::vector<sal_uInt32> m_aRequiredFeatures;
29 
30  void init();
31 
32  static bool isSpecialFeatureCode(sal_uInt32 nFeatureCode);
33  static FeatureDefinition handleSpecialFeatureCode(sal_uInt32 nFeatureCode);
34 
35 public:
37  FeatureDefinition getDefinition(sal_uInt32 nFeatureCode);
38  bool isRequired(sal_uInt32 nFeatureCode);
39 };
40 
42  : public rtl::Static<OpenTypeFeatureDefinitonListPrivate, OpenTypeFeatureDefinitonList>
43 {
44 };
45 
46 } // end font namespace
47 } // end vcl namespace
48 
49 #endif // INCLUDED_VCL_INC_FONT_OPENTYPEFEATUREDEFINITONLIST_HXX
50 
51 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unordered_map< sal_uInt32, size_t > m_aCodeToIndex
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
FILE * init(int, char **)