+1 vote

I use this code for changing font size:

func _ready():
  grab_focus()
  self.get_font("Chadwick_Cyrillic", "").set_height(6)

But bitmap font doesn't scale. I mean, a cursor scales but not font. I tried several fonts.
As for distance field it becomes super-antialiased glowing neon font.
enter image description here
And, by the way, it doesn't scales too.

in Engine by (45 points)

1 Answer

+1 vote

Godot 2.1 will contain DynamicFont resource that allows dynamic font loading and rendering. You can load ttf files using it. If you want to use it now you have to compile Godot from source

by (368 points)

Thx, how to access, via GDScript, size property?

I've tried:

get_node("Label").set("custom_fonts/font:font/size", 100)

with no success....
Any suggestions?
-j

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.