IGxFontBase.Family

Syntax

Family: String;

Description

The Family property returns font name.

Comments

To get font size, use the IGxFontBase.Size property.

Example

Executing the example requires that the repository contains a regular report with the REGULAR_REPORT_IGXFONTBASE identifier, in which the first cell must be filled with any data.

Add links to the Drawing, Metabase, Report, Tab system assemblies.

Sub userproc;
Var
    mb: IMetaBase;
    regrep: IPrxReport;
    sheet: IPrxSheet;
    table: IPrxTable;
    range: ITabSheet;
    diap1: ITabRange;
    font: IGxFontBase;
    family, style: String;
    size: Double;
Begin
    // Open regular report for edit
    mb := MetabaseClass.Active;
    regrep := mb.ItemById("REGULAR_REPORT_IGXFONTBASE").Edit As IPrxReport;
    // Get the first cell of regular report
    sheet := regrep.Activesheet;
    table := sheet As IPrxTable;
    range := table.TabSheet;
    diap1 := range.Cell(00);
    // Get font of the first cell
    font := diap1.Style.Font.AsGxFont;
    // Display font name in the console window
    family := font.Family;
    debug.WriteLine("Font name: " + family);
    // Display font size in the console window     size := font.Size;
    debug.WriteLine("Font size = " + size.ToString);
    // Display font style in the console window  
    style := font.Style.ToString;
    debug.WriteLine("Font style: " + style);
End Sub userproc;

After executing the example the console window displays basic font parameters.

See also:

IGxFontBase