Flutter Engine
minikin::MinikinFontForTest Class Reference

#include <MinikinFontForTest.h>

Inheritance diagram for minikin::MinikinFontForTest:
minikin::MinikinFont

Public Member Functions

 MinikinFontForTest (const std::string &font_path, int index, const std::vector< FontVariation > &variations)
 
 MinikinFontForTest (const std::string &font_path, int index)
 
 MinikinFontForTest (const std::string &font_path)
 
virtual ~MinikinFontForTest ()
 
float GetHorizontalAdvance (uint32_t glyph_id, const MinikinPaint &paint) const
 
void GetBounds (MinikinRect *bounds, uint32_t glyph_id, const MinikinPaint &paint) const
 
const std::string & fontPath () const
 
const void * GetFontData () const
 
size_t GetFontSize () const
 
int GetFontIndex () const
 
const std::vector< minikin::FontVariation > & GetAxes () const
 
std::shared_ptr< MinikinFontcreateFontWithVariation (const std::vector< FontVariation > &variations) const
 
- Public Member Functions inherited from minikin::MinikinFont
 MinikinFont (int32_t uniqueId)
 
virtual ~MinikinFont ()
 
virtual hb_face_t * CreateHarfBuzzFace () const
 
int32_t GetUniqueId () const
 

Additional Inherited Members

- Static Public Member Functions inherited from minikin::MinikinFont
static uint32_t MakeTag (char c1, char c2, char c3, char c4)
 

Detailed Description

Definition at line 26 of file MinikinFontForTest.h.

Constructor & Destructor Documentation

◆ MinikinFontForTest() [1/3]

minikin::MinikinFontForTest::MinikinFontForTest ( const std::string &  font_path,
int  index,
const std::vector< FontVariation > &  variations 
)

◆ MinikinFontForTest() [2/3]

minikin::MinikinFontForTest::MinikinFontForTest ( const std::string &  font_path,
int  index 
)
inline

Definition at line 31 of file MinikinFontForTest.h.

32  : MinikinFontForTest(font_path, index, std::vector<FontVariation>()) {}
MinikinFontForTest(const std::string &font_path, int index, const std::vector< FontVariation > &variations)

◆ MinikinFontForTest() [3/3]

minikin::MinikinFontForTest::MinikinFontForTest ( const std::string &  font_path)
inline

Definition at line 33 of file MinikinFontForTest.h.

References GetBounds(), GetHorizontalAdvance(), and ~MinikinFontForTest().

34  : MinikinFontForTest(font_path, 0) {}
MinikinFontForTest(const std::string &font_path, int index, const std::vector< FontVariation > &variations)

◆ ~MinikinFontForTest()

virtual minikin::MinikinFontForTest::~MinikinFontForTest ( )
virtual

Referenced by MinikinFontForTest().

Member Function Documentation

◆ createFontWithVariation()

std::shared_ptr<MinikinFont> minikin::MinikinFontForTest::createFontWithVariation ( const std::vector< FontVariation > &  variations) const
virtual

Reimplemented from minikin::MinikinFont.

Referenced by GetAxes().

◆ fontPath()

const std::string& minikin::MinikinFontForTest::fontPath ( ) const
inline

Definition at line 44 of file MinikinFontForTest.h.

44 { return mFontPath; }

◆ GetAxes()

const std::vector<minikin::FontVariation>& minikin::MinikinFontForTest::GetAxes ( ) const
inlinevirtual

Implements minikin::MinikinFont.

Definition at line 49 of file MinikinFontForTest.h.

References createFontWithVariation().

49  {
50  return mVariations;
51  }

◆ GetBounds()

void minikin::MinikinFontForTest::GetBounds ( MinikinRect bounds,
uint32_t  glyph_id,
const MinikinPaint paint 
) const
virtual

Implements minikin::MinikinFont.

Referenced by MinikinFontForTest().

◆ GetFontData()

const void* minikin::MinikinFontForTest::GetFontData ( ) const
inline

Definition at line 46 of file MinikinFontForTest.h.

46 { return mFontData; }

◆ GetFontIndex()

int minikin::MinikinFontForTest::GetFontIndex ( ) const
inline

Definition at line 48 of file MinikinFontForTest.h.

48 { return mFontIndex; }

◆ GetFontSize()

size_t minikin::MinikinFontForTest::GetFontSize ( ) const
inline

Definition at line 47 of file MinikinFontForTest.h.

47 { return mFontSize; }

◆ GetHorizontalAdvance()

float minikin::MinikinFontForTest::GetHorizontalAdvance ( uint32_t  glyph_id,
const MinikinPaint paint 
) const
virtual

Implements minikin::MinikinFont.

Referenced by MinikinFontForTest().


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