18 lines
649 B
GDScript
18 lines
649 B
GDScript
# client/tests/unit/test_fonts.gd
|
|
extends "res://addons/gut/test.gd"
|
|
|
|
const FONTS := {
|
|
"serif": "res://assets/theme/fonts/EBGaramond-VariableFont_wght.ttf",
|
|
"serif_italic": "res://assets/theme/fonts/EBGaramond-Italic-VariableFont_wght.ttf",
|
|
"accent": "res://assets/theme/fonts/ArchitectsDaughter-Regular.ttf",
|
|
"mono": "res://assets/theme/fonts/JetBrainsMono-VariableFont_wght.ttf",
|
|
}
|
|
|
|
|
|
func test_all_fonts_exist_and_load_as_fontfile():
|
|
for key in FONTS:
|
|
var path: String = FONTS[key]
|
|
assert_true(FileAccess.file_exists(path), "missing font: %s" % path)
|
|
var f = load(path)
|
|
assert_true(f is FontFile, "%s did not load as FontFile" % key)
|