CUBE2FONT(1)
π CUBE2FONT(1) β the cube2font manual, bestie edition π
okay so. sit down. hydrate. we're learning cube2font today and honestly? it's giving font wizardry. this is page 1 of the cube2font manual and i'm your girl for it. π§β¨
β¨ NAME β¨
cube2font β a utility program designed to create font bitmaps for Cube Engine games π
πΈ SYNOPSIS πΈ
cube2font infile outfile outborder[:inborder] pad offset advance
charwidth charheight texwidth texheight [spacewidth spaceheight texdir]
π DESCRIPTION π
cube2font is a utility program designed to create font bitmaps for Cube Engine games. the way it works?? it takes a Truetype font and builds it into a set of coordinates in an image. no cap. and listen β cube2font is an improved version of the previous TTF2Font, and it supports a much larger range of characters. glow up fr fr. π
so what does it actually spit out? the program outputs one or more PNG images containing a grid of characters β these are called "texes" btw, iykyk β plus an accompanying config file in plaintext that lists the character coordinates in the images. iconic behaviour honestly. π¦
π PARAMETERS π
infileβ path to the input file, and it's gotta be in truetype format. πoutfileβ sets the font name in the config file, AND doubles as your output filename template: a number and the.pngextension get appended to the texes, and a.cfgextension gets appended to the coordinate file. multitasking queen. πoutborderβ size of the black outside border around each character on the texes.inborderβ size of the black border between the elements inside each character.padβ padding added around characters on the texes, so they don't go "bleeding" into their neighbouring characters. personal space matters!! πoffsetβ spacing added to the left of each character when they're rendered ingame. if you exaggerate it, it looks something like this:
| A| B|
advanceβ spacing added to the right of each character when they're rendered ingame. exaggerate it and you get something like this:
|A |B |
charwidthβ width of the generated characters on the texes.charheightβ height of the generated characters on the texes.texwidthβ width of the generated texes.texheightβ height of the generated texes.spacewidthβ width of the standard space character size when rendered ingame. defaults to a third ofspaceheightif it's omitted or set to0. β¨spaceheightβ height of the vertical character separation when rendered ingame. defaults to the maximum vertical character range if omitted or set to0. this value is normally larger thancharheight, since it takes into account characters extending outside the 'em' box. this value will make the rendered characters scale to fit. π₯texdirβ sets the font directory path in the config file.
π EXAMPLES π
cube2font Play-Bold.ttf play 4 15 1 1 54 54 512 512 0 0 fonts/
this one generates a font named play with a 4 pixel black border, an additional 15 pixels of space around characters, one pixel of extra spacing at both sides when displayed ingame, a character size of 54x54 pixels, a tex size of 512x512 pixels, a 23 pixels wide standard space character, a 71 pixels high standard vertical line separation, and the font path set as fonts/. π«Ά
this would normally generate the files:
play.cfg
play0.png
play1.png
play2.png
the above values are used for the base font. π
cube2font default.ttf default 3 19 1 1 49 49 512 512 32 64 packages/fonts/
this generates the default font for the cube2 game Sauerbraten. β
π AUTHORS π
cube2font was created by Lee "eihrul" Salzman. π§
this manual page was written by Martin Erik Werner <martinerikwerner@gmail.com>. π
and that's the whole page, bestie!! you ate that. this was cube2font 1.3, dated 2012-07-16, and if you made it this far you're literally the main character of font bitmap generation. periodt. π
β¨π¦πΈπ
π¦ where this page comes from
- debian bookworm: cube2font 1.5.1-1 Β· Zlib
- debian trixie: cube2font 1.5.1-1 Β· Zlib
- fedora 43: cube2font 1.6.0-18.fc43 Β· zlib
- ubuntu jammy: cube2font 1.5.1-1 Β· Zlib
- ubuntu noble: cube2font 1.5.1-1 Β· Zlib
- ubuntu resolute: cube2font 1.5.1-1build1 Β· Zlib
- ubuntu stonking: cube2font 1.5.1-1build1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms