Giter Club home page Giter Club logo

mkwinfont's Introduction

mkwinfont/dewinfont

This is an update to Simon Tatham's font utilities found here:

Some additional information on his work can be found here:

In brief, mkwinfont and dewinfont are Python scripts for working with Windows bitmap font file types: FNT and FON. These scripts read from and write to text files (*.fd) where the character bitmaps are defined with text characters such a . and x, or 0 and 1 (or any combination of those).

For example, the letter "A":

char 65
width 9
.........
.........
.........
...xx....
...xx....
..xxxx...
..x..x...
.xx..xx..
.xx.xxx..
.xxxx.x..
xxx...xx.
xx....xx.
xx....xx.
.........
.........
.........

Syntax

To make a FNT file from an FD text file:

python3 mkwinfont.py -fnt -o <outfile.fnt> <file.fd>

To make a FON file from one or more FD text files:

python3 mkwinfont.py -fon -o <outfile.fon> [-facename <name>] <file1.fd> [<file2.fd> ...]
  • -facename <name> is required if the FD files have different facenames defined within them. Optional otherwise.

To desconstruct a FNT or single-font FON file to FD text file:

python3 dewinfont.py -o <outfile.fb> <filename>

To desconstruct a multi-font FON file to multiple FD text files:

python3 dewinfont.py -p <prefix> <file.fon>
  • Files will be named like so: <prefix>00.fd

Other Font Tools

Bitmap Font Tools

fony - For most work, you'll probably want to use this editor. It is a fairly good editor with only a few UI annoyances. It has a few issues that forced me to revert to mkwinfont here and there, but those are rare. I also had some trouble with saving multi-font FON files as FNT (the FNT file coming out identical to the FON file, which is wrong) and reducing multi-font FON files to a single-font FON file (the result not readable by Windows)... but I can't reliably reproduce those problems either so, go figure, maybe it was me. Considering that FNT files are resource files for programming and not installable in the OS (also, they cannot contain more than one font like FON files can, which this editor favors features for) it would probably make more sense to handle FNT as another type of import/export instead of a load/save. The feature to export to grid images is broken (which is fairly disappointing to me) -- or never completed (the latest version is a "work in progress").

VSoft's Fontedit - This FNT-only editor still works on the latest Windows versions except for one very important feature: a bug prevents it from saving on the latest Windows. The source code is provided so it should be an easy fix. This is not as nice an editor as fony but it has some features fony should absorb like inserting and deleting of columns and rows, and selection editing.

PSF Tools - UNIX programs that are useful for converting many bitmap types -- particularly, Linux's PSF console type (but not the PCF X11 type?). It installed fine in Babun/Cygwin for me.

See Also

This project was spawned by needs of this other one for creating fonts compatible with PICO-8 programming:

mkwinfont's People

Contributors

juanitogan avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.