godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
87.05k stars 19.54k forks source link

Font.is_language_supported always returns true #92299

Open floppyhammer opened 2 months ago

floppyhammer commented 2 months ago

Tested versions

v4.3.dev6.official [89850d553]

System information

Godot v4.3.dev6 - Windows 10.0.26217 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1080 Ti (NVIDIA; 32.0.15.6038) - Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz (8 Threads)

Issue description

Font.is_language_supported always return true no matter what language code I give and what font I set.

var language_codes = ["zh", "en", "ja", "ko", "th", "ar", "ru", "id", "tl", "de", "es"]

func support_language(language_code: String):
    var font = load("res://OpenSans-Regular.ttf")
    var result = font.is_language_supported(language_code)
    print(language_code, " ", result)

Output

zh true
en true
ja true
ko true
th true
ar true
ru true
id true
tl true
de true
es true

Steps to reproduce

See above.

Minimal reproduction project (MRP)

mrp.zip

bruvzg commented 2 months ago

There's no language support information in the fonts (only script support might be available), is_language_supported will return a different value only if you specify language_support in the advanced import dialog.

Chaosus commented 2 months ago

is_language_supported will return a different value only if you specify language_support in the advanced import dialog.

I guess this should be properly documented?