AGI STK Objects 11 Send comments on this topic.
IAgSc3dFont Interface





Description

IAgSc3dFont Interface.

Public Methods

Public Method IsFontAvailable Returns whether the specified font is installed in the system

Public Properties

Public Property AvailableFonts Names of fonts installed in the system.
Public Property Bold Specify whether the font is bold.
Public Property Italic Specify whether the font is italic.
Public Property Name The font name.
Public Property PtSize Font size in points.

Example

Configure scenario text font
[C#] Copy Code
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] Copy Code
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

© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1