(********************************************************************)
(*                                                                  *)
(*  font8x8.s7i  Bitmap font with 8x8 pixel used by TI-99/4A.       *)
(*  Copyright (C) 2020  Thomas Mertes                               *)
(*                                                                  *)
(*  This file is part of the Seed7 Runtime Library.                 *)
(*                                                                  *)
(*  The Seed7 Runtime Library is free software; you can             *)
(*  redistribute it and/or modify it under the terms of the GNU     *)
(*  Lesser General Public License as published by the Free Software *)
(*  Foundation; either version 2.1 of the License, or (at your      *)
(*  option) any later version.                                      *)
(*                                                                  *)
(*  The Seed7 Runtime Library is distributed in the hope that it    *)
(*  will be useful, but WITHOUT ANY WARRANTY; without even the      *)
(*  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR *)
(*  PURPOSE.  See the GNU Lesser General Public License for more    *)
(*  details.                                                        *)
(*                                                                  *)
(*  You should have received a copy of the GNU Lesser General       *)
(*  Public License along with this program; if not, write to the    *)
(*  Free Software Foundation, Inc., 51 Franklin Street,             *)
(*  Fifth Floor, Boston, MA  02110-1301, USA.                       *)
(*                                                                  *)
(********************************************************************)


include "bitmapfont.s7i";


