BarcodeTextOptions Class

The style of the human-readable text (Barcode.Text) printed under the bars of a barcode (BarcodeRenderOptions.Text).

public sealed class BarcodeTextOptions

Remarks

The text is measured with the metrics of BarcodeTextOptions.Fonts, and the fonts become the fonts of the scene (Scene.Fonts), so the SVG, image and PDF renderers draw it with the fonts that measured it. Set SvgRenderOptions.EmbedFonts to embed the font in an SVG document. The text is one line: its control characters (such as the new lines a Code 128 barcode can encode) are drawn as ?.

Constructors

NameDescription
BarcodeTextOptions()

BarcodeTextOptions()

BarcodeTextOptions.cs
public BarcodeTextOptions()

No documentation is available.

Properties

NameDescription
FontSizeGets or sets the size of the font, in units per em. Default is 14.
FontsGets or sets the fonts of the text. Default is BarcodeFonts.OcrB, the font usually printed under EAN and UPC barcodes.
PaintGets or sets the paint of the text. Default is null: the text is painted with BarcodeRenderOptions.DarkPaint.
SpacingGets or sets the space between the bottom of the bars and the top of the text. Default is 2.

Gets or sets the size of the font, in units per em. Default is 14.

public double FontSize { get; set; }

Property value

double

Remarks

The digits of EAN and UPC barcodes are smaller when they do not fit between the guard bars at this size.

Gets or sets the fonts of the text. Default is BarcodeFonts.OcrB, the font usually printed under EAN and UPC barcodes.

public SceneFontCollection Fonts { get; set; }

Property value

SceneFontCollection

Gets or sets the paint of the text. Default is null: the text is painted with BarcodeRenderOptions.DarkPaint.

public ScenePaint? Paint { get; set; }

Property value

ScenePaint?

Gets or sets the space between the bottom of the bars and the top of the text. Default is 2.

public double Spacing { get; set; }

Property value

double

Remarks

For EAN and UPC barcodes, it is the space between the bottom of the data bars (the guard bars are longer) and the digits, and between the digits of the add-on and its bars.