# Minecraft text generator This little project is a tool that takes a string of text and generates minecraft structure that represents given text in a font of your choice. User can choose blocks to use (or define their own palette) or just use preset. Exported structure can be in various formats, such as .schematic, .litematic or .nbt, or just .mcfunction file with setblock commands. ## Usage ### Build ```bash cargo build --release ``` The binary is at `target/release/minecraft-text-generator`. ### Generate text ```bash minecraft-text-generator -t "Hello World" -f path/to/font.ttf ``` Outputs `output.mcfunction` by default. ### Common flags | Flag | Default | Description | |------|---------|-------------| | `-t, --text` | *(required)* | Text to generate | | `-f, --font` | *(required)* | Path to `.ttf` font file | | `--format` | `mcfunction` | Output format(s): `mcfunction`, `litematica`, `png`, `all` | | `-o, --out` | `output` | Output file path (without extension) | | `--size` | `16.0` | Text height in blocks | | `-d, --depth` | `1` | How many blocks deep | | `-p, --palette` | `default` | Built-in palette preset name | | `--palette-file` | — | Path to a custom JSON palette file | | `--shadow` | off | Add a drop shadow | | `--shadow-x` / `--shadow-y` | `1` / `-1` | Shadow offset in blocks | | `--outline-mode` | `8` | Outline connectivity: `4` (cardinal) or `8` (with corners) | | `--letter-spacing` | font default | Extra blocks between characters | | `--word-spacing` | `4` | Blocks wide for a space character | | `--cell-size` | `16` | Pixel size per block for PNG export (8–64) | ### List available palettes ```bash minecraft-text-generator --list-palettes ``` ### Examples ```bash # Litematica schematic with a shadow minecraft-text-generator -t "HELLO" -f fonts/myfont.ttf --format litematica --shadow # PNG preview at 32px per block minecraft-text-generator -t "HELLO" -f fonts/myfont.ttf --format png --cell-size 32 # All formats at once, custom palette minecraft-text-generator -t "HELLO" -f fonts/myfont.ttf --format all -p stone ``` ![showcase](minecraft_world.png)