Coerce raw data into an AmigaBitmapFontSet class object
Source:R/bitmapfont.r
rawToAmigaBitmapFontSet.RdAmigaBitmapFontSet() objects are comprehensive representations of binary Amiga
font files (*.font). Use this function to convert raw data from
such a file to an AmigaBitmapFontSet object.
Arguments
- x
A
vectorofrawdata that needs to be converted into anAmigaBitmapFontSet().- file
The
rawversion of theAmigaBitmapFontSet()does not contain the nested font bitmap images. In order to correctly construct anAmigaBitmapFontSet()the file location of the original *.font file is required in order to read and include the font bitmap image information.fileshould thus be acharacterstring specifying the file location of the *.font file.
Value
Returns an AmigaBitmapFontSet() object.
Details
This function converts raw data as stored in *.font
files. The function also needs the file location, in order
to load the nested bitmap images for each font height.
This function is effectively the inverse of as.raw().
See also
Other AmigaBitmapFont.operations:
AmigaBitmapFont,
availableFontSizes(),
c(),
fontName(),
font_example,
getAmigaBitmapFont(),
rasterToAmigaBitmapFont(),
rawToAmigaBitmapFont(),
read.AmigaBitmapFont(),
read.AmigaBitmapFontSet(),
write.AmigaBitmapFont()
Other raw.operations:
as.AmigaBasic(),
as.raw.AmigaBasic(),
colourToAmigaRaw(),
packBitmap(),
rawToAmigaBasic(),
rawToAmigaBasicBMAP(),
rawToAmigaBasicShape(),
rawToAmigaBitmapFont(),
rawToAmigaIcon(),
rawToHWSprite(),
rawToIFFChunk(),
rawToSysConfig(),
simpleAmigaIcon()
Examples
data(font_example)
## First create raw font set data. Note that this raw data
## does not include the nested font bitmap images.
fontset.raw <- as.raw(font_example)
## Therefore it is necesary to have the entire font stored as files:
write.AmigaBitmapFontSet(font_example, tempdir())
font.restored <- rawToAmigaBitmapFontSet(fontset.raw, file.path(tempdir(), "AmigaFFH.font"))