Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions material_maker/globals.gd
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ const DEFAULT_CONFIG : Dictionary = {
ui_3d_preview_generated_mesh = true,
nearest_filter_reference = false,
sub_node_items = [],
ui_use_system_font = false,
ui_font_size = 16,
ui_code_font_size = 12,
ui_font_enable_msdf = true,
}


Expand Down Expand Up @@ -246,3 +250,6 @@ func ui_scale_factor() -> float:

func is_custom_theme() -> bool:
return config.get_value("window", "theme") == "custom"

func is_classic_theme() -> bool:
return "classic" in mm_globals.main_window.theme.resource_path
6 changes: 6 additions & 0 deletions material_maker/main_window.gd
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ func _ready() -> void:
if mm_globals.config.has_section_key("window", "size"):
get_window().size = mm_globals.config.get_value("window", "size")

# Update fonts
FontUtils.rebuild_fonts()
theme.default_font = FontUtils.main_font
theme.default_font_size = FontUtils.ui_font_size

# Restore the theme
var theme_name: String = "default dark"
if mm_globals.config.has_section_key("window", "theme"):
Expand Down Expand Up @@ -661,6 +666,7 @@ func change_theme(theme_name : String) -> void:
theme = _theme
ThemeUtils.setup_clear_color()
$NodeFactory.on_theme_changed()
FontUtils.setup_theme_fonts(theme, theme_name)

func _on_SetTheme_id_pressed(id : int) -> void:
var theme_name : String = ThemeUtils.THEMES[id].to_lower()
Expand Down
2 changes: 1 addition & 1 deletion material_maker/nodes/base.gd
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func _draw() -> void:
draw_style_box(get_theme_stylebox("node_highlight"), Rect2(Vector2.ZERO, size))
if generator.rendering_time > 0:
var time_color : Color = get_rendering_time_color(generator.rendering_time)
var buffer_timing_font : Font = preload("res://material_maker/theme/font_rubik/Rubik-416.ttf")
var buffer_timing_font : FontVariation = FontUtils.medium_font
@warning_ignore_start("narrowing_conversion")
draw_string_outline(buffer_timing_font, Vector2i(0, size.y+12), str(generator.rendering_time)+"ms", HORIZONTAL_ALIGNMENT_CENTER, size.x, 12, 4, Color.BLACK)
draw_string(buffer_timing_font, Vector2i(0, size.y+12), str(generator.rendering_time)+"ms", HORIZONTAL_ALIGNMENT_CENTER, size.x, 12, time_color)
Expand Down
4 changes: 3 additions & 1 deletion material_maker/nodes/generic/generic.gd
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ func do_update_preview() -> void:
func update_title() -> void:
title = TranslationServer.translate(generator.get_type_name())
if generator == null or generator.minimized:
var font : Font = get_theme_font("default_font")
var font : Font = FontUtils.medium_font
var max_title_width = 28
if font.get_string_size(title).x > max_title_width:
for i in range(1, title.length()-1):
Expand All @@ -455,6 +455,8 @@ func update_node() -> void:
if mm_globals.get_config(SETTINGS_NODE_CLOSE_BUTTON) else false)
# Rebuild node
update_title()
var title_label : Label = get_titlebar_hbox().get_child(0)
title_label.add_theme_font_override("font", FontUtils.medium_font)
# Resize to minimum
size = Vector2(0, 0)
# Regex for labels
Expand Down
2 changes: 2 additions & 0 deletions material_maker/nodes/minimal.gd
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ func _ready() -> void:
buttons = HBoxContainer.new()
var space : Control = Control.new()
buttons.add_theme_constant_override("separation", 1)
var title_label : Label = get_titlebar_hbox().get_child(0)
title_label.add_theme_font_override("font", FontUtils.medium_font)
space.custom_minimum_size = Vector2(4, 0)
buttons.add_child(space)
get_titlebar_hbox().add_child(buttons)
Expand Down
10 changes: 5 additions & 5 deletions material_maker/nodes/portal/portal.gd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
extends MMGraphNodeMinimal
class_name MMGraphPortal

