The main class for handling global font settings.
Static Public Member Functions | |
static void | OnLogMessage (string message) |
Logs a message. More... | |
static FontFace | Load (byte[] data) |
Wrapper function for loading a font from the given data. Note that loaded fonts are cached once loaded. More... | |
static void | Clear () |
Clears all fonts. More... | |
static FontFamily | GetOrCreate (string name) |
Gets or creates a font family by name. More... | |
static FontFamily | Get (string name) |
Tries to get a font family by name. More... | |
Static Public Attributes | |
static bool | AlwaysUseTypo =true |
Should InfiniText always use the OS/2 'typo' metrics when an OS/2 table is present? This is the W3C specification but it seems browsers vary in unclear ways. More... | |
static int | GlyphID =1 |
A globally unique glyph ID. Used when placing glyphs on atlases. More... | |
static bool | UseGPU =true |
Should fonts be rendered using the GPU? Strongly advised they are! More... | |
static readonly float[] | AutoAliasHints |
A tuned set of points which hint the auto-alias system. More... | |
static float | Aliasing =0.3f |
The current text aliasing value. More... | |
static Scanner | Rasteriser |
The main rasteriser used for drawing fonts. Sets itself up as an SDF rasteriser by default. More... | |
static bool | Preload =true |
Should font glyphs be loaded when the font is? If yes, font loading takes slightly longer (especially if you use large fonts) but you'll instead have the entire font loaded which can be useful. More... | |
static bool | DeferLoad =false |
Should font faces be entirely deferred? If yes, font faces are loaded up only when they are first used (at which point preloading may also occur). More... | |
static bool | InvertedNormals =false |
See InvertNormals. More... | |
static float | SdfPixelHeight =40f |
Change PixelHeight instead. The SDF draw height. More... | |
static float | SdfOffset =0.05f |
The SDF offset. SDFSize / SdfPixelHeight. More... | |
static int | SdfSize =2 |
Change SDFSpread instead. The raw size of the default SDF spread. The bigger this is, the more anti-aliasing and bigger glows you can use. More... | |
static int | DoubleSdfSize =SdfSize*2 |
Change SDFSpread instead. Simply 2 times SdfSize. More... | |
static float | OutlineLocation =0.35f |
The SDF outline location. 0-1. More... | |
static Dictionary< string, FontFamily > | All |
All available font families. More... | |
static OnLogEvent | OnLog |
The delegate used when InfiniText logs a message. More... | |
Static Package Functions | |
static void | Start () |
Sets up InfiniText. Called automatically when the first font is loaded. More... | |
Properties | |
static int | SDFSpread [get, set] |
The size of the default SDF spread around glyphs. More... | |
static float | PixelHeight [get, set] |
The SDF draw height. Default is 40. More... | |
|
inlinestatic |
Clears all fonts.
|
inlinestatic |
Tries to get a font family by name.
|
inlinestatic |
Gets or creates a font family by name.
|
inlinestatic |
Wrapper function for loading a font from the given data. Note that loaded fonts are cached once loaded.
|
inlinestatic |
Logs a message.
|
inlinestaticpackage |
Sets up InfiniText. Called automatically when the first font is loaded.
|
static |
The current text aliasing value.
|
static |
All available font families.
|
static |
Should InfiniText always use the OS/2 'typo' metrics when an OS/2 table is present? This is the W3C specification but it seems browsers vary in unclear ways.
|
static |
A tuned set of points which hint the auto-alias system.
|
static |
Should font faces be entirely deferred? If yes, font faces are loaded up only when they are first used (at which point preloading may also occur).
|
static |
Change SDFSpread instead. Simply 2 times SdfSize.
|
static |
A globally unique glyph ID. Used when placing glyphs on atlases.
|
static |
See InvertNormals.
|
static |
The delegate used when InfiniText logs a message.
|
static |
The SDF outline location. 0-1.
|
static |
Should font glyphs be loaded when the font is? If yes, font loading takes slightly longer (especially if you use large fonts) but you'll instead have the entire font loaded which can be useful.
|
static |
The main rasteriser used for drawing fonts. Sets itself up as an SDF rasteriser by default.
|
static |
The SDF offset. SDFSize / SdfPixelHeight.
|
static |
Change PixelHeight instead. The SDF draw height.
|
static |
Change SDFSpread instead. The raw size of the default SDF spread. The bigger this is, the more anti-aliasing and bigger glows you can use.
|
static |
Should fonts be rendered using the GPU? Strongly advised they are!
|
staticgetset |
The SDF draw height. Default is 40.
|
staticgetset |
The size of the default SDF spread around glyphs.