Fonts ##### Bitmap Fonts ============ The Micropython firmware image provided includes 12 bitmap fonts converted from pc bios text mode fonts for use with the tftui module. The fonts are encoded as frozen byte code and can be imported and used directly from flash to conserve RAM. | Font file format ---------------- .. literalinclude:: fontformat.py :linenos: :language: python :caption: Example python font file. | Bitmap Font Tables ------------------ | vga1_8x8 ^^^^^^^^ .. image:: images/vga1_8x8.jpg | vga2_8x8 ^^^^^^^^ .. image:: images/vga2_8x8.jpg | vga1_8x16 ^^^^^^^^^ .. image:: images/vga1_8x16.jpg | vga2_8x16 ^^^^^^^^^ .. image:: images/vga2_8x16.jpg | vga1_16x16 ^^^^^^^^^^ .. image:: images/vga1_16x16.jpg | vga2_16x16 ^^^^^^^^^^ .. image:: images/vga2_16x16.jpg | vga1_bold_16x16 ^^^^^^^^^^^^^^^ .. image:: images/vga1_bold_16x16.jpg | vga2_bold_16x16 ^^^^^^^^^^^^^^^ .. image:: images/vga2_bold_16x16.jpg | vga1_16x32 ^^^^^^^^^^ .. image:: images/vga1_16x32.jpg | vga2_16x32 ^^^^^^^^^^ .. image:: images/vga2_16x32.jpg | vga1_bold_16x32 ^^^^^^^^^^^^^^^ .. image:: images/vga1_bold_16x32.jpg | vga2_bold_16x32 ^^^^^^^^^^^^^^^ .. image:: images/vga2_bold_16x32.jpg | Vector Fonts ============ Introduction ------------ The TurtlePlotBot uses the public domain |hershey| fonts distributed on the USENET network. The Hershey Fonts were originally created by Dr. A. V. Hershey while working at the U. S. National Bureau of Standards. .. note:: The format of the Font data in this distribution was originally created by: :: James Hurt Cognition, Inc. 900 Technology Park Drive Billerica, MA 01821 (mit-eddie!ci-dandelion!hurt) The fonts range from simple to complex and include many symbols. The standard TurtlePlotBot does not have the movement accuracy to make all of the fonts practical. The more complex the font or the longer the message the more the movement errors will distort the text drawn. Font file format ---------------- You do not have to understand the font file format in order to use the fonts in TurtlePlotBot programs the library takes care of the details with the `write` function. The font files begin with a 8 bit byte containing the number of characters in the front followed by a sequence of (little endian) 16 bit unsigned integers containing the file offset to the coordinate data for each of the characters in the font file. Fonts with 96 characters are in ASCII order for characters 0x20 though 0x7f. Other fonts have characters starting at 0x00. The first byte of the coordinate data contains the number of x,y coordinates for the glyph. The second and third byte contain the coordinates for the left and right limits of the glyph. The following pairs of bytes are the x and y coordinates that make glyph. Like the original Hershey data each byte is offset by 0x52 (ascii 'R'). A value of -50 for the x coordinate is used to indicate the pen should be raised for the next move. LCD Font Demo ------------- .. literalinclude:: ../../programs/show_fonts.py :linenos: :language: python Vector Font Tables ------------------ astrol.fnt ^^^^^^^^^^ .. image:: images/astrol.svg :align: center cyrilc.fnt ^^^^^^^^^^ .. image:: images/cyrilc.svg :align: center gotheng.fnt ^^^^^^^^^^^ .. image:: images/gotheng.svg :align: center gothger.fnt ^^^^^^^^^^^ .. image:: images/gothger.svg :align: center gothita.fnt ^^^^^^^^^^^ .. image:: images/gothita.svg :align: center greekc.fnt ^^^^^^^^^^ .. image:: images/greekc.svg :align: center greekcs.fnt ^^^^^^^^^^^ .. image:: images/greekcs.svg :align: center greekp.fnt ^^^^^^^^^^ .. image:: images/greekp.svg :align: center greeks.fnt ^^^^^^^^^^ .. image:: images/greeks.svg :align: center italicc.fnt ^^^^^^^^^^^ .. image:: images/italicc.svg :align: center italiccs.fnt ^^^^^^^^^^^^ .. image:: images/italiccs.svg :align: center italict.fnt ^^^^^^^^^^^ .. image:: images/italict.svg :align: center japan.fnt ^^^^^^^^^ .. image:: images/japan.svg :align: center lowmat.fnt ^^^^^^^^^^ .. image:: images/lowmat.svg :align: center marker.fnt ^^^^^^^^^^ .. image:: images/marker.svg :align: center meteo.fnt ^^^^^^^^^ .. image:: images/meteo.svg :align: center misc.fnt ^^^^^^^^ .. image:: images/misc.svg :align: center music.fnt ^^^^^^^^^ .. image:: images/music.svg :align: center romanc.fnt ^^^^^^^^^^ .. image:: images/romanc.svg :align: center romancs.fnt ^^^^^^^^^^^ .. image:: images/romancs.svg :align: center romand.fnt ^^^^^^^^^^ .. image:: images/romand.svg :align: center romanp.fnt ^^^^^^^^^^ .. image:: images/romanp.svg :align: center romans.fnt ^^^^^^^^^^ .. image:: images/romans.svg :align: center romant.fnt ^^^^^^^^^^ .. image:: images/romant.svg :align: center scriptc.fnt ^^^^^^^^^^^ .. image:: images/scriptc.svg :align: center scripts.fnt ^^^^^^^^^^^ .. image:: images/scripts.svg :align: center symbol.fnt ^^^^^^^^^^ .. image:: images/symbol.svg :align: center uppmat.fnt ^^^^^^^^^^ .. image:: images/uppmat.svg :align: center