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(int fontFamily, boolean isBold, boolean isItalic)
Constructs a new |
|
Public methods | |
|---|---|
int
|
getFontFamily()
Returns the font-family which is of type |
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
| |||||||||||||||||||||||
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. |