SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

Freshmeat appindex# 903272408

                                     FontEd
                                  Version: 0.9

                               by Jonathan Atkins

                                  Introduction
                                  """"""""""""

This is a vga font editor. It must be used on a linux console. The user must also be root, or the program setuid and owned by root. Being that this program requires such permission please look through the code, and be reassured that I have not done anything malicious, and that you as a root user must be responsible for any unauthorized font editing of system fonts. Therefore it is not really meant to be a setuid program, and is only meant to be used by people who own (or administrate) the system they are working on.

The font's created with this system have been used by me on linux kernel 2.0 and have been included in this archive as production examples of what is possible using this program. I personally use this program to make console fonts and no other. There are others made to create such fonts but they require an svgalib compatible card or run in XWindows. This program shows and uses the font as you create it, making it the most accurate representation of the finished product while editting.

There is one workaraound for a non root user to use the program without privileges. Run XWindows and then exit or switch back to the console...you will now own the console, which is all that the root privs are needed for. Your XServer most likely has setuid on and will give you the access you require. If you cannot run you XServer as a regular user, then you need to setuid your XServer...one drawback may be the privileges required for /dev/vcs. If that is not available, then only printable letters will be shown realtime. Others are still editable however.

Fonts may be found installed at /usr/lib/kbd/consolefonts. You may wish to place your own new fonts there as well.

                                   Disclaimer
                                   """"""""""

I am not responsible for the irresponsible use of this program, nor if it happens to cause your system to become unusable. If unknown characters are streaming out of the console...it's not my fault. USE AT YOUR OWN RISK, and enjoyment!

                                  Requirements
                                  """"""""""""

ncurses library (1.9.9e is what I used) root privs (see Introduction above) Optional: XWindows

                                  Installation
                                  """"""""""""

1) login or su as root
2) make
3) make install
4) Enjoy!

                                     Usage
                                     """""

Just run fonted and the name of the fontfile. (ex: fonted cod.fnt) This will setup the font editor with the font and set the screen as well. Saving is confirmed on quitting the program, so you can decide then whether or not to keep or chuck the changes. If the fontfile is not found you will be asked if you would like to create a new fontfile. If you say yes, the font that is currently in use will become the default font in the editor. All editor use is explained inside the editor, on screen at all times, so I'm not going to explain that here. But let me say that it is easy to use and has more functions than you can shake a stick at. Some of the functions require the shift key, so look carefully at the command keys for their case! (Such as Shift-L to Reload) On quitting the screen will reset to original font before fonted ran. To set the screen to the new font use the setfont command. (ex: setfont cod.fnt)

Happy fonting!

                                 Extra programs
                                 """"" """"""""

Also included are some console font conversion and utility programs:

fnt2bdf
This program doesn't require a Linux Console, nor root access. Just feed it the font filename and it spits out the bdf font. It translates the console font to xwindows encoding on the fly. The output should be redirected into a file.bdf type filename. This out file may be installed in an XWindows font directory and used

in XWindows. (don't forget to makefontdir first!) the fonts are created in the "Console" foundry. It should show up in xfontsel. To compile the font.bdf file into a native XWindows format try bdftopcf.

Example sequence to install cod.fnt in /usr/X11R6/lib/fonts/misc:

        fnt2bdf cod.fnt > cod.bdf
        bdftopcf cod.bdf > cod.pcf
        cp cod.pcf.gz /usr/X11R6/lib/fonts/misc
        mkfontdir /usr/X11R6/lib/fonts/misc
    If in XWindows continue on and do the following steps to setup XWindows:
        # Issue the following to add fontdir to path (if needed)
        # This only affects the current XWindows session
        # Add the fontdir in the /etc/XF86Config, or whatever config file...
        # To check fontpath type: xset -q
        xset fp+ /usr/X11R6/lib/fonts/misc
        # Issue the following to rescan fontdirs, needed even without above step
        xset fp rehash
fonts test
This one requires ownership of the console...as explained in the Intro. Run this at a console to test a font really quick. This program may not like non 80x24 consoles...I dunno. It won't hurt to try with this, though. It sets the font on, and then you press enter to reset back to the previous

settings. If this program fails, so will fonted.

fnt2c
outputs a C compilable source file. (Do not redirect!) for example running the command:

fnt2c cod.fnt will result in the file "cod.c" without redirection. (I thing I will make it so it has to be redirected in the next version.) NOTE: I have no idea why I wrote this! I forget...but it is neat-o! But now you can create graphic fonts and compile them into your program!

                                     Files
                                     """""
BUGS        Known bugs and status
CHANGES     Version tracking through changes recorded here
COPYRIGHT   Read this if you plan to spread any files from here!
CREDITS     Where it's due...
INVALID     A list of invalid characters for normal output, so why edit them!
Makefile    edit this if you need to fix the compilation process, no autoconfig
README      this file!
cod.fnt     based on the Circle of Dust album font...cool beans.
cod50.fnt   the 50 line console version of the cod.fnt fontfile
imp.fnt     the impossible font, it's an aquired taste, straight from my mind...
lol.fnt     lol stands for linear outline...I think...it's a boxy outline font
para.fnt    based on segments and curves, almost miltary, but not!
see         a shell script, listing some reading resources used to create this!

wipeout.fnt a font made following the wipeout game font.

                                  Contact Info
                                  """"""" """"
                                Jonathan Atkins
                              2012 River Run Trail
                           Fort Wayne, IN 46825-6041

                             jcatki@most.fw.hac.com
                                       or
                             jcatki@mysolution.com


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.