Interesting challenge here... I'm doing a card game, and i use label nodes within my UI for text fields in my cards

Namely, my card title and card description are the areas of concern. I use a dynamic font for them, and made them each unique.

I have a routine in my script to reduce the font based on number of characters

func adjust_descriptionfontsize(lenth):
	
	var font = $TextUI/VBoxContainer/MarginContainer5/HBoxContainer/MarginContainer2/CardDescription.get_font("font","")

	if lenth > 80:
		font.size = font.size - 2
	if lenth > 90:
		font.size = font.size - 2
	if lenth > 100:
		font.size = font.size - 2
	if lenth > 110:
		font.size = font.size - 2
	
	$TextUI/VBoxContainer/MarginContainer5/HBoxContainer/MarginContainer2/CardDescription.add_font_override("font", font)

This code runs on every _ready() routine for each instance, but it seems to effect ALL instances of the card scene...... The end result is i have REALLY small font for all my cards because i just keep reducing them all.

How do I independantly control the font of each instance of a scene?

Is it because i need to load the font resource to the scene? check the box?

You have to check "local to scene" on the card scene so that each instance is unique.

@Mookie Did you find a better solution to this? I swear at some point I saw someone say we shouldn't have to adjust font size this way- the container system if setup correctly should handle this kind of stuff for us?

The container system does work, but it's more for whole screen changes (like different resolutions or aspect ratios on mobile). If you have a node (like a playing card) that is the same size but the text needs to be different, then I don't think it will work.

Actually, you can just change the font size without creating a new font. It was really easy.

var font = your_label.get_font("font", "")
font.size = 44 # or whatever you want

Try the sample project (slider on the bottom).

a year later