Skip to content

Latest commit

 

History

History
327 lines (229 loc) · 19.3 KB

README.md

File metadata and controls

327 lines (229 loc) · 19.3 KB

Meadow Font Test

Add new fonts to Meadow MicroGraphics Library

Here we demonstrate adding new fonts to the Meadow MicroGraphics Library

  1. Consolas
  2. IBM Plex Mono
  3. Sometype Mono
  4. BP Typewrite
  5. IBM 3270
  6. 52 Adafruit GFX fonts
  7. Microsoft .NetMF fixed fonts
  8. Petscii - character ROM dump
  9. Release the Hoard! - 37 Fixed width Yaff fonts from the Bitmap Hoard
  10. Font Hoard part II - 11 more wider fixed width fonts, custom Yaff Font Renderer
  11. Font Hoard part III - 39 Proportional Yaff fonts, mostly Mac and Lisa from the Bitmap Hoard

The Meadow.Foundation MicroGraphics Library supports drawing fonts in a few (now 8) fixed width sizes.

4x6 4x8 6x8
OG Font4x6 OG Font4x8 OG Font6x8
8x8 8x12 8x16
OG Font8x8 OG Font8x12 OG Font8x16
12x16 12x20
OG Font12x16 OG Font12x20

The smaller sizes may be appropriate for hand drawn fonts, but if we are converting higher quality desktop fonts, 12x20 is the only size that can support fonts with descenders. These initial attempts target fixed width or Monospaced fonts.

Consolas

Consolas is a Microsoft font, used in visual studio, it may not be appropriate for open source use.

Although apparently Fonts are not Copyright protected

So I found 3 open source fonts, which ended up with a much smaller character set

Note Consolas has an Initialization fault in RC1 and RC2

Consolas Font

IBM Plex Mono

IBM Plex Mono or on Github

IBM Plex Mono Font

Sometype Mono

monospacedfont or on Github

Sometype Mono

BP Typewrite

BP Typewrite may be the most distinct of these fonts. It is based on an italic font stood upwrite. Smaller set of characters.

BP Typewrite

IBM 3270

A favourite for terminal fonts or code editing. This version comes from an OpenType font converted back to bitmap 12x20. It has many of the drawing symbols of the petscii font - at a larger size, and at less precision. This font has many unicode characters hence the double size screenshot.

IBM327012x20

from github

To use them in your meadow project, you just need to compile the font file into your application. Then

graphics.CurrentFont = new BPtypewrite12x20();

The Windows application to generate these font files is called FontConverter

GFX Fonts

from Adafruit. These are bitmap fonts, that are proportionatley spaced, and support text wrapping. I had to convert the C++ .h files into C#. There seems to be 3 font faces converted from Berkley Unix.

  1. Free Mono
  2. Free Sans
  3. Free Serif

Each font has four typefaces: Normal, Bold, Oblique (or Italic), and Bold Oblique (or Bold Italic) and appears in four sizes: 9pt, 12pt, 18pt, 24pt.

Free Mono

Normal Bold Oblique Bold Oblique
Free Mono 9pt Free Mono Bold 9pt Free Mono Oblique 9pt Free Mono Bold Oblique 9pt
Free Mono 12pt Free Mono Bold  12pt Free Mono Oblique 12pt Free Mono Bold Oblique 12pt
Free Mono 18pt Free Mono Bold  18pt Free Mono Oblique 18pt Free Mono Bold Oblique 18pt
Free Mono 24pt Free Mono Bold  24pt Free Mono Oblique 24pt Free Mono Bold Oblique 24pt

Free Sans

Normal Bold Oblique Bold Oblique
Free Sans 9pt Free Sans Bold 9pt Free Sans Oblique 9pt Free Sans Bold Oblique 9pt
Free Sans 12pt Free Sans Bold  12pt Free Sans Oblique 12pt Free Sans Bold Oblique 12pt
Free Sans 18pt Free Sans Bold  18pt Free Sans Oblique 18pt Free Sans Bold Oblique 18pt
Free Sans 24pt Free Sans Bold  24pt Free Sans Oblique 24pt Free Sans Bold Oblique 24pt

