# Font drawing

The unit at gr/font.fs is an abstract interface for drawing font on a [gr/pix].

It describes a structure which has the method you'll likely be interested in the
most, "drawglyph ( bgcolor fgcolor g font -- )", which draws the specified glyph
index on current pixbuf destination, with specified background and foreground
colors, which must be in pixbuf destination colors.

To obtain a font structure, you'll use a kind of "load" word that will be
implemented by specific font units, for example [gr/font/ufx].

Current font abstraction assumes monospace fonts and consider all glyphs to have
the same pixel size.

Example usage:

  needs io/screen gr/font gr/font/ufx
  "data/font/atari8.uf1" loaduf1 const fnt
  0 0 screen pixdst! 0 $ffff 'X' fnt drawglyph

## API

### Fields

width  Width in pixels of glyphs
height Height in pixels of glyphs

### Methods

drawglyph ( bgcolor fgcolor glyph font -- )
  Draw glyph index "glyph" on current [gr/pix] destination using background
  color "bgcolor" and foreground color "fgcolor".
