| CustomAndroidAPI 1.11

- Main Page
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Variables Pages
Public Member Functions | Static Public Attributes | List of all members
it.custom.printer.api.android.PrinterFont Class Reference

## Public Member Functions
int | getCharWidth ()
void | setCharWidth (int charWidth) throws CustomException
int | getCharHeight ()
void | setCharHeight (int charHeight) throws CustomException
boolean | getEmphasized ()
void | setEmphasized (boolean bValue)
boolean | getItalic ()
void | setItalic (boolean bValue)
boolean | getUnderline ()
void | setUnderline (boolean bValue) throws CustomException
int | getJustification ()
void | setJustification (int justification) throws CustomException
void | setCharFontType (int charFontType) throws CustomException
int | getCharFontType ()
void | setInternationalCharSet (int interCharSet) throws CustomException
int | getInternationalCharSet ()
void | setInternationalCharSetString (String interCharSet) throws CustomException
String | getInternationalCharSetString ()

## Static Public Attributes
static final int | FONT_SIZE_X1 = 0
static final int | FONT_SIZE_X2 = 1
static final int | FONT_SIZE_X3 = 2
static final int | FONT_SIZE_X4 = 3
static final int | FONT_SIZE_X5 = 4
static final int | FONT_SIZE_X6 = 5
static final int | FONT_SIZE_X7 = 6
static final int | FONT_SIZE_X8 = 7
static final int | FONT_JUSTIFICATION_LEFT = 0
static final int | FONT_JUSTIFICATION_CENTER = 1
static final int | FONT_JUSTIFICATION_RIGHT = 2
static final int | FONT_TYPE_A = 0
static final int | FONT_TYPE_B = 1
static final int | FONT_CS_DEFAULT = 0
static final int | FONT_CS_RUSSIAN = 1
static final int | FONT_CS_TURKISH = 2
static final int | FONT_CS_EASTEEUROPE = 3
static final int | FONT_CS_ISRAELI = 4
static final int | FONT_CS_GREEK = 5

## Detailed Description

This the container class to hold various font attributes

## Member Function Documentation

int it.custom.printer.api.android.PrinterFont.getCharFontType | ( |  | ) |
| inline

Returns the font char type

Returns
  - FONT_TYPE_A - Font A.
  - FONT_TYPE_B - Font B.

int it.custom.printer.api.android.PrinterFont.getCharHeight | ( |  | ) |
| inline

Returns charHeight (FONT_SIZE_X1-FONT_SIZE_X8)

int it.custom.printer.api.android.PrinterFont.getCharWidth | ( |  | ) |
| inline

Returns charWidth (FONT_SIZE_X1-FONT_SIZE_X8)

boolean it.custom.printer.api.android.PrinterFont.getEmphasized | ( |  | ) |
| inline

Returns emphasized flag

Returns
  true is emphasized else false

int it.custom.printer.api.android.PrinterFont.getInternationalCharSet | ( |  | ) |
| inline

Returns the international char set

Returns
  - FONT_CS_DEFAULT - Default.
  - FONT_CS_RUSSIAN - RUSSIAN (Only if loaded on printer).
  - FONT_CS_TURKISH - TURKISH (Only if loaded on printer).
  - FONT_CS_EASTEEUROPE - EAST EUROPE (Only if loaded on printer).
  - FONT_CS_ISRAELI - ISRAELI (Only if loaded on printer).
  - FONT_CS_GREEK - GREEK (Only if loaded on printer).
  - -1 if the charset wasn't set by setInternationalCharSet function.

String it.custom.printer.api.android.PrinterFont.getInternationalCharSetString | ( |  | ) |
| inline

Returns the canonical name of the charset

Returns
  the canonical name of the charset

boolean it.custom.printer.api.android.PrinterFont.getItalic | ( |  | ) |
| inline

Returns italic flag

Returns
  true if italic else false

int it.custom.printer.api.android.PrinterFont.getJustification | ( |  | ) |
| inline

Return justification attribute

Returns
  - FONT_JUSTIFICATION_LEFT - left.
  - FONT_JUSTIFICATION_CENTER - center.
  - FONT_JUSTIFICATION_RIGHT - right.

boolean it.custom.printer.api.android.PrinterFont.getUnderline | ( |  | ) |
| inline

Returns the underline type

Returns
  true if underline else false

void it.custom.printer.api.android.PrinterFont.setCharFontType | ( | int | charFontType | ) | throws CustomException
| inline

Sets the char font type

Parameters

  charFontType | FONT_TYPE_A - Font A. FONT_TYPE_B - Font B.

Exceptions

  CustomException |

void it.custom.printer.api.android.PrinterFont.setCharHeight | ( | int | charHeight | ) | throws CustomException
| inline

Sets the character height ratio. Min is FONT_SIZE_X1 and Max is FONT_SIZE_X8

Parameters

  charHeight | height ratio

void it.custom.printer.api.android.PrinterFont.setCharWidth | ( | int | charWidth | ) | throws CustomException
| inline

