Make font fallbacking the default option

This commit is contained in:
ExMatics HydrogenC
2023-12-03 15:11:47 +08:00
parent 2f019d4264
commit 23b71e7d3e
83 changed files with 598 additions and 619 deletions

View File

@@ -233,7 +233,7 @@ namespace FlaxEngine.GUI
}
}
FallbackTextUtils.DrawText(_font.GetFont(), Material, _text, rect, color, hAlignment, wAlignment, Wrapping, BaseLinesGapScale, scale);
Render2D.DrawText(_font.GetFont(), Material, _text, rect, color, hAlignment, wAlignment, Wrapping, BaseLinesGapScale, scale);
if (ClipText)
Render2D.PopClip();
@@ -254,7 +254,7 @@ namespace FlaxEngine.GUI
layout.Bounds.Size.X = Width - Margin.Width;
else if (_autoWidth && !_autoHeight)
layout.Bounds.Size.Y = Height - Margin.Height;
_textSize = FallbackTextUtils.MeasureText(font, _text, ref layout);
_textSize = font.MeasureText(_text, ref layout);
_textSize.Y *= BaseLinesGapScale;
// Check if size is controlled via text