read.AmigaBitmapFontSet: Read AmigaBitmapFontSet from *.font file

View source: R/bitmapfont.r

read.AmigaBitmapFontSetR Documentation

Read AmigaBitmapFontSet from *.font file

Description

Reads AmigaBitmapFontSet() from *.font file including all nested bitmap images for all font heights.

Usage

read.AmigaBitmapFontSet(file, disk = NULL, ...)

Arguments

file

A character string of the filename of the *.font file to be read.

disk

A virtual Commodore Amiga disk from which the file should be read. This should be an amigaDisk() object. Using this argument requires the adfExplorer package. When set to NULL, this argument is ignored.

...

Currently ignored.

Details

The *.font file only holds meta-information. The bitmap images for each font height are stored in separate files, which are listed in the *.font file. The function reads the *.font file, including all nested bitmap files and returns it as a AmigaBitmapFontSet().

It can also read *.font files from adfExplorer::amigaDisk-class() objects, but that requires the adfExplorer package to be installed.

Value

Returns an AmigaBitmapFontSet() object read from the specified file.

Author(s)

Pepijn de Vries

See Also

Other AmigaBitmapFont.operations: AmigaBitmapFont, availableFontSizes(), c(), fontName(), font_example, getAmigaBitmapFont(), rasterToAmigaBitmapFont(), rawToAmigaBitmapFontSet(), rawToAmigaBitmapFont(), read.AmigaBitmapFont(), write.AmigaBitmapFont()

Other io.operations: read.AmigaBasicBMAP(), read.AmigaBasicShape(), read.AmigaBasic(), read.AmigaBitmapFont(), read.AmigaIcon(), read.SysConfig(), read.iff(), write.AmigaBasicShape(), write.AmigaBasic(), write.AmigaBitmapFont(), write.AmigaIcon(), write.SysConfig(), write.iff()

Examples

## Not run: 
data(font_example)

## in order to read, we first need to write a file"
write.AmigaBitmapFontSet(font_example, tempdir())

## The font is written as 'AmigaFFH.font' as that name
## is embedded in the AmigaBitmapFontSet object 'font_example'.
## We can read it as follows:
font.read <- read.AmigaBitmapFontSet(file.path(tempdir(), "AmigaFFH.font"))

## similarly, the file can also be written and read from and to
## a virtual amiga disk. The following codes requires the 'adfExplorer'
## package:
adf <- adfExplorer::blank.amigaDOSDisk("font.disk")
adf <- adfExplorer::dir.create.adf(adf, "FONTS")
adf <- write.AmigaBitmapFontSet(font_example, "DF0:FONTS", adf)
font.read <- read.AmigaBitmapFontSet("DF0:FONTS/AmigaFFH.font", adf)

## End(Not run)

AmigaFFH documentation built on June 22, 2024, 11:03 a.m.