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 and Description |
---|
FontUnit(FontUnit source) |
FontUnit(java.lang.String familyName,
float sizeValue,
GraphicsUnit graphicsUnit,
float dpi,
int style) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFamilyName()
Gets the face name of this Font.
|
com.aspose.ms.System.Drawing.Font |
getFont()
Deprecated.
|
Unit |
getSize()
Gets size of this FontUnit in Unit value.
|
int |
getStateHash() |
int |
getStyle()
Gets style information for this FontUnit.
|
void |
setFamilyName(java.lang.String value)
Sets the face name of this Font.
|
void |
setStyle(int value)
Sets style information for this FontUnit.
|
public FontUnit(FontUnit source)
public FontUnit(java.lang.String familyName, float sizeValue, GraphicsUnit graphicsUnit, float dpi, int style)
public java.lang.String getFamilyName()
Gets the face name of this Font.
public void setFamilyName(java.lang.String value)
Sets the face name of this Font.
public int getStyle()
Gets style information for this FontUnit.
public void setStyle(int value)
Sets style information for this FontUnit.
public Unit getSize()
Gets size of this FontUnit in Unit value.
java.lang.IllegalArgumentException
- <p>The <b>Size</b> parameter value is less than or equal to 0.</p>
@Deprecated public com.aspose.ms.System.Drawing.Font getFont()
public int getStateHash()