write.AmigaBitmapFont {AmigaFFH}R Documentation

Write an AmigaBitmapFont(set) file


Functions to write AmigaBitmapFont and AmigaBitmapFontSet class objects to files.


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

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



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.


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.


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.


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.


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.


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.


Pepijn de Vries

See Also

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

Other io.operations: read.AmigaBitmapFontSet, read.AmigaBitmapFont, read.AmigaIcon, read.SysConfig, read.iff, write.AmigaIcon, write.SysConfig, write.iff


## Not run: 
## obtain a bitmap font set:

## 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:
font.disk <- adfExplorer::blank.amigaDOSDisk("font.disk")
font.disk <- adfExplorer::dir.create.adf(font.disk, "FONTS")
font.disk <- write.AmigaBitmapFontSet(font_example, "DF0:FONTS", font.disk)

## End(Not run)

[Package AmigaFFH version 0.3.1 Index]