Minecraft text formatting, parsing, and rendering
Project description
mctext
Minecraft text formatting, parsing, and rendering library. Features all the exact glyphs used ingame, for the fonts of both pre and post-1.13.
Language Support
| Language | Package | Registry |
|---|---|---|
| Rust | mctext |
crates.io |
| Python | mctext |
PyPI |
| JavaScript | @hexze/mctext |
npm |
Features
- Text Parsing - Parse legacy
§formatting codes and JSON chat components - Color Support - All 16 named Minecraft colors plus RGB hex colors
- Style Handling - Bold, italic, underlined, strikethrough, obfuscated
- Font Rendering - Measure and render text with authentic Minecraft fonts
Font Showcase
Fonts Only
Looking for just the TTF files? Download them from the releases page:
minecraft-fonts-modern.zip- Latest Minecraft fonts (updated, cleaner look)minecraft-fonts-legacy.zip- Classic fonts for those who prefer pre-1.13minecraft-fonts-special.zip- Enchanting and Illager fonts
Usage
Rust
[dependencies]
mctext = "1.0"
# With legacy fonts:
mctext = { version = "1.0", features = ["legacy-fonts"] }
use mctext::McText;
let text = McText::parse("§cRed §lBold");
for span in text.spans() {
println!("{}: {:?}", span.text, span.color);
}
Python
pip install mctext
import mctext
text = mctext.parse("§cRed §lBold")
for span in text.spans():
print(f"{span.text}: {span.color}")
JavaScript
npm install @hexze/mctext
import { McText } from '@hexze/mctext';
const text = McText.parse("§cRed §lBold");
for (const span of text.spans()) {
console.log(`${span.text}: ${span.color}`);
}
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mctext-1.0.2.tar.gz.
File metadata
- Download URL: mctext-1.0.2.tar.gz
- Upload date:
- Size: 28.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05a673dd7f09e6e03f97f7b92904ffb7900b5ca3fe6a7d49a60fbe7a0f24e62e
|
|
| MD5 |
f32af9b011f1abff765b1a7a5ac6a8c1
|
|
| BLAKE2b-256 |
83ef6dd40d22e122b396cc58c1b43567cad51baa885e0982213b548a10f5594f
|
File details
Details for the file mctext-1.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: mctext-1.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 12.5 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96bb0096c65872c4906200f6bcf63939d51d88f9c42c91e71b3c105198e29939
|
|
| MD5 |
371c213e006fe83697b3e04eaa02dcac
|
|
| BLAKE2b-256 |
3f9c2655758515781b30f9a5629cde5064f845398872b59b26327f2ca992c85c
|
File details
Details for the file mctext-1.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: mctext-1.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 12.5 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9a8bace0724bd08a6d5a2180890de088ff85cfa10c2953f13e7fac6a523070c
|
|
| MD5 |
88d85367f5d70dc9cf1ad13c28dcd79c
|
|
| BLAKE2b-256 |
d4d2c8c721111bffe85b7b4a3dd88815201c87783e467af24ab2e4d31f60996d
|
File details
Details for the file mctext-1.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: mctext-1.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 12.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f581d50bbcdfdaff233ab06397a9fe246de821cbf4ea8e4ad46a148b9bebbfc
|
|
| MD5 |
4436bb7a8ff94c0bb1626e4d2d7f2b92
|
|
| BLAKE2b-256 |
a3e2c8fc018766cde6cc82ba55aaff9eefebdc814690ced05616835cd864e431
|
File details
Details for the file mctext-1.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: mctext-1.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 12.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63bba323cd1cc3ba5beed165892c4279166d0560e478c3d39cec9d2be2dedf5c
|
|
| MD5 |
c8b856cdc7ebee1c12194a4147b96da1
|
|
| BLAKE2b-256 |
81da4717cb9ba9be7f257f1631d91b4c8d6450dd54ef2614b627b9f81819d163
|
File details
Details for the file mctext-1.0.2-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: mctext-1.0.2-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 12.3 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
236c2e9aea3d8ac2435bcb11564ca4f6688e934009cf1c70caaec0f89937fd05
|
|
| MD5 |
774b71237da26e9b94fc3099b33bb1be
|
|
| BLAKE2b-256 |
482178a034a506a64a89b8e106e5b7c8eb461de6f4b62ab0385ff3825882240d
|
File details
Details for the file mctext-1.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: mctext-1.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 12.5 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00e7e74879e06dbadd2221fb7a55749d0486f8becdc3074ed8a6bfe4147342af
|
|
| MD5 |
4ef010182ca32d17b444ea0375f49fb6
|
|
| BLAKE2b-256 |
27c9982f7fbda0494f7bb1893ff299e9688acede5402f546e641880a790d48af
|
File details
Details for the file mctext-1.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: mctext-1.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 12.5 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bef4faea38d70d1911de8b41ba17e9ae0946d049f4121bab4aba8424ac0cace2
|
|
| MD5 |
22b9afcf7cb3f5898d2bb9cec2f9c24b
|
|
| BLAKE2b-256 |
8a0b784815f38500fbf83bd918fcb667fcba93b516c015f9ddd7a8b5c6972088
|
File details
Details for the file mctext-1.0.2-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: mctext-1.0.2-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 12.8 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73f68e208096de9c88976a1b1be4a84d797268aca5f95e8f117e57b16dee9ae7
|
|
| MD5 |
99527f60781e1b11b37d5d2dc3e49b75
|
|
| BLAKE2b-256 |
5eb3c0b28835486eb519c33f486bde8e50f65af905a8ff659e65855be00cfdee
|
File details
Details for the file mctext-1.0.2-cp311-cp311-macosx_10_12_x86_64.whl.
File metadata
- Download URL: mctext-1.0.2-cp311-cp311-macosx_10_12_x86_64.whl
- Upload date:
- Size: 12.4 MB
- Tags: CPython 3.11, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a489f1f5e365c76b83b0fd996e975598731354f53d5dbd6a1e14861060e1753
|
|
| MD5 |
4a9bc06eeacd8bdfc25ef15239c43b6a
|
|
| BLAKE2b-256 |
249a80bbaebe89418c68ae0c61ec2b9e69b6bfae0924cf76e5dea8d2cce100c5
|
File details
Details for the file mctext-1.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: mctext-1.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 12.5 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1eee1ab60002bf2a9bb813e08e6a3cd98a5eb414a3ac9d2c66430cd0ee4dba17
|
|
| MD5 |
1a7d11e3cbfed08eae00d5d0f4df3d55
|
|
| BLAKE2b-256 |
6edd9016225379f5ab0b6b611b7c0be097b6038786a2676981003b5affa22c55
|
File details
Details for the file mctext-1.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: mctext-1.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 12.5 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0dfd3eee36fab220fa9170ee4ce6df654869055280bcf85a6e3b3cfced45a97
|
|
| MD5 |
c4aa4b40e3c456679f291705c8d16032
|
|
| BLAKE2b-256 |
d701a23b469bcc68839633e90a3b9b91cfc8b803a67c484716000d70448faa6a
|
File details
Details for the file mctext-1.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: mctext-1.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 12.5 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b0d3fb0cf151ef0dfc3fd53ead692a89cb553e365ea522e047594fd2f580924
|
|
| MD5 |
f25a04ee17b70a0b5cd3676bea2fe3b4
|
|
| BLAKE2b-256 |
238922787e5d2b3e6d2fb31cc29551f13590152a26396993f8ad027b051a0ca4
|
File details
Details for the file mctext-1.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: mctext-1.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 12.5 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56d2672514257ba63a1241b48d0b82bd451c1083159fe2750b976f2975e78137
|
|
| MD5 |
61f56b373ba26f89b9474498004f8bbb
|
|
| BLAKE2b-256 |
7c558118e7a0fe7655b5ae3886429fd9b0233f333fb4a8ffc879ec80d254969f
|