Add font fallback

Note: All the `First()` in the code are temperary workarounds to make it work and require refractoring
This commit is contained in:
ExMatics HydrogenC
2023-11-28 07:17:46 +08:00
parent b3a18883ca
commit 47a25c7828
47 changed files with 787 additions and 87 deletions

View File

@@ -2,6 +2,7 @@
using FlaxEngine;
using FlaxEngine.GUI;
using System.Linq;
namespace FlaxEditor.GUI
{
@@ -101,8 +102,8 @@ namespace FlaxEditor.GUI
var style = Style.Current;
float width = 18;
if (style.FontMedium)
width += style.FontMedium.MeasureText(Text).X;
if (style.FontMedium.First())
width += style.FontMedium.First().MeasureText(Text).X;
Width = width;
}