FontUnit

Inheritance: java.lang.Object

public final class 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");

Constructors

ConstructorDescription
FontUnit(FontUnit source)
FontUnit(Typeface familyName, float sizeValue, GraphicsUnit graphicsUnit, float dpi)
FontUnit(Typeface familyName, float sizeValue, GraphicsUnit graphicsUnit, float dpi, int style)

Methods

MethodDescription
equals(Object arg0)
getClass()
getFamilyName()Gets the face name of this Font.
getFont()
getSize()Gets size of this FontUnit in Unit value.
getStateHash()
getStyle()Gets style information for this FontUnit.
hashCode()
notify()
notifyAll()
setFamilyName(Typeface value)Sets the face name of this Font.
setStyle(int value)Sets style information for this FontUnit.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

FontUnit(FontUnit source)

public FontUnit(FontUnit source)

Parameters:

ParameterTypeDescription
sourceFontUnit

FontUnit(Typeface familyName, float sizeValue, GraphicsUnit graphicsUnit, float dpi)

public FontUnit(Typeface familyName, float sizeValue, GraphicsUnit graphicsUnit, float dpi)

Parameters:

ParameterTypeDescription
familyNameandroid.graphics.Typeface
sizeValuefloat
graphicsUnitGraphicsUnit
dpifloat

FontUnit(Typeface familyName, float sizeValue, GraphicsUnit graphicsUnit, float dpi, int style)

public FontUnit(Typeface familyName, float sizeValue, GraphicsUnit graphicsUnit, float dpi, int style)

Parameters:

ParameterTypeDescription
familyNameandroid.graphics.Typeface
sizeValuefloat
graphicsUnitGraphicsUnit
dpifloat
styleint

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getFamilyName()

public Typeface getFamilyName()

Gets the face name of this Font.

Returns: android.graphics.Typeface

getFont()

public TextPaint getFont()

Returns: android.text.TextPaint

getSize()

public Unit getSize()

Gets size of this FontUnit in Unit value.

Returns: Unit

getStateHash()

public int getStateHash()

Returns: int

getStyle()

public int getStyle()

Gets style information for this FontUnit.

Returns: int

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setFamilyName(Typeface value)

public void setFamilyName(Typeface value)

Sets the face name of this Font.

Parameters:

ParameterTypeDescription
valueandroid.graphics.Typeface

setStyle(int value)

public void setStyle(int value)

Sets style information for this FontUnit.

Parameters:

ParameterTypeDescription
valueint

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int