#✅ [SOLVED] Font not working in other custom GUIs

1 messages · Page 1 of 1 (latest)

faint egretBOT
#

Hello there! Sorry to hear you're having trouble with your custom GUI font. I can certainly help you with that! 😊

To change the font of text in a custom GUI, you'll want to use Markdown formatting codes within a Text element. Specifically, the Fonts feature allows you to specify a custom font loaded via a resource pack.

Here's how you can do it:
You need to add %!!<font_name>% before your text and %!!% after it. For example, if you want to use a font named uniform, your text should look like this:
%!!uniform%this is a custom font%!!%

Please note that Markdown only works for Text elements and not for other text-based items like button labels. For those, you would use Minecraft's text formatting or text components.

Would you like more details on how to set up your resource pack to include custom fonts? Or perhaps you're working with button labels and need information on Minecraft's text component system? Just let me know! 🌷

You can find more information about text formatting here: Text Formatting

wintry gulch
#

Right but its a custom font from a resource pack

faint egretBOT
# wintry gulch Right but its a custom font from a resource pack

Ah, I see! You're already using a custom font from a resource pack, which is fantastic! ✨

The key to making that custom font work in your FancyMenu Text element is to ensure that the font name you use in the Markdown formatting code (%!!<font_name>%) exactly matches the name defined in your resource pack's font configuration.

Could you tell me what the font name is specified as in your resource pack? It would typically be defined in a .json file within your resource pack, usually located in assets/minecraft/font/.

If you're unsure where to find it, or if you're experiencing issues beyond just specifying the font name, I can also provide guidance on how to properly set up a resource pack for custom localizations and fonts. Just let me know! 😊

wintry gulch
#

alagard.json

faint egretBOT
# wintry gulch alagard.json

Ah, thank you for providing that! So the file name is alagard.json.

In Minecraft resource packs, the font name usable in-game (and by FancyMenu's Markdown) is derived from its path within the resource pack. If your alagard.json file is located at assets/minecraft/font/alagard.json within your resource pack, then the font name you should use in FancyMenu's Markdown is simply alagard.

So, your text formatting should look like this:
%!!alagard%This is my custom font text%!!%

Please ensure:

  1. Your resource pack is correctly installed and active in Minecraft. 🎮
  2. The alagard.json file defines the font assets correctly within the resource pack (assets/minecraft/font/alagard.json).
  3. You are applying this to a Text element in FancyMenu.

If you've done all this and it's still not working, could you describe what you're seeing instead? For example, is the text appearing in the default Minecraft font, or is it not appearing at all? Any extra detail helps!

wintry gulch
#

It's not working it just makes all the text little boxes. For buttons on a different page it worked if I set it to {"text":"Essentials","font":"fonthound:alagard"}

faint egretBOT
# wintry gulch It's not working it just makes all the text little boxes. For buttons on a diffe...

Thank you for those details! That's very insightful.

The fact that it works for buttons using {"text":"Essentials","font":"fonthound:alagard"} tells me a couple of important things:

  1. Your resource pack and custom font alagard are indeed loaded correctly by Minecraft.
  2. The fonthound: prefix indicates that the font is part of a specific namespace, likely from a mod or your custom resource pack setup.

Now, regarding the Markdown for Text elements, it seems there might be a misunderstanding of how namespaces work with Markdown's custom font feature. The %!!<font_name>% format is designed to use Minecraft's default minecraft namespace for fonts, or fonts that are directly added to the font directory without their own custom namespace.

Since your alagard font is under the fonthound: namespace, you cannot use the Markdown %!!<font_name>% syntax directly with just alagard. The Markdown font feature does not support specifying custom namespaces like fonthound:alagard.

Therefore, for Text elements, you have a couple of options:

Option 1: Move your font to the minecraft namespace (recommended for Text elements)

The best solution for Text elements would be to move your font definition to the default minecraft namespace within your resource pack.
This usually means restructuring your resource pack so that alagard.json is located at assets/minecraft/font/alagard.json. If it's already there, then the fonthound: preface should not be necessary, unless another mod is specifically overriding it.

If you can adjust your resource pack to place the alagard.json directly under assets/minecraft/font/, then you can use %!!alagard%This is my text%!!% in your Text element.

#

Option 2: Use an Image element instead of a Text element

If moving the font isn't feasible, you could consider creating your text as an image using your desired font and then displaying it with an Image element. This bypasses font rendering issues but removes the dynamic nature of text elements.

Option 3: Vanilla/Mod Button Labels

The JSON component syntax {"text":"...", "font":"fonthound:alagard"} only works for single-line text content like vanilla/mod button labels, not for the multi-line text field of a FancyMenu's Text element.

Let me know if you would like me to elaborate on how to check or adjust your resource pack structure for the font! 😊

faint egretBOT
#
Thread Marked as Solved

This support thread has been marked as solved by @wintry gulch.

The AI helper is now disabled, but you can still continue the conversation if needed. Thank you for using our support system!