Flutter Engine
minikin::FontStyle Class Reference

#include <FontFamily.h>

Public Member Functions

 FontStyle ()
 
 FontStyle (int weight, bool italic)
 
 FontStyle (uint32_t langListId)
 
 FontStyle (int variant, int weight, bool italic)
 
 FontStyle (uint32_t langListId, int variant, int weight, bool italic)
 
int getWeight () const
 
bool getItalic () const
 
int getVariant () const
 
uint32_t getLanguageListId () const
 
bool operator== (const FontStyle other) const
 
android::hash_t hash () const
 

Static Public Member Functions

static uint32_t registerLanguageList (const std::string &languages)
 

Detailed Description

Definition at line 38 of file FontFamily.h.

Constructor & Destructor Documentation

◆ FontStyle() [1/5]

minikin::FontStyle::FontStyle ( )
inline

Definition at line 40 of file FontFamily.h.

Referenced by FontStyle().

41  : FontStyle(0 /* variant */, 4 /* weight */, false /* italic */) {}

◆ FontStyle() [2/5]

minikin::FontStyle::FontStyle ( int  weight,
bool  italic 
)
inline

Definition at line 42 of file FontFamily.h.

43  : FontStyle(0 /* variant */, weight, italic) {}

◆ FontStyle() [3/5]

minikin::FontStyle::FontStyle ( uint32_t  langListId)
inline

Definition at line 44 of file FontFamily.h.

References FontStyle().

45  : FontStyle(langListId,
46  0 /* variant */,
47  4 /* weight */,
48  false /* italic */) {}

◆ FontStyle() [4/5]

minikin::FontStyle::FontStyle ( int  variant,
int  weight,
bool  italic 
)

◆ FontStyle() [5/5]

minikin::FontStyle::FontStyle ( uint32_t  langListId,
int  variant,
int  weight,
bool  italic 
)

Member Function Documentation

◆ getItalic()

bool minikin::FontStyle::getItalic ( ) const
inline

Definition at line 54 of file FontFamily.h.

54 { return (bits & kItalicMask) != 0; }

◆ getLanguageListId()

uint32_t minikin::FontStyle::getLanguageListId ( ) const
inline

Definition at line 56 of file FontFamily.h.

56 { return mLanguageListId; }

◆ getVariant()

int minikin::FontStyle::getVariant ( ) const
inline

Definition at line 55 of file FontFamily.h.

55 { return (bits >> kVariantShift) & kVariantMask; }

◆ getWeight()

int minikin::FontStyle::getWeight ( ) const
inline

Definition at line 53 of file FontFamily.h.

53 { return bits & kWeightMask; }

◆ hash()

android::hash_t minikin::FontStyle::hash ( ) const

Referenced by minikin::hash_type(), and operator==().

◆ operator==()

bool minikin::FontStyle::operator== ( const FontStyle  other) const
inline

Definition at line 58 of file FontFamily.h.

References hash(), and registerLanguageList().

58  {
59  return bits == other.bits && mLanguageListId == other.mLanguageListId;
60  }

◆ registerLanguageList()

static uint32_t minikin::FontStyle::registerLanguageList ( const std::string &  languages)
static

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