Fonts and Symbols as C-source code
Make C-source code bitmap Unicode fonts with IconEdit vector font converter.
Create C-source code pixel Unicode fonts directly.
Convert pictures and images to C-source code symbols.
Create proportional or mono-spaced raster fonts as C-source code.
How to create C-source code fonts
IconEdit can create Unicode fonts with Black & White characters, Anti-Alias Characters with Windows ClearType, and Extra Smooth Anti Alias as C-source code.
Here is the same character as Black & White, Windows ClearType, and Extra Smooth Anti Alias:
Black & White or Anti-Alias is chosen automatically according to the data format:
The masterfont can be a Windows TrueType or OpenType vector font, or it can be an extsting font from the included European Font Library or the optional East Asian Library:
The look of the font can be Regular, Semi Bold, or Bold with or without Italics. For Windows TrueType or OpenType Anti-Alias you can choose between Windows ClearType or Extra Smooth Anti Alias:
The fonts can be Normal, Subtitle Font with contrast edge for better visibility, or Outline Font with hollow characters.
The width of the font can be anywhere between 50% and 150% of the original Windows font:
Choose languages for the Unicode font. Unicode support most living languages with about 56,000 different characters, here you choose which characters to include in your font:
Finally save in the format you prefer:
The C Format is the standard multi color-mode C source format for use with the RAMTEX display driver library.
The H Include is an extra black and white C source format with 8 different Bit and Byte organizations to match your display and display driver.
How the C-source C Format is organized
The glyph symbols and the Unicode code-points are stored in separate files and bound together by a master file, so each font consists of 3 files:
- Name.c is a C-source module for compilation. It has the data definitions and includes the other 2 files.
- Name.cp a C-source list of the code-points in the font.
- Name.sym C-source data for all the glyph symbols in the font.
The Name of the files is the same as the name of the font so it has to be a valid C-source code name.
Here is a small test font with one and greek alpha and betha:
The hexadecimal numbers above the symbols are Unicode code-points.
The code-point list starts with the number of segments in the list and the default character to be used if a character is not in the font.
After that is a number of segments with consecutive code-points, each segment has 3 parameters the first code-point, the last code-point, and the symbol number for the first code-point in this segment:
The symbol list starts with a color type identifier for gray symbols and the X and Y size for each symbol. After that follows the glyph data bytes starting in the upper left corner of the symbol:
The highlighting shows the correspondance between the code-points and the symbols.
How the C-source H Include format is organized
The glyph symbols and the Unicode code-points are stored together in one file Name.h.
The Name of the file is the same as the name of the font so it has to be a valid C-source code name.
Here is a small test font with one and greek alpha and betha:
The hexadecimal numbers above the symbols are Unicode code-points.
The symbol list is organized according to the Unicode code-points and each symbol header starts with the code-point followed by the X and Y size for each symbol. After that follows the glyph data bytes starting in the upper left corner of the symbol:
The highlighting shows the code-point for each symbol.
Convert many Input Formats to the same C-source code format
IconEdit can convert fonts and images to a general human and compiler readable C-source code format:
Import fonts, texts, and images from many sources and convert them all to the same general data format with IconEdit:
- Convert True Type and Open Type vector fonts already installed in Windows to black & white, grey-tone anti-alias, or color fonts.
- Convert Glyph Bitmap Distribution Format (BDF) pixel fonts to black & white symbol fonts.
- Convert Texts in any language to text optimized fonts with only the characters needed for the text.
- Find and convert Text strings from C-source code text catalogs to text optimized fonts with only the characters in the text strings in the font.
- Convert Pictures and images to symbols or symbol groups with full or reduced color and pixel resolution. Symbol groups are ideal for animation.
C-source code portability
Save fonts, symbols, and groups of symbols in a general human-readable C-source code format:
- All RAMTEX Color and B&W display controller driver libraries support the same basic symbol and font C-source code format. This makes fonts and symbols portable across display controller types and target hardware.
- B&W (two-color) symbols are compatible with both B&W and Color display driver libraries.
- Grey-level symbols and anti-aliased fonts are compatible with Color display driver libraries.
- RGB Color symbols are compatible with RGB Color libraries. IconEdit can convert the symbols to grey for use with Grey-level libraries.
Recommended C-source code for Fonts
Black and white gives the smallest ROM footprint.
All pixel data are stored as bytes for maximum portability.
If the development system requires it all unsigned values can have an U suffix.
If you prefer white characters on black background pixel data can be inverted.
Two bit intensity level anti-alias gives a good compromise between ROM size and character look.
Data is stored as 4 pixels per byte.
If you prefer white characters on black background pixel data can be inverted.
Other Color Modes for Images and Fonts.