Class FontsController
App font family controller.
Inherited Members
Namespace: EduCATS.Fonts
Assembly: EduCATS.dll
Syntax
public static class FontsController
Fields
DefaultFont
Default font key.
Declaration
public const string DefaultFont = "font_default"
Field Value
Type | Description |
---|---|
string |
Methods
GetCurrentFont(bool)
Get current font.
Declaration
public static string GetCurrentFont(bool bold = false)
Parameters
Type | Name | Description |
---|---|---|
bool | bold |
Returns
Type | Description |
---|---|
string | Font family. |
GetFont(string, bool)
Get font by family.
Declaration
public static string GetFont(string font, bool bold)
Parameters
Type | Name | Description |
---|---|---|
string | font | Font family. |
bool | bold |
Returns
Type | Description |
---|---|
string | Font family. |
GetFontName(string)
Get font name without alias.
Declaration
public static string GetFontName(string fontFamily)
Parameters
Type | Name | Description |
---|---|---|
string | fontFamily | Font family. |
Returns
Type | Description |
---|---|
string | Font family. |
GetFonts()
Get font list.
Declaration
public static List<string> GetFonts()
Returns
Type | Description |
---|---|
List<string> | Font list. |
Initialize(IPlatformServices)
Initialize fonts.
Declaration
public static void Initialize(IPlatformServices platformServices)
Parameters
Type | Name | Description |
---|---|---|
IPlatformServices | platformServices | Platform services. |
Remarks
Call this on app start.
SetCurrentFont()
Set current font.
Declaration
public static void SetCurrentFont()
SetFont(string)
Set font.
Declaration
public static void SetFont(string fontName)
Parameters
Type | Name | Description |
---|---|---|
string | fontName | Font family. |