Introduction: 
This fnt_cvt.exe is the utility which runs on Windows to extract characters from the 
font file into specified point size FT800 metric block as well as bitmap raw data. 
The characters to be converted are specified in UTF-8 encoding file or ASCII printable 
code set from 32 to 126(both inclusive).

It will generate the metric block file as well as L1, L4, L8 format bitmap data. 
The output is one 148 bytes metric block appending the variable size raw bitmap data. 

The output data of this utility is prepared for 1 bitmap handle of FT800.


The usage is : 
    fnt_cvt.exe -i FontFileName -s pointsize [-u utf8_file]|[-a] [-d FT800_address]

Arguments list: 	
'-i' :	Mandatory argument. The input file shall be located at the 
same folder of utility, otherwise fnt_cvt will search the windows system font directory 
for the font file.Users are encouraged to test the different font file format listed at 
http://www.freetype.org/freetype2/#features,although it is not fully tested yet. 

'-s' :  Optional argument. The width in pixel of font characters to be converted. If 
this argument is not present, the size is assumed as 12. 

'-u' :  Mandatory argument if the input file is encoding in UTF-8. The utf8_file specifies 
the file name. fnt_cvt.exe will read this file and convert the characters in this file. Users 
can copy the characters to be converted into this file but ensure the file encoded with UTF-8.
The numbers of characters shall be not more than 127. 

'-a':   Mandatory argument if users wants to convert the ASCII printable character set , i.e.
from 32 to 126. There is no input file required. 

'-d':   Optional argument. This argument defines the start address of metric block in FT800.    
If it is not present, fnt_cvt will assume RAM_G is the starting address. Because the bitmap raw data
is following the metric block, the bitmap raw data address is starting from FT800_address + 148

Example : 
1. Convert the ASCII printable characters to Arial bold font and assume the address of output data 
is from RAM_G + 1000 in FT800. 
    fnt_cvt -i arialbd.ttf -s 24 -a -d 1000
	
2. Convert the characeters in utf8_file into arial bold font and assume the address of output data 
is from RAM_G + 1000 in FT800.
	fnt_cvt -i arialbd.ttf -s 24 -u utf8_file -d 1000
		
		
Output folder:  
All the files generated are under folder FontFileName_utf8_file_pointsize of current working directory.

Note: 
1. "L1" "L4" "L8" are output folders for different formats. Each folder contains the *.raw file and *.rawh file. 

*.rawh file is in C header format and explains the format of binary in *.raw. 
*.raw is the raw data in binary.
*.rtf is the file defining the character and index mapping relationship, which is encoded in UTF-8 and can be 
openned by word pad application of Windows.

2. Metric block and address of Bitmap raw data.
The metric block is totally 148 bytes and its format can be found in programmer guide. 
Please note the 4 bytes of metric block from offset 144 specifies the address of bitmap 
raw data of characters in FT800 RAM_G(in Little Endian).  We call it AddressInMetricBlk below.

AddressInMetricBlk is determined in different way at '-u' and '-a' argument case: 

'-u':  AddressInMetricBlk = FT800_address + RAM_G + 148 - stride * Height * 1

'-a':  AddressInMetricBlk = FT800_address + RAM_G + 148 - stride * Height * 32


3. In the 'UTF-8' format,  to address the character of font, the valid index range is from 1 to 127
   In the 'ASCII' format,  to address the character of font, the valid index range is from 32 to 127
 Pleasse see the *.rtf file for each character 's index. 

4. Please make sure the characters in utf8_file is supported in the FontFileName. Otherwise, it may not 
output the desired font data. 

5. The *.jpg and *.png is in L8 format and viewable at windows photo viewer application. 

6. The file "SampleApp.c" contains one function which tests the output data of utility: 
 fnt_cvt -i simfang.ttf -u FangSong_Chinese.txt -s 30 -d 1000
 Users shall copy the function to the Sample Application Project and try to call it to see 
 the effect. FT800 shows 20 Fang Song Tradinitional Chinese characters. 
 
 The file "FangSong_Chinese.txt" is encoded as UTF-8 and used for user to test. 
 
7. The file "ansi_32_126.txt" is the default file used by utility for '-a' argument. 
   DONOT delete it.


Release history:
0.3.1: Fix the deployment issue and introduce the new application icon. 
0.3:   Solve the issue of vertical alignment issue 
0.2.1: Solve the issue that cannot find resource file 
       if font file is under windows font directory only.  
0.2: Fix the issue true type font file has to be installed in windows font directory. 
0.1: Initial Release
	


