Integrated workflow
Use BitFonter with FontLab VI, TransType, FontLab Pad
BitFonter isn't limited to black-and-white! With the Photofont intermediate format and the new Color OpenType font format extensions, you can create full-color fonts with transparency, and use them on the web and in print! Imagine computer letters with true calligraphic expression, visible brush strokes and paper structure — a new dimension in the field of typography.
TXT is a file format that contains the text, organized in rows. Text files opposed binaries that contain data that is not intended for interpretation as a text (encoded sound or image). The text file can contain both formatted and unformatted text. Since the very simple text. FontArk font-editor synchronizes the design of all the font's Glyphs – a set of simple tools to enable easy and intuitive control over the character set in real-time. Controlling over 50 characters is complex, but we make it simple for you. Watch our short tutorials to help you understand the basic operations of FontArk online font-editor.
To create Color OpenType fonts, export the font as Photofont PHF, then open the PHF file in TransType or FontLab VI, and export a Color OpenType font in the SVG, sbix or CBDT flavor. Finally, use the Color OpenType font in Adobe CC apps, web browsers or in our free FontLab Pad app!
You can also export a color bitmap font into a monochrome Outline Pixelfont: BitFonter will halftone your pixels using vector squares, circles, lines or luminance-based shapes, and export outline-based VFB font that you can open in FontLab VI, Fontographer or TypeTool to produce a final monochrome OpenType font that approximates your bitmap design with scalable outlines. To achieve this, turn on Tools > Options > Outline Font Editor, turn on Export outline font into VFB file, and choose Font > Export > Outline Font or Outline Pixelfont.
To learn more about color font formats and to see how to use BitFonter together with Photoshop, FontLab VI, TransType and FontLab Pad, watch our tutorial video!
Files
- fonts.zip245 KiB
After my blog post on e-ink displays, I wanted to go into more detail on how I generated the bitmap fonts I used. In this blog post, I'll show how to generate bitmap fonts from fonts you can get online, and a brief intro on how to use them.
I know there are a few tools out there for generating this kind of thing, but this was a custom thing for my microcontroller and I like doing and learning things myself!
Bitmap Fonts
There are quite a few sites with freely downloadable fonts that make great pixel fonts (FontGal.com is one), although .ttf files can't really be used on microcontrollers, so we first need to rasterize them to a bitmap font. To conserve space, each character is 6x8 pixels in size (WxH), and only common ASCII characters are drawn.
C Header
Before we can use this in a microcontroller, we need to turn the bitmap font into a C header file, so it can be compiled into the firmware. Since the bitmap font is black and white, the most efficient way to store it is an array of 6 bytes, with each byte representing one vertical column of pixels (8 pixels high). The resulting header file looks something like this:
This is a fairly standard way of representing fonts, though it does pose a limitation in that characters can only be 8 pixels high, and it makes it somewhat difficult to represent variable-width characters (since each char must have exactly 6 bytes)
For example, the character 'A':
Drawing Fonts
It's fairly easy to draw fonts stored like this. First we convert the ASCII character to an index by subtracting the offset of the first character in the font. This works because the characters in the font are defined in numerical order ('0'=48, 'A'=65, etc.), so subtracting the space character (' '=32) returns the index in the array. We also replace any invalid characters with space, to prevent the code from trying to draw characters that aren't defined!
This can easily be used to draw a C-string:
It is possible to extend this code to support variable-width characters, or dynamically selectable fonts (using pointers), but that's a bit trickier to implement.
Bitmap Font Generator
To create Color OpenType fonts, export the font as Photofont PHF, then open the PHF file in TransType or FontLab VI, and export a Color OpenType font in the SVG, sbix or CBDT flavor. Finally, use the Color OpenType font in Adobe CC apps, web browsers or in our free FontLab Pad app!
You can also export a color bitmap font into a monochrome Outline Pixelfont: BitFonter will halftone your pixels using vector squares, circles, lines or luminance-based shapes, and export outline-based VFB font that you can open in FontLab VI, Fontographer or TypeTool to produce a final monochrome OpenType font that approximates your bitmap design with scalable outlines. To achieve this, turn on Tools > Options > Outline Font Editor, turn on Export outline font into VFB file, and choose Font > Export > Outline Font or Outline Pixelfont.
To learn more about color font formats and to see how to use BitFonter together with Photoshop, FontLab VI, TransType and FontLab Pad, watch our tutorial video!
Files
- fonts.zip245 KiB
After my blog post on e-ink displays, I wanted to go into more detail on how I generated the bitmap fonts I used. In this blog post, I'll show how to generate bitmap fonts from fonts you can get online, and a brief intro on how to use them.
I know there are a few tools out there for generating this kind of thing, but this was a custom thing for my microcontroller and I like doing and learning things myself!
Bitmap Fonts
There are quite a few sites with freely downloadable fonts that make great pixel fonts (FontGal.com is one), although .ttf files can't really be used on microcontrollers, so we first need to rasterize them to a bitmap font. To conserve space, each character is 6x8 pixels in size (WxH), and only common ASCII characters are drawn.
C Header
Before we can use this in a microcontroller, we need to turn the bitmap font into a C header file, so it can be compiled into the firmware. Since the bitmap font is black and white, the most efficient way to store it is an array of 6 bytes, with each byte representing one vertical column of pixels (8 pixels high). The resulting header file looks something like this:
This is a fairly standard way of representing fonts, though it does pose a limitation in that characters can only be 8 pixels high, and it makes it somewhat difficult to represent variable-width characters (since each char must have exactly 6 bytes)
For example, the character 'A':
Drawing Fonts
It's fairly easy to draw fonts stored like this. First we convert the ASCII character to an index by subtracting the offset of the first character in the font. This works because the characters in the font are defined in numerical order ('0'=48, 'A'=65, etc.), so subtracting the space character (' '=32) returns the index in the array. We also replace any invalid characters with space, to prevent the code from trying to draw characters that aren't defined!
This can easily be used to draw a C-string:
It is possible to extend this code to support variable-width characters, or dynamically selectable fonts (using pointers), but that's a bit trickier to implement.
Bitmap Font Generator
Create Bitmap Fonts
Downloads
An archive of my processed fonts is available here: fonts.zip
This includes the processing script, rasterized .png files, and the source .ttf files.
As always, if you want to know more or need some help, feel free to contact me or leave a comment!