Free Serif

Normal Bold Italic Bold Italic
Free Serif 9pt Free Serif Bold 9pt Free Serif Italic 9pt Free Serif Bold Italic 9pt
Free Serif 12pt Free Serif Bold  12pt Free Serif Italic 12pt Free Serif Bold Italic 12pt
Free Serif 18pt Free Serif Bold  18pt Free Serif Italic 18pt Free Serif Bold Italic 18pt
Free Serif 24pt Free Serif Bold  24pt Free Serif Italic 24pt Free Serif Bold Italic 24pt

There are also 4 additional extra small fonts, in one typeface each. Other than the TomThumb font, only the lower 7bit ascii characters are available. I have included a 4 times zoom of each of the small fonts so you can see the detail (or lack thereof).

Org_01

Org_01 Org_01

Picopixel

Pico Pixel Pico Pixel

Tiny3x3

Tiny3x3 Tiny3x3

Tom Thumb

Tom Thumb Tom Thumb

To use GFX fonts in your Meadow project, you need to include the GFXFontBase.cs and the GraphicsLibraryEx.cs as well as any of the GFX fonts you want to use. DrawGFXText is used to display text. The x,y origin is for the left baseline of the character (not the upper left). The WrapText property can be enabled and text will be written on the next line if it doesn't fit on the current line.

More GFX font info: Here and Here

There are certainly other GFX fonts avaialble, including tools to convert to the GFX format. Adafruit says they will not expand the base fonts available on Github any further.

Microsoft .NetMF fixed fonts

I found these in the abandoned .net Micro Framework repository. They include a few extended characters. The way the character bitmaps are laid out is much easier to hand edit if you want to.

Converted from C++ these are compatible with the Meadow Graphics Library Fonts (just include the font file).

8x8

MSFont8x8

8x15

MSFont8x15

Petscii 8x8

The OG personal computer circa 1977 was the Commodore PET - 6502 processor, cassette deck, green text enclosed in an industrial steel case. This version of the ROM is from the SuperPet a weird work from home offshoot that had Pascal, Fortran and APL built in along with the MSBasic. So along with the famous line drawing characters, we also get some APL symbols and several other rare math symbols. The character set is mapped to unicode (rather than the original shiftable 7bit ascii). See the comments for which unicode character to use.

from 6502.org

Petscii8x8

Petscii8x8

and don't forget, the Meadow Graphics Library can also display fonts at 2X or 3X here is petscii at 2X (16x16)

Petscii8x82X

The Bitmap Hoard

Part 1 - Fixed width 12px or less

Rob Hagemans has not only collected many historical bitmap fonts, he has also created a new storage format (Yaff) that is more human readable than most formats, and not too bad to parse.

These Fonts, are read by the YaffReader, which returns an IYaffFont which is an IFont that the Micrographics DrawText function can use. This means you can include the YaYaffReader.cs in your meadow application, along with any number of these Yaff files, and load and display the font at runtime. This consumes more memory than compiling the fonts, but being able to treat the fonts as files, instead of code is more convienient.

Amiga

Topaz
amiga-ks30-topaz-08 amiga-ks30-topaz-09 amiga-wb31-topaz-11
Xen
amiga-magicwb-xen-08 amiga-magicwb-xen-09 amiga-magicwb-xen-11
Nudel
amiga-nudelfonts-polarsmall-6 amiga-nudelfonts-eagleplayer-8 amiga-nudelfonts-pot-ibm-8 amiga-nudelfonts-pot-noodle-8
MagicWB XCourier
amiga-magicwb-xcourier-11 amiga-magicwb-xcourier-13 amiga-magicwb-xcourier-15
Courier
amiga-wb31-courier-11 amiga-wb31-courier-13 amiga-wb31-courier-15 amiga-wb31-courier-18