const func bitmapFont: genFont8x8 is func
  result
    var bitmapFont: bmpFont is bitmapFont.value;
  begin
    bmpFont.xHeight       :=  8;
    bmpFont.capHeight     :=  8;
    bmpFont.lineHeight    :=  8;
    bmpFont.ascent        :=  0;
    bmpFont.descent       :=  0;
    bmpFont.baseLineDelta :=  7;

    incl(bmpFont.fontPictures, ' ',
    [] ("        ",
        "        ",
        "        ",
        "        ",
        "        ",
        "        ",
        "        ",
        "        "));

    incl(bmpFont.fontPictures, '!',
    [] ("        ",
        "   X    ",
        "   X    ",
        "   X    ",
        "   X    ",
        "   X    ",
        "        ",
        "   X    "));

    incl(bmpFont.fontPictures, '"',
    [] ("        ",
        "  X X   ",
        "  X X   ",
        "  X X   ",
        "        ",
        "        ",
        "        ",
        "        "));

    incl(bmpFont.fontPictures, '#',
    [] ("        ",
        "  X X   ",
        "  X X   ",
        " XXXXX  ",
        "  X X   ",
        " XXXXX  ",
        "  X X   ",
        "  X X   "));

    incl(bmpFont.fontPictures, '$',
    [] ("        ",
        "  XXX   ",
        " X X X  ",
        " X X    ",
        "  XXX   ",
        "   X X  ",
        " X X X  ",
        "  XXX   "));

    incl(bmpFont.fontPictures, '%',
    [] ("        ",
        " XX     ",
        " XX  X  ",
        "    X   ",
        "   X    ",
        "  X     ",
        " X  XX  ",
        "    XX  "));

    incl(bmpFont.fontPictures, '&',
    [] ("        ",
        "  X     ",
        " X X    ",
        " X X    ",
        "  X     ",
        " X X X  ",
        " X  X   ",
        "  XX X  "));

    incl(bmpFont.fontPictures, ''',
    [] ("        ",
        "    X   ",
        "    X   ",
        "   X    ",
        "        ",
        "        ",
        "        ",
        "        "));

    incl(bmpFont.fontPictures, '(',
    [] ("        ",
        "    X   ",
        "   X    ",
        "  X     ",
        "  X     ",
        "  X     ",
        "   X    ",
        "    X   "));

    incl(bmpFont.fontPictures, ')',
    [] ("        ",
        "  X     ",
        "   X    ",
        "    X   ",
        "    X   ",
        "    X   ",
        "   X    ",
        "  X     "));

    incl(bmpFont.fontPictures, '*',
    [] ("        ",
        "        ",
        "  X X   ",
        "   X    ",
        " XXXXX  ",
        "   X    ",
        "  X X   ",
        "        "));

    incl(bmpFont.fontPictures, '+',
    [] ("        ",
        "        ",
        "   X    ",
        "   X    ",
        " XXXXX  ",
        "   X    ",
        "   X    ",
        "        "));

    incl(bmpFont.fontPictures, ',',
    [] ("        ",
        "        ",
        "        ",
        "        ",
        "        ",
        "  XX    ",
        "   X    ",
        "  X     "));

    incl(bmpFont.fontPictures, '-',
    [] ("        ",
        "        ",
        "        ",
        "        ",
        " XXXXX  ",
        "        ",
        "        ",
        "        "));

    incl(bmpFont.fontPictures, '.',
    [] ("        ",
        "        ",
        "        ",
        "        ",
        "        ",
        "        ",
        "  XX    ",
        "  XX    "));

    incl(bmpFont.fontPictures, '/',
    [] ("        ",
        "        ",
        "     X  ",
        "    X   ",
        "   X    ",
        "  X     ",
        " X      ",
        "        "));

    incl(bmpFont.fontPictures, '0',
    [] ("        ",
        "  XXX   ",
        " X   X  ",
        " X   X  ",
        " X   X  ",
        " X   X  ",
        " X   X  ",
        "  XXX   "));

    incl(bmpFont.fontPictures, '1',
    [] ("        ",
        "   X    ",
        "  XX    ",
        "   X    ",
        "   X    ",
        "   X    ",
        "   X    ",
        "  XXX   "));

    incl(bmpFont.fontPictures, '2',
    [] ("        ",
        "  XXX   ",
        " X   X  ",
        "     X  ",
        "    X   ",
        "   X    ",
        "  X     ",
        " XXXXX  "));

    incl(bmpFont.fontPictures, '3',
    [] ("        ",
        "  XXX   ",
        " X   X  ",
        "     X  ",
        "   XX   ",
        "     X  ",
        " X   X  ",
        "  XXX   "));

    incl(bmpFont.fontPictures, '4',
    [] ("        ",
        "    X   ",
        "   XX   ",
        "  X X   ",
        " X  X   ",
        " XXXXX  ",
        "    X   ",
        "    X   "));

    incl(bmpFont.fontPictures, '5',
    [] ("        ",
        " XXXXX  ",
        " X      ",
        " XXXX   ",
        "     X  ",
        "     X  ",
        " X   X  ",
        "  XXX   "));

    incl(bmpFont.fontPictures, '6',
    [] ("        ",
        "   XX   ",
        "  X     ",
        " X      ",
        " XXXX   ",
        " X   X  ",
        " X   X  ",
        "  XXX   "));

    incl(bmpFont.fontPictures, '7',
    [] ("        ",
        " XXXXX  ",
        "     X  ",
        "    X   ",
        "   X    ",
        "  X     ",
        "  X     ",
        "  X     "));

    incl(bmpFont.fontPictures, '8',
    [] ("        ",
        "  XXX   ",
        " X   X  ",
        " X   X  ",
        "  XXX   ",
        " X   X  ",
        " X   X  ",
        "  XXX   "));

    incl(bmpFont.fontPictures, '9',
    [] ("        ",
        "  XXX   ",
        " X   X  ",
        " X   X  ",
        "  XXXX  ",
        "     X  ",
        "    X   ",
        "  XX    "));

    incl(bmpFont.fontPictures, ':',
    [] ("        ",
        "        ",
        "  XX    ",
        "  XX    ",
        "        ",
        "  XX    ",
        "  XX    ",
        "        "));

    incl(bmpFont.fontPictures, ';',
    [] ("        ",
        "        ",
        "  XX    ",
        "  XX    ",
        "        ",
        "  XX    ",
        "   X    ",
        "  X     "));

    incl(bmpFont.fontPictures, '<',
    [] ("        ",
        "    X   ",
        "   X    ",
        "  X     ",
        " X      ",
        "  X     ",
        "   X    ",
        "    X   "));

    incl(bmpFont.fontPictures, '=',
    [] ("        ",
        "        ",
        "        ",
        " XXXXX  ",
        "        ",
        " XXXXX  ",
        "        ",
        "        "));

    incl(bmpFont.fontPictures, '>',
    [] ("        ",
        "  X     ",
        "   X    ",
        "    X   ",
        "     X  ",
        "    X   ",
        "   X    ",
        "  X     "));

    incl(bmpFont.fontPictures, '?',
    [] ("        ",
        "  XXX   ",
        " X   X  ",
        "     X  ",
        "    X   ",
        "   X    ",
        "        ",
        "   X    "));

    incl(bmpFont.fontPictures, '@',
    [] ("        ",
        "  XXX   ",
        " X   X  ",
        " X XXX  ",
        " X X X  ",
        " X XXX  ",
        " X      ",
        "  XXX   "));

    incl(bmpFont.fontPictures, 'A',
    [] ("        ",
        "  XXX   ",
        " X   X  ",
        " X   X  ",
        " XXXXX  ",
        " X   X  ",
        " X   X  ",
        " X   X  "));

    incl(bmpFont.fontPictures, 'B',
    [] ("        ",
        " XXXX   ",
        "  X  X  ",
        "  X  X  ",
        "  XXX   ",
        "  X  X  ",
        "  X  X  ",
        " XXXX   "));

    incl(bmpFont.fontPictures, 'C',
    [] ("        ",
        "  XXX   ",
        " X   X  ",
        " X      ",
        " X      ",
        " X      ",
        " X   X  ",
        "  XXX   "));

    incl(bmpFont.fontPictures, 'D',
    [] ("        ",
        " XXXX   ",
        "  X  X  ",
        "  X  X  ",
        "  X  X  ",
        "  X  X  ",
        "  X  X  ",
        " XXXX   "));

    incl(bmpFont.fontPictures, 'E',
    [] ("        ",
        " XXXXX  ",
        " X      ",
        " X      ",
        " XXXX   ",
        " X      ",
        " X      ",
        " XXXXX  "));

    incl(bmpFont.fontPictures, 'F',
    [] ("        ",
        " XXXXX  ",
        " X      ",
        " X      ",
        " XXXX   ",
        " X      ",
        " X      ",
        " X      "));

    incl(bmpFont.fontPictures, 'G',
    [] ("        ",
        "  XXXX  ",
        " X      ",
        " X      ",
        " X XXX  ",
        " X   X  ",
        " X   X  ",
        "  XXX   "));

    incl(bmpFont.fontPictures, 'H',
    [] ("        ",
        " X   X  ",
        " X   X  ",
        " X   X  ",
        " XXXXX  ",
        " X   X  ",
        " X   X  ",
        " X   X  "));

    incl(bmpFont.fontPictures, 'I',
    [] ("        ",
        "  XXX   ",
        "   X    ",
        "   X    ",
        "   X    ",
        "   X    ",
        "   X    ",
        "  XXX   "));

    incl(bmpFont.fontPictures, 'J',
    [] ("        ",
        "     X  ",
        "     X  ",
        "     X  ",
        "     X  ",
        "     X  ",
        " X   X  ",
        "  XXX   "));

    incl(bmpFont.fontPictures, 'K',
    [] ("        ",
        " X   X  ",
        " X  X   ",
        " X X    ",
        " XX     ",
        " X X    ",
        " X  X   ",
        " X   X  "));

    incl(bmpFont.fontPictures, 'L',
    [] ("        ",
        " X      ",
        " X      ",
        " X      ",
        " X      ",
        " X      ",
        " X      ",
        " XXXXX  "));

    incl(bmpFont.fontPictures, 'M',
    [] ("        ",
        " X   X  ",
        " XX XX  ",
        " X X X  ",
        " X X X  ",
        " X   X  ",
        " X   X  ",
        " X   X  "));

    incl(bmpFont.fontPictures, 'N',
    [] ("        ",
        " X   X  ",
        " XX  X  ",
        " XX  X  ",
        " X X X  ",
        " X  XX  ",
        " X  XX  ",
        " X   X  "));

    incl(bmpFont.fontPictures, 'O',
    [] ("        ",
        " XXXXX  ",
        " X   X  ",
        " X   X  ",
        " X   X  ",
        " X   X  ",
        " X   X  ",
        " XXXXX  "));

    incl(bmpFont.fontPictures, 'P',
    [] ("        ",
        " XXXX   ",
        " X   X  ",
        " X   X  ",
        " XXXX   ",
        " X      ",
        " X      ",
        " X      "));

    incl(bmpFont.fontPictures, 'Q',
    [] ("        ",
        "  XXX   ",
        " X   X  ",
        " X   X  ",
        " X   X  ",
        " X X X  ",
        " X  X   ",
        "  XX X  "));

    incl(bmpFont.fontPictures, 'R',
    [] ("        ",
        " XXXX   ",
        " X   X  ",
        " X   X  ",
        " XXXX   ",
        " X X    ",
        " X  X   ",
        " X   X  "));

    incl(bmpFont.fontPictures, 'S',
    [] ("        ",
        "  XXX   ",
        " X   X  ",
        " X      ",
        "  XXX   ",
        "     X  ",
        " X   X  ",
        "  XXX   "));

    incl(bmpFont.fontPictures, 'T',
    [] ("        ",
        " XXXXX  ",
        "   X    ",
        "   X    ",
        "   X    ",
        "   X    ",
        "   X    ",
        "   X    "));

    incl(bmpFont.fontPictures, 'U',
    [] ("        ",
        " X   X  ",
        " X   X  ",
        " X   X  ",
        " X   X  ",
        " X   X  ",
        " X   X  ",
        "  XXX   "));

    incl(bmpFont.fontPictures, 'V',
    [] ("        ",
        " X   X  ",
        " X   X  ",
        " X   X  ",
        "  X X   ",
        "  X X   ",
        "   X    ",
        "   X    "));

    incl(bmpFont.fontPictures, 'W',
    [] ("        ",
        " X   X  ",
        " X   X  ",
        " X   X  ",
        " X X X  ",
        " X X X  ",
        " X X X  ",
        "  X X   "));

    incl(bmpFont.fontPictures, 'X',
    [] ("        ",
        " X   X  ",
        " X   X  ",
        "  X X   ",
        "   X    ",
        "  X X   ",
        " X   X  ",
        " X   X  "));

    incl(bmpFont.fontPictures, 'Y',
    [] ("        ",
        " X   X  ",
        " X   X  ",
        "  X X   ",
        "   X    ",
        "   X    ",
        "   X    ",
        "   X    "));

    incl(bmpFont.fontPictures, 'Z',
    [] ("        ",
        " XXXXX  ",
        "     X  ",
        "    X   ",
        "   X    ",
        "  X     ",
        " X      ",
        " XXXXX  "));

    incl(bmpFont.fontPictures, '[',
    [] ("        ",
        "  XXX   ",
        "  X     ",
        "  X     ",
        "  X     ",
        "  X     ",
        "  X     ",
        "  XXX   "));

    incl(bmpFont.fontPictures, '\\',
    [] ("        ",
        "        ",
        " X      ",
        "  X     ",
        "   X    ",
        "    X   ",
        "     X  ",
        "        "));

    incl(bmpFont.fontPictures, ']',
    [] ("        ",
        "  XXX   ",
        "    X   ",
        "    X   ",
        "    X   ",
        "    X   ",
        "    X   ",
        "  XXX   "));

    incl(bmpFont.fontPictures, '^',
    [] ("        ",
        "        ",
        "   X    ",
        "  X X   ",
        " X   X  ",
        "        ",
        "        ",
        "        "));

    incl(bmpFont.fontPictures, '_',
    [] ("        ",
        "        ",
        "        ",
        "        ",
        "        ",
        "        ",
        "        ",
        " XXXXX  "));

    incl(bmpFont.fontPictures, '`',
    [] ("        ",
        "        ",
        "  X     ",
        "   X    ",
        "    X   ",
        "        ",
        "        ",
        "        "));

    incl(bmpFont.fontPictures, 'a',
    [] ("        ",
        "        ",
        "        ",
        "  XXX   ",
        " X   X  ",
        " XXXXX  ",
        " X   X  ",
        " X   X  "));

    incl(bmpFont.fontPictures, 'b',
    [] ("        ",
        "        ",
        "        ",
        " XXXX   ",
        "  X  X  ",
        "  XXX   ",
        "  X  X  ",
        " XXXX   "));

    incl(bmpFont.fontPictures, 'c',
    [] ("        ",
        "        ",
        "        ",
        "  XXXX  ",
        " X      ",
        " X      ",
        " X      ",
        "  XXXX  "));

    incl(bmpFont.fontPictures, 'd',
    [] ("        ",
        "        ",
        "        ",
        " XXXX   ",
        "  X  X  ",
        "  X  X  ",
        "  X  X  ",
        " XXXX   "));

    incl(bmpFont.fontPictures, 'e',
    [] ("        ",
        "        ",
        "        ",
        " XXXXX  ",
        " X      ",
        " XXXX   ",
        " X      ",
        " XXXXX  "));

    incl(bmpFont.fontPictures, 'f',
    [] ("        ",
        "        ",
        "        ",
        " XXXXX  ",
        " X      ",
        " XXXX   ",
        " X      ",
        " X      "));

    incl(bmpFont.fontPictures, 'g',
    [] ("        ",
        "        ",
        "        ",
        "  XXXX  ",
        " X      ",
        " X XXX  ",
        " X   X  ",
        "  XXX   "));

    incl(bmpFont.fontPictures, 'h',
    [] ("        ",
        "        ",
        "        ",
        " X   X  ",
        " X   X  ",
        " XXXXX  ",
        " X   X  ",
        " X   X  "));

    incl(bmpFont.fontPictures, 'i',
    [] ("        ",
        "        ",
        "        ",
        "  XXX   ",
        "   X    ",
        "   X    ",
        "   X    ",
        "  XXX   "));

    incl(bmpFont.fontPictures, 'j',
    [] ("        ",
        "        ",
        "        ",
        "    X   ",
        "    X   ",
        "    X   ",
        " X  X   ",
        "  XX    "));

    incl(bmpFont.fontPictures, 'k',
    [] ("        ",
        "        ",
        "        ",
        "  X  X  ",
        "  X X   ",
        "  XX    ",
        "  X X   ",
        "  X  X  "));

    incl(bmpFont.fontPictures, 'l',
    [] ("        ",
        "        ",
        "        ",
        " X      ",
        " X      ",
        " X      ",
        " X      ",
        " XXXXX  "));

    incl(bmpFont.fontPictures, 'm',
    [] ("        ",
        "        ",
        "        ",
        " X   X  ",
        " XX XX  ",
        " X X X  ",
        " X   X  ",
        " X   X  "));

    incl(bmpFont.fontPictures, 'n',
    [] ("        ",
        "        ",
        "        ",
        " X   X  ",
        " XX  X  ",
        " X X X  ",
        " X  XX  ",
        " X   X  "));

    incl(bmpFont.fontPictures, 'o',
    [] ("        ",
        "        ",
        "        ",
        " XXXXX  ",
        " X   X  ",
        " X   X  ",
        " X   X  ",
        " XXXXX  "));

    incl(bmpFont.fontPictures, 'p',
    [] ("        ",
        "        ",
        "        ",
        " XXXX   ",
        " X   X  ",
        " XXXX   ",
        " X      ",
        " X      "));

    incl(bmpFont.fontPictures, 'q',
    [] ("        ",
        "        ",
        "        ",
        "  XXX   ",
        " X   X  ",
        " X X X  ",
        " X  X   ",
        "  XX X  "));

    incl(bmpFont.fontPictures, 'r',
    [] ("        ",
        "        ",
        "        ",
        " XXXX   ",
        " X   X  ",
        " XXXX   ",
        " X  X   ",
        " X   X  "));

    incl(bmpFont.fontPictures, 's',
    [] ("        ",
        "        ",
        "        ",
        "  XXXX  ",
        " X      ",
        "  XXX   ",
        "     X  ",
        " XXXX   "));

    incl(bmpFont.fontPictures, 't',
    [] ("        ",
        "        ",
        "        ",
        " XXXXX  ",
        "   X    ",
        "   X    ",
        "   X    ",
        "   X    "));

    incl(bmpFont.fontPictures, 'u',
    [] ("        ",
        "        ",
        "        ",
        " X   X  ",
        " X   X  ",
        " X   X  ",
        " X   X  ",
        "  XXX   "));

    incl(bmpFont.fontPictures, 'v',
    [] ("        ",
        "        ",
        "        ",
        " X   X  ",
        " X   X  ",
        "  X X   ",
        "  X X   ",
        "   X    "));

    incl(bmpFont.fontPictures, 'w',
    [] ("        ",
        "        ",
        "        ",
        " X   X  ",
        " X   X  ",
        " X X X  ",
        " X X X  ",
        "  X X   "));

    incl(bmpFont.fontPictures, 'x',
    [] ("        ",
        "        ",
        "        ",
        " X   X  ",
        "  X X   ",
        "   X    ",
        "  X X   ",
        " X   X  "));

    incl(bmpFont.fontPictures, 'y',
    [] ("        ",
        "        ",
        "        ",
        " X   X  ",
        "  X X   ",
        "   X    ",
        "   X    ",
        "   X    "));

    incl(bmpFont.fontPictures, 'z',
    [] ("        ",
        "        ",
        "        ",
        " XXXXX  ",
        "    X   ",
        "   X    ",
        "  X     ",
        " XXXXX  "));

    incl(bmpFont.fontPictures, '{',
    [] ("        ",
        "   XX   ",
        "  X     ",
        "  X     ",
        " X      ",
        "  X     ",
        "  X     ",
        "   XX   "));

    incl(bmpFont.fontPictures, '|',
    [] ("        ",
        "   X    ",
        "   X    ",
        "   X    ",
        "        ",
        "   X    ",
        "   X    ",
        "   X    "));

    incl(bmpFont.fontPictures, '}',
    [] ("        ",
        "  XX    ",
        "    X   ",
        "    X   ",
        "     X  ",
        "    X   ",
        "    X   ",
        "  XX    "));

    incl(bmpFont.fontPictures, '~',
    [] ("        ",
        "        ",
        "  X     ",
        " X X X  ",
        "    X   ",
        "        ",
        "        ",
        "        "));

    bmpFont.columnWidth := columnWidth(bmpFont.fontPictures);
end func;


const bitmapFont: font8x8 is genFont8x8;