FontFormat Object
The FontFormat object contains the properties for text objects such as axes titles, axis labels, and contour labels.
The following table provides all properties of the FontFormat object.
Property |
Description |
Returns the application object. It is a read only property. |
|
Returns the background RGBA color object. It is a read only property. |
|
Returns/sets the bold style. |
|
Returns/sets the color as an RGB value. The Color property is superseded by the BackColorRGBA and ForeColorRGBA properties. Color has been preserved for backwards compatibility. |
|
Returns/sets the font face name. |
|
Returns the foreground RGBA color object. It is a read only property. |
|
Returns/sets the horizontal alignment. |
|
Returns/sets the italic style. |
|
Returns the parent object. It is a read only property. |
|
Returns/sets the font height in points. |
|
Returns/sets the strike-through style. |
|
Returns/sets the underline style. |
|
Returns/sets the vertical alignment. |
Example
The following script demonstrates how the FontFormat object is used in reference to the BaseLayer object.
Sub Main
'Declares SurferApp as an object
Dim SurferApp As Object
'Creates an instance of the Surfer Application object and assigns it
'to the variable named "SurferApp"
Set SurferApp = CreateObject("Surfer.Application")
'Makes Surfer visible
SurferApp.Visible = True
'Declares Plot as an object
Dim Plot As Object
'Creates a plot document in Surfer and assigns it to the variable
'named "Plot"
Set Plot = SurferApp.Documents.Add(srfDocPlot)
'Declares Shapes as an object
Dim Shapes As Object
'Assigns the Shapes collection to the variable named "Shapes"
Set Shapes = Plot.Shapes
'Declares MapFrame as an object
Dim MapFrame As Object
'Creates a base map and assigns the map coordinate system to the
'variable named "MapFrame"
Set MapFrame = Shapes.AddBaseMap(ImportFileName:=SurferApp.Path+"\Samples\ca2010.gsb")
'Declares BaseLayer as an object
Dim BaseLayer As Object
'Assigns the base map properties to the variable named "BaseLayer"
Set BaseLayer = MapFrame.Overlays(1)
'Declares FontFormat as an object
Dim FontFormat As Object
'Assigns the font properties of the base map to the variable named
'"FontFormat"
Set FontFormat = BaseLayer.Font
End Sub