Flutter Engine
 
Loading...
Searching...
No Matches
txt::FontFeatures Class Reference

#include <font_features.h>

Public Member Functions

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

Detailed Description

Definition at line 16 of file font_features.h.

Member Function Documentation

◆ GetFeatureSettings()

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

Definition at line 15 of file font_features.cc.

15 {
16 if (feature_map_.empty()) {
17 return "";
18 }
19
20 std::ostringstream stream;
21
22 for (const auto& kv : feature_map_) {
23 if (stream.tellp()) {
24 stream << ',';
25 }
26 stream << kv.first << '=' << kv.second;
27 }
28
29 return stream.str();
30}

◆ GetFontFeatures()

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

Definition at line 32 of file font_features.cc.

32 {
33 return feature_map_;
34}

◆ SetFeature()

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

Definition at line 11 of file font_features.cc.

11 {
12 feature_map_[tag] = value;
13}
int32_t value

References value.

Referenced by flutter::decodeFontFeatures().


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