Detailed Description

A font face for a particular font family. Note that you must consider if this font face has been loaded (see RequiresLoad) yet if you use deferred loading. The metrics will always be available however - just the glyphs will not be if RequiresLoad is true.

Public Member Functions

void AllGlyphsLoaded ()
 Called when all glyphs in this font face have been loaded up. Note that this may occur very late or, more likely never, when glyphs are loaded on demand. More...
 
void InvertNormals ()
 Inverts the normals of all glyphs in this font face. More...
 
void Load ()
 Loads the glyph info for this font face now. See RequiresLoad. More...
 
void Derive (FontFace from, bool italic, int weight)
 Derives this font face from the given one, with the given settings. More...
 
void SetItalicAngle (float angle)
 Applies the angle, in degrees, used for synthesizing italic chars. More...
 
void SetFlags (bool italic, int weight)
 Sets the weight of this face and if it's italic. More...
 
FontFace CreateSynthetic (bool italic, int weight)
 Creates a synthetic derivative of this font. Used when a font does not have e.g. an italic face. More...
 
Glyph Synthesize (int charCode)
 Synthesizes a glyph of the given charcode. More...
 
Glyph GetGlyph (int charCode)
 Gets a glyph for a particular charcode. Note that no glyphs are ever empty. More...
 

Public Attributes

int Weight
 The font weight. More...
 
string Name
 The full name of this font face. More...
 
bool Clockness
 The winding order of glyphs of this font. More...
 
bool DisableExtrude
 Use this to disable the SDF extrusion of a font face which may cause the letters to go streaky in rare cases. More...
 
bool WindingUnknown =true
 Is the clockness of this face known yet? If so, the first loaded glyph will figure it out. More...
 
bool RequiresLoad =false
 Is this font face loaded at all? If it requires a load, call Load(). Note that metrics are available if it's not loaded. More...
 
float LineGap =0.1f
 The gap between vertical lines. More...
 
float ItalicAngle =0.213f
 The computed amount of units to "push" (sheer) the top of a glyph over by. Std default is 12 degrees; tan(12d) units. More...
 
float Ascender
 The size of the ascender. Relative to em size. More...
 
float Descender
 The size of the descender. Relative to em size. More...
 
FontFamily Family
 The family that this font is in. Created by the first font in the family. More...
 
int CharacterCount
 The number of characters in this font face. More...
 
float MaxAdvanceWidth
 The maximum advance width. More...
 
float MinLeftSideBearing
 The minimum left side bearing. More...
 
float MinRightSideBearing
 The minimum right side bearing. More...
 
float MaxXExtent
 The maximum x extent. More...
 
float CaretAngle
 The angle of the caret when this font is used. More...
 
float CaretOffset
 The horizontal caret offset. More...
 
int NumberOfHMetrics
 The number of glyphs in this font face. More...
 
int UnitsPerEm =1000
 The glyph units per em value. More...
 
float UnitsPerEmF =1000f
 The glyph units per em value, as a float. More...
 
float StrikeSize =0.1f
 The thickness of a strikethrough line. More...
 
float StrikeOffset =0.25f
 The offset to a strikethrough line. More...
 
FontFace SyntheticDerivative
 The font that this is a derivative of. More...
 
FontFaceFlags StyleFlags =FontFaceFlags.Regular
 The flags for this font face. A style bitmask. More...
 
Dictionary< int, GlyphGlyphs =new Dictionary<int,Glyph>()
 All raw glyphs in this font face. Indexed by charcode. Note that if you have Font.Preload false, they may not be loaded. Check glyph.RequiresLoad if you access this directly. More...
 
CffGlyphParser CffParser
 The CFF parser, if this is a CFF format font. Used to load glyphs on demand. More...
 
FontParser Parser
 The raw parser. Used to load glyphs on demand. More...
 
int UnloadedGlyphs
 The number of not yet loaded glyphs in this font. More...
 

Package Functions

void FindWinding (Glyph glyph)
 Figures out the winding order of this font face from the given glyph. More...
 

Package Attributes

Glyph[] ParserGlyphs
 Don't use this! Use Glyphs instead. The raw glyph set used by the parser. May be null. More...
 

Properties

bool Synthetic [get]
 Is this a synthetic font? More...
 
bool Regular [get]
 Is this the regular font for this family? More...
 
bool Italic [get]
 True if this is an italic face. More...
 
bool Bold [get]
 True if this is a bold face. More...
 
string FamilyName [get, set]
 The name of the family this font is in. Set is for internal use only. More...
 

Member Function Documentation

void InfiniText.FontFace.AllGlyphsLoaded ( )
inline

Called when all glyphs in this font face have been loaded up. Note that this may occur very late or, more likely never, when glyphs are loaded on demand.

FontFace InfiniText.FontFace.CreateSynthetic ( bool  italic,
int  weight 
)
inline

