InfiniText.FontFamily Class Reference

Detailed Description

A font family is a collection of font faces (Font objects). A font family is e.g. Arial, and it's faces are e.g. bold and italic variants.

Public Member Functions

 FontFamily (string name)
 
void Add (FontFace font)
 Adds the given font face to this family. More...
 
void SetExtrude (bool active)
 Use this to disable or enable SDF extrusion. In some rare cases, it can make fonts go streaky. Enabled by default. More...
 
void InvertNormals ()
 Use this to invert the normals of the glyphs in this face. Can be used to make letters go more/less bold. More...
 
Glyph GetGlyph (int charcode, FontFaceFlags style)
 Gets or synthesises a glyph for the given style settings which include weight and italic. Style code 400 means regular. More...
 
FontFace BestWeight (List< FontFace > faces, int weight, out int bestWeightDiff)
 

Public Attributes

string Name
 The name of this family. More...
 
FontFace Regular
 The regular "default" font. Always set (first font to join). More...
 
bool DisableExtrude
 True if all faces of this font should disable their extrusion. Enabled by default, but it can make some rare fonts go streaky. More...
 
List< FontFaceBold
 Set of all bold faces that are not italic. More...
 
List< FontFaceItalics
 Set of all italic faces. More...
 
bool InvertedNormals =false
 See InvertNormals. More...
 
Dictionary< FontFaceFlags,
FontFace
FontFaces =new Dictionary<FontFaceFlags,FontFace>()
 All self-declared italic fonts. More...
 

Constructor & Destructor Documentation

InfiniText.FontFamily.FontFamily ( string  name)
inline

Member Function Documentation

void InfiniText.FontFamily.Add ( FontFace  font)
inline

Adds the given font face to this family.

FontFace InfiniText.FontFamily.BestWeight ( List< FontFace faces,
int  weight,
out int  bestWeightDiff 
)
inline
Glyph InfiniText.FontFamily.GetGlyph ( int  charcode,
FontFaceFlags  style 
)
inline

Gets or synthesises a glyph for the given style settings which include weight and italic. Style code 400 means regular.

void InfiniText.FontFamily.InvertNormals ( )
inline

Use this to invert the normals of the glyphs in this face. Can be used to make letters go more/less bold.

void InfiniText.FontFamily.SetExtrude ( bool  active)
inline

Use this to disable or enable SDF extrusion. In some rare cases, it can make fonts go streaky. Enabled by default.

Member Data Documentation

List<FontFace> InfiniText.FontFamily.Bold

Set of all bold faces that are not italic.

bool InfiniText.FontFamily.DisableExtrude

True if all faces of this font should disable their extrusion. Enabled by default, but it can make some rare fonts go streaky.

Dictionary<FontFaceFlags,FontFace> InfiniText.FontFamily.FontFaces =new Dictionary<FontFaceFlags,FontFace>()

All self-declared italic fonts.

bool InfiniText.FontFamily.InvertedNormals =false

See InvertNormals.

List<FontFace> InfiniText.FontFamily.Italics

Set of all italic faces.

string InfiniText.FontFamily.Name

The name of this family.

FontFace InfiniText.FontFamily.Regular

The regular "default" font. Always set (first font to join).