cbmfont
cbmfont
v0.1
cbmfont is a linux32 elf32 c99 application
cbmfont can do multiple things with cbm pixel fonts, including
-crafting a preview image
-dumping the font gfx to an image file
-lint reporting about the font, with warning & errors
-font files decoding, reporting about diskfont file structure
-prints infos about a fontfile as a single line summary
cbmfont can only handle pixel fonts b&w, grayscale or coloured.
vector font .otag file can't be loaded with it.
download: cbmfont ~102kB linux ELF32 exe i386
cbmfont [--help][--version][-v][-r DIR][-l][-g][-c][-d][-s][-p][--cmap [FILENAME]] FILE
--help help
--version
-v print info while doing
-r DIR destination directory
-l report lint
-g report about glyphs
-c report about file chunks
-d draw glyphs on the command line
-s craft an image with any glyphs found in font
-p craft a preview image
--fg rgba color as 0xRRGGBBAA
--bg rgba color as 0xRRGGBBAA
--cmap load .cmap palette filename with path
FILE .font cbm font file.
lint
option -l==========================================
Prime.font
==========================================
fontdrawer found:Prime ✔ found
lint: 2 entries found != 3 .font fileentries
dotfontfile requested fc_FontDimFileName:9 ✔ found
dotfontfile requested fc_FontDimFileName:8 ✔ found
dotfontfile requested fc_FontDimFileName:11 ✘ not found
==========================================
garamond.font
==========================================
fontdrawer found:garamond ✔ found
lint: 0 entries found != 3 .font fileentries
dotfontfile requested fc_FontDimFileName:23 ✘ not found
dotfontfile requested fc_FontDimFileName:32 ✘ not found
dotfontfile requested fc_FontDimFileName:64 ✘ not found
to report about multiple files:
for FILE in *.font; do cbmfont -l "$FILE" ;done
print info while doing things
option -v
short font summary str
option -tprints a single line summary per fontfile, as:
Mcoop.font cbm font, 6 entries:
Mcoop.font #0, 60, YSize: 60, not found
Mcoop.font #1, 44, YSize: 44, not found
Mcoop.font #2, 39, YSize: 39, not found
Mcoop.font #3, 30, YSize: 30, Style:NORMAL , Flags:TALLDOT PROPORTIONAL DESIGNED ,
Mcoop.font #4, 21, YSize: 21, Style:NORMAL , Flags:TALLDOT PROPORTIONAL DESIGNED ,
Mcoop.font #5, 17, YSize: 17, Style:NORMAL , Flags:DISKFONT TALLDOT PROPORTIONAL DESIGNED ,
to report about multiple files bash could be used:
for FILE in *.font; do cbmfont -t "$FILE" ;done
font style | | |
NORMAL | normal | |
UNDERLINED | underlined | |
BOLD | bold face | |
ITALIC | italic (slanted 1:2 right) | |
EXTENDED | extra wide extended face (wider than normal) | |
COLORFONT | a color font | |
TAGGED | | **not implemented** |
font flags | | |
ROMFONT | The font is built into the ROM (mostly, only Topaz-8 and Topaz-9 are ROM fonts). | |
DISKFONT | The font was loaded from disk | |
REVPATH | The font is designed to be printed from from right to left | **not implemented** |
TALLDOT | The font was designed for a Hires screen (640x200 NTSC, non-interlaced) | **not implemented** |
WIDEDOT | The font was designed for a Lores Interlaced screen (320x400 NTSC) | **not implemented** |
PROPORTIONAL | The character widths of this font are not constant | |
DESIGNED | The font size was explicitly designed at this size rather than constructed. | |
REMOVED | the font has been removed | **not implemented** |
colourfont flags | | |
COLORFONT | The color map for this font contains colors specified by the designer. | |
GREYFONT | The colors for this font describe evenly stepped gray shades from low to high. | |
ANTIALIAS | zero background thru fully saturated char | **not implemented** |
changelog
20240402
-multiple small fixes
-handle subdirectories better
-preview also if some files are missing
20231023
-draw with other colors, also .cmap palette files
cli interface with --fg --bg --cmap
-option to return a short single line summary about the font,
cli interface with -t
20231014-23 improved many things
-load most fonts,
-report about probable palette errors
-inject palette in existing font file -function only, no cli interface
-fallback to uppercase if lowercase glyph absent
-report if other files are found in the font drawer
20220126 can do previews
links
Amiga bitmap font reader/viewer for Windows and Linux (written in C). by mrmcsoftware
afont.c
A set of tools to read bitmap font files as used by the Commodore Amiga.
also convert to ttf. by smugpie
here
|