FontedLabel.gd 357 B

123456789101112131415161718
  1. extends Label
  2. tool
  3. class_name FontedLabel
  4. var font = DynamicFont.new()
  5. var font_path = "res://now-fl/Now-SemiBold.otf"
  6. var font_size = 20
  7. func _ready():
  8. var font_data=DynamicFontData.new()
  9. font_data.font_path = font_path
  10. font.font_data=font_data
  11. font.size=font_size
  12. add_font_override("font",font)
  13. add_color_override("font_color", ColorN("white"))