Revert Rich text (#5848)

This commit is contained in:
Paul Ritter
2021-12-20 12:42:42 +01:00
committed by GitHub
parent e3a1b2b37b
commit cc57d1380c
60 changed files with 212 additions and 302 deletions

View File

@@ -4,7 +4,6 @@ using Robust.Client.ResourceManagement;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Utility;
using Robust.Shared.Maths;
namespace Content.Client.Stylesheets
@@ -40,57 +39,28 @@ namespace Content.Client.Stylesheets
protected StyleBoxTexture BaseAngleRect { get; }
protected IFontLibrary FontLib { get; }
protected StyleBase(IResourceCache resCache)
{
FontLib = new FontLibrary(
new FontClass(Id: "notosans", Style: default, Size: (FontSize) 12)
) as IFontLibrary;
FontLib.AddFont("notosans",
new FontVariant
(
FontStyle.Normal,
new []
{
resCache.GetResource<FontResource>("/Fonts/NotoSans/NotoSans-Regular.ttf"),
resCache.GetResource<FontResource>("/Fonts/NotoSans/NotoSansSymbols-Regular.ttf"),
resCache.GetResource<FontResource>("/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf")
}
),
new FontVariant
(
FontStyle.Italic,
new []
{
resCache.GetResource<FontResource>("/Fonts/NotoSans/NotoSans-Italic.ttf"),
resCache.GetResource<FontResource>("/Fonts/NotoSans/NotoSansSymbols-Regular.ttf"),
resCache.GetResource<FontResource>("/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf")
}
),
new FontVariant
(
FontStyle.Bold,
new []
{
resCache.GetResource<FontResource>("/Fonts/NotoSans/NotoSans-Bold.ttf"),
resCache.GetResource<FontResource>("/Fonts/NotoSans/NotoSansSymbols-Bold.ttf"),
resCache.GetResource<FontResource>("/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf")
}
),
new FontVariant
(
FontStyle.Bold | FontStyle.Italic,
new []
{
resCache.GetResource<FontResource>("/Fonts/NotoSans/NotoSans-BoldItalic.ttf"),
resCache.GetResource<FontResource>("/Fonts/NotoSans/NotoSansSymbols-Bold.ttf"),
resCache.GetResource<FontResource>("/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf")
}
)
var notoSans12 = resCache.GetFont
(
new []
{
"/Fonts/NotoSans/NotoSans-Regular.ttf",
"/Fonts/NotoSans/NotoSansSymbols-Regular.ttf",
"/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf"
},
12
);
var notoSans12Italic = resCache.GetFont
(
new []
{
"/Fonts/NotoSans/NotoSans-Italic.ttf",
"/Fonts/NotoSans/NotoSansSymbols-Regular.ttf",
"/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf"
},
12
);
var textureCloseButton = resCache.GetTexture("/Textures/Interface/Nano/cross.svg.png");
// Button styles.
@@ -181,8 +151,7 @@ namespace Content.Client.Stylesheets
new SelectorElement(null, null, null, null),
new[]
{
new StyleProperty("font-library", FontLib),
new StyleProperty("font", new FontClass("notosans", default, (FontSize) 12)),
new StyleProperty("font", notoSans12),
}),
// Default font.
@@ -190,7 +159,7 @@ namespace Content.Client.Stylesheets
new SelectorElement(null, new[] {StyleClassItalic}, null, null),
new[]
{
new StyleProperty("font", new FontClass("notosans", FontStyle.Italic, (FontSize) 12)),
new StyleProperty("font", notoSans12Italic),
}),
// Window close button base texture.