Package com.aspose.barcode.generation
Class FontUnit
java.lang.Object
com.aspose.barcode.generation.FontUnit
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
ConstructorsConstructorDescriptionFontUnit(android.graphics.Typeface familyName, float sizeValue, GraphicsUnit graphicsUnit, float dpi) FontUnit(android.graphics.Typeface familyName, float sizeValue, GraphicsUnit graphicsUnit, float dpi, int style) -
Method Summary
Modifier and TypeMethodDescriptionandroid.graphics.TypefaceGets the face name of this Font.getSize()Gets size of this FontUnit in Unit value.intDeprecated.intgetStyle()Gets style information for this FontUnit.voidsetFamilyName(android.graphics.Typeface value) Sets the face name of this Font.voidsetStyle(int value) Sets style information for this FontUnit.
-
Constructor Details
-
FontUnit
-
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
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.
-