Stylesheets: Take advantage of Font stacking (#5111)

Depends on https://github.com/space-wizards/RobustToolbox/pull/2182
 - Adds Noto Sans Symbols and its sequel, Noto Sans Symbols 2: Revenge
   of the Unicode.
 - Uses a stack of Noto Sans, Symbols, and Symbols 2 in all places where
   Noto Sans/Noto Sans Display are used.

If you _really_ wanted to, you could use this to add Noto Emoji too.

In considering this, please remember that not everything that _can_ be
done, _should_ be done.
This commit is contained in:
E F R
2021-11-04 03:32:03 +00:00
committed by GitHub
parent 6739bbc85b
commit 1b5b32c8a6
7 changed files with 92 additions and 17 deletions

View File

@@ -41,8 +41,26 @@ namespace Content.Client.Stylesheets
protected StyleBase(IResourceCache resCache)
{
var notoSans12 = resCache.GetFont("/Fonts/NotoSans/NotoSans-Regular.ttf", 12);
var notoSans12Italic = resCache.GetFont("/Fonts/NotoSans/NotoSans-Italic.ttf", 12);
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.