Apple Mac

Gacha and Monaco are two of the few fixed Mac Fonts. There are a few slightly smaller versions of both.

Gacha 7x13 Monaco 7x16
Gacha_7x13 Monaco_7x16

Atari

Classic ST 6x6 ST 8x8 ST 8x16
Classic ST6x6 ST8x8 ST8x16
CoA

There are several other sizes for these fonts in the hoard

DrDos 8x19 Gem 3.1 6x6 Viewmax 8x8
drdos 8x19 Gem 3.1 6x6 Viewmax
Feld-Hell Typenbildschreiber 7x14 Hellschreiber T-Typ 72 GL 7x14 Hell-80 7x9 GTL Telewriter 7x8
Feld-Hell Typenbildschreiber Hellschreiber T-Typ 72 GL Hell 80 GTL Telewriter
Abtastfernschreiber 8x14
Abtastfernschreiber

DEC VT-xxx Terminals

VT-52 VT-100 VT-220
VT-52 VT-100 VT-220
funky g and lightning tilda Desenders and line drawing characters Accented characters, backward ?

There are other regional versions with slightly different characters as well

olivetti-m10-us.yaff.png

Windows 3.1 Terminal

Like the Mac fonts, most are proportional. There are also older versions from Windows 1.0-3.0

Terminal 140 Terminal 8514
Terminal140 Terminal8154

Part 2 - Wider fixed width fonts, and a custom Yaff Renderer

The Yaff renderer was designed for proportional fonts, as it takes a vertical slice of the character, and wider characters just have more slices. This is also true of fixed width fonts, and removes any limitations, or alignment requirements.

The YaffReader is used to read the yaff files, and the MicroGraphicsEx extension has a DrawYaffText method similar to DrawGFXText and the default DrawText in the base library. DrawYaffText can wrap text automatically, again similar to the DrawGFXText method.

Amiga

Courier 24 15x23
amiga-wb31-courier-24

Atari

ST 16x32
ST16x32

Lots of fonts of various sizes in this set too

LW Barrows 14x24
GeosLWBarrows

OS/2

Lots of OS/2 fonts available in various sizes and versions

Courier 15x25
OS2Courier15x25

DEC VT-320

The Graphics Terminal had a larger 15x12 font and character set plus the abilty to add custom fonts

VT-320
VT-320

VT-320 Fonts from Paul Williams

Boothill Future Gothic
Boothill Future Gothic
Jetpac Mercy Powerslave
Jetpac Mercy Powerslave

Part 3 - Proportional Yaff Fonts - mostly Mac and Lisa

Athens Chicago Geneva London Los Angeles
Athens 18 Chicago 12 Geneva 18 London 18 Los Angeles 24
Monaco Prop Monaco Fixed New York 24 New York 36 San Franciso
Monoco 6 Monoco 7 New York 24 New York 36 San Franciso 18
Toronto Venice Cairo Mobil System
Toronto 24 Venice 14 Cairo 18 Mobile 18 System 12
Courier Cream eWorld Helvetica
Courier 18 Cream 12 eWorld tight 18 Helvetica 12
Symbol 12 Symbol 18 Palatino 14 Palatino 18
Symbol 12 Symbol 18 Palatino 14 Palatino 18
Espy Sans Espy Bold 12 Espy Bold 14 Espy Serif
Espy 16 Espy Bold 12 Espy Bold 14 Espy Serif apples
Classic 12 classic 18 Classic 24
Classic 12pt Classic 18pt Classic 24pt
Modern 14 Modern 24 System Patterns System Text
Modern 14pt Modern 24pt System Patterns System Text
Toolkit Window Manager
Toolkit Window Manager

Others

BSD Banner Epson FX Printer Windows EGA System
BSD Banner Epson EGA