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 .png extension get appended to the texes, and a .cfg extension 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 of spaceheight if it's omitted or set to 0. ✨
  • spaceheight β€” height of the vertical character separation when rendered ingame. defaults to the maximum vertical character range if omitted or set to 0. this value is normally larger than charheight, 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