const LABEL_FONT = preload("res://material_maker/theme/font_rubik/Rubik-416.ttf")
var label_font : FontVariation = FontUtils.medium_font

## Whether portal's link is being edited
## (i.e. its associated LineEdit is visible)
Expand Down Expand Up @@ -34,7 +34,7 @@ func _draw() -> void:
var label_pos : Vector2 = size * 0.5
var label_color : Color = generator.color
var label_draw_pos : Vector2 = label_pos
var label_size : Vector2 = LABEL_FONT.get_string_size(
var label_size : Vector2 = label_font.get_string_size(
get_link(), HORIZONTAL_ALIGNMENT_CENTER, -1, label_font_size)

if not is_editing:
Expand All @@ -43,8 +43,8 @@ func _draw() -> void:
else:
label_draw_pos -= Vector2(label_size.x * 0.5, label_y_offset)

draw_string_outline(LABEL_FONT, label_draw_pos, get_link(), HORIZONTAL_ALIGNMENT_CENTER, -1, label_font_size, 5, Color.BLACK)
draw_string(LABEL_FONT, label_draw_pos, get_link(), HORIZONTAL_ALIGNMENT_CENTER, -1, label_font_size, label_color)
draw_string_outline(label_font, label_draw_pos, get_link(), HORIZONTAL_ALIGNMENT_CENTER, -1, label_font_size, 5, Color.BLACK)
draw_string(label_font, label_draw_pos, get_link(), HORIZONTAL_ALIGNMENT_CENTER, -1, label_font_size, label_color)

# label dragger
%Dragger.mouse_filter = MOUSE_FILTER_IGNORE if is_editing else MOUSE_FILTER_PASS
Expand Down Expand Up @@ -339,7 +339,7 @@ func setup_portal_edit() -> void:
var old_link : String = get_link()
var graph : MMGraphEdit = get_parent()
var edit : LineEdit = LineEdit.new()
edit.add_theme_font_override("font", LABEL_FONT)
edit.add_theme_font_override("font", label_font)
edit.alignment = HORIZONTAL_ALIGNMENT_CENTER
edit.max_length = 64
edit.expand_to_text_length = true
Expand Down
4 changes: 4 additions & 0 deletions material_maker/panels/graph_edit/graph_zoom_menu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ func update_zoom() -> void:
if graph_edit:
graph_edit.zoom = zoom_level
mm_globals.set_config(SETTING_GRAPH_ZOOM_LEVEL, zoom_level)

func _notification(what : int) -> void:
if what == NOTIFICATION_THEME_CHANGED:
%ZoomLabel.add_theme_font_override("font", FontUtils.main_font)
4 changes: 1 addition & 3 deletions material_maker/panels/library/library.gd
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ var category_buttons = {}
@onready var filter_line_edit : LineEdit = %Filter
@onready var item_menu : PopupMenu = %ItemMenu

var section_font = preload("res://material_maker/theme/font_rubik/Rubik-416.ttf")

const MINIMUM_ITEM_HEIGHT : int = 30

const MENU_CREATE_LIBRARY : int = 1000
Expand Down Expand Up @@ -153,7 +151,7 @@ func update_tree() -> void:

for section : TreeItem in tree.get_root().get_children():
if section.get_children().size():
section.set_custom_font(0, section_font)
section.set_custom_font(0, FontUtils.medium_font)
tree.queue_redraw()

func add_item(item, library_index : int, item_name : String, item_icon = null, item_parent = null, force_expand = false) -> TreeItem:
Expand Down
2 changes: 2 additions & 0 deletions material_maker/panels/preview_2d/export_menu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ func _notification(what: int) -> void:
%ExportFolderButton.icon = get_theme_icon("folder", "MM_Icons")
%ExportFileResultLabel.add_theme_color_override("font_color", get_theme_color("font_color", "Label").lerp(Color.ORANGE, 0.5))
%ExportNotificationLabel.add_theme_color_override("font_color", get_theme_color("font_color", "Label").lerp(get_theme_color("icon_pressed_color", "Button"), 0.5))
%ExportFileResultLabel.add_theme_font_override("font",
FontUtils.create_italic_variation(FontUtils.main_font))


func _open() -> void:
Expand Down
7 changes: 7 additions & 0 deletions material_maker/panels/preview_3d/export_menu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,10 @@ func interpret_map_file_name(file_name: String, path:="") -> String:

func _on_map_file_type_item_selected(_index: int) -> void:
update_generate_map_file_label()

func _notification(what: int) -> void:
if what == NOTIFICATION_THEME_CHANGED:
if not is_node_ready():
await ready
MapExportFileResultLabel.add_theme_font_override("font",
FontUtils.create_italic_variation(FontUtils.main_font))
2 changes: 1 addition & 1 deletion material_maker/theme/classic.tres
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_resource type="Theme" script_class="EnhancedTheme" load_steps=4 format=3 uid="uid://wuddtc1fglln"]
[gd_resource type="Theme" script_class="EnhancedTheme" format=3 uid="uid://wuddtc1fglln"]

