FontUnit

FontUnit class

Defines a particular format for text, including font face, size, and style attributes where size in Unit value property.

new FontUnit()

Example:

This sample shows how to create and save a BarCode image.

  let generator = new BarcodeGenerator(EncodeTypes.CODE_128);
  generator.getParameters().getCaptionAbove().setText("CAPTION ABOOVE");
  generator.getParameters().getCaptionAbove().setVisible(true);
  generator.getParameters().getCaptionAbove().getFont().setStyle(FontStyle.ITALIC);
  generator.getParameters().getCaptionAbove().getFont().getSize().setPoint(25);

Methods

NameDescription
getFamilyName()Gets the face name of this Font.
getSize()Gets size of this FontUnit in Unit value.
getStyle()Gets style information for this FontUnit.
setFamilyName()Sets the face name of this Font.
setStyle()Sets style information for this FontUnit.