Show fallback glyph if its not present in the font, add Japanese font to TestGame.
This commit is contained in:
@@ -42,6 +42,11 @@ public class TestGame : Game
|
||||
|
||||
}
|
||||
|
||||
if (!ResourceManager.TryLoad("fonts/NotoSansJP-Regular.ttf", out _jpFont))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
ResourceManager.TryLoad("icon.png", out _icon);
|
||||
ResourceManager.TryLoad("sounds/test_sound_mono.ogg", out _sound);
|
||||
|
||||
@@ -73,7 +78,7 @@ public class TestGame : Game
|
||||
|
||||
if (Input.IsActionPressed("accept"))
|
||||
{
|
||||
_container.AddChild(new Label("Hello, World!", _font));
|
||||
_container.AddChild(new Label("こんにちは世界!", _jpFont));
|
||||
}
|
||||
|
||||
if (Input.IsActionPressed("cancel") && _container.Children.Count != 0)
|
||||
@@ -120,6 +125,7 @@ public class TestGame : Game
|
||||
private int _emitterId;
|
||||
private ResourceRef<ParticleEmitterSettingsResource> _fireEffect;
|
||||
private ResourceRef<Font> _font;
|
||||
private ResourceRef<Font> _jpFont;
|
||||
private ResourceRef<Sound> _sound;
|
||||
private ResourceRef<Texture2d> _icon;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user