Flutter Engine
The Flutter Engine
Classes | Public Member Functions | List of all members
SkFontArguments Struct Reference

#include <SkFontArguments.h>

Classes

struct  Palette
 
struct  VariationPosition
 

Public Member Functions

 SkFontArguments ()
 
SkFontArgumentssetCollectionIndex (int collectionIndex)
 
SkFontArgumentssetVariationDesignPosition (VariationPosition position)
 
int getCollectionIndex () const
 
VariationPosition getVariationDesignPosition () const
 
SkFontArgumentssetPalette (Palette palette)
 
Palette getPalette () const
 

Detailed Description

Represents a set of actual arguments for a font.

Definition at line 16 of file SkFontArguments.h.

Constructor & Destructor Documentation

◆ SkFontArguments()

SkFontArguments::SkFontArguments ( )
inline

Definition at line 43 of file SkFontArguments.h.

44 : fCollectionIndex(0)
45 , fVariationDesignPosition{nullptr, 0}
46 , fPalette{0, nullptr, 0} {}

Member Function Documentation

◆ getCollectionIndex()

int SkFontArguments::getCollectionIndex ( ) const
inline

Definition at line 71 of file SkFontArguments.h.

71 {
72 return fCollectionIndex;
73 }

◆ getPalette()

Palette SkFontArguments::getPalette ( ) const
inline

Definition at line 86 of file SkFontArguments.h.

86{ return fPalette; }

◆ getVariationDesignPosition()

VariationPosition SkFontArguments::getVariationDesignPosition ( ) const
inline

Definition at line 75 of file SkFontArguments.h.

75 {
76 return fVariationDesignPosition;
77 }

◆ setCollectionIndex()

SkFontArguments & SkFontArguments::setCollectionIndex ( int  collectionIndex)
inline

Specify the index of the desired font.

Font formats like ttc, dfont, cff, cid, pfr, t42, t1, and fon may actually be indexed collections of fonts.

Definition at line 53 of file SkFontArguments.h.

53 {
54 fCollectionIndex = collectionIndex;
55 return *this;
56 }

◆ setPalette()

SkFontArguments & SkFontArguments::setPalette ( Palette  palette)
inline

Definition at line 79 of file SkFontArguments.h.

79 {
80 fPalette.index = palette.index;
81 fPalette.overrides = palette.overrides;
82 fPalette.overrideCount = palette.overrideCount;
83 return *this;
84 }
const Override * overrides

◆ setVariationDesignPosition()

SkFontArguments & SkFontArguments::setVariationDesignPosition ( VariationPosition  position)
inline

Specify a position in the variation design space.

Any axis not specified will use the default value. Any specified axis not actually present in the font will be ignored.

Parameters
positionnot copied. The value must remain valid for life of SkFontArguments.

Definition at line 65 of file SkFontArguments.h.

65 {
66 fVariationDesignPosition.coordinates = position.coordinates;
67 fVariationDesignPosition.coordinateCount = position.coordinateCount;
68 return *this;
69 }

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