GraphicsFont Constructor (String, Int32, FontStyle, Boolean) |
Initializes a graphics font with the given arguments.
Namespace:
AGI.Foundation.Graphics
Assembly:
AGI.Foundation.Graphics (in AGI.Foundation.Graphics.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax public GraphicsFont(
string name,
int size,
FontStyle fontStyle,
bool outline
)
Public Sub New (
name As String,
size As Integer,
fontStyle As FontStyle,
outline As Boolean
)
public:
GraphicsFont(
String^ name,
int size,
FontStyle fontStyle,
bool outline
)
new :
name : string *
size : int *
fontStyle : FontStyle *
outline : bool -> GraphicsFont
Parameters
- name
- Type: SystemString
The typeface name of the font. - size
- Type: SystemInt32
The size of the font. - fontStyle
- Type: System.DrawingFontStyle
The style of the font. FontStyle enumeration
values can be logically ored together to apply more than one style.
- outline
- Type: SystemBoolean
true if the font should be created with an outline around its characters;
otherwise, false.
Exceptions Exception | Condition |
---|
ArgumentException |
The font could not be created. In most cases, a font with a typeface
name equal to name could not be found on the system.
|
Remarks
For best performance, avoid creating duplicate font objects.
Instead assign the same font object to several text batch primitives.
See Also