Font

constructor(stockFont: Font.StockFont)

Constructor enables creating a stock font


constructor(nameWithExtension: String, slot: Font.Slot)

Constructor enables creating a custom font

The font information will take extracted from the font fle name, is possible

Font file name example: Roboto-Bold.ttf.20x18.2bpp.sif

  • Roboto-Bold.ttf: free form font description

  • 20x18: maxW x maxH

  • 2bpp: 2 bit per pixel sif file

  • sif: the font binary format

Parameters

nameWithExtension

the name of the font file (with extension)

slot

the required available slot for the font


constructor(nameWithExtension: String, slot: Font.Slot, maxW: Int, maxH: Int)

Constructor enables creating a custom font

The font information will take extracted from the font fle name, is possible The maxW & maxH parameter will be overridden by the maxW and maxH

Parameters

nameWithExtension

the name of the font file (with extension)

slot

the required available slot for the font

maxW

The width of the wider character within the font in pixels

maxH

The height of the highest character within the font in pixels


constructor(data: ByteArray, fType: FontType, slot: Font.Slot, maxW: Int, maxH: Int)

Constructor receiving font binary data

Parameters

data

the font binary data

fType

the font type

slot

the required available slot for the font

maxW

The width of the wider character within the font in pixels

maxH

The height of the highest character within the font in pixels