Class FontUnit

java.lang.Object
com.aspose.barcode.generation.FontUnit

public final class FontUnit extends Object

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


  This sample shows how to create and save a BarCode image.
  
         BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.CODE_128);
         generator.getCodeTextStyle().getFont().setStyle(FontStyle.ITALIC);
         generator.getCodeTextStyle().getFont().getSize().setPoint(18);
         generator.save("test.png");
        

  • Constructor Details

    • FontUnit

      public FontUnit(FontUnit source)
    • FontUnit

      public FontUnit(android.graphics.Typeface familyName, float sizeValue, GraphicsUnit graphicsUnit, float dpi)
    • FontUnit

      public FontUnit(android.graphics.Typeface familyName, float sizeValue, GraphicsUnit graphicsUnit, float dpi, int style)
  • Method Details

    • getFamilyName

      public android.graphics.Typeface getFamilyName()

      Gets the face name of this Font.

    • setFamilyName

      public void setFamilyName(android.graphics.Typeface value)

      Sets the face name of this Font.

    • getStyle

      public int getStyle()

      Gets style information for this FontUnit.

    • setStyle

      public void setStyle(int value)

      Sets style information for this FontUnit.

    • getSize

      public Unit getSize()

      Gets size of this FontUnit in Unit value.

      Throws:
      IllegalArgumentException - <p>The <b>Size</b> parameter value is less than or equal to 0.</p>
    • getStateHash

      @Deprecated public int getStateHash()
      Deprecated.