Username:     
Password:     
            Register  

Projects
font_converter 1.3
 
Windows (PC) utility to convert fonts for use in CircleOS

Code size:0 Author:sfenwick76
Source files included:yes Version:1.3
Use circleOS:yes (circleOSversion) Creation date:2011-02-23 23:18:37
Hardware modification:no Modification date:2011-03-24 11:44:12
Based on the STM32 Primer:All
   
Downloads:351 Views:15041
   
Vote:
Average ratings:0/5 (0 rates)

Download:    font-converter-1.3.zip (166 KB)

Description:

This is a Windows application which will convert a regular font (like you would use in MS Word) to a C array.  The array should be copied into font_spe.c (within CircleOS).  You also need to update Font_Table with the new size (if applicable).

I've found that monospaced fonts work best with this utility (i.e., Courier, Terminal, Console, etc.).  Note that, if the font has a height that is greater than 16, you need to set the height back to 16 before you save it.  CircleOS 4.1 only supports fonts with a maximum height of 16 pixels. 

I included the source code for this application (I built the code with Microsoft Visual Studio 2005.)  I did not write it myself, I only modified the output format so it would work with CircleOS.  I did, however, obtain permission to modify and distribute it from the author, Lee Atkins, for the good of the Circle OS community.  There is no doubt improvements can be made to this:

- Better support for non-monospaced fonts
- A way to trim off whitespace leftover after a conversion
- Better visualization of how the fonts will look when they appear on the Primer LCD

Please feel free to post any updates you might make or send them to me!

Updates:
v1.3:
   - Added ability to offset the characters vertically during conversion.  Leave the "Y offset" field blank (or set to 0) for no offset.  A positive value shifts the characters down, a negative value shifts them up.  For example, to get 8pt Courier New to fit in a 7x11 font, change the Width/Height to 7x11 and set the offset to 4 (see screen shot).



Project comments


To add comments, please register you.