LibreOffice Module vcl (master)  1
FeatureCollector.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 
11 #ifndef INCLUDED_VCL_INC_FONT_FEATURECOLLECTOR_HXX
12 #define INCLUDED_VCL_INC_FONT_FEATURECOLLECTOR_HXX
13 
14 #include <vcl/font/Feature.hxx>
15 #include <hb.h>
16 #include <i18nlangtag/lang.h>
17 
18 namespace vcl
19 {
20 namespace font
21 {
23 {
24 private:
25  hb_face_t* const m_pHbFace;
26  std::vector<vcl::font::Feature>& m_rFontFeatures;
28 
29 public:
30  FeatureCollector(hb_face_t* pHbFace, std::vector<vcl::font::Feature>& rFontFeatures,
31  LanguageType eLanguageType)
32  : m_pHbFace(pHbFace)
33  , m_rFontFeatures(rFontFeatures)
34  , m_eLanguageType(eLanguageType)
35  {
36  }
37 
38 private:
39  void collectForLanguage(hb_tag_t aTableTag, sal_uInt32 nScript, hb_tag_t aScriptTag,
40  sal_uInt32 nLanguage, hb_tag_t aLanguageTag);
41 
42  void collectForScript(hb_tag_t aTableTag, sal_uInt32 nScript, hb_tag_t aScriptTag);
43  void collectForTable(hb_tag_t aTableTag);
44  bool collectGraphite();
45 
46 public:
47  bool collect();
48 };
49 
50 } // end namespace font
51 } // end namespace vcl
52 
53 #endif // INCLUDED_VCL_INC_FONT_FEATURECOLLECTOR_HXX
54 
55 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::vector< vcl::font::Feature > & m_rFontFeatures
LanguageType const m_eLanguageType
void collectForLanguage(hb_tag_t aTableTag, sal_uInt32 nScript, hb_tag_t aScriptTag, sal_uInt32 nLanguage, hb_tag_t aLanguageTag)
void collectForTable(hb_tag_t aTableTag)
void collectForScript(hb_tag_t aTableTag, sal_uInt32 nScript, hb_tag_t aScriptTag)
FeatureCollector(hb_face_t *pHbFace, std::vector< vcl::font::Feature > &rFontFeatures, LanguageType eLanguageType)