[ext_resource type="Theme" uid="uid://w487nirev8y5" path="res://material_maker/theme/classic_base.tres" id="1_meah8"]
[ext_resource type="Script" uid="uid://3ga2k3abkk0d" path="res://material_maker/theme/enhanced_theme_system/color_swap.gd" id="5_qpu3p"]
Expand Down
6 changes: 4 additions & 2 deletions material_maker/theme/default.tres
Original file line number Diff line number Diff line change
Expand Up @@ -1402,8 +1402,8 @@ GraphNode/styles/titlebar = SubResource("StyleBoxFlat_imqse")
GraphNode/styles/titlebar_selected = SubResource("StyleBoxFlat_ru0kh")
GraphNodeTitleLabel/colors/font_outline_color = Color(0.168627, 0.176471, 0.192157, 1)
GraphNodeTitleLabel/colors/font_shadow_color = Color(0.168627, 0.176471, 0.192157, 1)
GraphNodeTitleLabel/constants/outline_size = 5
GraphNodeTitleLabel/constants/shadow_outline_size = 6
GraphNodeTitleLabel/constants/outline_size = 6
GraphNodeTitleLabel/constants/shadow_outline_size = 7
GraphNodeTitleLabel/fonts/font = ExtResource("2_5e0gw")
HScrollBar/styles/grabber = SubResource("StyleBoxFlat_fs6qc")
HScrollBar/styles/grabber_highlight = SubResource("StyleBoxFlat_70aex")
Expand Down Expand Up @@ -1669,6 +1669,8 @@ TabContainer/styles/tab_unselected = SubResource("StyleBoxFlat_e07v0")
TextEdit/colors/selection_color = Color(0.5, 0.5, 0.5, 1)
TextEdit/styles/focus = SubResource("StyleBoxEmpty_asgc8")
TooltipLabel/font_sizes/font_size = 15
TooltipLabel/fonts/font = ExtResource("1_5tfb1")
TooltipPanel/fonts/title_font = ExtResource("1_5tfb1")
TooltipPanel/styles/panel = SubResource("StyleBoxFlat_5rnro")
Tree/colors/font_color = Color(0.7, 0.7, 0.7, 1)
Tree/colors/font_disabled_color = Color(0.875, 0.875, 0.875, 0.5)
Expand Down
14 changes: 14 additions & 0 deletions material_maker/theme/fonts/system/system_bold_font.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[gd_resource type="FontVariation" format=3 uid="uid://ch4d2bwcn5a"]

[ext_resource type="FontFile" uid="uid://btybkvkb8rtol" path="res://material_maker/fonts/DroidSansFallback.ttf" id="1_ub2cf"]
[ext_resource type="FontFile" uid="uid://buwvapsuukd0n" path="res://material_maker/fonts/DroidSansJapanese.ttf" id="2_ml3ku"]

[sub_resource type="SystemFont" id="SystemFont_ouejq"]
font_names = PackedStringArray("Sans-Serif")
font_weight = 800
multichannel_signed_distance_field = true
msdf_pixel_range = 32