Creates a synthetic derivative of this font. Used when a font does not have e.g. an italic face.

void InfiniText.FontFace.Derive ( FontFace  from,
bool  italic,
int  weight 
)
inline

Derives this font face from the given one, with the given settings.

void InfiniText.FontFace.FindWinding ( Glyph  glyph)
inlinepackage

Figures out the winding order of this font face from the given glyph.

Glyph InfiniText.FontFace.GetGlyph ( int  charCode)
inline

Gets a glyph for a particular charcode. Note that no glyphs are ever empty.

void InfiniText.FontFace.InvertNormals ( )
inline

Inverts the normals of all glyphs in this font face.

void InfiniText.FontFace.Load ( )
inline

Loads the glyph info for this font face now. See RequiresLoad.

void InfiniText.FontFace.SetFlags ( bool  italic,
int  weight 
)
inline

Sets the weight of this face and if it's italic.

void InfiniText.FontFace.SetItalicAngle ( float  angle)
inline

Applies the angle, in degrees, used for synthesizing italic chars.

Glyph InfiniText.FontFace.Synthesize ( int  charCode)
inline

Synthesizes a glyph of the given charcode.

Member Data Documentation

float InfiniText.FontFace.Ascender

The size of the ascender. Relative to em size.

float InfiniText.FontFace.CaretAngle

The angle of the caret when this font is used.

float InfiniText.FontFace.CaretOffset

The horizontal caret offset.

CffGlyphParser InfiniText.FontFace.CffParser

The CFF parser, if this is a CFF format font. Used to load glyphs on demand.

int InfiniText.FontFace.CharacterCount

The number of characters in this font face.

bool InfiniText.FontFace.Clockness

The winding order of glyphs of this font.

float InfiniText.FontFace.Descender

The size of the descender. Relative to em size.

bool InfiniText.FontFace.DisableExtrude

Use this to disable the SDF extrusion of a font face which may cause the letters to go streaky in rare cases.

FontFamily InfiniText.FontFace.Family

The family that this font is in. Created by the first font in the family.

Dictionary<int,Glyph> InfiniText.FontFace.Glyphs =new Dictionary<int,Glyph>()

All raw glyphs in this font face. Indexed by charcode. Note that if you have Font.Preload false, they may not be loaded. Check glyph.RequiresLoad if you access this directly.

float InfiniText.FontFace.ItalicAngle =0.213f

The computed amount of units to "push" (sheer) the top of a glyph over by. Std default is 12 degrees; tan(12d) units.

float InfiniText.FontFace.LineGap =0.1f

The gap between vertical lines.

float InfiniText.FontFace.MaxAdvanceWidth

The maximum advance width.

float InfiniText.FontFace.MaxXExtent

The maximum x extent.

float InfiniText.FontFace.MinLeftSideBearing

The minimum left side bearing.

float InfiniText.FontFace.MinRightSideBearing

The minimum right side bearing.

string InfiniText.FontFace.Name

The full name of this font face.

int InfiniText.FontFace.NumberOfHMetrics

The number of glyphs in this font face.

FontParser InfiniText.FontFace.Parser

The raw parser. Used to load glyphs on demand.

Glyph [] InfiniText.FontFace.ParserGlyphs
package

Don't use this! Use Glyphs instead. The raw glyph set used by the parser. May be null.

bool InfiniText.FontFace.RequiresLoad =false

Is this font face loaded at all? If it requires a load, call Load(). Note that metrics are available if it's not loaded.

float InfiniText.FontFace.StrikeOffset =0.25f

The offset to a strikethrough line.

float InfiniText.FontFace.StrikeSize =0.1f

The thickness of a strikethrough line.

FontFaceFlags InfiniText.FontFace.StyleFlags =FontFaceFlags.Regular

The flags for this font face. A style bitmask.

FontFace InfiniText.FontFace.SyntheticDerivative

The font that this is a derivative of.

int InfiniText.FontFace.UnitsPerEm =1000

The glyph units per em value.

float InfiniText.FontFace.UnitsPerEmF =1000f

The glyph units per em value, as a float.

int InfiniText.FontFace.UnloadedGlyphs

The number of not yet loaded glyphs in this font.

int InfiniText.FontFace.Weight

The font weight.

bool InfiniText.FontFace.WindingUnknown =true

Is the clockness of this face known yet? If so, the first loaded glyph will figure it out.

Property Documentation

bool InfiniText.FontFace.Bold
get

True if this is a bold face.

string InfiniText.FontFace.FamilyName
getset

The name of the family this font is in. Set is for internal use only.

bool InfiniText.FontFace.Italic
get

True if this is an italic face.

bool InfiniText.FontFace.Regular
get

Is this the regular font for this family?

bool InfiniText.FontFace.Synthetic
get

Is this a synthetic font?