mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 09:09:47 +00:00
If the selected font index is out of bounds, fall back to Roboto
This commit is contained in:
parent
fd714d04df
commit
203340b3a1
|
@ -223,8 +223,12 @@ var theme_font_index := 1:
|
|||
if theme_font_index < loaded_fonts.size():
|
||||
theme_font = loaded_fonts[theme_font_index]
|
||||
else:
|
||||
var font_name := get_available_font_names()[theme_font_index]
|
||||
theme_font = find_font_from_name(font_name)
|
||||
var available_font_names := get_available_font_names()
|
||||
if theme_font_index < available_font_names.size():
|
||||
var font_name := available_font_names[theme_font_index]
|
||||
theme_font = find_font_from_name(font_name)
|
||||
else:
|
||||
theme_font = loaded_fonts[1] # Fall back to Roboto if out of bounds
|
||||
## Found in Preferences. The font size used by the interface.
|
||||
var font_size := 16
|
||||
## Found in Preferences. If [code]true[/code], the interface dims on popups.
|
||||
|
|
Loading…
Reference in a new issue