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.

Convert vector fonts to C-source code raster fonts

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:

CJK ideograph as black and white C-source code bitmap character CJK ideograph as ClearType AntiAlias C-source code bitmap character CJK ideograph as Extra Smooth AntiAlias C-source code bitmap character

Black & White or Anti-Alias is chosen automatically according to the data format:

Choice of black and white C-source code bitmap font

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:

Choice of master font for raster font

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:

Choice of character look for bitmap font

Choice of character look for raster font

The fonts can be Normal, Subtitle Font with contrast edge for better visibility, or Outline Font with hollow characters.

Selection of character look normal subtitle or outline raster font

The width of the font can be anywhere between 50% and 150% of the original Windows font:

Use Master Font Selector to stretch or squeeze font

Use Master Font Selector to stretch or compress font width

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:

Language selector for over 100 languages

Finally save in the format you prefer:

Save formats for fonts

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:

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:

Code-point list for test font with one and greek alpha and betha

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:

Symbol list for test font with one and greek alpha and betha

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:

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:

Symbol list for test font with one and greek alpha and betha

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:

Convert fonts, images, and text to C-source 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

1-bit B&W C Source code for one character from IconEdit

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.

Choice of black and white C-source code bitmap font

All pixel data are stored as bytes for maximum portability.

Black and white C-source code bitmap font character

If the development system requires it all unsigned values can have an U suffix.

C-source code pixel font with capital U suffix

Black and white C-code character with capital U suffix raster font

If you prefer white characters on black background pixel data can be inverted.

C-source code pixel font with white on black

Black and white C-source code character with white on black from raster font

Two bit intensity level anti-alias gives a good compromise between ROM size and character look.

Choice of 2-bit intensity level C-source code pixel font

Data is stored as 4 pixels per byte.

2-bit anti alias intensity level C-code character from pixel font

If you prefer white characters on black background pixel data can be inverted.

C-source code bitmap font with white on black alpha value anti-alias

C-source code character with white on black alpha value anti-alias from raster font



ROM Optimized Characters and Images Other Color Modes for Images and Fonts.



IconEdit font and symbol editor home IconEdit font and symbol editor home

Download the zip file for IconEdit Go to download of the IconEdit zip file.