AmigaBitmapFont {AmigaFFH}R Documentation

The S3 AmigaBitmapFont and AmigaBitmapFontSet classes

Description

A comprehensive representation of monochromous Amiga bitmap fonts.

Details

Nowadays fonts are represented by vector graphics an computer systems. On the original Commodore Amiga, the screen resolution, system memory and cpu speed were limited. On those systems, it was more efficient to use bitmap images to represent the glyphs in fonts. The AmigaBitmapFontSet and AmigaBitmapFont classes can be used to represent Amiga bitmap fonts.

The Commodore Amiga had a directory named 'FONTS' located in the root, where (bitmap) fonts were stored. Font sets were stored under the font name with a *.font extension. Files with the *.font extension did not contain the bitmap images of the font. Rather the *.font file contained information on which font heights (in pixels) are available, in addition to some other meta-information.

The bitmap images were stored in separate files for each individual height. The AmigaBitmapFontSet is an S3 class that forms a comprehensive format (named list) to represent the *.font files. The AmigaBitmapFont is an S3 class is a comprehensive format (named list) that represent each font bitmap and glyph information. The AmigaBitmapFontSet objects will hold one or more AmigaBitmapFont objects.

The AmigaBitmapFont and AmigaBitmapFontSet objects are essentially named lists. Their structure and most important elements are described below. Although it is possible to replace elements manually, it is only advisable when you know what you are doing as it may break the validity of the font.

AmigaBitmapFontSet

AmigaBitmapFont

Information represented by a AmigaBitmapFont is not stored in *.font files. Rather it is stored in sub-directories of the font in separate files. It has the following structure:

Useful functions

For importing and exporting the following functions are useful: read.AmigaBitmapFont(), read.AmigaBitmapFontSet(), write.AmigaBitmapFont() and write.AmigaBitmapFontSet().

The following generic functions are implemented for these objects: plot(), print, as.raster() and as.raw().

Use c() to combine one or more AmigaBitmapFont objects into a AmigaBitmapFontSet.

Author(s)

Pepijn de Vries

References

http://amigadev.elowar.com/read/ADCD_2.1/Libraries_Manual_guide/node03E0.html http://amigadev.elowar.com/read/ADCD_2.1/Libraries_Manual_guide/node03DE.html http://amigadev.elowar.com/read/ADCD_2.1/Libraries_Manual_guide/node05BA.html

See Also

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

Other raster.operations: as.raster.AmigaBasicShape(), bitmapToRaster(), dither(), index.colours(), rasterToAmigaBasicShape(), rasterToAmigaBitmapFont(), rasterToBitmap(), rasterToHWSprite(), rasterToIFF()

Examples

## Not run: 
## 'font_example' is an example of the AmigaBitmapFontSet object:
data(font_example)

## An AmigaBitmapFont object can also be extracted from this object:
font_example_9 <- getAmigaBitmapFont(font_example, 9)

## the objects can be printed, plotted, converted to raw data or a raster:
print(font_example)
plot(font_example)
font_example_raw    <- as.raw(font_example)
font_example_raster <- as.raster(font_example)

## You can also format text using the font:
formated_raster     <- as.raster(font_example, text = "Foo bar", style = "bold")
plot(font_example, text = "Foo bar", style = "underlined", interpolate = F)

## End(Not run)

[Package AmigaFFH version 0.4.5 Index]