FontedLabel.gd 359 B

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