From 34d65a7960930f2b732ab84edc0e1482d7c2888d Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com> Date: Tue, 1 Aug 2023 20:32:31 +0200 Subject: [PATCH] Use engine font instead of SS14-specific font in a few places. (#4206) --- RELEASE-NOTES.md | 2 +- Robust.Client/Debugging/DebugPhysicsSystem.cs | 2 +- Robust.Client/GameStates/NetEntityOverlay.cs | 2 +- Robust.Client/GameStates/NetGraphOverlay.cs | 2 +- Robust.Client/Profiling/LiveProfileViewControl.cs | 2 +- .../ViewVariables/Instances/ViewVariablesInstanceEntity.cs | 2 +- Robust.Client/ViewVariables/ViewVariablesInstance.cs | 2 +- Robust.Client/ViewVariables/ViewVariablesPropertyControl.cs | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 1b7c3ffb8..333791a39 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -18,7 +18,7 @@ Don't change the format without looking at the script! ### Bugfixes -*None yet* +* Fix certain debug commands and tools crashing on non-SS14 RobustToolbox games due to a missing font. ### Other diff --git a/Robust.Client/Debugging/DebugPhysicsSystem.cs b/Robust.Client/Debugging/DebugPhysicsSystem.cs index 491e71720..3c0c91094 100644 --- a/Robust.Client/Debugging/DebugPhysicsSystem.cs +++ b/Robust.Client/Debugging/DebugPhysicsSystem.cs @@ -218,7 +218,7 @@ namespace Robust.Client.Debugging _debugPhysicsSystem = system; _lookup = lookup; _physicsSystem = physicsSystem; - _font = new VectorFont(cache.GetResource("/Fonts/NotoSans/NotoSans-Regular.ttf"), 10); + _font = new VectorFont(cache.GetResource("/EngineFonts/NotoSans/NotoSans-Regular.ttf"), 10); } private void DrawWorld(DrawingHandleWorld worldHandle, OverlayDrawArgs args) diff --git a/Robust.Client/GameStates/NetEntityOverlay.cs b/Robust.Client/GameStates/NetEntityOverlay.cs index e309fe98f..f5638b9f1 100644 --- a/Robust.Client/GameStates/NetEntityOverlay.cs +++ b/Robust.Client/GameStates/NetEntityOverlay.cs @@ -41,7 +41,7 @@ namespace Robust.Client.GameStates { IoCManager.InjectDependencies(this); var cache = IoCManager.Resolve(); - _font = new VectorFont(cache.GetResource("/Fonts/NotoSans/NotoSans-Regular.ttf"), 10); + _font = new VectorFont(cache.GetResource("/EngineFonts/NotoSans/NotoSans-Regular.ttf"), 10); _lineHeight = _font.GetLineHeight(1); _gameStateManager.GameStateApplied += HandleGameStateApplied; diff --git a/Robust.Client/GameStates/NetGraphOverlay.cs b/Robust.Client/GameStates/NetGraphOverlay.cs index 777e942af..9b02d1db2 100644 --- a/Robust.Client/GameStates/NetGraphOverlay.cs +++ b/Robust.Client/GameStates/NetGraphOverlay.cs @@ -53,7 +53,7 @@ namespace Robust.Client.GameStates { IoCManager.InjectDependencies(this); var cache = IoCManager.Resolve(); - _font = new VectorFont(cache.GetResource("/Fonts/NotoSans/NotoSans-Regular.ttf"), 10); + _font = new VectorFont(cache.GetResource("/EngineFonts/NotoSans/NotoSans-Regular.ttf"), 10); _gameStateManager.GameStateApplied += HandleGameStateApplied; } diff --git a/Robust.Client/Profiling/LiveProfileViewControl.cs b/Robust.Client/Profiling/LiveProfileViewControl.cs index af9171214..01e1a67d0 100644 --- a/Robust.Client/Profiling/LiveProfileViewControl.cs +++ b/Robust.Client/Profiling/LiveProfileViewControl.cs @@ -24,7 +24,7 @@ public sealed class LiveProfileViewControl : Control { IoCManager.InjectDependencies(this); - if (!_resourceCache.TryGetResource("/Fonts/NotoSans/NotoSans-Regular.ttf", out var font)) + if (!_resourceCache.TryGetResource("/EngineFonts/NotoSans/NotoSans-Regular.ttf", out var font)) return; _font = font.MakeDefault(); diff --git a/Robust.Client/ViewVariables/Instances/ViewVariablesInstanceEntity.cs b/Robust.Client/ViewVariables/Instances/ViewVariablesInstanceEntity.cs index 97b1cf369..d44f53e88 100644 --- a/Robust.Client/ViewVariables/Instances/ViewVariablesInstanceEntity.cs +++ b/Robust.Client/ViewVariables/Instances/ViewVariablesInstanceEntity.cs @@ -88,7 +88,7 @@ namespace Robust.Client.ViewVariables.Instances var stringified = PrettyPrint.PrintUserFacingWithType(obj, out var typeStringified); if (typeStringified != "") { - //var smallFont = new VectorFont(_resourceCache.GetResource("/Fonts/CALIBRI.TTF"), 10); + //var smallFont = new VectorFont(_resourceCache.GetResource("/EngineFonts/NotoSans/NotoSans-Regular.ttf"), 10); // Custom ToString() implementation. var headBox = new BoxContainer { diff --git a/Robust.Client/ViewVariables/ViewVariablesInstance.cs b/Robust.Client/ViewVariables/ViewVariablesInstance.cs index 2be757244..f4b59c0fe 100644 --- a/Robust.Client/ViewVariables/ViewVariablesInstance.cs +++ b/Robust.Client/ViewVariables/ViewVariablesInstance.cs @@ -121,7 +121,7 @@ namespace Robust.Client.ViewVariables } //var smallFont = - // new VectorFont(IoCManager.Resolve().GetResource("/Fonts/CALIBRI.TTF"), + // new VectorFont(IoCManager.Resolve().GetResource("/EngineFonts/NotoSans/NotoSans-Regular.ttf"), // 10); // Custom ToString() implementation. diff --git a/Robust.Client/ViewVariables/ViewVariablesPropertyControl.cs b/Robust.Client/ViewVariables/ViewVariablesPropertyControl.cs index c807aafd9..cf40bb4f1 100644 --- a/Robust.Client/ViewVariables/ViewVariablesPropertyControl.cs +++ b/Robust.Client/ViewVariables/ViewVariablesPropertyControl.cs @@ -57,7 +57,7 @@ namespace Robust.Client.ViewVariables }; VBox.AddChild(BottomContainer); - //var smallFont = new VectorFont(_resourceCache.GetResource("/Fonts/CALIBRI.TTF"), 10); + //var smallFont = new VectorFont(_resourceCache.GetResource("/EngineFonts/NotoSans/NotoSans-Regular.ttf"), 10); _bottomLabel = new Label {