monobit


Namemonobit JSON
Version 0.42.2 PyPI version JSON
download
home_page
SummaryTools for working with monochrome bitmap fonts.
upload_time2023-08-12 09:24:37
maintainer
docs_urlNone
author
requires_python>=3.9
licenseMIT License Copyright (c) 2019--2023 Rob Hagemans Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords 8-bit bitfont bitmap-font font pixel-font retro
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
    -@@------------------------------------------@@------@@--------------@@-
    -@@------------------------------------------@@------@@--@@----------@@-
    -@@------------------------------------------@@----------@@----------@@-
    -@@------@@@@@@@@@----@@@@---@@@@@----@@@@---@@@@@---@@-@@@@---------@@-
    -@@------@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@----------@@-
    -@@------@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@----------@@-
    -@@------@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@----------@@-
    -@@------@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@----------@@-
    -@@------@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@------@@-
    -@@------@@--@@--@@---@@@@---@@--@@---@@@@---@@@@@---@@---@@-@@------@@-
    -@@------------------------------------------------------------------@@-
    -@@------------------------------------------------------------------@@-
    -@@------------------------------------------------------------------@@-


Tools for working with monochrome bitmap fonts
==============================================

The `monobit` tools let you modify bitmap fonts and convert between several formats.

`monobit`'s native format is `yaff`, a human-friendly, text-based visual format similar to the ones used by
Roman Czyborra's `hexdraw`, Simon Tatham's `mkwinfont` and John Elliott's `psftools`. Details are
given in [the `yaff` font file format specification](YAFF.md).

Monobit requires Python 3.9 or above. Install through `pip install monobit`. Some formats or features require additional packages; see _Dependencies_ below for a list. These
will be installed automatically if you use `pip`.

`monobit` can be used as a Python package or as a command-line tool.



Usage examples
--------------

##### Convert utility

Here are some examples of how to use the conversion utility.

`monobit-convert --help`

Display usage summary and command-line options

`monobit-convert --help load --format=raw`

Display usage summary and additional format-specific command-line options for conversion from raw binary.

`monobit-convert fixedsys.fon`

Recognise the source file format from "magic bytes" or suffix (here, a Windows font) and write fonts
to standard output in `yaff` format.

`monobit-convert roman.bdf to --format=unifont`

Read font from BDF file and write to standard output as Unifont HEX.

`monobit-convert fixed.psf to fixed.png`

Read font in PSF format and write to disk as image in PNG format.

`monobit-convert --format=c to --format=bdf`

Read font from standard input as C-source coded binary and write to standard output as BDF.

The converter transparently reads and writes `gz`, `bz2`, or `xz`-compressed font files and can read
and write `zip` and `tar` archives. Some font formats contain multiple fonts whereas others can
contain only one; the converter will write multiple files to a directory or archive if needed.

It is also possible to apply various transformations on the font before saving it. Check
`monobit-convert --help` for usage.


##### Banner utility

The banner utility renders text to standard output in a given font. This is similar to the ancient
`banner` commands included in System-V and BSD Unixes.

For example, the banner at the top of this `README` was made with

    me@bandit:~$ monobit-banner '| monobit. |' --font=VGASYS.FON

`monobit-banner` has a number of rendering options - you can choose fonts, change the "ink" and "paper"
characters, set a margin, scale text, and rotate by quarter turns.
Check `monobit-banner --help` for usage.


Supported bitmap formats
------------------------

