CustomAndroidAPI  1.30
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 ()
 
int getLineSpacing ()
 
void setLineSpacing (int iValue) throws CustomException
 
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 LINESPACING_DEFAULT = 64
 
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

◆ getCharFontType()

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.

◆ getCharHeight()

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

Returns charHeight (FONT_SIZE_X1-FONT_SIZE_X8)

◆ getCharWidth()

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

Returns charWidth (FONT_SIZE_X1-FONT_SIZE_X8)

◆ getEmphasized()

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

Returns emphasized flag

Returns
true is emphasized else false

◆ getInternationalCharSet()

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.

◆ getInternationalCharSetString()

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

Returns the canonical name of the charset

Returns
the canonical name of the charset

◆ getItalic()

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

Returns italic flag

Returns
true if italic else false

◆ getJustification()

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.

◆ getLineSpacing()

int it.custom.printer.api.android.PrinterFont.getLineSpacing ( )
inline

Returns current line spacing

◆ getUnderline()

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

Returns the underline type

Returns
true if underline else false

◆ setCharFontType()

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

◆ setCharHeight()

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
charHeightheight ratio

◆ setCharWidth()

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
charWidthwidth ratio

◆ setEmphasized()

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

Set the emphasied flag. Default is false.

Parameters
bValuetrue to bold/emphasize the text

◆ setInternationalCharSet()

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

◆ setInternationalCharSetString()

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
interCharSetcharset canonical name (Ex. "GB2312")
Exceptions
CustomException

◆ setItalic()

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

Sets the italic flag. Default is false.

Parameters
bValuetrue to make the text italic else false

◆ setJustification()

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

◆ setLineSpacing()

void it.custom.printer.api.android.PrinterFont.setLineSpacing ( int  iValue) throws CustomException
inline

Set the line spacing. Please refere to the device command manual for additional info. NOTE: All the values under the font height set line spacing to 0.

Parameters
iValueline spacing
Exceptions
CustomException

◆ setUnderline()

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

Sets the underline attribute. Default is false

Parameters
bValuetrue to make the text underline else false
Exceptions
CustomException

Member Data Documentation

◆ FONT_CS_DEFAULT

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

Indicates that the International Charset is Default

◆ FONT_CS_EASTEEUROPE

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

Indicates that the International Charset is East Europe (PC852)

◆ FONT_CS_GREEK

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

Indicates that the International Charset is Greek (PC737)

◆ FONT_CS_ISRAELI

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

Indicates that the International Charset is Israeli (PC862)

◆ FONT_CS_RUSSIAN

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

Indicates that the International Charset is Russian (PC866)

◆ FONT_CS_TURKISH

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

Indicates that the International Charset is Turkish (PC857)

◆ FONT_JUSTIFICATION_CENTER

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

Indicates that the Font Justification is Center

◆ FONT_JUSTIFICATION_LEFT

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

Indicates that the Font Justification is Left

◆ FONT_JUSTIFICATION_RIGHT

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

Indicates that the Font Justification is Right

◆ FONT_SIZE_X1

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

Indicates that the Font Size is 1X

◆ FONT_SIZE_X2

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

Indicates that the Font Size is 2X

◆ FONT_SIZE_X3

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

Indicates that the Font Size is 3X

◆ FONT_SIZE_X4

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

Indicates that the Font Size is 4X

◆ FONT_SIZE_X5

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

Indicates that the Font Size is 5X

◆ FONT_SIZE_X6

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

Indicates that the Font Size is 6X

◆ FONT_SIZE_X7

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

Indicates that the Font Size is 7X

◆ FONT_SIZE_X8

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

Indicates that the Font Size is 8X

◆ FONT_TYPE_A

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

Indicates that the Font Type is A

◆ FONT_TYPE_B

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

Indicates that the Font Type is B

◆ LINESPACING_DEFAULT

final int it.custom.printer.api.android.PrinterFont.LINESPACING_DEFAULT = 64
static

Indicates the default line spacing