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