[resource]
fallbacks = Array[Font]([ExtResource("1_ub2cf"), ExtResource("2_ml3ku")])
base_font = SubResource("SystemFont_ouejq")
13 changes: 13 additions & 0 deletions material_maker/theme/fonts/system/system_code_font.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[gd_resource type="FontVariation" format=3 uid="uid://dhfia0y843i1y"]

[ext_resource type="FontFile" uid="uid://btybkvkb8rtol" path="res://material_maker/fonts/DroidSansFallback.ttf" id="1_tb5d5"]
[ext_resource type="FontFile" uid="uid://buwvapsuukd0n" path="res://material_maker/fonts/DroidSansJapanese.ttf" id="2_qhq60"]

[sub_resource type="SystemFont" id="SystemFont_ouejq"]
font_names = PackedStringArray("Monospace")
multichannel_signed_distance_field = true
msdf_pixel_range = 32

[resource]
fallbacks = Array[Font]([ExtResource("1_tb5d5"), ExtResource("2_qhq60")])
base_font = SubResource("SystemFont_ouejq")
13 changes: 13 additions & 0 deletions material_maker/theme/fonts/system/system_main_font.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[gd_resource type="FontVariation" format=3 uid="uid://bke5ujsr368cv"]

[ext_resource type="FontFile" uid="uid://btybkvkb8rtol" path="res://material_maker/fonts/DroidSansFallback.ttf" id="1_dcm08"]
[ext_resource type="FontFile" uid="uid://buwvapsuukd0n" path="res://material_maker/fonts/DroidSansJapanese.ttf" id="2_dulnh"]

[sub_resource type="SystemFont" id="SystemFont_ouejq"]
font_names = PackedStringArray("Sans-Serif")
multichannel_signed_distance_field = true
msdf_pixel_range = 32

[resource]
fallbacks = Array[Font]([ExtResource("1_dcm08"), ExtResource("2_dulnh")])
base_font = SubResource("SystemFont_ouejq")
14 changes: 14 additions & 0 deletions material_maker/theme/fonts/system/system_medium_font.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[gd_resource type="FontVariation" format=3 uid="uid://6k785eldqigf"]

[ext_resource type="FontFile" uid="uid://btybkvkb8rtol" path="res://material_maker/fonts/DroidSansFallback.ttf" id="1_qyurx"]
[ext_resource type="FontFile" uid="uid://buwvapsuukd0n" path="res://material_maker/fonts/DroidSansJapanese.ttf" id="2_wh3pl"]

[sub_resource type="SystemFont" id="SystemFont_ouejq"]
font_names = PackedStringArray("Sans-Serif")
font_weight = 600
multichannel_signed_distance_field = true
msdf_pixel_range = 32

[resource]
fallbacks = Array[Font]([ExtResource("1_qyurx"), ExtResource("2_wh3pl")])
base_font = SubResource("SystemFont_ouejq")
8 changes: 8 additions & 0 deletions material_maker/theme/fonts/ui/bold_font.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[gd_resource type="FontVariation" format=3 uid="uid://cfoeywyltjuo2"]

[ext_resource type="FontFile" uid="uid://dq4ssdyyfotag" path="res://material_maker/theme/font_rubik/Rubik-Bold.ttf" id="1_v3ac0"]
[ext_resource type="FontFile" uid="uid://btybkvkb8rtol" path="res://material_maker/fonts/DroidSansFallback.ttf" id="2_bhm15"]
[ext_resource type="FontFile" uid="uid://buwvapsuukd0n" path="res://material_maker/fonts/DroidSansJapanese.ttf" id="3_bhm15"]

[resource]
fallbacks = Array[Font]([ExtResource("1_v3ac0"), ExtResource("2_bhm15"), ExtResource("3_bhm15")])
7 changes: 7 additions & 0 deletions material_maker/theme/fonts/ui/classic_font.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="FontVariation" format=3 uid="uid://cukrxt4w03iac"]

