Flutter Engine
 
Loading...
Searching...
No Matches
font_features.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_TXT_SRC_TXT_FONT_FEATURES_H_
6#define FLUTTER_TXT_SRC_TXT_FONT_FEATURES_H_
7
8#include <map>
9#include <string>
10#include <vector>
11
12namespace txt {
13
14// Feature tags that can be applied in a text style to control how a font
15// selects glyphs.
17 public:
18 void SetFeature(const std::string& tag, int value);
19
20 std::string GetFeatureSettings() const;
21
22 const std::map<std::string, int>& GetFontFeatures() const;
23
24 private:
25 std::map<std::string, int> feature_map_;
26};
27
28// Axis tags and values that can be applied in a text style to control the
29// attributes of variable fonts.
31 public:
32 void SetAxisValue(const std::string& tag, float value);
33
34 const std::map<std::string, float>& GetAxisValues() const;
35
36 private:
37 std::map<std::string, float> axis_map_;
38};
39
40} // namespace txt
41
42#endif // FLUTTER_TXT_SRC_TXT_FONT_FEATURES_H_
const std::map< std::string, int > & GetFontFeatures() const
void SetFeature(const std::string &tag, int value)
std::string GetFeatureSettings() const
const std::map< std::string, float > & GetAxisValues() const
void SetAxisValue(const std::string &tag, float value)
int32_t value