Font: IGxFont;
The Font property determines font parameters of a map layer label.
The module is connected to the regular report, which sheet contains the map.
Add links to the Drawing, Map, Report, Tab system assemblies.
Sub LayerFont;
Var
Sheets: IPrxSheets;
SheetT : IPrxTable;
Map : IMap;
Layer : IMapLayer;
Begin
Sheets := PrxReport.ActiveReport.Sheets;
SheetT := Sheets.Item(0) As IPrxTable;
Map := SheetT.TabSheet.Objects.Item(0).Extension As IMap;
Layer := Map.Layers.FindByName("Regions");
// Set map layer label font options
Layer.Font := New GxFont.Create("Arial Black", 8, 1 As GxFontStyle, 3 As GxUnit);
// Set map layer label font color
Layer.FontColor := GxColor.FromName("Red");
Map.Refresh;
End Sub LayerFont;
After executing the example the font options of the layer label are changed to Arial Black, font size 8, font style bold, and the Point unit of measurement. the layer label font color is changed to red:

See also: