STK ObjectsSend comments on this topic.
IAgSc3dFont Interface

Description

IAgSc3dFont Interface.

Public Methods

Public Method IsFontAvailableReturns whether the specified font is installed in the system.

Public Properties

Public Property AvailableFontsNames of fonts installed in the system.
Public Property BoldSpecify whether the font is bold.
Public Property ItalicSpecify whether the font is italic.
Public Property NameGets or sets the font name.
Public Property PtSizeFont size in points.

Example

Configure scenario text font
[C#]
IAgSc3dFont fonts = scenario.VO.LargeFont;

fonts.Bold = true;
fonts.Italic = true;
fonts.PtSize = AgESc3dPtSize.eSc3dFontSize36;

if (fonts.IsFontAvailable("Impact"))
{
    fonts.Name = "Impact";
}

// AvailableFonts returns a one dimensional array of font strings
Array allFonts = fonts.AvailableFonts;
int index = Array.IndexOf(allFonts, "Courier");
if (index != -1)
{
    fonts.Name = allFonts.GetValue(index) as string;
}
Configure scenario text font
[Visual Basic .NET]
Dim fonts As IAgSc3dFont = scenario.VO.LargeFont

fonts.Bold = True
fonts.Italic = True
fonts.PtSize = AgESc3dPtSize.eSc3dFontSize36

If fonts.IsFontAvailable("Impact") Then
	fonts.Name = "Impact"
End If

' AvailableFonts returns a one dimensional array of font strings
Dim allFonts As Array = fonts.AvailableFonts
Dim index As Integer = Array.IndexOf(allFonts, "Courier")
If index <> -1 Then
	fonts.Name = TryCast(allFonts.GetValue(index), String)
End If
© 2024 Analytical Graphics, Inc. All Rights Reserved.