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






Windows & Linux

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 NameThe font name.
Public Property PtSizeFont 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

© 2018 Analytical Graphics, Inc. All Rights Reserved.