write.AmigaBitmapFont {AmigaFFH} R Documentation

## Write an AmigaBitmapFont(set) file

### Description

Functions to write AmigaBitmapFont and AmigaBitmapFontSet class objects to files.

### Usage

write.AmigaBitmapFont(x, file, disk = NULL)

write.AmigaBitmapFontSet(x, path = getwd(), disk = NULL)


### Arguments

 x Respectively an AmigaBitmapFont or a AmigaBitmapFontSet object depending on which of the write-functions is called. This is the object that will be written to the specified file. file A character string specifying the file location to which x (an AmigaBitmapFont object) needs to be written. It is common practice on the Amiga to use the font height in pixels as file name. disk A virtual Commodore Amiga disk to which the file should be written. This should be an amigaDisk object. Using this argument requires the adfExplorer package. When set to NULL, this argument is ignored. path A character string specifying the path where x (an AmigaBitmapFontSet object) needs to be stored. The filename for the font set will be extracted from x using fontName followed by the *.font extension. A subdirectory will be created with the same name (without the extension) if it doesn't already exists. In this subdirectory all the nested AmigaBitmapFont objects are stored.

### Details

AmigaBitmapFontSet class objects are written to a *.font file. The filename used for this purpose is obtained from the object itself using fontName. In addition, a subdirectory is created automatically (when it doesn't already exist) to which al the separate bitmap images for each font height are written to individual files.

AmigaBitmapFont class objects can also be written to a file. In order to use it on a Commodore Amiga or emulator, it is better to embed the font bitmap in a font set (using c) and write the set to corresponding files.

### Value

Invisibly returns the result of the call of close to the file connection. Or, when disk is specified, a copy of disk is returned to which the file(s) is/are written.

### Author(s)

Pepijn de Vries

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

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

### Examples

## Not run:
## obtain a bitmap font set:
data(font_example)

## write the font set to their files. The file name
## is extracted from the font object, so you only have
## to provide the path:
write.AmigaBitmapFont(font_example, temp.dir())

## extract a font bitmap:
font <- getAmigaBitmapFont(font_example, 9)

## and write it to the temp dir:
write.AmigaBitmapFont(font, file.path(temp.dir(), "9"))

## The following examples require the 'adfExplorer' package: