Up to the Contents

Back to Layout of the Hershey Occidental Glyphs


Font Utilities

Topics

  1. MBS Module: allasc.MBS
  2. *
  3. GNU® Free Documentation License (separate file)
  4. GNU General Public License (separate file)
  5. Legal

1 - MBS Module: allasc.MBS

This module draws the entire ASCII character set using glyphs from the specified font in the specified color. It uses the default font size (5mm), with 8mm between baselines (some very large glyphs might overlap, but this generally separates the lines well). The specified origin is the lower left corner.

It does not print VARKON® font character positions 128-255. It also doesn't print anything for position 0, since 0 doesn't seem to want to be part of a string.

global drawing module allasc(
float x_origin;
float y_origin;
int   font;
int   color);

float x;
float y;
constant float yskip = 8;

beginmodule

   x := x_origin;
   y := y_origin + (yskip * 8);

   text(#1,vec(x,y),0, " "  + chr(1)  + chr(2)  + chr(3) +
                            chr(4)  + chr(5)  + chr(6)  + chr(7) +
                            chr(8)  + chr(9)  + chr(10) + chr(11) +
                            chr(12) + chr(13) + chr(14) + chr(15)
           : tfont=font, tslant=0, pen=color);
   y := y - yskip;
   text(#2,vec(x,y),0, chr(16) + chr(17) + chr(18) + chr(19) +
                            chr(20) + chr(21) + chr(22) + chr(23) +
                            chr(24) + chr(25) + chr(26) + chr(27) +
                            chr(28) + chr(29) + chr(30) + chr(31)
           : tfont=font, tslant=0, pen=color);
   y := y - yskip;
   text(#3,vec(x,y),0," !" + chr(34) + "#$%&'()*+,-./"
           : tfont=font, tslant=0, pen=color);
   y := y - yskip;
   text(#4,vec(x,y),0,"0123456789:;<=>?": tfont=font, tslant=0, pen=color);
   y := y - yskip;
   text(#5,vec(x,y),0,"@ABCDEFGHIJKLMNO": tfont=font, tslant=0, pen=color);
   y := y - yskip;
   text(#6,vec(x,y),0,"PQRSTUVWXYZ[\]^_": tfont=font, tslant=0, pen=color);
   y := y - yskip;
   text(#7,vec(x,y), 0,"`abcdefghijklmno": tfont=font, tslant=0, pen=color);
   y := y - yskip;
   text(#8,vec(x,y),     0,"pqrstuvwxyz{|}~" + chr(126)
           : tfont=font, tslant=0, pen=color);

endmodule

The entire MBS module is available as allasc.MBS

This module is useful for displaying fonts, and for overprinting multiple fonts for comparison. For example:

Fig. 1 - allasc.MBS Printing Hershey Cartographic Greek Font
Fig. 1 - allasc.MBS Printing Hershey Cartographic Greek Font

This was produced by calling allasc() from this Active Module:

BASIC DRAWING MODULE t2();

CONSTANT FLOAT yskip=6.0;
FLOAT y;

BEGINMODULE

  part(#1,allasc(0, 0, 11, 1));

ENDMODULE

Fig. 1 - allasc.MBS Overprinting VARKON 0 and Hershey Cartographic Greek Fonts
Fig. 1 - allasc.MBS Overprinting VARKON 0 and Hershey Cartographic Greek Fonts

This was produced by calling allasc() from this Active Module:

BASIC DRAWING MODULE t2();

CONSTANT FLOAT yskip=6.0;
FLOAT y;

BEGINMODULE

  part(#1,allasc(0, 0, 0, 3));
  part(#2,allasc(0, 0, 11, 1));

ENDMODULE

In both cases, my mapping of the Hershey cartographic Greek and symbol glyphs to a font was in place as font 11.FNT It's best to call the font being tested second, so that it overwrites the first one on the screen.


Legal

Copyright

The data, files, text, and programs of the Holzmann USENET Hershey Glyph Distribution may be redistributed and used freely under their original terms as specified in the Holzmann USENET Hershey Glyph Distribution Cover Statement. The distribution here complies with these terms. The data of the Hershey Glyphs as transformed for use with VARKON may be redistributed and used freely under these same terms. I assert no additional rights or conditions on the use of the transformed data. Some of the text and programs in the Holzmann USENET Hershey Font Distribution may be Copyright 1986 by Peter Holzmann and/or James Hurt. Their own terms either allow or require their redistribution with the Hershey data. The distribution of these texts, files, data, and programs here is subject to all of the disclaimers of warranty and liability noted herein.

The text of this document itself and of any linked program files insofar as their text is separable from any Hershey Glyph data they may contain are copyright © 2003 by David M. MacMillan.

License

Permission is granted to copy, distribute and/or modify copyrighted portions of this document (other than the portions the copyright of which is owned by Peter Holzmann and/or James Hurt, which are freely redistributable under their own terms) under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License."

Note: Those portions of this document which are in the public domain, if any, may be copied freely. The distribution of these public domain portions is subject to all of the disclaimers of warranty and liability noted herein.

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

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

NOTICE OF DISCLAIMER OF WARRANTY AND LIABILITY:

This work is distributed "as-is," without any warranty of any kind, expressed or implied; without even the implied warranty of merchantability or fitness for a particular purpose.

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.

Trademarks

GNU is a registered trademark of the Free Software Foundation.
VARKON is or was a trademark of Microform AB (Sweden).


Forward to The Latin Fonts