| Format                | Short Name | Typical Extension           | Read  | Write |
|-----------------------|------------|-----------------------------|-------|-------|
| Xerox Alto CONVERT    | `alto`     | `.al`                       |✓|       |
| Amiga Font Contents   | `amiga-fc` | `.font`                     |✓|       |
| Amiga font            | `amiga`    |                             |✓|       |
| BBC soft font         | `bbc`      |                             |✓|✓|
| X11/Adobe BDF         | `bdf`      | `.bdf`                      |✓|✓|
| Xerox Alto BITBLT     | `bitblt`   | `.strike` `.ks`             |✓|       |
| AngelCode BMFont [P]  | `bmfont` | `.fnt` `.xml` `.json` + images|✓|✓|
| Raw binary            | `raw`      | `.fnt` `.rom` [*]           |✓|✓|
| Codepage Information  | `cpi`      | `.cpi`                      |✓|✓|
| Consoleet / vfontas   | `consoleet`| `.txt`                      |✓|       |
| Daisy-Dot             | `daisy`    | `.nlq` `.nl2` `.nl3` `.nl4` |✓|       |
| Dashen                | `dashen`   | `.pft`                      |✓|       |
| DEC DRCS soft font    | `dec`      |                             |✓|✓|
| DosStart!             | `dosstart` | `.dsf`                      |✓|       |
| FZX font              | `fzx`      | `.fzx`                      |✓|✓|
| Figlet font           | `figlet`   | `.flf`                      |✓|✓|
| Windows or OS/2 font  | `mzfon`    | `.fon` `.exe` `.dll`        |✓|✓ (16-bit Windows) |
| FONTX2                | `fontx`    | `.fnt`                      |✓|✓|
| FONTEDIT              | `fontedit` | `.com`                      |✓|       |
| Fontraption           | `frapt`    | `.com`                      |✓|       |
| Fontraption TSR       | `frapt-tsr`| `.com`                      |✓|       |
| Hanzi Bitmap Font     | `hbf`      | `.hbf` + raw binary         |✓|✓|
| OS/2 GPI resource     | `gpi`      | `.fnt`                      |✓|       |
| Atari GDOS / GEM      | `gdos`     | `.fnt` `.gft` `.vga`        |✓|✓|
| C64 GEOS ConVerT      | `geos`     | `.cvt`                      |✓|       |
| HP PCL soft font      | `hppcl`    | `.sft` `.sfp` `.sfl`        |✓|✓|
| GNU Unifont           | `unifont`  | `.hex`                      |✓|✓|
| Extended Hex          | `pcbasic`  | `.hex`                      |✓|✓|
| hexdraw               | `hexdraw`  | `.draw`                     |✓|✓|
| Bitmap image [P]      | `image`    | `.png` `.gif` `.bmp`        |✓|✓|
| Apple IIgs font       | `iigs`     | `.fon`                      |✓|✓|
| Bare codepage         | `kbd`      | `.cp`                       |✓|✓|
| REXXCOM Font Mania    | `mania`    | `.com`                      |✓|       |
| LISA font library     | `lisa`     | `.bin`                      |✓|       |
| MacOS font            | `mac`      | `.dfont` `.suit`            |✓|✓|
| mkwinfon text format  | `mkwinfon` | `.fd`                       |✓|       |
| X11 Portable Compiled Format |  `pcf` | `.pcf`                   |✓|✓|
| Xerox Alto PrePress   | `prepress` | `.ac`                       |✓|       |
| PSF2AMS PSFCOM        | `psfcom`   | `.com`                      |✓|       |
| Bare NFNT resource    | `nfnt`     | `.f`                        |✓|✓|
| Palm OS font (v1/NFNT)| `palm`     | `.pdb`                      |✓|       |
| Optiks PCR Font       | `pcr`      | `.pcr`                      |✓|       |
| PCPaint, GRASP, ChiWriter | `pcpaint` | `.set` `.fnt`  `.sft` `.pft` `.eft` ... |✓|  |
| PDF chart [R]         | `pdf`      | `.pdf`                      |       |✓|
| TeX PKFONT            | `pkfont`   | `.pk`                       |✓|       |
| Adobe Prebuilt Format | `prebuilt` | `.bepf` `.lepf`             |✓|       |
| The Print Shop        | `printshop`| `.pnf`                      |✓|       |
| PC Screen Font        | `psf`      | `.psf` `.psfu`              |✓|✓ (version 2) |
| PSF2AMS PSFCOM        | `psfcom`   | `.com`                      |✓|       |
| PSF2TXT               | `psf2txt`  | `.txt`                      |✓|       |
| Signum! 2             | `signum`   | `.e24` `.p9` `.p24` `.l30`  |✓|       |
| SFNT embedded bitmap  | `sfnt`     | `.otb` `.ttf` `.otf` [F] [**] |✓|✓ (OTB) |
| SFNT collection       | `ttcf`     | `.otc` `.ttc` [F] [**]      |✓|✓ (OTB) |
| vfont                 | `vfont`    |                             |✓|✓|
| Bare GEOS resource    | `vlir`     |                             |✓|       |
| Windows FNT resource  | `win`      | `.fnt`                      |✓|✓|
| XBIN font section     | `xbin`     | `.xb`                       |✓|✓|
| monobit yaff          | `yaff`     | `.yaff`                     |✓|✓|


[P] - requires **PIL**  
[R] - requires **reportlab**  
[F] - requires **fontTools**


[*] Identifying raw binary files
--------------------------------

This is the most common format used on old platforms, often with the unhelpful suffix `.fnt`. As there is no metadata, it's up to you to specify the character-cell size. The most common, and default, size is 8x8 (CGA and many 8-bit platforms), followed by 8x16 (VGA) and 8x14 (EGA).

- 8x8 raw files are also known as `.f08`, `.ch8`, `.64c`, `.chr`, `.udg`, and many others.
- 8x14 raw files are also known as `.f14` or CHET `.814`.
- 8x16 raw files are also known as `.f16`, Warp 9 `.fnt` or Degas Elite `.fnt`
- Genecar `.car` files are 16x16 raw files.
- Harlekin III `.fnt` files are raw binaries with a 4096x8 pixel bitmap strike hosting 512 8x8 glyphs side by side. Extract with `-strike-width=512`.

It is also useful to check the file size. Raw files commonly hold 96 (ASCII excluding controls), 128 (ASCII), 256, or multiples thereof. Common file sizes therefore are:

|       |  8x8  |  8x14 |  8x16 |
|-------|-------|-------|-------|
| **96**|   768 |  1344 |  1536 |
|**128**|  1024 |  1792 |  2048 |
|**256**|  2048 |  3584 |  4096 |
|**512**|  4096 |  7168 |  8192 |


If your unidentified font file has one of these sizes, chances are it is a raw binary file.


