Package com.aspose.barcode.generation
Class FontUnit
- java.lang.Object
-
- com.aspose.barcode.generation.FontUnit
-
public final class FontUnit extends java.lang.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 Summary
Constructors Constructor Description FontUnit(android.graphics.Typeface familyName, float sizeValue, com.aspose.barcode.generation.GraphicsUnit graphicsUnit, float dpi)
FontUnit(android.graphics.Typeface familyName, float sizeValue, com.aspose.barcode.generation.GraphicsUnit graphicsUnit, float dpi, int style)
FontUnit(FontUnit source)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description android.graphics.Typeface
getFamilyName()
Gets the face name of this Font.android.text.TextPaint
getFont()
Unit
getSize()
Gets size of this FontUnit in Unit value.int
getStateHash()
Deprecated.int
getStyle()
Gets style information for this FontUnit.void
setFamilyName(android.graphics.Typeface value)
Sets the face name of this Font.void
setStyle(int value)
Sets style information for this FontUnit.
-
-
-
Constructor Detail
-
FontUnit
public FontUnit(FontUnit source)
-
FontUnit
public FontUnit(android.graphics.Typeface familyName, float sizeValue, com.aspose.barcode.generation.GraphicsUnit graphicsUnit, float dpi)
-
FontUnit
public FontUnit(android.graphics.Typeface familyName, float sizeValue, com.aspose.barcode.generation.GraphicsUnit graphicsUnit, float dpi, int style)
-
-
Method Detail
-
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:
java.lang.IllegalArgumentException
-<p>The <b>Size</b> parameter value is less than or equal to 0.</p>
-
getFont
public android.text.TextPaint getFont()
-
getStateHash
@Deprecated public int getStateHash()
Deprecated.
-
-