[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IFontOption

IFontOption Interface

Represents font options for barcode label text.

This interface defines the font-related options exposed by barcode objects that support label text, including font family, style, weight, text decoration, alignment, and size. It is typically used together with IBarcode and ILabelOption on barcode values returned by barcode formulas.

Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public interface IFontOption
Public Interface IFontOption
Examples
worksheet.Range["A1"].Value = "123456789";
worksheet.Range["B1"].Formula =
    "=BC_CODE128(A1,\"rgb(0, 0, 0)\",\"rgb(255, 255, 255)\",true,\"bottom\","
    + "\"auto\",\"Arial\",\"italic\",\"bold\",\"underline\",\"left\",14,10,10,0,0)";
IFontOption fontOption = (IFontOption) worksheet.Range["B1"].Value;
string fontFamily = fontOption.FontFamily;
string fontStyle = fontOption.FontStyle;
string fontWeight = fontOption.FontWeight;
string fontTextDecoration = fontOption.FontTextDecoration;
string fontTextAlign = fontOption.FontTextAlign;
int fontSize = fontOption.FontSize;

Properties

Name Description
FontFamily

Gets the font family of barcode label text.

The default value is "sans-serif".

FontSize

Gets the numeric font size of barcode label text.

The return type is int. The default value is 12, which corresponds to the formula parameter default of 12px.

FontStyle

Gets the font style of barcode label text.

The default value is "normal".

FontTextAlign

Gets the alignment of barcode label text.

The default value is "center".

FontTextDecoration

Gets the text decoration of barcode label text.

The default value is "none".

FontWeight

Gets the font weight of barcode label text.

The default value is "normal".