[**] TrueType / OpenType embedded bitmaps
-----------------------------------------

`monobit` can extract bitmaps embedded in TrueType and OpenType font files. It
should be kept in mind that these are primarily intended as scalable formats,
and only exceptionally embed bitmaps to improve rendering on low-resolution displays.

_The vast majority of `.ttf`, `.otf`, `.dfont` etc. files do not contain bitmaps at all_.
This is true even for fonts with a pixelised look.
To convert these you first need to _rasterise_ them, which `monobit` does not do.
Some of the other font tools linked below do have rasterising features.

`monobit` can experimentally output OpenType Bitmap (`.otb`) files, a bitmap-only
file format supported by Linux desktops.


Font format features
--------------------

Here is a comparison of what you can and cannot store in selected formats supported by `monobit`.

| Format        | Unicode | Unicode sequences | Encoding | MBCS | Multiple fonts | Cell size | Proportional | Kerning | Colour/antialiasing | Glyph representation
|---------------|-------|-------|-------|-------|-------|------|-------|-------|-------|--------------
| `yaff`        |✓|✓|✓|✓|✓| any  |✓|✓|       | visual text
| `sfnt`        |✓|✓|✓|✓|✓| any  |✓|✓|✓| binary
| `bmfont`      |✓|       |✓|✓|       | any  |✓|✓|✓| image
| `mac`         |       |       |✓|       |       | any  |✓|✓|✓| binary
| `bdf`         |✓|       |✓|✓|       | any  |✓|       |       | hex
| `win`         |       |       |✓|       |✓| any  |✓|       |       | binary
| `hexdraw`     |✓|       |       |       |       | any  |✓|       |       | visual text
| `amiga`       |       |       |       |       |✓| any  |✓|       |✓| binary
| `gdos`        |       |       |       |       |       | any  |✓|       |       | binary
| `fzx`         |       |       |       |       |       | any  |✓|       |       | binary
| `figlet`      |✓|       |       |       |       | any  |✓|       |✓| visual text
| `vfont`       |       |       |       |       |       | any  |✓|       |       | binary
| `pcbasic`     |✓|✓|       |       |       | 8xN  | multi-cell |  |       | hex
| `unifont`     |✓|       |       |       |       | 8x16 | multi-cell |  |       | hex
| `hbf`         |       |       |✓|✓|       | any  |       |       |       | binary
| `psf` (v2)    |✓|✓|       |       |       | any  |       |       |       | binary
| `psf` (v1)    |✓|       |       |       |       | 8xN  |       |       |       | binary
| `fontx`       |       |       |       |✓|       | any  |       |       |       | binary
| `cpi`         |       |       |✓|       |✓| 8xN  |       |       |       | binary
| `dec`         |       |       |       |       |       | >4xN |       |       |       | binary
| `bbc`         |       |       |       |       |       | 8x8  |       |       |       | binary


Wrapper formats
-----------------

`monobit` will recurse and extract font files from a number of common container,
archive, compression and encoding formats:

| Format                | Name     | Typical Extension       | Read  | Write |
|-----------------------|----------|-------------------------|-------|-------|
| PKZip/WinZip          | `zip`    | `.zip`                  |✓|✓|
| GNU tar               | `tar`    | `.tar` `.tgz`           |✓|✓|
| GZip                  | `gzip`   | `.gz`                   |✓|✓|
| BZip2                 | `bzip2`  | `.bz2`                  |✓|✓|
| XZ/LZMA               | `lzma`   | `.xz` `.lzma`           |✓|✓|
| AppleSingle           | `apple1` | `.as`                   |✓|       |
| AppleDouble           | `apple2` | `.adf` `.rsrc`          |✓|       |
| MacBinary             | `macbin` | `.bin`                  |✓|       |
| BinHex 4.0            | `binhex` | `.hqx`                  |✓|       |
| C or C++ coded binary | `c`      | `.c` `.cpp` `.cc` `.h`  |✓|✓|
| JSON coded binary     | `json`   | `.json`                 |✓|✓|
| Python coded binary   | `python` | `.py`                   |✓|✓|
| Pascal coded binary   | `pascal` | `.pas`                  |✓|       |
| BASIC coded binary    | `basic`  | `.bas`                  |✓|✓|


Stroke formats
--------------

Stroke font support is experimental. Stroke fonts are scalable fonts defined as
line segments. They are fundamentally different from modern fonts in that they
define single strokes whereas modern fonts define outlines to be filled with ink.
Additionally, the fonts currently supported consist of straight line segments only.


| Format                     | Short Name | Typical Extension | Read  | Write |
|----------------------------|------------|-------------------|-------|-------|
| monobit yaff               | `yaff`     | `.yaff`           |✓|✓|
| SVG Fonts                  | `svg`      | `.svg`            |✓|✓|
| Windows resource           | `win`      | `.fnt`            |✓|✓|
| Windows font               | `fon`      | `.fon`            |✓|✓ (NE) |
| Borland Graphics Interface | `borland`  | `.chr`            |✓|✓|
| Hershey fonts (Jim Hurt)   | `hurt`     | `.jhf`            |✓|       |
| DOSStart                   | `dosstart` | `.dsf`            |✓|       |


