Defold supports a specific type of GUI node that allows text to be rendered in a GUI scene. Any font resource added to a project can be used for text node rendering.
The editor preview supports text shaping and right-to-left layout using the engine’s font renderer. See text layout support for the required font and App Manifest settings.
The fonts that you wish to use in GUI text nodes must be added to the GUI component. Either right-click the Fonts folder, use the GUI top menu or press the corresponding keyboard shortcut.

Text nodes have a set of special properties:
Follow the Vector font setup, add the .font resource to the GUI scene’s Fonts, and select it on the text node. Set the font resource’s Material to /builtins/fonts/font-vector.material. Use the node’s Font Size to control the displayed size.
For color emoji, also complete the COLRv1 fallback and bundling setup. Create a text node with the id text, leave its Text empty, and add the following to the GUI scene’s .gui_script:
function init(self)
local node = gui.get_node("text")
local text = "Hello 😀 🍎 🚀"
local font_resource = gui.get_font_resource(gui.get_font(node))
-- Add the fallback once for this shared font resource.
font.add_font(font_resource, "/fonts/NotoColorEmoji-Regular.ttf")
font.prewarm_text(font_resource, text, function(self, request_id, result, err)
if result then
gui.set_text(node, text)
else
print("Could not prepare GUI text:", err)
end
end)
end
gui.get_font() returns the font name within the GUI scene; gui.get_font_resource() resolves that name to the font resource used by font.add_font(). Other nodes and Labels sharing that resource also receive the fallback, so initialize it only once. The text is set after prewarming succeeds.
By setting the node pivot you can change the alignment mode for the text.
Center, North or South, the text is center-aligned.West modes, the text is left-aligned.East modes, the text is right-aligned.
Text nodes respond to any generic node manipulation functions for setting size, pivot, color and so forth. A few text node only functions exist:
gui.set_font() function.gui.set_line_break() function.gui.set_text() function.function on_message(self, message_id, message, sender)
if message_id == hash("set_score") then
local s = gui.get_node("score")
gui.set_text(s, message.score)
end
end