Sets the character width ratio. Min is FONT_SIZE_X1 and Max is FONT_SIZE_X8

Parameters

  charWidth | width ratio

void it.custom.printer.api.android.PrinterFont.setEmphasized | ( | boolean | bValue | ) |
| inline

Set the emphasied flag. Default is false.

Parameters

  bValue | true to bold/emphasize the text

void it.custom.printer.api.android.PrinterFont.setInternationalCharSet | ( | int | interCharSet | ) | throws CustomException
| inline

Sets the international char set

Parameters

  interCharSet | FONT_CS_DEFAULT - Default. FONT_CS_RUSSIAN - RUSSIAN (Only if loaded on printer). FONT_CS_TURKISH - TURKISH (Only if loaded on printer). FONT_CS_EASTEEUROPE - EAST EUROPE (Only if loaded on printer). FONT_CS_ISRAELI - ISRAELI (Only if loaded on printer). FONT_CS_GREEK - GREEK (Only if loaded on printer).

Exceptions

  CustomException |

void it.custom.printer.api.android.PrinterFont.setInternationalCharSetString | ( | String | interCharSet | ) | throws CustomException
| inline

Sets the international char set (It works only if it was loaded on printer)

Remarks
  NOTE: The list of the available strings can be available Here.

Parameters

  interCharSet | charset canonical name (Ex. "GB2312")

Exceptions

  CustomException |

void it.custom.printer.api.android.PrinterFont.setItalic | ( | boolean | bValue | ) |
| inline

Sets the italic flag. Default is false.

Parameters

  bValue | true to make the text italic else false

void it.custom.printer.api.android.PrinterFont.setJustification | ( | int | justification | ) | throws CustomException
| inline

Sets the justification attribute

Parameters

  justification | FONT_JUSTIFICATION_LEFT - left. FONT_JUSTIFICATION_CENTER - center. FONT_JUSTIFICATION_RIGHT - right.

Exceptions

  CustomException |

void it.custom.printer.api.android.PrinterFont.setUnderline | ( | boolean | bValue | ) | throws CustomException
| inline

Sets the underline attribute. Default is false

Parameters

  bValue | true to make the text underline else false

Exceptions

  CustomException |

## Member Data Documentation

final int it.custom.printer.api.android.PrinterFont.FONT_CS_DEFAULT = 0
| static

Indicates that the International Charset is Default

final int it.custom.printer.api.android.PrinterFont.FONT_CS_EASTEEUROPE = 3
| static

Indicates that the International Charset is East Europe (PC852)

final int it.custom.printer.api.android.PrinterFont.FONT_CS_GREEK = 5
| static

Indicates that the International Charset is Greek (PC737)

final int it.custom.printer.api.android.PrinterFont.FONT_CS_ISRAELI = 4
| static

Indicates that the International Charset is Israeli (PC862)

final int it.custom.printer.api.android.PrinterFont.FONT_CS_RUSSIAN = 1
| static

Indicates that the International Charset is Russian (PC866)

final int it.custom.printer.api.android.PrinterFont.FONT_CS_TURKISH = 2
| static

Indicates that the International Charset is Turkish (PC857)

final int it.custom.printer.api.android.PrinterFont.FONT_JUSTIFICATION_CENTER = 1
| static

Indicates that the Font Justification is Center

final int it.custom.printer.api.android.PrinterFont.FONT_JUSTIFICATION_LEFT = 0
| static

Indicates that the Font Justification is Left

final int it.custom.printer.api.android.PrinterFont.FONT_JUSTIFICATION_RIGHT = 2
| static

Indicates that the Font Justification is Right

final int it.custom.printer.api.android.PrinterFont.FONT_SIZE_X1 = 0
| static

Indicates that the Font Size is 1X

final int it.custom.printer.api.android.PrinterFont.FONT_SIZE_X2 = 1
| static

Indicates that the Font Size is 2X

final int it.custom.printer.api.android.PrinterFont.FONT_SIZE_X3 = 2
| static

Indicates that the Font Size is 3X

final int it.custom.printer.api.android.PrinterFont.FONT_SIZE_X4 = 3
| static

Indicates that the Font Size is 4X

final int it.custom.printer.api.android.PrinterFont.FONT_SIZE_X5 = 4
| static

Indicates that the Font Size is 5X

final int it.custom.printer.api.android.PrinterFont.FONT_SIZE_X6 = 5
| static

Indicates that the Font Size is 6X

final int it.custom.printer.api.android.PrinterFont.FONT_SIZE_X7 = 6
| static

Indicates that the Font Size is 7X

final int it.custom.printer.api.android.PrinterFont.FONT_SIZE_X8 = 7
| static

Indicates that the Font Size is 8X

final int it.custom.printer.api.android.PrinterFont.FONT_TYPE_A = 0
| static

Indicates that the Font Type is A

final int it.custom.printer.api.android.PrinterFont.FONT_TYPE_B = 1
| static

Indicates that the Font Type is B