Dependencies
------------

Some formats require
- **PIL** (`Pillow`)
- **reportlab**
- **fontTools**

The renderer additionally employs
- **uniseg**
- **python-bidi**
- **arabic-reshaper**

All can be installed through Pip:

    pip install Pillow reportlab fonttools uniseg python-bidi arabic-reshaper

Without these packages, some functionality may not be available.


Copyright and licences
----------------------

`monobit` and the `yaff` specification are copyright 2019--2023 Rob Hagemans and
released under the [MIT licence](https://opensource.org/licenses/MIT).

`monobit` contains code from:  
- [`mkwinfont`](https://www.chiark.greenend.org.uk/~sgtatham/fonts/) copyright 2001 Simon Tatham. All rights reserved.  
- [`dewinfont`](https://www.chiark.greenend.org.uk/~sgtatham/fonts/) copyright 2001,2017 Simon Tatham. All rights reserved.  
- [OS/2 GPI Font Tools](https://github.com/altsan/os2-gpi-font-tools) (C) 2012 Alexander Taylor  
- [FONDU](https://sourceforge.net/projects/fondu/) copyright (C) 2000,2001,2002,2003 by George Williams

Please refer to the notices in the `windows` and `os2` subpackages and `mac/fond.py` module for licences and more information.

The font files in `tests/fonts` are subject to their own
licences, some of which are more restrictive. These are files used for testing
and development and are not included in the packaged distribution. See `tests/fonts/README.md` and notices included with individual files.


Acknowledgements
----------------

`monobit` would not exist without those documenting,
reverse-engineering, implementing and preserving font formats and files:
- [The Internet Archive](https://archive.org)
- [Archive Team](http://fileformats.archiveteam.org/wiki/Fonts)
- [Jason Scott's textfiles.com](http://textfiles.com)
- [John Elliott's homepage](http://www.seasip.info)
- [Simon Tatham's fonts page](https://www.chiark.greenend.org.uk/~sgtatham/fonts/)
- [Aivosto's character set documentation](https://www.aivosto.com/articles/charsets.html)
- [Rebecca Bettencourt's character set documentation](https://www.kreativekorp.com/charset/)
- [Xiphoseer's Signum Document Toolbox](https://sdo.dseiler.eu/)
- [George Williams et al.'s FontForge documentation](https://fontforge.org/docs/index.html)
- [FreeType Glyph Conventions](https://freetype.org/freetype2/docs/glyphs/index.html)
- ... and many others


Other software
--------------

Other bitmap font tools you could use in conjunction with (or instead of) `monobit` include:
- [FontForge](http://fontforge.github.io/en-US/)
- Rebecca Bettencourt's [Bits'n'Picas](https://github.com/kreativekorp/bitsnpicas)
- John Elliott's [PSFTools](http://www.seasip.info/Unix/PSF/)
- Mark Leisher's [`gbdfed`](http://sofia.nmsu.edu/~mleisher/Software/gbdfed/)
- [RECOIL](https://recoil.sourceforge.net/)
- John Zaitseff's [console font utilities](https://www.zap.org.au/projects/console-fonts-utils/)
- George Williams's [Fondu](https://fondu.sourceforge.net)
- VileR's [Fontraption](https://github.com/viler-int10h/Fontraption/)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "monobit",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "8-bit,bitfont,bitmap-font,font,pixel-font,retro",
    "author": "",
    "author_email": "Rob Hagemans <rob.hagemans@hotmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/b3/e9/cba5a7a6c202f97696300f789a022b3870b5706600b397443d4c2314b1b7/monobit-0.42.2.tar.gz",
    "platform": null,
    "description": "\n    -@@------------------------------------------@@------@@--------------@@-\n    -@@------------------------------------------@@------@@--@@----------@@-\n    -@@------------------------------------------@@----------@@----------@@-\n    -@@------@@@@@@@@@----@@@@---@@@@@----@@@@---@@@@@---@@-@@@@---------@@-\n    -@@------@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@----------@@-\n    -@@------@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@----------@@-\n    -@@------@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@----------@@-\n    -@@------@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@----------@@-\n    -@@------@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@--@@------@@-\n    -@@------@@--@@--@@---@@@@---@@--@@---@@@@---@@@@@---@@---@@-@@------@@-\n    -@@------------------------------------------------------------------@@-\n    -@@------------------------------------------------------------------@@-\n    -@@------------------------------------------------------------------@@-\n\n\nTools for working with monochrome bitmap fonts\n==============================================\n\nThe `monobit` tools let you modify bitmap fonts and convert between several formats.\n\n`monobit`'s native format is `yaff`, a human-friendly, text-based visual format similar to the ones used by\nRoman Czyborra's `hexdraw`, Simon Tatham's `mkwinfont` and John Elliott's `psftools`. Details are\ngiven in [the `yaff` font file format specification](YAFF.md).\n\nMonobit requires Python 3.9 or above. Install through `pip install monobit`. Some formats or features require additional packages; see _Dependencies_ below for a list. These\nwill be installed automatically if you use `pip`.\n\n`monobit` can be used as a Python package or as a command-line tool.\n\n\n\nUsage examples\n--------------\n\n##### Convert utility\n\nHere are some examples of how to use the conversion utility.\n\n`monobit-convert --help`\n\nDisplay usage summary and command-line options\n\n`monobit-convert --help load --format=raw`\n\nDisplay usage summary and additional format-specific command-line options for conversion from raw binary.\n\n`monobit-convert fixedsys.fon`\n\nRecognise the source file format from \"magic bytes\" or suffix (here, a Windows font) and write fonts\nto standard output in `yaff` format.\n\n`monobit-convert roman.bdf to --format=unifont`\n\nRead font from BDF file and write to standard output as Unifont HEX.\n\n`monobit-convert fixed.psf to fixed.png`\n\nRead font in PSF format and write to disk as image in PNG format.\n\n`monobit-convert --format=c to --format=bdf`\n\nRead font from standard input as C-source coded binary and write to standard output as BDF.\n\nThe converter transparently reads and writes `gz`, `bz2`, or `xz`-compressed font files and can read\nand write `zip` and `tar` archives. Some font formats contain multiple fonts whereas others can\ncontain only one; the converter will write multiple files to a directory or archive if needed.\n\nIt is also possible to apply various transformations on the font before saving it. Check\n`monobit-convert --help` for usage.\n\n\n##### Banner utility\n\nThe banner utility renders text to standard output in a given font. This is similar to the ancient\n`banner` commands included in System-V and BSD Unixes.\n\nFor example, the banner at the top of this `README` was made with\n\n    me@bandit:~$ monobit-banner '| monobit. |' --font=VGASYS.FON\n\n`monobit-banner` has a number of rendering options - you can choose fonts, change the \"ink\" and \"paper\"\ncharacters, set a margin, scale text, and rotate by quarter turns.\nCheck `monobit-banner --help` for usage.\n\n\nSupported bitmap formats\n------------------------\n\n| Format                | Short Name | Typical Extension           | Read  | Write |\n|-----------------------|------------|-----------------------------|-------|-------|\n| Xerox Alto CONVERT    | `alto`     | `.al`                       |&check;|       |\n| Amiga Font Contents   | `amiga-fc` | `.font`                     |&check;|       |\n| Amiga font            | `amiga`    |                             |&check;|       |\n| BBC soft font         | `bbc`      |                             |&check;|&check;|\n| X11/Adobe BDF         | `bdf`      | `.bdf`                      |&check;|&check;|\n| Xerox Alto BITBLT     | `bitblt`   | `.strike` `.ks`             |&check;|       |\n| AngelCode BMFont [P]  | `bmfont` | `.fnt` `.xml` `.json` + images|&check;|&check;|\n| Raw binary            | `raw`      | `.fnt` `.rom` [*]           |&check;|&check;|\n| Codepage Information  | `cpi`      | `.cpi`                      |&check;|&check;|\n| Consoleet / vfontas   | `consoleet`| `.txt`                      |&check;|       |\n| Daisy-Dot             | `daisy`    | `.nlq` `.nl2` `.nl3` `.nl4` |&check;|       |\n| Dashen                | `dashen`   | `.pft`                      |&check;|       |\n| DEC DRCS soft font    | `dec`      |                             |&check;|&check;|\n| DosStart!             | `dosstart` | `.dsf`                      |&check;|       |\n| FZX font              | `fzx`      | `.fzx`                      |&check;|&check;|\n| Figlet font           | `figlet`   | `.flf`                      |&check;|&check;|\n| Windows or OS/2 font  | `mzfon`    | `.fon` `.exe` `.dll`        |&check;|&check; (16-bit Windows) |\n| FONTX2                | `fontx`    | `.fnt`                      |&check;|&check;|\n| FONTEDIT              | `fontedit` | `.com`                      |&check;|       |\n| Fontraption           | `frapt`    | `.com`                      |&check;|       |\n| Fontraption TSR       | `frapt-tsr`| `.com`                      |&check;|       |\n| Hanzi Bitmap Font     | `hbf`      | `.hbf` + raw binary         |&check;|&check;|\n| OS/2 GPI resource     | `gpi`      | `.fnt`                      |&check;|       |\n| Atari GDOS / GEM      | `gdos`     | `.fnt` `.gft` `.vga`        |&check;|&check;|\n| C64 GEOS ConVerT      | `geos`     | `.cvt`                      |&check;|       |\n| HP PCL soft font      | `hppcl`    | `.sft` `.sfp` `.sfl`        |&check;|&check;|\n| GNU Unifont           | `unifont`  | `.hex`                      |&check;|&check;|\n| Extended Hex          | `pcbasic`  | `.hex`                      |&check;|&check;|\n| hexdraw               | `hexdraw`  | `.draw`                     |&check;|&check;|\n| Bitmap image [P]      | `image`    | `.png` `.gif` `.bmp`        |&check;|&check;|\n| Apple IIgs font       | `iigs`     | `.fon`                      |&check;|&check;|\n| Bare codepage         | `kbd`      | `.cp`                       |&check;|&check;|\n| REXXCOM Font Mania    | `mania`    | `.com`                      |&check;|       |\n| LISA font library     | `lisa`     | `.bin`                      |&check;|       |\n| MacOS font            | `mac`      | `.dfont` `.suit`            |&check;|&check;|\n| mkwinfon text format  | `mkwinfon` | `.fd`                       |&check;|       |\n| X11 Portable Compiled Format |  `pcf` | `.pcf`                   |&check;|&check;|\n| Xerox Alto PrePress   | `prepress` | `.ac`                       |&check;|       |\n| PSF2AMS PSFCOM        | `psfcom`   | `.com`                      |&check;|       |\n| Bare NFNT resource    | `nfnt`     | `.f`                        |&check;|&check;|\n| Palm OS font (v1/NFNT)| `palm`     | `.pdb`                      |&check;|       |\n| Optiks PCR Font       | `pcr`      | `.pcr`                      |&check;|       |\n| PCPaint, GRASP, ChiWriter | `pcpaint` | `.set` `.fnt`  `.sft` `.pft` `.eft` ... |&check;|  |\n| PDF chart [R]         | `pdf`      | `.pdf`                      |       |&check;|\n| TeX PKFONT            | `pkfont`   | `.pk`                       |&check;|       |\n| Adobe Prebuilt Format | `prebuilt` | `.bepf` `.lepf`             |&check;|       |\n| The Print Shop        | `printshop`| `.pnf`                      |&check;|       |\n| PC Screen Font        | `psf`      | `.psf` `.psfu`              |&check;|&check; (version 2) |\n| PSF2AMS PSFCOM        | `psfcom`   | `.com`                      |&check;|       |\n| PSF2TXT               | `psf2txt`  | `.txt`                      |&check;|       |\n| Signum! 2             | `signum`   | `.e24` `.p9` `.p24` `.l30`  |&check;|       |\n| SFNT embedded bitmap  | `sfnt`     | `.otb` `.ttf` `.otf` [F] [**] |&check;|&check; (OTB) |\n| SFNT collection       | `ttcf`     | `.otc` `.ttc` [F] [**]      |&check;|&check; (OTB) |\n| vfont                 | `vfont`    |                             |&check;|&check;|\n| Bare GEOS resource    | `vlir`     |                             |&check;|       |\n| Windows FNT resource  | `win`      | `.fnt`                      |&check;|&check;|\n| XBIN font section     | `xbin`     | `.xb`                       |&check;|&check;|\n| monobit yaff          | `yaff`     | `.yaff`                     |&check;|&check;|\n\n\n[P] - requires **PIL**  \n[R] - requires **reportlab**  \n[F] - requires **fontTools**\n\n\n[*] Identifying raw binary files\n--------------------------------\n\nThis is the most common format used on old platforms, often with the unhelpful suffix `.fnt`. As there is no metadata, it's up to you to specify the character-cell size. The most common, and default, size is 8x8 (CGA and many 8-bit platforms), followed by 8x16 (VGA) and 8x14 (EGA).\n\n- 8x8 raw files are also known as `.f08`, `.ch8`, `.64c`, `.chr`, `.udg`, and many others.\n- 8x14 raw files are also known as `.f14` or CHET `.814`.\n- 8x16 raw files are also known as `.f16`, Warp 9 `.fnt` or Degas Elite `.fnt`\n- Genecar `.car` files are 16x16 raw files.\n- Harlekin III `.fnt` files are raw binaries with a 4096x8 pixel bitmap strike hosting 512 8x8 glyphs side by side. Extract with `-strike-width=512`.\n\nIt is also useful to check the file size. Raw files commonly hold 96 (ASCII excluding controls), 128 (ASCII), 256, or multiples thereof. Common file sizes therefore are:\n\n|       |  8x8  |  8x14 |  8x16 |\n|-------|-------|-------|-------|\n| **96**|   768 |  1344 |  1536 |\n|**128**|  1024 |  1792 |  2048 |\n|**256**|  2048 |  3584 |  4096 |\n|**512**|  4096 |  7168 |  8192 |\n\n\nIf your unidentified font file has one of these sizes, chances are it is a raw binary file.\n\n\n[**] TrueType / OpenType embedded bitmaps\n-----------------------------------------\n\n`monobit` can extract bitmaps embedded in TrueType and OpenType font files. It\nshould be kept in mind that these are primarily intended as scalable formats,\nand only exceptionally embed bitmaps to improve rendering on low-resolution displays.\n\n_The vast majority of `.ttf`, `.otf`, `.dfont` etc. files do not contain bitmaps at all_.\nThis is true even for fonts with a pixelised look.\nTo convert these you first need to _rasterise_ them, which `monobit` does not do.\nSome of the other font tools linked below do have rasterising features.\n\n`monobit` can experimentally output OpenType Bitmap (`.otb`) files, a bitmap-only\nfile format supported by Linux desktops.\n\n\nFont format features\n--------------------\n\nHere is a comparison of what you can and cannot store in selected formats supported by `monobit`.\n\n| Format        | Unicode | Unicode sequences | Encoding | MBCS | Multiple fonts | Cell size | Proportional | Kerning | Colour/antialiasing | Glyph representation\n|---------------|-------|-------|-------|-------|-------|------|-------|-------|-------|--------------\n| `yaff`        |&check;|&check;|&check;|&check;|&check;| any  |&check;|&check;|       | visual text\n| `sfnt`        |&check;|&check;|&check;|&check;|&check;| any  |&check;|&check;|&check;| binary\n| `bmfont`      |&check;|       |&check;|&check;|       | any  |&check;|&check;|&check;| image\n| `mac`         |       |       |&check;|       |       | any  |&check;|&check;|&check;| binary\n| `bdf`         |&check;|       |&check;|&check;|       | any  |&check;|       |       | hex\n| `win`         |       |       |&check;|       |&check;| any  |&check;|       |       | binary\n| `hexdraw`     |&check;|       |       |       |       | any  |&check;|       |       | visual text\n| `amiga`       |       |       |       |       |&check;| any  |&check;|       |&check;| binary\n| `gdos`        |       |       |       |       |       | any  |&check;|       |       | binary\n| `fzx`         |       |       |       |       |       | any  |&check;|       |       | binary\n| `figlet`      |&check;|       |       |       |       | any  |&check;|       |&check;| visual text\n| `vfont`       |       |       |       |       |       | any  |&check;|       |       | binary\n| `pcbasic`     |&check;|&check;|       |       |       | 8xN  | multi-cell |  |       | hex\n| `unifont`     |&check;|       |       |       |       | 8x16 | multi-cell |  |       | hex\n| `hbf`         |       |       |&check;|&check;|       | any  |       |       |       | binary\n| `psf` (v2)    |&check;|&check;|       |       |       | any  |       |       |       | binary\n| `psf` (v1)    |&check;|       |       |       |       | 8xN  |       |       |       | binary\n| `fontx`       |       |       |       |&check;|       | any  |       |       |       | binary\n| `cpi`         |       |       |&check;|       |&check;| 8xN  |       |       |       | binary\n| `dec`         |       |       |       |       |       | >4xN |       |       |       | binary\n| `bbc`         |       |       |       |       |       | 8x8  |       |       |       | binary\n\n\nWrapper formats\n-----------------\n\n`monobit` will recurse and extract font files from a number of common container,\narchive, compression and encoding formats:\n\n| Format                | Name     | Typical Extension       | Read  | Write |\n|-----------------------|----------|-------------------------|-------|-------|\n| PKZip/WinZip          | `zip`    | `.zip`                  |&check;|&check;|\n| GNU tar               | `tar`    | `.tar` `.tgz`           |&check;|&check;|\n| GZip                  | `gzip`   | `.gz`                   |&check;|&check;|\n| BZip2                 | `bzip2`  | `.bz2`                  |&check;|&check;|\n| XZ/LZMA               | `lzma`   | `.xz` `.lzma`           |&check;|&check;|\n| AppleSingle           | `apple1` | `.as`                   |&check;|       |\n| AppleDouble           | `apple2` | `.adf` `.rsrc`          |&check;|       |\n| MacBinary             | `macbin` | `.bin`                  |&check;|       |\n| BinHex 4.0            | `binhex` | `.hqx`                  |&check;|       |\n| C or C++ coded binary | `c`      | `.c` `.cpp` `.cc` `.h`  |&check;|&check;|\n| JSON coded binary     | `json`   | `.json`                 |&check;|&check;|\n| Python coded binary   | `python` | `.py`                   |&check;|&check;|\n| Pascal coded binary   | `pascal` | `.pas`                  |&check;|       |\n| BASIC coded binary    | `basic`  | `.bas`                  |&check;|&check;|\n\n\nStroke formats\n--------------\n\nStroke font support is experimental. Stroke fonts are scalable fonts defined as\nline segments. They are fundamentally different from modern fonts in that they\ndefine single strokes whereas modern fonts define outlines to be filled with ink.\nAdditionally, the fonts currently supported consist of straight line segments only.\n\n\n| Format                     | Short Name | Typical Extension | Read  | Write |\n|----------------------------|------------|-------------------|-------|-------|\n| monobit yaff               | `yaff`     | `.yaff`           |&check;|&check;|\n| SVG Fonts                  | `svg`      | `.svg`            |&check;|&check;|\n| Windows resource           | `win`      | `.fnt`            |&check;|&check;|\n| Windows font               | `fon`      | `.fon`            |&check;|&check; (NE) |\n| Borland Graphics Interface | `borland`  | `.chr`            |&check;|&check;|\n| Hershey fonts (Jim Hurt)   | `hurt`     | `.jhf`            |&check;|       |\n| DOSStart                   | `dosstart` | `.dsf`            |&check;|       |\n\n\nDependencies\n------------\n\nSome formats require\n- **PIL** (`Pillow`)\n- **reportlab**\n- **fontTools**\n\nThe renderer additionally employs\n- **uniseg**\n- **python-bidi**\n- **arabic-reshaper**\n\nAll can be installed through Pip:\n\n    pip install Pillow reportlab fonttools uniseg python-bidi arabic-reshaper\n\nWithout these packages, some functionality may not be available.\n\n\nCopyright and licences\n----------------------\n\n`monobit` and the `yaff` specification are copyright 2019--2023 Rob Hagemans and\nreleased under the [MIT licence](https://opensource.org/licenses/MIT).\n\n`monobit` contains code from:  \n- [`mkwinfont`](https://www.chiark.greenend.org.uk/~sgtatham/fonts/) copyright 2001 Simon Tatham. All rights reserved.  \n- [`dewinfont`](https://www.chiark.greenend.org.uk/~sgtatham/fonts/) copyright 2001,2017 Simon Tatham. All rights reserved.  \n- [OS/2 GPI Font Tools](https://github.com/altsan/os2-gpi-font-tools) (C) 2012 Alexander Taylor  \n- [FONDU](https://sourceforge.net/projects/fondu/) copyright (C) 2000,2001,2002,2003 by George Williams\n\nPlease refer to the notices in the `windows` and `os2` subpackages and `mac/fond.py` module for licences and more information.\n\nThe font files in `tests/fonts` are subject to their own\nlicences, some of which are more restrictive. These are files used for testing\nand development and are not included in the packaged distribution. See `tests/fonts/README.md` and notices included with individual files.\n\n\nAcknowledgements\n----------------\n\n`monobit` would not exist without those documenting,\nreverse-engineering, implementing and preserving font formats and files:\n- [The Internet Archive](https://archive.org)\n- [Archive Team](http://fileformats.archiveteam.org/wiki/Fonts)\n- [Jason Scott's textfiles.com](http://textfiles.com)\n- [John Elliott's homepage](http://www.seasip.info)\n- [Simon Tatham's fonts page](https://www.chiark.greenend.org.uk/~sgtatham/fonts/)\n- [Aivosto's character set documentation](https://www.aivosto.com/articles/charsets.html)\n- [Rebecca Bettencourt's character set documentation](https://www.kreativekorp.com/charset/)\n- [Xiphoseer's Signum Document Toolbox](https://sdo.dseiler.eu/)\n- [George Williams et al.'s FontForge documentation](https://fontforge.org/docs/index.html)\n- [FreeType Glyph Conventions](https://freetype.org/freetype2/docs/glyphs/index.html)\n- ... and many others\n\n\nOther software\n--------------\n\nOther bitmap font tools you could use in conjunction with (or instead of) `monobit` include:\n- [FontForge](http://fontforge.github.io/en-US/)\n- Rebecca Bettencourt's [Bits'n'Picas](https://github.com/kreativekorp/bitsnpicas)\n- John Elliott's [PSFTools](http://www.seasip.info/Unix/PSF/)\n- Mark Leisher's [`gbdfed`](http://sofia.nmsu.edu/~mleisher/Software/gbdfed/)\n- [RECOIL](https://recoil.sourceforge.net/)\n- John Zaitseff's [console font utilities](https://www.zap.org.au/projects/console-fonts-utils/)\n- George Williams's [Fondu](https://fondu.sourceforge.net)\n- VileR's [Fontraption](https://github.com/viler-int10h/Fontraption/)\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2019--2023 Rob Hagemans  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Tools for working with monochrome bitmap fonts.",
    "version": "0.42.2",
    "project_urls": {
        "Homepage": "https://github.com/robhagemans/monobit"
    },
    "split_keywords": [
        "8-bit",
        "bitfont",
        "bitmap-font",
        "font",
        "pixel-font",
        "retro"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a1c22e18ed004c57c70b3be1e8873fdb370c8f4b356a0190af19f6b3318d7f1b",
                "md5": "1f3036c4c4d7f642e08da0017a045acc",
                "sha256": "d2fc2ac5d15c39e13140a3fc2bac30503d00c8b3c5fbd9b3f2715edf680dec10"
            },
            "downloads": -1,
            "filename": "monobit-0.42.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1f3036c4c4d7f642e08da0017a045acc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 3626716,
            "upload_time": "2023-08-12T09:24:33",
            "upload_time_iso_8601": "2023-08-12T09:24:33.137372Z",
            "url": "https://files.pythonhosted.org/packages/a1/c2/2e18ed004c57c70b3be1e8873fdb370c8f4b356a0190af19f6b3318d7f1b/monobit-0.42.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b3e9cba5a7a6c202f97696300f789a022b3870b5706600b397443d4c2314b1b7",
                "md5": "2664bec166c6f8d11975186c01c84ca3",
                "sha256": "b90fc1e6427e6c9ea31ef121ce2fc550df3d8ce30653b5a9b7c9786f0f3a4ebe"
            },
            "downloads": -1,
            "filename": "monobit-0.42.2.tar.gz",
            "has_sig": false,
            "md5_digest": "2664bec166c6f8d11975186c01c84ca3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 3012330,
            "upload_time": "2023-08-12T09:24:37",
            "upload_time_iso_8601": "2023-08-12T09:24:37.575105Z",
            "url": "https://files.pythonhosted.org/packages/b3/e9/cba5a7a6c202f97696300f789a022b3870b5706600b397443d4c2314b1b7/monobit-0.42.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-12 09:24:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "robhagemans",
    "github_project": "monobit",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "monobit"
}
        
Elapsed time: 0.11177s