#Custom font in GUI
77 messages · Page 1 of 1 (latest)
let's say how it is here https://media.forgecdn.net/attachments/759/900/2023-11-16_13.png
and here (I don't support cheats, but here I just show the font in the GUI.) https://preview.redd.it/follow-me-on-my-journey-to-create-a-minecraft-cheat-v0-qzo8z37087lc1.png?width=2560&format=png&auto=webp&s=0804b28bb886b27a07dbe5ee6c7bb8961b9f0ab8
We do not support hacked clients, cheats, or modifications that are intended to give you the upper hand in a server, competitive or otherwise.
See rule 1 in #welcome and the Discord TOS: https://discordapp.com/terms
I'm not saying that these are cheats, I gave this as an example, I just need to understand how to use my font in the GUI.
Help me pls 😥
🤓
🤓
help
I've never done it bro can't help, ur best option is to go read source code of other mods and see how they did it
Just came to nerd emoji that guy ngl
so I do not know which mod to watch, there are not too many such mods and not every one with the source code, can you recommend some?
I would recommend you to check how minecraft set their own font
And where can I see it?
In the IDE you can see the Minecraft Code
in the External Libraries, just search for the class
you can either search for it here:
https://linkie.shedaniel.dev/mappings?namespace=yarn&version=1.21.5&search=font&translateMode=none
View mod dependencies; Search up mappings; All on your web browser instead!
It came to me in a dream
?
Why?
try this maybe
there's been an entire thread ab this already with tons of information, it could help
@misty fern Can you help me? I kind of did everything as they wrote in the chat, but the characters are not displayed.
{
"providers": [
{
"type": "ttf",
"file": "fpsboost:font/bahnschrift.ttf",
"shift": [0, 1],
"size": 11,
"oversample": 8
},
{
"type": "bitmap",
"file": "minecraft:font/default.png",
"ascent": 7,
"height": 8,
"chars": [
"0123456789",
"abcdefghij",
"klmnopqrst",
"uvwxyz{}[]",
"ABCDEFGHIJ",
"KLMNOPQRST",
"UVWXYZ!\"#$",
"%&'()*+,-.",
"/:;<=>?@\\^",
"_`|~ "
]
}
]
}
It's displayed in the game like that guy's
@fervent lichen hello, can you help me, pls
i trying
{
"providers": [
{
"type": "ttf",
"file": "fpsboost:font/bahnschrift.ttf",
"shift": [0, 1],
"size": 11,
"oversample": 8
},
{
"type": "bitmap",
"file": "fpsboost:font/bahnschrift.reg.png",
"ascent": 7,
"height": 8,
"chars": [
"ABCDEFGHIJKLMNOPQRSTUVWXYZ",
"abcdefghijklmnopqrstuvwxyz",
"0123456789 *+,-./:;<=>?@[^"
]
}
]
}
But it didn't help
my .json just looks like this:
{
"providers": [
{
"type": "bitmap",
"file": "pvpranked:font/minecrafter.reg.png",
"height": 13,
"ascent": 13,
"chars": [
"ABCDEFGHIJKLMNOPQRSTUVWXYZ "
]
}
]
}
```, so no top part about the .ttf file
there should be an error in your console when you run your mod complaining about a missing font png file
you have to convert it into a png
you will have to look up a ttf to png converter and then use that
the png it gives you should go in assets/YOUR_MODID_HERE/textures/font/bahnschrift.reg.png
since minecraft can't use the ttf file, you should correct this to just
{
"providers": [
{
"type": "bitmap",
"file": "fpsboost:font/bahnschrift.reg.png",
"ascent": 7,
"height": 8,
"chars": [
"ABCDEFGHIJKLMNOPQRSTUVWXYZ",
"abcdefghijklmnopqrstuvwxyz",
"0123456789 *+,-./:;<=>?@[^"
]
}
]
}
``` (removed the top part)
you have a folder called assets.fpsboost. you need two folders assets and fpsboost
is that not just how the ide displays it?
the only thing in assets is a folder called fpsboost
what does it say in the output log when you run the game?
also, for documentation on the format https://minecraft.wiki/w/Font#Providers
oh i see whats wrong, you put fpsboost:font/bahnschrift.ttf it should be fpsboost:bahnschrift.ttf
also this png would not work for a minecraft font, it has to be a grid of characters, like how the vanilla ascii.png one looks like
and where can I make such a font with a grid from a ttf file?
why not just.. use the ttf file?
what you had here should work if you remove the font/ and the default minecraft font
so they wrote to me above that minecraft does not support ttf files, only png, and I have the same "file": "fpsboost:bahnschrift.reg.png" that is png
well theyre wrong because it does support ttf fonts
why, you can just use the ttf
{
"providers": [
{
"type": "ttf",
"file": "fpsboost:bahnschrift.ttf",
"shift": [0, 1],
"size": 11,
"oversample": 8
}
]
}```
when this happens, check the output log and it will tell you exactly why it isnt working
YYEEEEEEEEEEE
TNX BRO
I'm use
I didn't know you could use ttf files, I couldn't get it to be supported for me so I just used a png
neat
Hey @sweet cedar, can you pass your code to see how you make it? I think it would be useful for the future!
@bold wigeon ^ you just make a style, set the font to the id of your font, then set that on your text component
(you don’t need to convert it to a string first tho)
i don’t mean this in a rude way but it’s kinda funny how so many people have run into this same issue recently
I'm not at home right now and I posted all the code above
Okay, ty