[ext_resource type="FontFile" uid="uid://btybkvkb8rtol" path="res://material_maker/fonts/DroidSansFallback.ttf" id="2_em5my"]

[resource]
fallbacks = Array[Font]([ExtResource("2_em5my")])
base_font = ExtResource("2_em5my")
8 changes: 8 additions & 0 deletions material_maker/theme/fonts/ui/code_font.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[gd_resource type="FontVariation" format=3 uid="uid://cjc2c8qp5r5x0"]

[ext_resource type="FontFile" uid="uid://c4vhxy5kgdp8s" path="res://material_maker/fonts/hack.ttf" id="1_w2v43"]
[ext_resource type="FontFile" uid="uid://btybkvkb8rtol" path="res://material_maker/fonts/DroidSansFallback.ttf" id="2_nv7dv"]
[ext_resource type="FontFile" uid="uid://buwvapsuukd0n" path="res://material_maker/fonts/DroidSansJapanese.ttf" id="3_nv7dv"]

[resource]
fallbacks = Array[Font]([ExtResource("1_w2v43"), ExtResource("2_nv7dv"), ExtResource("3_nv7dv")])
8 changes: 8 additions & 0 deletions material_maker/theme/fonts/ui/main_font.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[gd_resource type="FontVariation" format=3 uid="uid://b3d8p401jppew"]

[ext_resource type="FontFile" uid="uid://lro0qdrhfytt" path="res://material_maker/theme/font_rubik/Rubik-Light.ttf" id="1_c62ru"]
[ext_resource type="FontFile" uid="uid://btybkvkb8rtol" path="res://material_maker/fonts/DroidSansFallback.ttf" id="2_waneu"]
[ext_resource type="FontFile" uid="uid://buwvapsuukd0n" path="res://material_maker/fonts/DroidSansJapanese.ttf" id="3_waneu"]

[resource]
fallbacks = Array[Font]([ExtResource("1_c62ru"), ExtResource("2_waneu"), ExtResource("3_waneu")])
8 changes: 8 additions & 0 deletions material_maker/theme/fonts/ui/medium_font.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[gd_resource type="FontVariation" format=3 uid="uid://clmqa2fxntpp4"]

[ext_resource type="FontFile" uid="uid://bn648prik7soq" path="res://material_maker/theme/font_rubik/Rubik-416.ttf" id="1_22i4t"]
[ext_resource type="FontFile" uid="uid://btybkvkb8rtol" path="res://material_maker/fonts/DroidSansFallback.ttf" id="2_k8ftl"]
[ext_resource type="FontFile" uid="uid://buwvapsuukd0n" path="res://material_maker/fonts/DroidSansJapanese.ttf" id="3_k8ftl"]

[resource]
fallbacks = Array[Font]([ExtResource("1_22i4t"), ExtResource("2_k8ftl"), ExtResource("3_k8ftl")])
92 changes: 92 additions & 0 deletions material_maker/theme/utils/font_utils.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
class_name FontUtils
extends RefCounted

static var main_font : FontVariation = preload("res://material_maker/theme/fonts/ui/main_font.tres")
static var medium_font : FontVariation = preload("res://material_maker/theme/fonts/ui/medium_font.tres")
static var bold_font : FontVariation = preload("res://material_maker/theme/fonts/ui/bold_font.tres")
static var code_font : FontVariation = preload("res://material_maker/theme/fonts/ui/code_font.tres")

static var classic_font : FontVariation = preload("res://material_maker/theme/fonts/ui/classic_font.tres")

static var ui_font_size : int
static var ui_code_font_size : int

const SETTINGS_UI_FONT_SIZE : String = "ui_font_size"
const SETTINGS_UI_CODE_FONT_SIZE : String = "ui_code_font_size"
const SETTINGS_UI_USE_SYSTEM_FONT : String = "ui_use_system_font"

static func create_italic_variation(font : FontVariation) -> FontVariation:
var f : FontVariation = font.duplicate()
f.variation_transform = Transform2D(
Vector2(1.0, 0.22), Vector2(0.0, 1.0), Vector2.ZERO)
return f

