PdfPageTextObjectFont  |  API reference  |  Android Developers


public class PdfPageTextObjectFont
extends Object



Represents the font attributes of a PdfPageTextObject. This class encapsulates the attributes font family, boldness and italic styling.

Summary

Constants

int FONT_FAMILY_COURIER

Constant representing the Courier font family.

int FONT_FAMILY_HELVETICA

Constant representing the Helvetica font family.

int FONT_FAMILY_SYMBOL

Constant representing the Symbol font family.

int FONT_FAMILY_TIMES_NEW_ROMAN

Constant representing the Times New Roman font family.

Public constructors

PdfPageTextObjectFont(PdfPageTextObjectFont font)

Creates a new PdfPageTextObjectFont by copying attributes from the another PdfPageTextObjectFont instance.

PdfPageTextObjectFont(int fontFamily, boolean isBold, boolean isItalic)

Constructs a new PdfPageTextObjectFont with the specified attributes.

Public methods

int getFontFamily()

Returns the font-family which is of type ERROR(FontFamily/android.graphics.pdf.component.PdfPageTextObjectFont.FontFamily FontFamily), previously set using PdfPageTextObjectFont.setFontFamily(int) or the constructor.

boolean isBold()

Determines if the text is bold.

boolean isItalic()

Determines if the text is italic.

void setBold(boolean bold)

Sets whether the text should be bold or not.

void setFontFamily(int fontFamily)

Set the font family of the object.

void setItalic(boolean italic)

Set whether the text should be italic or not.

Inherited methods

From class java.lang.Object

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Constants

FONT_FAMILY_COURIER

public static final int FONT_FAMILY_COURIER

Constant representing the Courier font family.

Constant Value: 0 (0x00000000)

FONT_FAMILY_HELVETICA

public static final int FONT_FAMILY_HELVETICA

Constant representing the Helvetica font family.

Constant Value: 1 (0x00000001)

FONT_FAMILY_SYMBOL

public static final int FONT_FAMILY_SYMBOL

Constant representing the Symbol font family. Note: This font family only renders symbols and does not support bold or italic.

Constant Value: 2 (0x00000002)

FONT_FAMILY_TIMES_NEW_ROMAN

public static final int FONT_FAMILY_TIMES_NEW_ROMAN

Constant representing the Times New Roman font family.

Constant Value: 3 (0x00000003)

Public constructors

Public methods

isBold

public boolean isBold ()

Determines if the text is bold.

Returns
boolean true if the text is bold, false otherwise.

isItalic

public boolean isItalic ()

Determines if the text is italic.

Returns
boolean true if the text is italic, false otherwise.

setBold

public void setBold (boolean bold)

Sets whether the text should be bold or not.

Parameters
bold boolean: true if the text should be bold, false otherwise.

setItalic

public void setItalic (boolean italic)

Set whether the text should be italic or not.

Parameters
italic boolean: true if the text should be italic, false otherwise.