home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / doc / console-tools / file-formats / raw < prev    next >
Encoding:
Text File  |  1999-04-08  |  2.1 KB  |  71 lines

  1.             The RAW file-format
  2.  
  3.         (C) 1997 Yann Dirson <dirson@debian.org>
  4.  
  5.  
  6.  This file documents the RAW font-file-format, as understood by the Linux
  7. console utilities ('kbd').
  8.  
  9.  This file has revision number 1.0, and is dated 1997/09/02.
  10.  
  11.  
  12. 0. Changes
  13.  
  14. 1998/08/20: updated author's e-mail.
  15.  
  16.  
  17. 1. Summary
  18.  
  19.  A RAW file only contains one 8-pixels-wide 256-characters font, ie. each
  20. scanline in a character occupies 1 byte.
  21.  
  22.  It may contain characters of any height between 0 and 255, though character
  23. heights lower than 8 or greater than 32 are not attested to exist or even be
  24. useful [more info needed on this]; the file's size is used to determine the
  25. font's height when reading it.
  26.  
  27.  WARNING: no program can reliably ensure a file it reads is in this format;
  28. it can only recognize when the file's size makes it obvious it is not. Thus
  29. some files can be wrongly assumed to be raw font-files. For this reason, you
  30. are strongly encouraged to use other formats, like PSF, which can be
  31. identified by magic-number.
  32.  
  33.  
  34. 2. History
  35.  
  36.  Unknown. This file-format probably cannot evolve.
  37.  
  38.  
  39. 3. Known programs understanding this file-format.
  40.  
  41.  The following program in the Linux console utilities can read and/or write
  42. RAW files:
  43.  
  44.     setfont (R/W)
  45.  
  46.  
  47. 4. Technical data
  48.  
  49.  The file format is described here in sort-of EBNF notation. Upper-case
  50. WORDS represent terminal symbols, ie. C types; lower-case words represent
  51. non-terminal symbols, ie. symbols defined in terms of other symbols.
  52.  [sym] is an optional symbol
  53.  {sym} is a symbol that can be repeated 0 or more times
  54.  {sym}*N is a symbol that must be repeated N times
  55.  Comments are introduced with a # sign.
  56.  
  57.  
  58. # The data (U_SHORT's) are stored in LITTLE_ENDIAN byte order.
  59.  
  60. raw_file =    raw_fontdata
  61.  
  62. raw_fontdata =    {char_data}*256
  63.  
  64. char_data =    {BYTE}*<fontheight>
  65.  
  66. # This makes the file have a size of 256*<fontheight> bytes; thus only files
  67. # whose size has 0 as less significant byte can be interpreted as a raw font.
  68. # One might even want to extend these lower 8 bits to 10 (resp. 11) to ensure
  69. # that no file is wrongly assumed to be a (quite rare!) less-than-4 (resp. 8)
  70. # scanlines font.
  71.