mikaelpatel/Cosa — pull request #288 by jediunix (2014-12-26 15:11:54+00:00)
Title: Simplified and Enhanced Fonts

This PR clarifies the meaning of *bitmap* within Cosa. **bitmap** now means the standard Cosa format (like GLCD, a byte represents 8 vertical pixels within a horizontal band, with the least significant bit at the top, with the bytes progressing from the left to the right through the band). An **icon** is the same format as a **bitmap** with the exception of optionally being preceded by width and height bytes.

1. `UTFTFont` has been **removed**. Consumers needing to use UTFT formatted font data will need to convert to the standard Cosa format. A very simple converter *utft2bdf.c* in https://github.com/jediunix/bdf2uc can be used to convert UTFT fonts to BDF which can then be converted to the Cosa format using *bdf2uc* (https://github.com/jediunix/bdf2uc).

2. `GLCDFont` has been **removed**. `Font` is now equivalent to a GLCDFont. The only `Font` previously in Cosa (System5x7) was equivalent to the GLCD format. Consumers that were using `Font` for fonts larger than 1 band (8 pixels high) will need to convert their fonts to the new Cosa standard format.

3. All the X11/Adobe fixed width fonts have been implemented. They were created by *bdf2uc* (https://github.com/jediunix/bdf2uc) from the original BDF files.

4. Test case CosaCanvasFontST7735 was created to exercise fonts on the ST7735. The active font is selected by a define.

5. The width and height methods of `Font` are deprecated due to inclusion of `SPACING` and potential confusion relative to `WIDTH`. `SPACING` is only a hint.

6. `LINE_SPACING` was added to `Font`. `LINE_SPACING` is only a hint.

Tested with ST7735 only (and https://github.com/jediunix/CosaOLED) as I do not have the other devices.