! font_test.MBS
! Display all positions of a VARKON font
! Call this from the Active Module; do clear_pm() and clear_gm() there first.

global drawing module font_test(
int font_number;
int verbosity);

! verbosity levels
!    0 = no warning/debugging info at all
!   >0 = all fatal errors
!    5 = tracing
!    9 = everything

         int    row_number, column_number;
         int    label;
constant float  baseline_skip   = 10;
constant float  character_width = 10;
         float  text_size;

beginmodule

! label the display
   text(#1,vec(0, 0),
               0,
               "Font Number " + str(font_number,1,0));

! label a grid of rows and columns
for column_number := 0 to 15 do
   text(#10,vec((character_width * column_number), -baseline_skip),
               0,
               str(column_number,1,0): tfont=0, tsize=2.5); ! half-size
endfor;
for row_number := 0 to 15 do
   text(#11,vec(-character_width, -(baseline_skip * (row_number + 2))),
               0,
               str(row_number,1,0): tfont=0, tsize=2.5); ! half-size
endfor;

for column_number := 0 to 15 do
   for row_number := 0 to 15 do
      text(#20,vec((character_width * (column_number)),
                   -(baseline_skip * (row_number + 2))),
               0,
               chr((column_number * 16) + row_number): tfont=font_number);
   endfor;
endfor;

endmodule

! Copyright 2005 by David M. MacMillan

! This work is free software; you can redistribute it and/or modify
! it under the terms of the GNU General Public License as published by
! the Free Software Foundation; either version 2 of the License, or
! (at your option) any later version.

! NOTICE OF DISCLAIMER OF WARRANTY AND LIABILITY:

! This work is distributed WITHOUT ANY WARRANTY;
! without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
! See the GNU General Public License for more details.

! In no event will the author(s), editor(s), or publisher(s) of this work
! be liable to you or to any other party for damages,
! including but not limited to any general, special, incidental
! or consequential damages arising out of your use of or inability to use this
! work or the information contained in it, even if you have been advised
! of the possibility of such damages.

! In no event will the author(s), editor(s), or publisher(s) of this work
! be liable to you or to any other party for any injury, death,
! disfigurement, or other personal damage arising out of your use of
! or inability to use this work or the information
! contained in it, even if you have been advised of the
! possibility of such injury, death, disfigurement, or other
! personal damage.

! You should have received a copy of the GNU General Public License
! along with this work; if not, write to the
! Free Software Foundation, Inc., 59 Temple Place - Suite 330,
! Boston, MA  02111-1307, USA.

