Skip to content
Crystal Hammer edited this page Apr 16, 2017 · 11 revisions

Running

Go to CrystalFont\bin and run CrystalFont.exe.

Press F11 to show keyboard help, use left,right to change pages.

Program doesn't support mouse, so every action comes from keyborard.

Use existing .fnt files to load whole font settings, browse .clr files for existing coloring schemes, to apply for font/glow.

Note: some texture bug still appears when changing many font projects, restarting program and loading font again resolves it.

The code is quite old (started in 2005), all computations go on CPU, so for big font sizes (>120) and wide glow applyied, it can take few secons to draw.


Using fonts

Saved fonts can be used to draw any text in own applications.

Needed data is saved in .cf text file as follows:

minimal version:

CrystalFont 4.46	- first line, program version
33				- font height (for every character the same)
32 122			- characters range (ascii codes, ' ' to 'z')
0 0 8 			- for each character from range:
8 0 5 			-   x and y position in texture, and width
...

extended version:

CrystalFont 4.46
chars_height = 33
chars_from = 32
chars_to = 122
x=0  y=0  w=8
x=8  y=0  w=5
...

abc and full versions save additional character data like

a,b,c widths etc.

The program itself is using own created fonts, which can be seen in CrystalFont\data, fixed and variable width.


Compiling

To compile under Visual Studio 2008 use the included vcproj/sln file. Program is written in C++, it should be easy to use other compilers.

You need to have DirectX SDK installed and properly set VC Directories to include and library SDK dirs (used March 2009 release, should do fine with others).


Clone this wiki locally