www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/03/03/18:30:33

Date: Wed, 3 Mar 93 17:22:32 CST
From: (csaba AT vuse DOT vanderbilt DOT edu) <csaba AT vuse DOT vanderbilt DOT edu>
To: kuku AT acds DOT physik DOT rwth-aachen DOT de
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: grx fonts

On Wed, 3 Mar 93 21:40:44 +0100,
  Christoph Kukulies writes:

>This is adressed to Csaba, are you listening?
>
>I'm experimenting with various fonts in contrib/libgrx/fonts
>and I wonder how I can modify these .fnt files. Some of the files
>don't have Umlauts or don't have them in the places where the PC fonts
>have them.
>
>How can I produce a .fnt file from, say, an X11 pcf or bdf font file?
>What is the .fnt file format, anyhow?
>
>
>--Chris


The .fnt format is described in the file:
   
    .....grx/include/grxfont.h

You may also consult the font loading routine in:

    .....grx/src/loadfont.c

There is a program called FNTOOL in the distribution in the 

    .....grx/fntool 

directory. You will have to rebuild it as I only distribute the sources.
This is the program I used to convert the fonts to the .fnt format. If you 
run it without any arguments it should print a self-explanatory help 
message.

It supports the following file formats:

   .fnt   --- the GRX font file format
   .fna   --- an ASCII representation of the above
   .bdf   --- Machine-independent font sources from the X11 distribution.

The program can convert any of the above formats to .fnt or .fna formats. 

There is another program in the distribution (I think in the utils 
directory) called XWD2FNA. This can be used to convert X window dumps (use 
'xwd -nobdrs') of the output of the 'xfd' program to the .fna format. You 
have to transfer XWD2FNA.C to your favorite X workstation and build it 
there. Don't bother if your X workstation uses anything else but a packed 8 
bit pixel format or if you have a 'fancy' xfd program which displays 
additional info besides the font characters themselves.

The .fna format could be of particular interest for you as you can change 
the characters using your favorite text editor. Every character is 
represented in the ASCII file in a format something like this:

   .......
   #......
   #......
   #......
   #......
   #......
   #####..
   .......

Once you are done just run FNTOOL to convert the ASCII file back to the 
.fnt format. NOTE: if you add a new font or change the SIZE of an existing 
one (making changes in a character bitmap without changing its size does 
not matter) you are advised to rebuild the font directory as well. FNTOOL 
will do this for you if you use the -d switch.


Hope this helps


Csaba

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019