home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / COMM / MISC / SRC26_2.ZIP / DOC / BDFTOHFT.DOC < prev    next >
Encoding:
Text File  |  1990-07-01  |  2.9 KB  |  113 lines

  1.  
  2.     BDFTOHFT.EXE  hterm font compiler
  3.  
  4.  
  5. SYNTAX: bdftohft [options] <ascii.bdf> <kanji.bdf> <outfile.hft>
  6.  
  7. OPTIONS:
  8.     -v    verbose
  9.     -1    include only JIS level 1 kanji
  10.  
  11. DESCRIPTION:
  12.  
  13.   bdftohft converts font file from X11 window system's bdf file format
  14. to hterm font file format.
  15.  
  16.  
  17. HOW TO MAKE HTERM FONT FILE:
  18.  
  19. 1) prepare bdf file (X11 font file)
  20.  
  21.    You need ascii file and kanji file. For example, we assume to use
  22.    a14.bdf as a ascii font file and k14.bdf as a kanji font file.
  23.  
  24. 2) make a14x.bdf from a14.bdf and a14add.bdf
  25.  
  26.    insert a14add.bdf to proper position in a14.bdf then make a14x.bdf.
  27.    There are two characters which are used by hterm's history editor.
  28.    Since their code are 0x7f and 0x80, edit a14.bdf and insert them
  29.    after 0x7e code.
  30.  
  31. 3) create hft file
  32.  
  33.    use hterm font compiler bdftohft.exe
  34.  
  35.     C> bdftohft a14x.bdf k14.bdf a14k14.hft
  36.  
  37.    bdftohft takes some command line options. One is -1 option. -1 option
  38.    directs to include only JIS level 1 kanji in hft file so that hterm
  39.    consumes less memory.
  40.    JIS is an acronym of Japanese Industry Standard. 'JIS level 1' means
  41.    minimal set of usual kanji characters. In JIS level 1 set there are 3500 
  42.    characters including special symbols, hira-kana, kata-kana, alphabet and
  43.    kanji.
  44.    
  45. 4) copy hft file to a directory in PATH.
  46.  
  47.    C> copy a14k14.hft /tools/bin
  48.  
  49.    If your font file name is maru14.hft, type hterm -fmaru14.hft.
  50.    hterm will search maru14.hft in current directory, your HOME directory 
  51.    and directories in PATH environment variable.
  52.    
  53.     
  54. FONT FILE FORMAT:
  55.  
  56. As described in src/font.h, hft file has following structure.
  57.  
  58.     comment        48 bytes
  59.     font descriptor for ascii font
  60.     font descriptor for kanji font
  61.     ascii font body
  62.     ascii font index
  63.     kanji font body
  64.     kanji font index
  65.  
  66. Here is font descriptor format. One font is consisted by on memory part
  67. and off memory part. While on memory part is loaded on memory parmanently,
  68. off memory part is loaded in cache on demand basis. 'onMemEndChar' defines
  69. border of two parts. By default configulation, 0xff is used for ascii and
  70. 0x2576 is used for kanji. 0x2567 is a code of the last character of KATA-KANA.
  71.  
  72.  
  73.     unsigned short    startChar
  74.         code number of first character
  75.  
  76.     unsigned short    endChar
  77.         code number of end character
  78.  
  79.     unsigned short    numFont
  80.         number of fonts
  81.  
  82.     unsigned short    onMemEndChar
  83.         code nubmer of last on memory font
  84.  
  85.     unsigned short    numOnMemFont
  86.         number of on memory font
  87.  
  88.     unsigned short    numIndex
  89.         number of items in index
  90.  
  91.     unsigned short    wwidth
  92.         font column width in bytes
  93.         eg. 1 for ascii 2 for kanji
  94.  
  95.     unsigned short    dwidth
  96.         font raw width in bytes e.g., 14
  97.  
  98.     long fontAddress
  99.         font body address in hft file
  100.  
  101.     long indexAddress
  102.         font index address in hft file
  103.  
  104.     char FAR *fontBuf;
  105.         not used
  106.  
  107.     long HUGE *indexTab;
  108.         not used
  109.     
  110. BUGS:
  111.   You shuld edit bdftohft.c in order to change onMemEndChar.
  112.  
  113.