I want to add text on a box node but when i add text, it is asking me to select a font. In the properties of the box node when I go to check the font I cant find any in the drop down, it is empty. I even downloaded fonts from online and added them into the game but they still don’t show up on in the properties of the box node font. Is there another way to add font or am I missing a step?
Yes, missing a step. Check this:
If you don’t mind can you tell me which step I am missing.
I have attached what it looks like when I add text to the box node. Thanks.
You don’t have any Fonts in your GUI. Right click on Fonts “folder” and add some. At first you can add a built-in font.
But if you want to use your font, first define a font component somewhere in your project.
I have already added a font and i downloaded it from google fonts so I don’t know why it is not showing it in the options for fonts for the box node.
Ohhh I got it now thank you so much
It seems obvious, but it is not.
If you are a beginner, as I am - the natural flow is that if you add a node txt - you should be allowed to point to the font you created earlier.
Having to add it additionally still in the Gui/Fonst section seems like an absolutely unnecessary extra step.
Of course I understand that this may be due to the engine architecture, but I’ve been dealing with Defold for a few days as a begginer and a lot of things seem unintuitive.
Translated with DeepL.com (free version)
It all boils down to resource management. If you create a font using New->Font nothing happens to your project until you start using the font. If nothing is using the font the font will not be included in the build. Defold is very granular in terms of resource usage and every resource has to be referenced from where it is used. Right now if you want to use a font in a gui, you first need to add the font to the gui.
But as I type this I do also get your point. Why is it required to add the font to the gui? Could it not be enough to directly reference the font from the text node? It is an improvement we could consider.
The current resource approach also have a pros:
- Faster selection fonts inside a font dropdown, not across all resources
- You can replace/adjust the font resource also easily on one place
- You see the all resources this GUI using, sometimes it helps a lot
- You can replace font by one call from
go.set
, which is helpful in case of localization as an example
This is relative to textures and other resources also. When selecting resource inside go/collections, we need to do more actions & clicks , while placing different elements, which I found a little bit frustrating
Well, maybe my problem is that I switched from Godot a while ago, which I have been learning for the last one? two? months.
Some of the concepts are just different and that makes it difficult for me. I have to burn off the new-old habits I just learned a while ago. On top of that, after a few years I am already ‘tired’ of reading documentation and would like to get results right away
Example - the communication system. For three days I have been trying to grasp the transition between screens (scenes in Godog, here collections). I finally found it in the documentation.
But I don’t give up, I want to give the application a chance.
For me the key point is that Godot a simple three-screen application for web built on 35+ Mb, Defold on ~3-5 Mb