getFont

getFont(fontName:                           StringUtf8 io;
        pointSize:                          Real io;
        bold, italic, strikeout, underline: Boolean io);

The getFont method of the JadeDotNetType class is a helper method that enables you to retrieve font information from a .NET Font object, which is in the System.Drawing.dll assembly if that type has not been imported into JADE; for example, if a method in a .NET assembly returns a Font object, the Font type is not imported because it is not specific to the assembly when the assembly is imported into JADE.

The returned type for the imported method is the generic JadeDotNetType type.

The following method shows the use of the getColor method.

vars
    f : JadeDotNetType;                        // To represent a Font object
    fontName : StringUtf8;
    pointSize : Real;
    bold, italic, strikeout, underline : Boolean;
begin
    // Use createFont to make a Font object (10 pt Arial bold)
    create f transient;
    f.createFont("Arial", 10, true, false, false, false);
    // Use the helper method to retrieve font information from a Font object
    f.getFont(fontName, pointSize, bold, italic, strikeout, underline);
    write fontName;                            // Outputs Arial
    write pointSize;                           // Outputs 10
    write bold;                                // Outputs true
epilog
    delete f;
end;