static func _has_font_config(config : String) -> bool:
return (mm_globals.has_config(config)
and not mm_globals.get_config(config).is_empty())

static func _setup_rendering(font : FontVariation) -> void:
if mm_globals.get_config("ui_font_enable_msdf"):
font.base_font.msdf_pixel_range = 32
font.base_font.msdf_size = 48
font.base_font.multichannel_signed_distance_field = true
else:
font.base_font.multichannel_signed_distance_field = false

static func rebuild_fonts() -> void:
if mm_globals.has_config(SETTINGS_UI_FONT_SIZE):
ui_font_size = mm_globals.get_config(SETTINGS_UI_FONT_SIZE)

if mm_globals.has_config(SETTINGS_UI_CODE_FONT_SIZE):
ui_code_font_size = mm_globals.get_config(SETTINGS_UI_CODE_FONT_SIZE)

if mm_globals.get_config(SETTINGS_UI_USE_SYSTEM_FONT):
main_font = load("res://material_maker/theme/fonts/system/system_main_font.tres")
medium_font = load("res://material_maker/theme/fonts/system/system_medium_font.tres")
bold_font = load("res://material_maker/theme/fonts/system/system_bold_font.tres")
code_font = load("res://material_maker/theme/fonts/system/system_code_font.tres")

var config : Dictionary[FontVariation, Dictionary] = {
main_font : { "weight": 400, "name": "Segoe UI" },
medium_font : { "weight": 600, "name": "Segoe UI" },
bold_font : { "weight": 800, "name": "Segoe UI" },
code_font : { "weight": 400, "name": "Consolas" }
}

for font_var : FontVariation in config:
var cfg : Dictionary = config[font_var]
if OS.get_name() == "Windows":
font_var.base_font = SystemFont.new()
font_var.base_font.font_names.append(cfg.name)
font_var.base_font.font_weight = cfg.weight
_setup_rendering(font_var)
return

var fonts : Dictionary[String, FontVariation] = {
"main_font": main_font,
"medium_font": medium_font,
"bold_font": bold_font,
"code_font": code_font
}

for font : String in fonts:
var font_variation : FontVariation = fonts[font]
var custom_font_path : String = mm_globals.get_config(font)
if _has_font_config(font) and FileAccess.file_exists(custom_font_path):
font_variation.base_font = FontFile.new()
font_variation.base_font.load_dynamic_font(custom_font_path)
font_variation.base_font.emit_changed()
else:
mm_globals.set_config(font, "")
font_variation.base_font = load(font_variation.fallbacks[0].resource_path)
font_variation.base_font.emit_changed()
_setup_rendering(font_variation)

static func setup_theme_fonts(theme : Theme, theme_name : String) -> void:
var font : FontVariation = main_font
if "classic" in theme_name and not _has_font_config("main_font"):
font = classic_font

theme.default_font = font
theme.set_font("title_font", "TooltipPanel", font)
theme.set_font("font", "TooltipLabel", font)
1 change: 1 addition & 0 deletions material_maker/theme/utils/font_utils.gd.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://c50net8nr1iig
2 changes: 2 additions & 0 deletions material_maker/widgets/float_edit/float_edit.gd
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ func update() -> void:
$Edit.add_theme_color_override("font_uneditable_color", get_theme_color("font_color"))
else:
$Edit.remove_theme_color_override("font_uneditable_color")
$Edit.add_theme_font_size_override("font_size", FontUtils.ui_font_size)
$Edit.add_theme_font_override("font", FontUtils.main_font)
$Edit.queue_redraw()

func _ready() -> void:
Expand Down
2 changes: 1 addition & 1 deletion material_maker/widgets/splines_edit/splines_editor.gd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var mode : Modes = Modes.DRAW

var progressive : bool = false

var spline_font = preload("res://material_maker/theme/font_rubik/Rubik-Bold.ttf")
var spline_font : FontVariation = FontUtils.bold_font
var font_size = 16
var text_bg_width = 12

Expand Down
Loading
Loading