Class UniversalFont
- Namespace
- Utils.Common
- Assembly
- Utils.Common.dll
The cross-platform replacement of System.Drawing.Font in ATAS X builds: an immutable description of a font
(family name, size, style, unit) that owns no native resources and needs no disposal. Indicators built for ATAS X use it
in place of Font, and the font references of indicators compiled for the classic platform are retargeted to it when
they are loaded on ATAS X. The classic platform build uses System.Drawing.Font instead. The family name is not checked
against the installed fonts.
Added in ATAS 8.0.15.
public sealed class UniversalFont
- Inheritance
-
objectUniversalFont
- Extension Methods
Constructors
UniversalFont(string, float, FontStyle)
Creates a font with the size in points.
public UniversalFont(string fontFamily, float size, FontStyle style)
Parameters
fontFamilystringThe name of the font family.
sizefloatThe em-size, in points.
styleFontStyleThe style of the font.
UniversalFont(string, float, FontStyle, GraphicsUnit)
Creates a font with the size in the given unit.
public UniversalFont(string fontFamily, float size, FontStyle style, GraphicsUnit unit)
Parameters
fontFamilystringThe name of the font family.
sizefloatThe em-size, in
unitunits.styleFontStyleThe style of the font.
unitGraphicsUnitThe unit of
size.
UniversalFont(string, float, FontStyle, GraphicsUnit, byte)
Creates a font with the size in the given unit and the given GDI character set.
public UniversalFont(string fontFamily, float size, FontStyle style, GraphicsUnit unit, byte gdiCharSet)
Parameters
fontFamilystringThe name of the font family.
sizefloatThe em-size, in
unitunits.styleFontStyleThe style of the font.
unitGraphicsUnitThe unit of
size.gdiCharSetbyteThe GDI character set.
UniversalFont(UniversalFontFamily, float, FontStyle, GraphicsUnit, byte)
Creates a font of the given family with the size in the given unit and the given GDI character set.
public UniversalFont(UniversalFontFamily fontFamily, float size, FontStyle style, GraphicsUnit unit, byte gdiCharSet)
Parameters
fontFamilyUniversalFontFamilyThe font family.
sizefloatThe em-size, in
unitunits.styleFontStyleThe style of the font.
unitGraphicsUnitThe unit of
size.gdiCharSetbyteThe GDI character set.
Properties
FontFamily
The font family.
public UniversalFontFamily FontFamily { get; }
Property Value
GdiCharSet
The GDI character set passed to the chart renderer; 0 for the constructors that do not take it.
public byte GdiCharSet { get; }
Property Value
- byte
Size
The em-size of the font, in Unit units.
public float Size { get; }
Property Value
- float
Style
The style of the font: bold, italic, underline, strikeout or a combination.
public FontStyle Style { get; }
Property Value
- FontStyle
Unit
The unit of Size; System.Drawing.GraphicsUnit.Point for the constructors that do not take it.
public GraphicsUnit Unit { get; }
Property Value
- GraphicsUnit