RHML - A Retro Computing Web Protocol

Thanks for checking this project out.  RHML is a simple protocol being developed to provide a web-like experience for retro computing enthus...

Saturday, July 28, 2018

Variable width font

Im thinking of changing the browsers to use a variable width font instead of a mono sized one.  This would improve readability and rendering speed.  The idea is somewhat taken from GEOS fonts.  The idea would be:

128 64 32 16  8  4  2  1
        *  *  * 
     *        *
     *        *
        *  *  *
              *
              *
     *        *
        *  *

Notice that the entire 128 column, 4, 2, and 1 are empty.   Also note that row 5 could be a descender below the baseline.

Each character would still require 8 bytes for it's definition, but there would be two additional bytes to be used as a header bytes to determine width and Y offset (for descenders)

So in the case above, the header byte would be:

128 64 32 16  8  4  2  1
     *  *  *  *               = 72 / $48

This would tell the browser to only render bits 3-6 for this character.

The second header byte would be:

128 64 32 16  8  4  2  1
                 *     *      = 5 / $05

Which indicates that the offset for this character (from the y plot) is 5 bytes down.  This one is a bit wasteful, unless I can find something to do with the high nybble.  Maybe later on a style byte or something.

Its even possible, with height and width bytes, to use even more data for larger font sizes.  But I dont really want to go there just yet.  Will see in time.



No comments:

Post a Comment