Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
txt::FontFeatures Class Reference

#include <font_features.h>

Public Member Functions

void SetFeature (std::string tag, int value)
 
std::string GetFeatureSettings () const
 
const std::map< std::string, int > & GetFontFeatures () const
 

Detailed Description

Definition at line 28 of file font_features.h.

Member Function Documentation

◆ GetFeatureSettings()

std::string txt::FontFeatures::GetFeatureSettings ( ) const

Definition at line 27 of file font_features.cc.

27 {
28 if (feature_map_.empty())
29 return "";
30
31 std::ostringstream stream;
32
33 for (const auto& kv : feature_map_) {
34 if (stream.tellp()) {
35 stream << ',';
36 }
37 stream << kv.first << '=' << kv.second;
38 }
39
40 return stream.str();
41}

◆ GetFontFeatures()

const std::map< std::string, int > & txt::FontFeatures::GetFontFeatures ( ) const

Definition at line 43 of file font_features.cc.

43 {
44 return feature_map_;
45}

◆ SetFeature()

void txt::FontFeatures::SetFeature ( std::string  tag,
int  value 
)

Definition at line 23 of file font_features.cc.

23 {
24 feature_map_[tag] = value;
25}
uint8_t value

The documentation for this class was generated from the following files: