Adjust sprite texts in-line with framework changes

This commit is contained in:
smoogipoo
2019-02-12 13:04:46 +09:00
parent e174fa2d3e
commit a2aa3ec5cb
140 changed files with 424 additions and 514 deletions

View File

@ -60,7 +60,7 @@ namespace osu.Desktop.Overlays
{ {
new OsuSpriteText new OsuSpriteText
{ {
Font = @"Exo2.0-Bold", Font = OsuFont.GetFont(weight: FontWeight.Bold),
Text = game.Name Text = game.Name
}, },
new OsuSpriteText new OsuSpriteText
@ -74,9 +74,8 @@ namespace osu.Desktop.Overlays
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
TextSize = 12, Font = OsuFont.GetFont(Typeface.Venera, 12),
Colour = colours.Yellow, Colour = colours.Yellow,
Font = @"Venera",
Text = @"Development Build" Text = @"Development Build"
}, },
new Sprite new Sprite

View File

@ -14,6 +14,7 @@ using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints; using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Graphics;
using osu.Game.Rulesets.Mania.Objects; using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Rulesets.Mania.Objects.Drawables; using osu.Game.Rulesets.Mania.Objects.Drawables;
using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Objects.Drawables;
@ -141,7 +142,7 @@ namespace osu.Game.Rulesets.Mania.Tests
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
TextSize = 14, Font = OsuFont.GetFont(size: 14),
Text = description Text = description
} }
} }

View File

@ -3,6 +3,7 @@
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Game.Graphics;
using osu.Game.Rulesets.Judgements; using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Objects.Drawables;
@ -19,7 +20,7 @@ namespace osu.Game.Rulesets.Mania.UI
private void load() private void load()
{ {
if (JudgementText != null) if (JudgementText != null)
JudgementText.TextSize = 25; JudgementText.Font = OsuFont.GetFont(JudgementText.Font, size: 25);
} }
protected override void LoadComplete() protected override void LoadComplete()

View File

@ -16,6 +16,7 @@ using osuTK.Graphics;
using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Mods;
using System.Linq; using System.Linq;
using NUnit.Framework; using NUnit.Framework;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Rulesets.Judgements; using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Objects;
@ -313,7 +314,7 @@ namespace osu.Game.Rulesets.Osu.Tests
Origin = Anchor.Centre, Origin = Anchor.Centre,
Text = result.IsHit ? "Hit!" : "Miss!", Text = result.IsHit ? "Hit!" : "Miss!",
Colour = result.IsHit ? Color4.Green : Color4.Red, Colour = result.IsHit ? Color4.Green : Color4.Red,
TextSize = 30, Font = OsuFont.GetFont(size: 30),
Position = osuObject.HitObject.StackedEndPosition + judgementOffsetDirection * new Vector2(0, 45) Position = osuObject.HitObject.StackedEndPosition + judgementOffsetDirection * new Vector2(0, 45)
}); });

View File

@ -7,6 +7,7 @@ using osu.Framework.Graphics.Containers;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osuTK.Graphics; using osuTK.Graphics;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Skinning; using osu.Game.Skinning;
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
@ -42,9 +43,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
}, s => s.GetTexture("Play/osu/hitcircle") == null), }, s => s.GetTexture("Play/osu/hitcircle") == null),
number = new SkinnableSpriteText("Play/osu/number-text", _ => new OsuSpriteText number = new SkinnableSpriteText("Play/osu/number-text", _ => new OsuSpriteText
{ {
Font = @"Venera", Font = OsuFont.GetFont(Typeface.Venera, 40),
UseFullGlyphHeight = false, UseFullGlyphHeight = false,
TextSize = 40,
}, restrictSize: false) }, restrictSize: false)
{ {
Text = @"1" Text = @"1"

View File

@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
@ -23,16 +24,14 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Text = @"0", Text = @"0",
Font = @"Venera", Font = OsuFont.GetFont(Typeface.Venera, 24),
TextSize = 24
}, },
new OsuSpriteText new OsuSpriteText
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Text = @"SPINS PER MINUTE", Text = @"SPINS PER MINUTE",
Font = @"Venera", Font = OsuFont.GetFont(Typeface.Venera, 12),
TextSize = 12,
Y = 30 Y = 30
} }
}; };

View File

@ -15,6 +15,7 @@ using osu.Game.Graphics.Sprites;
using osu.Game.Overlays; using osu.Game.Overlays;
using osuTK.Graphics; using osuTK.Graphics;
using osu.Framework.Lists; using osu.Framework.Lists;
using osu.Game.Graphics;
namespace osu.Game.Tests.Visual namespace osu.Game.Tests.Visual
{ {
@ -196,8 +197,8 @@ namespace osu.Game.Tests.Visual
{ {
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
Direction = FillDirection.Horizontal; Direction = FillDirection.Horizontal;
Add(new OsuSpriteText { Text = header + @": ", TextSize = text_size }); Add(new OsuSpriteText { Text = header + @": ", Font = OsuFont.GetFont(size: text_size) });
Add(valueText = new OsuSpriteText { TextSize = text_size }); Add(valueText = new OsuSpriteText { Font = OsuFont.GetFont(size: text_size) });
Margin = new MarginPadding(margin); Margin = new MarginPadding(margin);
} }
} }

View File

@ -96,7 +96,7 @@ namespace osu.Game.Tests.Visual
return true; return true;
} }
bool isItalic() => newLine.ContentFlow.Where(d => d is OsuSpriteText).Cast<OsuSpriteText>().All(sprite => sprite.Font == "Exo2.0-MediumItalic"); bool isItalic() => newLine.ContentFlow.Where(d => d is OsuSpriteText).Cast<OsuSpriteText>().All(sprite => sprite.Font.FontName == "Exo2.0-MediumItalic");
bool isShowingLinks() bool isShowingLinks()
{ {

View File

@ -4,6 +4,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Screens.Menu; using osu.Game.Screens.Menu;
@ -22,7 +23,7 @@ namespace osu.Game.Tests.Visual
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Text = "Fired!", Text = "Fired!",
TextSize = 50, Font = OsuFont.GetFont(size: 50),
Alpha = 0, Alpha = 0,
}; };

View File

@ -41,7 +41,7 @@ namespace osu.Game.Tests.Visual
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
TextSize = 20, Font = OsuFont.GetFont(size: 20),
Text = @"Wave Container", Text = @"Wave Container",
}, },
}, },

View File

@ -4,6 +4,7 @@
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osuTK.Graphics; using osuTK.Graphics;
@ -31,8 +32,8 @@ namespace osu.Game.Beatmaps.Drawables
public float TextSize public float TextSize
{ {
get => statusText.TextSize; get => statusText.Font.Size;
set => statusText.TextSize = value; set => statusText.Font = OsuFont.GetFont(statusText.Font, size: value);
} }
public MarginPadding TextPadding public MarginPadding TextPadding
@ -58,7 +59,7 @@ namespace osu.Game.Beatmaps.Drawables
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Font = @"Exo2.0-Bold", Font = OsuFont.GetFont(weight: FontWeight.Bold)
}, },
}; };

View File

@ -46,8 +46,6 @@ namespace osu.Game.Graphics.Cursor
} }
} }
private const float text_size = 16;
public OsuTooltip() public OsuTooltip()
{ {
AutoSizeEasing = Easing.OutQuint; AutoSizeEasing = Easing.OutQuint;
@ -69,9 +67,7 @@ namespace osu.Game.Graphics.Cursor
}, },
text = new OsuSpriteText text = new OsuSpriteText
{ {
TextSize = text_size, Padding = new MarginPadding(5)
Padding = new MarginPadding(5),
Font = @"Exo2.0-Regular",
} }
}; };
} }

View File

@ -30,8 +30,7 @@ namespace osu.Game.Graphics
public DrawableDate(DateTimeOffset date) public DrawableDate(DateTimeOffset date)
{ {
Font = "Exo2.0-RegularItalic"; Font = OsuFont.GetFont(italics: true);
Date = date; Date = date;
} }

View File

@ -0,0 +1,71 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics.Sprites;
namespace osu.Game.Graphics
{
public struct OsuFont
{
public const float DEFAULT_FONT_SIZE = 16;
public static FontUsage Default => GetFont();
public static FontUsage GetFont(FontUsage usage, Typeface? typeface = null, float? size = null, FontWeight? weight = null, bool? italics = null, bool? fixedWidth = null)
{
string familyString = typeface != null ? getFamilyString(typeface.Value) : usage.Family;
string weightString = weight != null ? getWeightString(familyString, weight.Value) : usage.Weight;
return new FontUsage(usage, familyString, size, weightString, italics, fixedWidth);
}
public static FontUsage GetFont(Typeface typeface = Typeface.Exo, float size = DEFAULT_FONT_SIZE, FontWeight weight = FontWeight.Regular, bool italics = false, bool fixedWidth = false)
=> new FontUsage(getFamilyString(typeface), size, getWeightString(typeface, weight), italics, fixedWidth);
private static string getFamilyString(Typeface typeface)
{
switch (typeface)
{
case Typeface.Exo:
return "Exo2.0";
case Typeface.FontAwesome:
return "FontAwesome";
case Typeface.Venera:
return "Venera";
}
return null;
}
private static string getWeightString(Typeface typeface, FontWeight weight)
=> getWeightString(getFamilyString(typeface), weight);
private static string getWeightString(string family, FontWeight weight)
{
string weightString = weight.ToString();
// Only exo has an explicit "regular" weight, other fonts do not
if (family != "Exo2.0" && weight == FontWeight.Regular)
weightString = string.Empty;
return weightString;
}
}
public enum Typeface
{
Exo,
FontAwesome,
Venera,
}
public enum FontWeight
{
Light,
Regular,
Medium,
SemiBold,
Bold,
Black
}
}

View File

@ -9,12 +9,10 @@ namespace osu.Game.Graphics.Sprites
{ {
public class OsuSpriteText : SpriteText public class OsuSpriteText : SpriteText
{ {
public const float FONT_SIZE = 16;
public OsuSpriteText() public OsuSpriteText()
{ {
Shadow = true; Shadow = true;
TextSize = FONT_SIZE; Font = OsuFont.Default;
} }
} }

View File

@ -82,7 +82,7 @@ namespace osu.Game.Graphics.UserInterface
public BreadcrumbTabItem(T value) : base(value) public BreadcrumbTabItem(T value) : base(value)
{ {
Text.TextSize = 18; Text.Font = OsuFont.GetFont(Text.Font, size: 18);
Text.Margin = new MarginPadding { Vertical = 8 }; Text.Margin = new MarginPadding { Vertical = 8 };
Padding = new MarginPadding { Right = padding + item_chevron_size }; Padding = new MarginPadding { Right = padding + item_chevron_size };
Add(Chevron = new SpriteIcon Add(Chevron = new SpriteIcon

View File

@ -141,8 +141,7 @@ namespace osu.Game.Graphics.UserInterface
Text = Text, Text = Text,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
TextSize = 28, Font = OsuFont.GetFont(size: 28, weight: FontWeight.Bold),
Font = "Exo2.0-Bold",
Shadow = true, Shadow = true,
ShadowColour = new Color4(0, 0, 0, 0.1f), ShadowColour = new Color4(0, 0, 0, 0.1f),
Colour = Color4.White, Colour = Color4.White,
@ -197,18 +196,10 @@ namespace osu.Game.Graphics.UserInterface
} }
} }
private float textSize = 28;
public float TextSize public float TextSize
{ {
get get => spriteText.Font.Size;
{ set => spriteText.Font = OsuFont.GetFont(spriteText.Font, size: value);
return textSize;
}
set
{
textSize = value;
spriteText.TextSize = value;
}
} }
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => backgroundContainer.ReceivePositionalInputAt(screenSpacePos); public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => backgroundContainer.ReceivePositionalInputAt(screenSpacePos);

View File

@ -84,7 +84,7 @@ namespace osu.Game.Graphics.UserInterface
Depth = -1, Depth = -1,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Font = @"Exo2.0-Bold", Font = OsuFont.GetFont(weight: FontWeight.Bold)
}; };
} }
} }

View File

@ -149,7 +149,7 @@ namespace osu.Game.Graphics.UserInterface
{ {
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
TextSize = text_size, Font = OsuFont.GetFont(size: text_size),
Margin = new MarginPadding { Horizontal = margin_horizontal, Vertical = MARGIN_VERTICAL }, Margin = new MarginPadding { Horizontal = margin_horizontal, Vertical = MARGIN_VERTICAL },
}, },
BoldText = new OsuSpriteText BoldText = new OsuSpriteText
@ -158,8 +158,7 @@ namespace osu.Game.Graphics.UserInterface
Alpha = 0, Alpha = 0,
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
TextSize = text_size, Font = OsuFont.GetFont(size: text_size, weight: FontWeight.Bold),
Font = @"Exo2.0-Bold",
Margin = new MarginPadding { Horizontal = margin_horizontal, Vertical = MARGIN_VERTICAL }, Margin = new MarginPadding { Horizontal = margin_horizontal, Vertical = MARGIN_VERTICAL },
} }
}; };

View File

@ -159,7 +159,7 @@ namespace osu.Game.Graphics.UserInterface
Origin = Anchor.BottomLeft, Origin = Anchor.BottomLeft,
Anchor = Anchor.BottomLeft, Anchor = Anchor.BottomLeft,
Text = (value as IHasDescription)?.Description ?? (value as Enum)?.GetDescription() ?? value.ToString(), Text = (value as IHasDescription)?.Description ?? (value as Enum)?.GetDescription() ?? value.ToString(),
TextSize = 14, Font = OsuFont.GetFont(size: 14)
}, },
Bar = new Box Bar = new Box
{ {
@ -173,7 +173,7 @@ namespace osu.Game.Graphics.UserInterface
new HoverClickSounds() new HoverClickSounds()
}; };
Active.BindValueChanged(val => Text.Font = val ? @"Exo2.0-Bold" : @"Exo2.0", true); Active.BindValueChanged(val => Text.Font = OsuFont.GetFont(Text.Font, weight: val ? FontWeight.Bold : FontWeight.Regular), true);
} }
protected override void OnActivated() => fadeActive(); protected override void OnActivated() => fadeActive();

View File

@ -94,11 +94,7 @@ namespace osu.Game.Graphics.UserInterface
Direction = FillDirection.Horizontal, Direction = FillDirection.Horizontal,
Children = new Drawable[] Children = new Drawable[]
{ {
text = new OsuSpriteText text = new OsuSpriteText { Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold) },
{
TextSize = 14,
Font = @"Exo2.0-Bold",
},
icon = new SpriteIcon icon = new SpriteIcon
{ {
Size = new Vector2(14), Size = new Vector2(14),

View File

@ -24,7 +24,7 @@ namespace osu.Game.Graphics.UserInterface
protected override SpriteText CreatePlaceholder() => new OsuSpriteText protected override SpriteText CreatePlaceholder() => new OsuSpriteText
{ {
Font = @"Exo2.0-MediumItalic", Font = OsuFont.GetFont(weight: FontWeight.Medium, italics: true),
Colour = new Color4(180, 180, 180, 255), Colour = new Color4(180, 180, 180, 255),
Margin = new MarginPadding { Left = 2 }, Margin = new MarginPadding { Left = 2 },
}; };
@ -57,7 +57,7 @@ namespace osu.Game.Graphics.UserInterface
base.OnFocusLost(e); base.OnFocusLost(e);
} }
protected override Drawable GetDrawableCharacter(char c) => new OsuSpriteText { Text = c.ToString(), TextSize = CalculatedTextSize }; protected override Drawable GetDrawableCharacter(char c) => new OsuSpriteText { Text = c.ToString(), Font = OsuFont.GetFont(size: CalculatedTextSize) };
public virtual bool OnPressed(GlobalAction action) public virtual bool OnPressed(GlobalAction action)
{ {

View File

@ -45,7 +45,7 @@ namespace osu.Game.Graphics.UserInterface
Origin = Anchor.BottomLeft, Origin = Anchor.BottomLeft,
Anchor = Anchor.BottomLeft, Anchor = Anchor.BottomLeft,
Text = (value as Enum)?.GetDescription() ?? value.ToString(), Text = (value as Enum)?.GetDescription() ?? value.ToString(),
TextSize = 14, Font = OsuFont.GetFont(size: 14)
}, },
box = new Box box = new Box
{ {
@ -59,7 +59,7 @@ namespace osu.Game.Graphics.UserInterface
new HoverClickSounds() new HoverClickSounds()
}; };
Active.BindValueChanged(val => Text.Font = val ? @"Exo2.0-Bold" : @"Exo2.0", true); Active.BindValueChanged(val => Text.Font = OsuFont.GetFont(Text.Font, weight: val ? FontWeight.Bold : FontWeight.Regular), true);
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]

View File

@ -22,7 +22,7 @@ namespace osu.Game.Graphics.UserInterface
public PercentageCounter() public PercentageCounter()
{ {
DisplayedCountSpriteText.FixedWidth = true; DisplayedCountSpriteText.Font = OsuFont.GetFont(DisplayedCountSpriteText.Font, fixedWidth: true);
Current.Value = DisplayedCount = 1.0f; Current.Value = DisplayedCount = 1.0f;
} }

View File

@ -61,16 +61,11 @@ namespace osu.Game.Graphics.UserInterface
public abstract void Increment(T amount); public abstract void Increment(T amount);
private float textSize;
public float TextSize public float TextSize
{ {
get { return textSize; } get => DisplayedCountSpriteText.Font.Size;
set set => DisplayedCountSpriteText.Font = OsuFont.GetFont(DisplayedCountSpriteText.Font, size: value);
{
textSize = value;
DisplayedCountSpriteText.TextSize = value;
}
} }
public Color4 AccentColour public Color4 AccentColour
@ -86,10 +81,7 @@ namespace osu.Game.Graphics.UserInterface
{ {
Children = new Drawable[] Children = new Drawable[]
{ {
DisplayedCountSpriteText = new OsuSpriteText DisplayedCountSpriteText = new OsuSpriteText { Font = OsuFont.GetFont(Typeface.Venera) }
{
Font = @"Venera"
},
}; };
TextSize = 40; TextSize = 40;

View File

@ -28,7 +28,7 @@ namespace osu.Game.Graphics.UserInterface
/// <param name="leading">How many leading zeroes the counter will have.</param> /// <param name="leading">How many leading zeroes the counter will have.</param>
public ScoreCounter(uint leading = 0) public ScoreCounter(uint leading = 0)
{ {
DisplayedCountSpriteText.FixedWidth = true; DisplayedCountSpriteText.Font = OsuFont.GetFont(DisplayedCountSpriteText.Font, fixedWidth: true);
LeadingZeroes = leading; LeadingZeroes = leading;
} }

View File

@ -9,6 +9,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
@ -75,9 +76,7 @@ namespace osu.Game.Online.Leaderboards
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Font = @"Exo2.0-MediumItalic", Font = OsuFont.GetFont(size: 22, weight: FontWeight.Medium, italics: true),
TextSize = 22,
// ReSharper disable once ImpureMethodCallOnReadonlyValueField
Text = RankPosition.ToString(), Text = RankPosition.ToString(),
}, },
}, },
@ -137,8 +136,7 @@ namespace osu.Game.Online.Leaderboards
nameLabel = new OsuSpriteText nameLabel = new OsuSpriteText
{ {
Text = user.Username, Text = user.Username,
Font = @"Exo2.0-BoldItalic", Font = OsuFont.GetFont(size: 23, weight: FontWeight.Bold, italics: true)
TextSize = 23,
}, },
new FillFlowContainer new FillFlowContainer
{ {
@ -187,7 +185,7 @@ namespace osu.Game.Online.Leaderboards
Spacing = new Vector2(5f, 0f), Spacing = new Vector2(5f, 0f),
Children = new Drawable[] Children = new Drawable[]
{ {
scoreLabel = new GlowingSpriteText(score.TotalScore.ToString(@"N0"), @"Venera", 23, Color4.White, OsuColour.FromHex(@"83ccfa")), scoreLabel = new GlowingSpriteText(score.TotalScore.ToString(@"N0"), OsuFont.GetFont(Typeface.Venera, 23), Color4.White, OsuColour.FromHex(@"83ccfa")),
RankContainer = new Container RankContainer = new Container
{ {
Size = new Vector2(40f, 20f), Size = new Vector2(40f, 20f),
@ -275,7 +273,7 @@ namespace osu.Game.Online.Leaderboards
private class GlowingSpriteText : Container private class GlowingSpriteText : Container
{ {
public GlowingSpriteText(string text, string font, int textSize, Color4 textColour, Color4 glowColour) public GlowingSpriteText(string text, FontUsage font, Color4 textColour, Color4 glowColour)
{ {
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
@ -296,9 +294,7 @@ namespace osu.Game.Online.Leaderboards
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Font = font, Font = OsuFont.GetFont(font, fixedWidth: true),
FixedWidth = true,
TextSize = textSize,
Text = text, Text = text,
Colour = glowColour, Colour = glowColour,
Shadow = false, Shadow = false,
@ -309,9 +305,7 @@ namespace osu.Game.Online.Leaderboards
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Font = font, Font = OsuFont.GetFont(font, fixedWidth: true),
FixedWidth = true,
TextSize = textSize,
Text = text, Text = text,
Colour = textColour, Colour = textColour,
Shadow = false, Shadow = false,
@ -369,7 +363,7 @@ namespace osu.Game.Online.Leaderboards
}, },
}, },
}, },
new GlowingSpriteText(statistic.Value, @"Exo2.0-Bold", 17, Color4.White, OsuColour.FromHex(@"83ccfa")) new GlowingSpriteText(statistic.Value, OsuFont.GetFont(size: 17, weight: FontWeight.Bold), Color4.White, OsuColour.FromHex(@"83ccfa"))
{ {
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,

View File

@ -14,7 +14,7 @@ namespace osu.Game.Online.Leaderboards
{ {
AddIcon(FontAwesome.fa_exclamation_circle, cp => AddIcon(FontAwesome.fa_exclamation_circle, cp =>
{ {
cp.TextSize = TEXT_SIZE; cp.Font = OsuFont.GetFont(cp.Font, size: TEXT_SIZE);
cp.Padding = new MarginPadding { Right = 10 }; cp.Padding = new MarginPadding { Right = 10 };
}); });

View File

@ -3,6 +3,7 @@
using System; using System;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
namespace osu.Game.Online.Leaderboards namespace osu.Game.Online.Leaderboards
@ -12,7 +13,7 @@ namespace osu.Game.Online.Leaderboards
protected const float TEXT_SIZE = 22; protected const float TEXT_SIZE = 22;
protected Placeholder() protected Placeholder()
: base(cp => cp.TextSize = TEXT_SIZE) : base(cp => cp.Font = OsuFont.GetFont(cp.Font, size: TEXT_SIZE))
{ {
Anchor = Anchor.Centre; Anchor = Anchor.Centre;
Origin = Anchor.Centre; Origin = Anchor.Centre;

View File

@ -3,6 +3,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osuTK.Graphics; using osuTK.Graphics;
@ -13,7 +14,7 @@ namespace osu.Game.Overlays.AccountCreation
private readonly List<Drawable> errorDrawables = new List<Drawable>(); private readonly List<Drawable> errorDrawables = new List<Drawable>();
public ErrorTextFlowContainer() public ErrorTextFlowContainer()
: base(cp => { cp.TextSize = 12; }) : base(cp => cp.Font = OsuFont.GetFont(cp.Font, size: 12))
{ {
} }

View File

@ -61,10 +61,10 @@ namespace osu.Game.Overlays.AccountCreation
{ {
new OsuSpriteText new OsuSpriteText
{ {
TextSize = 20,
Margin = new MarginPadding { Vertical = 10 }, Margin = new MarginPadding { Vertical = 10 },
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Font = OsuFont.GetFont(size: 20),
Text = "Let's create an account!", Text = "Let's create an account!",
}, },
usernameTextBox = new OsuTextBox usernameTextBox = new OsuTextBox
@ -129,7 +129,7 @@ namespace osu.Game.Overlays.AccountCreation
usernameDescription.AddText("This will be your public presence. No profanity, no impersonation. Avoid exposing your own personal details, too!"); usernameDescription.AddText("This will be your public presence. No profanity, no impersonation. Avoid exposing your own personal details, too!");
emailAddressDescription.AddText("Will be used for notifications, account verification and in the case you forget your password. No spam, ever."); emailAddressDescription.AddText("Will be used for notifications, account verification and in the case you forget your password. No spam, ever.");
emailAddressDescription.AddText(" Make sure to get it right!", cp => cp.Font = "Exo2.0-Bold"); emailAddressDescription.AddText(" Make sure to get it right!", cp => cp.Font = OsuFont.GetFont(cp.Font, weight: FontWeight.Bold));
passwordDescription.AddText("At least "); passwordDescription.AddText("At least ");
characterCheckText = passwordDescription.AddText("8 characters long"); characterCheckText = passwordDescription.AddText("8 characters long");

View File

@ -83,14 +83,13 @@ namespace osu.Game.Overlays.AccountCreation
}, },
new OsuSpriteText new OsuSpriteText
{ {
TextSize = 28,
Font = "Exo2.0-Light",
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Colour = Color4.Red, Colour = Color4.Red,
Font = OsuFont.GetFont(size: 28, weight: FontWeight.Light),
Text = "Warning! 注意!", Text = "Warning! 注意!",
}, },
multiAccountExplanationText = new OsuTextFlowContainer(cp => { cp.TextSize = 12; }) multiAccountExplanationText = new OsuTextFlowContainer(cp => cp.Font = OsuFont.GetFont(cp.Font, size: 12))
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y AutoSizeAxes = Axes.Y
@ -106,7 +105,7 @@ namespace osu.Game.Overlays.AccountCreation
Text = "I understand. This account isn't for me.", Text = "I understand. This account isn't for me.",
Action = () => this.Push(new ScreenEntry()) Action = () => this.Push(new ScreenEntry())
}, },
furtherAssistance = new LinkFlowContainer(cp => { cp.TextSize = 12; }) furtherAssistance = new LinkFlowContainer(cp => cp.Font = OsuFont.GetFont(cp.Font, size: 12))
{ {
Margin = new MarginPadding { Top = 20 }, Margin = new MarginPadding { Top = 20 },
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,

View File

@ -5,6 +5,7 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Screens; using osu.Framework.Screens;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Overlays.Settings; using osu.Game.Overlays.Settings;
using osu.Game.Screens.Menu; using osu.Game.Screens.Menu;
@ -40,17 +41,16 @@ namespace osu.Game.Overlays.AccountCreation
}, },
new OsuSpriteText new OsuSpriteText
{ {
TextSize = 24,
Font = "Exo2.0-Light",
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Font = OsuFont.GetFont(size: 24, weight: FontWeight.Light),
Text = "New Player Registration", Text = "New Player Registration",
}, },
new OsuSpriteText new OsuSpriteText
{ {
TextSize = 12,
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Font = OsuFont.GetFont(size: 12),
Text = "let's get you started", Text = "let's get you started",
}, },
new SettingsButton new SettingsButton

View File

@ -11,6 +11,8 @@ using osuTK;
using osuTK.Graphics; using osuTK.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
namespace osu.Game.Overlays.BeatmapSet namespace osu.Game.Overlays.BeatmapSet
{ {
@ -47,8 +49,8 @@ namespace osu.Game.Overlays.BeatmapSet
fields.Children = new Drawable[] fields.Children = new Drawable[]
{ {
new Field("mapped by", BeatmapSet.Metadata.Author.Username, @"Exo2.0-RegularItalic"), new Field("mapped by", BeatmapSet.Metadata.Author.Username, OsuFont.GetFont(italics: true)),
new Field("submitted on", online.Submitted.ToString(@"MMMM d, yyyy"), @"Exo2.0-Bold") new Field("submitted on", online.Submitted.ToString(@"MMMM d, yyyy"), OsuFont.GetFont(weight: FontWeight.Bold))
{ {
Margin = new MarginPadding { Top = 5 }, Margin = new MarginPadding { Top = 5 },
}, },
@ -56,11 +58,11 @@ namespace osu.Game.Overlays.BeatmapSet
if (online.Ranked.HasValue) if (online.Ranked.HasValue)
{ {
fields.Add(new Field("ranked on", online.Ranked.Value.ToString(@"MMMM d, yyyy"), @"Exo2.0-Bold")); fields.Add(new Field("ranked on", online.Ranked.Value.ToString(@"MMMM d, yyyy"), OsuFont.GetFont(weight: FontWeight.Bold)));
} }
else if (online.LastUpdated.HasValue) else if (online.LastUpdated.HasValue)
{ {
fields.Add(new Field("last updated on", online.LastUpdated.Value.ToString(@"MMMM d, yyyy"), @"Exo2.0-Bold")); fields.Add(new Field("last updated on", online.LastUpdated.Value.ToString(@"MMMM d, yyyy"), OsuFont.GetFont(weight: FontWeight.Bold)));
} }
} }
@ -105,7 +107,7 @@ namespace osu.Game.Overlays.BeatmapSet
private class Field : FillFlowContainer private class Field : FillFlowContainer
{ {
public Field(string first, string second, string secondFont) public Field(string first, string second, FontUsage secondFont)
{ {
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
Direction = FillDirection.Horizontal; Direction = FillDirection.Horizontal;
@ -115,13 +117,12 @@ namespace osu.Game.Overlays.BeatmapSet
new OsuSpriteText new OsuSpriteText
{ {
Text = $"{first} ", Text = $"{first} ",
TextSize = 13, Font = OsuFont.GetFont(size: 13)
}, },
new OsuSpriteText new OsuSpriteText
{ {
Text = second, Text = second,
TextSize = 13, Font = OsuFont.GetFont(secondFont, size: 13)
Font = secondFont,
}, },
}; };
} }

View File

@ -136,9 +136,8 @@ namespace osu.Game.Overlays.BeatmapSet
{ {
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
TextSize = 13,
Font = @"Exo2.0-Bold",
Margin = new MarginPadding { Left = 10 }, Margin = new MarginPadding { Left = 10 },
Font = OsuFont.GetFont(size: 13, weight: FontWeight.Bold),
}, },
}, },
}, },

View File

@ -107,15 +107,13 @@ namespace osu.Game.Overlays.BeatmapSet
{ {
Anchor = Anchor.BottomLeft, Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft, Origin = Anchor.BottomLeft,
TextSize = 20, Font = OsuFont.GetFont(size: 20, weight: FontWeight.Bold)
Font = @"Exo2.0-Bold",
}, },
starRating = new OsuSpriteText starRating = new OsuSpriteText
{ {
Anchor = Anchor.BottomLeft, Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft, Origin = Anchor.BottomLeft,
TextSize = 13, Font = OsuFont.GetFont(size: 13, weight: FontWeight.Bold),
Font = @"Exo2.0-Bold",
Text = "Star Difficulty", Text = "Star Difficulty",
Alpha = 0, Alpha = 0,
Margin = new MarginPadding { Bottom = 1 }, Margin = new MarginPadding { Bottom = 1 },
@ -309,8 +307,7 @@ namespace osu.Game.Overlays.BeatmapSet
{ {
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
Font = @"Exo2.0-SemiBoldItalic", Font = OsuFont.GetFont(size: 14, weight: FontWeight.SemiBold, italics: true)
TextSize = 14,
}, },
}; };
} }

View File

@ -118,8 +118,7 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
new OsuSpriteText new OsuSpriteText
{ {
Text = "Downloading...", Text = "Downloading...",
TextSize = 13, Font = OsuFont.GetFont(size: 13, weight: FontWeight.Bold)
Font = @"Exo2.0-Bold",
}, },
}; };
break; break;
@ -129,8 +128,7 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
new OsuSpriteText new OsuSpriteText
{ {
Text = "Importing...", Text = "Importing...",
TextSize = 13, Font = OsuFont.GetFont(size: 13, weight: FontWeight.Bold)
Font = @"Exo2.0-Bold",
}, },
}; };
break; break;
@ -143,14 +141,12 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
new OsuSpriteText new OsuSpriteText
{ {
Text = "Download", Text = "Download",
TextSize = 13, Font = OsuFont.GetFont(size: 13, weight: FontWeight.Bold)
Font = @"Exo2.0-Bold",
}, },
new OsuSpriteText new OsuSpriteText
{ {
Text = BeatmapSet.Value.OnlineInfo.HasVideo && noVideo ? "without Video" : string.Empty, Text = BeatmapSet.Value.OnlineInfo.HasVideo && noVideo ? "without Video" : string.Empty,
TextSize = 11, Font = OsuFont.GetFont(size: 11, weight: FontWeight.Bold)
Font = @"Exo2.0-Bold",
}, },
}; };
this.FadeIn(200); this.FadeIn(200);

View File

@ -115,8 +115,7 @@ namespace osu.Game.Overlays.BeatmapSet
{ {
title = new OsuSpriteText title = new OsuSpriteText
{ {
Font = @"Exo2.0-BoldItalic", Font = OsuFont.GetFont(size: 37, weight: FontWeight.Bold, italics: true)
TextSize = 37,
}, },
externalLink = new ExternalLinkButton externalLink = new ExternalLinkButton
{ {
@ -126,11 +125,7 @@ namespace osu.Game.Overlays.BeatmapSet
}, },
} }
}, },
artist = new OsuSpriteText artist = new OsuSpriteText { Font = OsuFont.GetFont(size: 25, weight: FontWeight.SemiBold, italics: true) },
{
Font = @"Exo2.0-SemiBoldItalic",
TextSize = 25,
},
new Container new Container
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,

View File

@ -156,7 +156,7 @@ namespace osu.Game.Overlays.BeatmapSet
this.FadeIn(transition_duration); this.FadeIn(transition_duration);
textFlow.Clear(); textFlow.Clear();
textFlow.AddText(value, s => s.TextSize = 14); textFlow.AddText(value, s => s.Font = OsuFont.GetFont(s.Font, size: 14));
} }
} }
@ -177,8 +177,7 @@ namespace osu.Game.Overlays.BeatmapSet
header = new OsuSpriteText header = new OsuSpriteText
{ {
Text = title, Text = title,
Font = @"Exo2.0-Bold", Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold),
TextSize = 14,
Shadow = false, Shadow = false,
Margin = new MarginPadding { Top = 20 }, Margin = new MarginPadding { Top = 20 },
}, },

View File

@ -4,6 +4,7 @@
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Users; using osu.Game.Users;
@ -30,21 +31,14 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
public float TextSize public float TextSize
{ {
set get => text.Font.Size;
{ set => text.Font = OsuFont.GetFont(text.Font, size: value);
if (text.TextSize == value) return;
text.TextSize = value;
}
get { return text.TextSize; }
} }
public ClickableUsername() public ClickableUsername()
{ {
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
Child = text = new OsuSpriteText Child = text = new OsuSpriteText { Font = OsuFont.GetFont(weight: FontWeight.Bold, italics: true) };
{
Font = @"Exo2.0-BoldItalic",
};
} }
[BackgroundDependencyLoader(true)] [BackgroundDependencyLoader(true)]

View File

@ -46,7 +46,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
Text = $"#{index + 1}", Text = $"#{index + 1}",
Font = @"Exo2.0-RegularItalic", Font = OsuFont.GetFont(italics: true),
Margin = new MarginPadding { Left = side_margin } Margin = new MarginPadding { Left = side_margin }
}, },
new DrawableFlag(score.User.Country) new DrawableFlag(score.User.Country)
@ -87,17 +87,16 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreRight, Origin = Anchor.CentreRight,
Text = $@"{score.TotalScore:N0}", Text = $@"{score.TotalScore:N0}",
Font = @"Venera", Font = OsuFont.GetFont(Typeface.Venera, fixedWidth: true),
RelativePositionAxes = Axes.X, RelativePositionAxes = Axes.X,
X = 0.75f, X = 0.75f,
FixedWidth = true,
}, },
new OsuSpriteText new OsuSpriteText
{ {
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreRight, Origin = Anchor.CentreRight,
Text = $@"{score.Accuracy:P2}", Text = $@"{score.Accuracy:P2}",
Font = @"Exo2.0-RegularItalic", Font = OsuFont.GetFont(italics: true),
RelativePositionAxes = Axes.X, RelativePositionAxes = Axes.X,
X = 0.85f X = 0.85f
}, },
@ -106,7 +105,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
Anchor = Anchor.CentreRight, Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight, Origin = Anchor.CentreRight,
Text = $"{score.Statistics[HitResult.Great]}/{score.Statistics[HitResult.Good]}/{score.Statistics[HitResult.Meh]}", Text = $"{score.Statistics[HitResult.Great]}/{score.Statistics[HitResult.Good]}/{score.Statistics[HitResult.Meh]}",
Font = @"Exo2.0-RegularItalic", Font = OsuFont.GetFont(italics: true),
Margin = new MarginPadding { Right = side_margin } Margin = new MarginPadding { Right = side_margin }
}, },
}; };

View File

@ -117,8 +117,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
Anchor = Anchor.TopRight, Anchor = Anchor.TopRight,
Origin = Anchor.BottomRight, Origin = Anchor.BottomRight,
Text = "#1", Text = "#1",
TextSize = 40, Font = OsuFont.GetFont(size: 40, weight: FontWeight.Bold, italics: true),
Font = @"Exo2.0-BoldItalic",
Y = height / 4, Y = height / 4,
Margin = new MarginPadding { Right = margin } Margin = new MarginPadding { Right = margin }
}, },
@ -222,15 +221,10 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
{ {
headerText = new OsuSpriteText headerText = new OsuSpriteText
{ {
TextSize = 14,
Text = header, Text = header,
Font = @"Exo2.0-Bold", Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold)
}, },
valueText = new OsuSpriteText valueText = new OsuSpriteText { Font = OsuFont.GetFont(size: 25, italics: true) }
{
TextSize = 25,
Font = @"Exo2.0-RegularItalic",
}
}; };
} }

View File

@ -62,7 +62,7 @@ namespace osu.Game.Overlays.BeatmapSet
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Text = "Success Rate", Text = "Success Rate",
TextSize = 13, Font = OsuFont.GetFont(size: 13)
}, },
successRate = new Bar successRate = new Bar
{ {
@ -79,7 +79,7 @@ namespace osu.Game.Overlays.BeatmapSet
{ {
Anchor = Anchor.TopRight, Anchor = Anchor.TopRight,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
TextSize = 13, Font = OsuFont.GetFont(size: 13),
}, },
}, },
graphLabel = new OsuSpriteText graphLabel = new OsuSpriteText
@ -87,7 +87,7 @@ namespace osu.Game.Overlays.BeatmapSet
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Text = "Points of Failure", Text = "Points of Failure",
TextSize = 13, Font = OsuFont.GetFont(size: 13),
Margin = new MarginPadding { Vertical = 20 }, Margin = new MarginPadding { Vertical = 20 },
}, },
}, },

View File

@ -87,9 +87,8 @@ namespace osu.Game.Overlays.Chat
Drawable effectedUsername = username = new OsuSpriteText Drawable effectedUsername = username = new OsuSpriteText
{ {
Font = @"Exo2.0-BoldItalic",
Colour = hasBackground ? customUsernameColour : username_colours[message.Sender.Id % username_colours.Length], Colour = hasBackground ? customUsernameColour : username_colours[message.Sender.Id % username_colours.Length],
TextSize = TextSize, Font = OsuFont.GetFont(size: TextSize, weight: FontWeight.Bold, italics: true)
}; };
if (hasBackground) if (hasBackground)
@ -138,9 +137,7 @@ namespace osu.Game.Overlays.Chat
{ {
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
Font = @"Exo2.0-SemiBold", Font = OsuFont.GetFont(size: TextSize * 0.75f, weight: FontWeight.Bold, fixedWidth: true)
FixedWidth = true,
TextSize = TextSize * 0.75f,
}, },
new MessageSender(message.Sender) new MessageSender(message.Sender)
{ {
@ -162,13 +159,13 @@ namespace osu.Game.Overlays.Chat
{ {
if (Message.IsAction) if (Message.IsAction)
{ {
t.Font = @"Exo2.0-MediumItalic"; t.Font = OsuFont.GetFont(weight: FontWeight.Medium, italics: true);
if (senderHasBackground) if (senderHasBackground)
t.Colour = OsuColour.FromHex(message.Sender.Colour); t.Colour = OsuColour.FromHex(message.Sender.Colour);
} }
t.TextSize = TextSize; t.Font = OsuFont.GetFont(t.Font, size: TextSize);
}) })
{ {
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,

View File

@ -89,8 +89,7 @@ namespace osu.Game.Overlays.Chat.Selection
name = new OsuSpriteText name = new OsuSpriteText
{ {
Text = channel.ToString(), Text = channel.ToString(),
TextSize = text_size, Font = OsuFont.GetFont(size: text_size, weight: FontWeight.Bold),
Font = @"Exo2.0-Bold",
Shadow = false, Shadow = false,
}, },
}, },
@ -106,8 +105,7 @@ namespace osu.Game.Overlays.Chat.Selection
topic = new OsuSpriteText topic = new OsuSpriteText
{ {
Text = channel.Topic, Text = channel.Topic,
TextSize = text_size, Font = OsuFont.GetFont(size: text_size, weight: FontWeight.SemiBold),
Font = @"Exo2.0-SemiBold",
Shadow = false, Shadow = false,
}, },
}, },
@ -130,8 +128,7 @@ namespace osu.Game.Overlays.Chat.Selection
new OsuSpriteText new OsuSpriteText
{ {
Text = @"0", Text = @"0",
TextSize = text_size, Font = OsuFont.GetFont(size: text_size, weight: FontWeight.SemiBold),
Font = @"Exo2.0-SemiBold",
Shadow = false, Shadow = false,
}, },
}, },

View File

@ -7,6 +7,7 @@ using System.Linq;
using osuTK; using osuTK;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Online.Chat; using osu.Game.Online.Chat;
@ -48,8 +49,7 @@ namespace osu.Game.Overlays.Chat.Selection
{ {
header = new OsuSpriteText header = new OsuSpriteText
{ {
TextSize = 15, Font = OsuFont.GetFont(size: 15, weight: FontWeight.Bold),
Font = @"Exo2.0-Bold",
}, },
ChannelFlow = new FillFlowContainer<ChannelListItem> ChannelFlow = new FillFlowContainer<ChannelListItem>
{ {

View File

@ -110,7 +110,7 @@ namespace osu.Game.Overlays.Chat.Selection
new OsuSpriteText new OsuSpriteText
{ {
Text = @"Chat Channels", Text = @"Chat Channels",
TextSize = 20, Font = OsuFont.GetFont(size: 20),
Shadow = false, Shadow = false,
}, },
search = new HeaderSearchTextBox search = new HeaderSearchTextBox

View File

@ -20,8 +20,8 @@ namespace osu.Game.Overlays.Chat.Tabs
Icon.Alpha = 0; Icon.Alpha = 0;
Text.TextSize = 45; Text.Font = OsuFont.GetFont(Text.Font, size: 45);
TextBold.TextSize = 45; TextBold.Font = OsuFont.GetFont(Text.Font, size: 45);
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]

View File

@ -90,7 +90,7 @@ namespace osu.Game.Overlays.Chat.Tabs
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Text = value.ToString(), Text = value.ToString(),
TextSize = 18, Font = OsuFont.GetFont(size: 18)
}, },
TextBold = new OsuSpriteText TextBold = new OsuSpriteText
{ {
@ -99,8 +99,7 @@ namespace osu.Game.Overlays.Chat.Tabs
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Text = value.ToString(), Text = value.ToString(),
Font = @"Exo2.0-Bold", Font = OsuFont.GetFont(size: 18, weight: FontWeight.Bold)
TextSize = 18,
}, },
CloseButton = new TabCloseButton CloseButton = new TabCloseButton
{ {

View File

@ -171,7 +171,7 @@ namespace osu.Game.Overlays.Dialog
}, },
}, },
}, },
header = new OsuTextFlowContainer(t => t.TextSize = 25) header = new OsuTextFlowContainer(t => t.Font = OsuFont.GetFont(t.Font, size: 25))
{ {
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
@ -180,7 +180,7 @@ namespace osu.Game.Overlays.Dialog
Padding = new MarginPadding(15), Padding = new MarginPadding(15),
TextAnchor = Anchor.TopCentre, TextAnchor = Anchor.TopCentre,
}, },
body = new OsuTextFlowContainer(t => t.TextSize = 18) body = new OsuTextFlowContainer(t => t.Font = OsuFont.GetFont(t.Font, size: 18))
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,

View File

@ -75,13 +75,12 @@ namespace osu.Game.Overlays.Direct
new OsuSpriteText new OsuSpriteText
{ {
Text = new LocalisedString((SetInfo.Metadata.TitleUnicode, SetInfo.Metadata.Title)), Text = new LocalisedString((SetInfo.Metadata.TitleUnicode, SetInfo.Metadata.Title)),
TextSize = 18, Font = OsuFont.GetFont(size: 18, weight: FontWeight.Bold, italics: true)
Font = @"Exo2.0-BoldItalic",
}, },
new OsuSpriteText new OsuSpriteText
{ {
Text = new LocalisedString((SetInfo.Metadata.ArtistUnicode, SetInfo.Metadata.Artist)), Text = new LocalisedString((SetInfo.Metadata.ArtistUnicode, SetInfo.Metadata.Artist)),
Font = @"Exo2.0-BoldItalic", Font = OsuFont.GetFont(weight: FontWeight.Bold, italics: true)
}, },
}, },
}, },
@ -127,15 +126,14 @@ namespace osu.Game.Overlays.Direct
new OsuSpriteText new OsuSpriteText
{ {
Text = "mapped by ", Text = "mapped by ",
TextSize = 14, Font = OsuFont.GetFont(size: 14),
Shadow = false, Shadow = false,
Colour = colours.Gray5, Colour = colours.Gray5,
}, },
new OsuSpriteText new OsuSpriteText
{ {
Text = SetInfo.Metadata.Author.Username, Text = SetInfo.Metadata.Author.Username,
TextSize = 14, Font = OsuFont.GetFont(size: 14, weight: FontWeight.SemiBold, italics: true),
Font = @"Exo2.0-SemiBoldItalic",
Shadow = false, Shadow = false,
Colour = colours.BlueDark, Colour = colours.BlueDark,
}, },
@ -150,7 +148,7 @@ namespace osu.Game.Overlays.Direct
new OsuSpriteText new OsuSpriteText
{ {
Text = SetInfo.Metadata.Source, Text = SetInfo.Metadata.Source,
TextSize = 14, Font = OsuFont.GetFont(size: 14),
Shadow = false, Shadow = false,
Colour = colours.Gray5, Colour = colours.Gray5,
Alpha = string.IsNullOrEmpty(SetInfo.Metadata.Source) ? 0f : 1f, Alpha = string.IsNullOrEmpty(SetInfo.Metadata.Source) ? 0f : 1f,

View File

@ -95,13 +95,12 @@ namespace osu.Game.Overlays.Direct
new OsuSpriteText new OsuSpriteText
{ {
Text = new LocalisedString((SetInfo.Metadata.TitleUnicode, SetInfo.Metadata.Title)), Text = new LocalisedString((SetInfo.Metadata.TitleUnicode, SetInfo.Metadata.Title)),
TextSize = 18, Font = OsuFont.GetFont(size: 18, weight: FontWeight.Bold, italics: true)
Font = @"Exo2.0-BoldItalic",
}, },
new OsuSpriteText new OsuSpriteText
{ {
Text = new LocalisedString((SetInfo.Metadata.ArtistUnicode, SetInfo.Metadata.Artist)), Text = new LocalisedString((SetInfo.Metadata.ArtistUnicode, SetInfo.Metadata.Artist)),
Font = @"Exo2.0-BoldItalic", Font = OsuFont.GetFont(weight: FontWeight.Bold, italics: true)
}, },
} }
}, },
@ -161,13 +160,12 @@ namespace osu.Game.Overlays.Direct
new OsuSpriteText new OsuSpriteText
{ {
Text = "mapped by ", Text = "mapped by ",
TextSize = 14, Font = OsuFont.GetFont(size: 14)
}, },
new OsuSpriteText new OsuSpriteText
{ {
Text = SetInfo.Metadata.Author.Username, Text = SetInfo.Metadata.Author.Username,
TextSize = 14, Font = OsuFont.GetFont(size: 14, weight: FontWeight.SemiBold, italics: true)
Font = @"Exo2.0-SemiBoldItalic",
}, },
}, },
}, },
@ -176,7 +174,7 @@ namespace osu.Game.Overlays.Direct
Text = SetInfo.Metadata.Source, Text = SetInfo.Metadata.Source,
Anchor = Anchor.TopRight, Anchor = Anchor.TopRight,
Origin = Anchor.TopRight, Origin = Anchor.TopRight,
TextSize = 14, Font = OsuFont.GetFont(size: 14),
Alpha = string.IsNullOrEmpty(SetInfo.Metadata.Source) ? 0f : 1f, Alpha = string.IsNullOrEmpty(SetInfo.Metadata.Source) ? 0f : 1f,
}, },
}, },

View File

@ -173,10 +173,7 @@ namespace osu.Game.Overlays.Direct
Children = new Drawable[] Children = new Drawable[]
{ {
text = new OsuSpriteText text = new OsuSpriteText { Font = OsuFont.GetFont(weight: FontWeight.SemiBold, italics: true) },
{
Font = @"Exo2.0-SemiBoldItalic",
},
new SpriteIcon new SpriteIcon
{ {
Icon = icon, Icon = icon,

View File

@ -15,7 +15,7 @@ namespace osu.Game.Overlays.Direct
protected override Color4 BackgroundColour => OsuColour.FromHex(@"252f3a"); protected override Color4 BackgroundColour => OsuColour.FromHex(@"252f3a");
protected override DirectTab DefaultTab => DirectTab.Search; protected override DirectTab DefaultTab => DirectTab.Search;
protected override Drawable CreateHeaderText() => new OsuSpriteText { Text = @"osu!direct", TextSize = 25 }; protected override Drawable CreateHeaderText() => new OsuSpriteText { Text = @"osu!direct", Font = OsuFont.GetFont(size: 25) };
protected override FontAwesome Icon => FontAwesome.fa_osu_chevron_down_o; protected override FontAwesome Icon => FontAwesome.fa_osu_chevron_down_o;
public Header() public Header()

View File

@ -105,12 +105,11 @@ namespace osu.Game.Overlays
new OsuSpriteText new OsuSpriteText
{ {
Text = "Found ", Text = "Found ",
TextSize = 15, Font = OsuFont.GetFont(size: 15)
}, },
resultCountsText = new OsuSpriteText resultCountsText = new OsuSpriteText
{ {
TextSize = 15, Font = OsuFont.GetFont(size: 15, weight: FontWeight.Bold)
Font = @"Exo2.0-Bold",
}, },
} }
}, },

View File

@ -349,8 +349,7 @@ namespace osu.Game.Overlays.KeyBinding
}, },
Text = new OsuSpriteText Text = new OsuSpriteText
{ {
Font = "Venera", Font = OsuFont.GetFont(Typeface.Venera, 10),
TextSize = 10,
Margin = new MarginPadding(5), Margin = new MarginPadding(5),
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,

View File

@ -73,8 +73,7 @@ namespace osu.Game.Overlays
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Y = 15, Y = 15,
TextSize = 12, Font = OsuFont.GetFont(size: 12, weight: FontWeight.Bold),
Font = @"Exo2.0-Bold",
Text = @"back", Text = @"back",
}, },
} }

View File

@ -63,8 +63,7 @@ namespace osu.Game.Overlays.MedalSplash
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Text = "Medal Unlocked".ToUpperInvariant(), Text = "Medal Unlocked".ToUpperInvariant(),
TextSize = 24, Font = OsuFont.GetFont(size: 24, weight: FontWeight.Light),
Font = @"Exo2.0-Light",
Alpha = 0f, Alpha = 0f,
Scale = new Vector2(1f / scale_when_unlocked), Scale = new Vector2(1f / scale_when_unlocked),
}, },
@ -84,8 +83,7 @@ namespace osu.Game.Overlays.MedalSplash
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Text = medal.Name, Text = medal.Name,
TextSize = 20, Font = OsuFont.GetFont(size: 20, weight: FontWeight.Bold),
Font = @"Exo2.0-Bold",
Alpha = 0f, Alpha = 0f,
Scale = new Vector2(1f / scale_when_full), Scale = new Vector2(1f / scale_when_full),
}, },
@ -107,7 +105,7 @@ namespace osu.Game.Overlays.MedalSplash
{ {
s.Anchor = Anchor.TopCentre; s.Anchor = Anchor.TopCentre;
s.Origin = Anchor.TopCentre; s.Origin = Anchor.TopCentre;
s.TextSize = 16; s.Font = OsuFont.GetFont(s.Font, size: 16);
}); });
medalContainer.OnLoadComplete = d => medalContainer.OnLoadComplete = d =>

View File

@ -14,6 +14,7 @@ using System;
using System.Linq; using System.Linq;
using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Cursor;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Mods namespace osu.Game.Overlays.Mods
@ -275,7 +276,7 @@ namespace osu.Game.Overlays.Mods
Y = 75, Y = 75,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
TextSize = 18, Font = OsuFont.GetFont(size: 18)
}, },
new HoverClickSounds() new HoverClickSounds()
}; };

View File

@ -11,6 +11,7 @@ using System;
using System.Linq; using System.Linq;
using System.Collections.Generic; using System.Collections.Generic;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Game.Graphics;
namespace osu.Game.Overlays.Mods namespace osu.Game.Overlays.Mods
{ {
@ -123,7 +124,7 @@ namespace osu.Game.Overlays.Mods
Origin = Anchor.TopLeft, Origin = Anchor.TopLeft,
Anchor = Anchor.TopLeft, Anchor = Anchor.TopLeft,
Position = new Vector2(0f, 0f), Position = new Vector2(0f, 0f),
Font = @"Exo2.0-Bold" Font = OsuFont.GetFont(weight: FontWeight.Bold)
}, },
ButtonsContainer = new FillFlowContainer<ModButtonEmpty> ButtonsContainer = new FillFlowContainer<ModButtonEmpty>
{ {

View File

@ -264,9 +264,8 @@ namespace osu.Game.Overlays.Mods
{ {
new OsuSpriteText new OsuSpriteText
{ {
Font = @"Exo2.0-Bold",
Text = @"Gameplay Mods", Text = @"Gameplay Mods",
TextSize = 22, Font = OsuFont.GetFont(size: 22, weight: FontWeight.Bold),
Shadow = true, Shadow = true,
Margin = new MarginPadding Margin = new MarginPadding
{ {
@ -275,7 +274,7 @@ namespace osu.Game.Overlays.Mods
}, },
new OsuTextFlowContainer(text => new OsuTextFlowContainer(text =>
{ {
text.TextSize = 18; text.Font = OsuFont.GetFont(text.Font, size: 18);
text.Shadow = true; text.Shadow = true;
}) })
{ {
@ -365,7 +364,7 @@ namespace osu.Game.Overlays.Mods
new OsuSpriteText new OsuSpriteText
{ {
Text = @"Score Multiplier:", Text = @"Score Multiplier:",
TextSize = 30, Font = OsuFont.GetFont(size: 30),
Margin = new MarginPadding Margin = new MarginPadding
{ {
Top = 5, Top = 5,
@ -374,8 +373,7 @@ namespace osu.Game.Overlays.Mods
}, },
MultiplierLabel = new OsuSpriteText MultiplierLabel = new OsuSpriteText
{ {
Font = @"Exo2.0-Bold", Font = OsuFont.GetFont(size: 30, weight: FontWeight.Bold),
TextSize = 30,
Margin = new MarginPadding Margin = new MarginPadding
{ {
Top = 5 Top = 5
@ -383,9 +381,8 @@ namespace osu.Game.Overlays.Mods
}, },
UnrankedLabel = new OsuSpriteText UnrankedLabel = new OsuSpriteText
{ {
Font = @"Exo2.0-Bold",
Text = @"(Unranked)", Text = @"(Unranked)",
TextSize = 30, Font = OsuFont.GetFont(size: 30, weight: FontWeight.Bold),
Margin = new MarginPadding Margin = new MarginPadding
{ {
Top = 5, Top = 5,

View File

@ -108,16 +108,11 @@ namespace osu.Game.Overlays.Music
text.Clear(); text.Clear();
//space after the title to put a space between the title and artist //space after the title to put a space between the title and artist
titleSprites = text.AddText(titleBind.Value + @" ", sprite => titleSprites = text.AddText(titleBind.Value + @" ", sprite => sprite.Font = OsuFont.Default).OfType<SpriteText>();
{
sprite.TextSize = 16;
sprite.Font = @"Exo2.0-Regular";
}).OfType<SpriteText>();
text.AddText(artistBind.Value, sprite => text.AddText(artistBind.Value, sprite =>
{ {
sprite.TextSize = 14; sprite.Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold);
sprite.Font = @"Exo2.0-Bold";
sprite.Colour = artistColour; sprite.Colour = artistColour;
sprite.Padding = new MarginPadding { Top = 1 }; sprite.Padding = new MarginPadding { Top = 1 };
}); });

View File

@ -107,20 +107,18 @@ namespace osu.Game.Overlays
Origin = Anchor.BottomCentre, Origin = Anchor.BottomCentre,
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Position = new Vector2(0, 40), Position = new Vector2(0, 40),
TextSize = 25, Font = OsuFont.GetFont(size: 25, weight: FontWeight.Medium, italics: true),
Colour = Color4.White, Colour = Color4.White,
Text = @"Nothing to play", Text = @"Nothing to play",
Font = @"Exo2.0-MediumItalic"
}, },
artist = new OsuSpriteText artist = new OsuSpriteText
{ {
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Position = new Vector2(0, 45), Position = new Vector2(0, 45),
TextSize = 15, Font = OsuFont.GetFont(size: 15, weight: FontWeight.Bold, italics: true),
Colour = Color4.White, Colour = Color4.White,
Text = @"Nothing to play", Text = @"Nothing to play",
Font = @"Exo2.0-BoldItalic"
}, },
new Container new Container
{ {

View File

@ -102,13 +102,13 @@ namespace osu.Game.Overlays.Notifications
titleText = new OsuSpriteText titleText = new OsuSpriteText
{ {
Text = title.ToUpperInvariant(), Text = title.ToUpperInvariant(),
Font = @"Exo2.0-Black", Font = OsuFont.GetFont(weight: FontWeight.Black)
}, },
countText = new OsuSpriteText countText = new OsuSpriteText
{ {
Text = "3", Text = "3",
Colour = colours.Yellow, Colour = colours.Yellow,
Font = @"Exo2.0-Black", Font = OsuFont.GetFont(weight: FontWeight.Black)
}, },
} }
}, },

View File

@ -115,10 +115,7 @@ namespace osu.Game.Overlays.Notifications
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
}); });
Content.Add(textDrawable = new OsuTextFlowContainer(t => Content.Add(textDrawable = new OsuTextFlowContainer(t => t.Font = OsuFont.Default)
{
t.TextSize = 16;
})
{ {
Colour = OsuColour.Gray(128), Colour = OsuColour.Gray(128),
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,

View File

@ -59,7 +59,7 @@ namespace osu.Game.Overlays.Notifications
} }
}); });
Content.Add(textDrawable = new OsuTextFlowContainer(t => t.TextSize = 14) Content.Add(textDrawable = new OsuTextFlowContainer(t => t.Font = OsuFont.GetFont(t.Font, size: 14))
{ {
Colour = OsuColour.Gray(128), Colour = OsuColour.Gray(128),
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,

View File

@ -69,16 +69,14 @@ namespace osu.Game.Overlays
textLine1 = new OsuSpriteText textLine1 = new OsuSpriteText
{ {
Padding = new MarginPadding(10), Padding = new MarginPadding(10),
Font = @"Exo2.0-Black", Font = OsuFont.GetFont(size: 14, weight: FontWeight.Black),
Spacing = new Vector2(1, 0), Spacing = new Vector2(1, 0),
TextSize = 14,
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
}, },
textLine2 = new OsuSpriteText textLine2 = new OsuSpriteText
{ {
TextSize = 24, Font = OsuFont.GetFont(size: 24, weight: FontWeight.Light),
Font = @"Exo2.0-Light",
Padding = new MarginPadding { Left = 10, Right = 10 }, Padding = new MarginPadding { Left = 10, Right = 10 },
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.BottomCentre, Origin = Anchor.BottomCentre,
@ -105,8 +103,7 @@ namespace osu.Game.Overlays
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Margin = new MarginPadding { Bottom = 15 }, Margin = new MarginPadding { Bottom = 15 },
Font = @"Exo2.0-Bold", Font = OsuFont.GetFont(size: 12, weight: FontWeight.Bold),
TextSize = 12,
Alpha = 0.3f, Alpha = 0.3f,
}, },
} }

View File

@ -6,6 +6,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Textures;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
namespace osu.Game.Overlays.Profile.Components namespace osu.Game.Overlays.Profile.Components
@ -36,8 +37,7 @@ namespace osu.Game.Overlays.Profile.Components
{ {
Anchor = Anchor.BottomCentre, Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre, Origin = Anchor.BottomCentre,
TextSize = 14, Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold)
Font = @"Exo2.0-Bold"
}); });
} }

View File

@ -53,11 +53,10 @@ namespace osu.Game.Overlays.Profile.Header
{ {
badgeCountText = new OsuSpriteText badgeCountText = new OsuSpriteText
{ {
Alpha = 0,
TextSize = 12,
Anchor = Anchor.BottomCentre, Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre, Origin = Anchor.BottomCentre,
Font = "Exo2.0-Regular" Alpha = 0,
Font = OsuFont.GetFont(size: 12)
}, },
new Container new Container
{ {

View File

@ -44,30 +44,26 @@ namespace osu.Game.Overlays.Profile.Header
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Text = "No recent plays", Text = "No recent plays",
TextSize = 14, Font = OsuFont.GetFont(size: 14, italics: true)
Font = @"Exo2.0-RegularItalic",
}, },
rankText = new OsuSpriteText rankText = new OsuSpriteText
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Font = @"Exo2.0-RegularItalic", Font = OsuFont.GetFont(size: primary_textsize, italics: true),
TextSize = primary_textsize
}, },
relativeText = new OsuSpriteText relativeText = new OsuSpriteText
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Font = @"Exo2.0-RegularItalic", Font = OsuFont.GetFont(size: secondary_textsize, italics: true),
Y = 25, Y = 25,
TextSize = secondary_textsize
}, },
performanceText = new OsuSpriteText performanceText = new OsuSpriteText
{ {
Anchor = Anchor.BottomCentre, Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre, Origin = Anchor.BottomCentre,
Font = @"Exo2.0-RegularItalic", Font = OsuFont.GetFont(size: secondary_textsize, italics: true)
TextSize = secondary_textsize
}, },
graph = new RankChartLineGraph graph = new RankChartLineGraph
{ {

View File

@ -118,8 +118,7 @@ namespace osu.Game.Overlays.Profile
usernameText = new OsuSpriteText usernameText = new OsuSpriteText
{ {
Text = user.Username, Text = user.Username,
Font = @"Exo2.0-RegularItalic", Font = OsuFont.GetFont(size: 30, italics: true)
TextSize = 30,
}, },
new ExternalLinkButton($@"https://osu.ppy.sh/users/{user.Id}") new ExternalLinkButton($@"https://osu.ppy.sh/users/{user.Id}")
{ {
@ -166,7 +165,7 @@ namespace osu.Game.Overlays.Profile
Y = cover_height, Y = cover_height,
Colour = OsuColour.Gray(34), Colour = OsuColour.Gray(34),
}, },
infoTextLeft = new LinkFlowContainer(t => t.TextSize = 14) infoTextLeft = new LinkFlowContainer(t => t.Font = OsuFont.GetFont(t.Font, size: 14))
{ {
X = UserProfileOverlay.CONTENT_X_MARGIN, X = UserProfileOverlay.CONTENT_X_MARGIN,
Y = cover_height + 20, Y = cover_height + 20,
@ -175,11 +174,7 @@ namespace osu.Game.Overlays.Profile
ParagraphSpacing = 0.8f, ParagraphSpacing = 0.8f,
LineSpacing = 0.2f LineSpacing = 0.2f
}, },
infoTextRight = new LinkFlowContainer(t => infoTextRight = new LinkFlowContainer(t => t.Font = OsuFont.GetFont(size: 14, italics: true))
{
t.TextSize = 14;
t.Font = @"Exo2.0-RegularItalic";
})
{ {
X = UserProfileOverlay.CONTENT_X_MARGIN + info_width + 20, X = UserProfileOverlay.CONTENT_X_MARGIN + info_width + 20,
Y = cover_height + 20, Y = cover_height + 20,
@ -222,7 +217,7 @@ namespace osu.Game.Overlays.Profile
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Y = 11, Y = 11,
TextSize = 20 Font = OsuFont.GetFont(size: 20)
} }
} }
}, },
@ -354,19 +349,18 @@ namespace osu.Game.Overlays.Profile
colourBar.Show(); colourBar.Show();
} }
void boldItalic(SpriteText t) => t.Font = @"Exo2.0-BoldItalic"; void boldItalic(SpriteText t) => t.Font = OsuFont.GetFont(t.Font, weight: FontWeight.Bold, italics: true);
void lightText(SpriteText t) => t.Alpha = 0.8f; void lightText(SpriteText t) => t.Alpha = 0.8f;
OsuSpriteText createScoreText(string text) => new OsuSpriteText OsuSpriteText createScoreText(string text) => new OsuSpriteText
{ {
TextSize = 14, Font = OsuFont.GetFont(size: 14),
Text = text Text = text
}; };
OsuSpriteText createScoreNumberText(string text) => new OsuSpriteText OsuSpriteText createScoreNumberText(string text) => new OsuSpriteText
{ {
TextSize = 14, Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold),
Font = @"Exo2.0-Bold",
Anchor = Anchor.TopRight, Anchor = Anchor.TopRight,
Origin = Anchor.TopRight, Origin = Anchor.TopRight,
Text = text Text = text

View File

@ -35,8 +35,7 @@ namespace osu.Game.Overlays.Profile
new OsuSpriteText new OsuSpriteText
{ {
Text = Title, Text = Title,
TextSize = 20, Font = OsuFont.GetFont(size: 20, italics: true),
Font = @"Exo2.0-RegularItalic",
Margin = new MarginPadding Margin = new MarginPadding
{ {
Horizontal = UserProfileOverlay.CONTENT_X_MARGIN, Horizontal = UserProfileOverlay.CONTENT_X_MARGIN,
@ -67,8 +66,7 @@ namespace osu.Game.Overlays.Profile
Add(new OsuSpriteText Add(new OsuSpriteText
{ {
Text = @"coming soon!", Text = @"coming soon!",
TextSize = 16, Font = OsuFont.GetFont(weight: FontWeight.Medium),
Font = @"Exo2.0-Medium",
Colour = Color4.Gray, Colour = Color4.Gray,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,

View File

@ -7,6 +7,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Cursor;
using osu.Framework.Localisation; using osu.Framework.Localisation;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
@ -48,15 +49,13 @@ namespace osu.Game.Overlays.Profile.Sections
{ {
Text = new LocalisedString(($"{beatmap.Metadata.TitleUnicode ?? beatmap.Metadata.Title} [{beatmap.Version}] ", Text = new LocalisedString(($"{beatmap.Metadata.TitleUnicode ?? beatmap.Metadata.Title} [{beatmap.Version}] ",
$"{beatmap.Metadata.Title ?? beatmap.Metadata.TitleUnicode} [{beatmap.Version}] ")), $"{beatmap.Metadata.Title ?? beatmap.Metadata.TitleUnicode} [{beatmap.Version}] ")),
TextSize = 15, Font = OsuFont.GetFont(size: 15, weight: FontWeight.SemiBold, italics: true)
Font = "Exo2.0-SemiBoldItalic",
}, },
new OsuSpriteText new OsuSpriteText
{ {
Text = new LocalisedString((beatmap.Metadata.ArtistUnicode, beatmap.Metadata.Artist)), Text = new LocalisedString((beatmap.Metadata.ArtistUnicode, beatmap.Metadata.Artist)),
TextSize = 12,
Padding = new MarginPadding { Top = 3 }, Padding = new MarginPadding { Top = 3 },
Font = "Exo2.0-RegularItalic", Font = OsuFont.GetFont(size: 12, italics: true)
}, },
}, },
}; };

View File

@ -6,6 +6,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Drawables; using osu.Game.Beatmaps.Drawables;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osuTK; using osuTK;
@ -47,7 +48,7 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
new OsuSpriteText new OsuSpriteText
{ {
Text = @"mapped by ", Text = @"mapped by ",
TextSize = 12, Font = OsuFont.GetFont(size: 12)
}, },
mapperContainer = new OsuHoverContainer mapperContainer = new OsuHoverContainer
{ {
@ -57,8 +58,7 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
new OsuSpriteText new OsuSpriteText
{ {
Text = beatmap.Metadata.AuthorString, Text = beatmap.Metadata.AuthorString,
TextSize = 12, Font = OsuFont.GetFont(size: 12, weight: FontWeight.Medium, italics: true)
Font = @"Exo2.0-MediumItalic"
} }
} }
}, },
@ -78,16 +78,14 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
Anchor = Anchor.BottomRight, Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight, Origin = Anchor.BottomRight,
Text = playCount.ToString(), Text = playCount.ToString(),
TextSize = 18, Font = OsuFont.GetFont(size: 18, weight: FontWeight.SemiBold, italics: true)
Font = @"Exo2.0-SemiBoldItalic"
}, },
new OsuSpriteText new OsuSpriteText
{ {
Anchor = Anchor.BottomRight, Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight, Origin = Anchor.BottomRight,
Text = @"times played ", Text = @"times played ",
TextSize = 12, Font = OsuFont.GetFont(size: 12, italics: true)
Font = @"Exo2.0-RegularItalic"
}, },
} }
}); });

View File

@ -107,21 +107,19 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
Anchor = Anchor.BottomLeft, Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft, Origin = Anchor.BottomLeft,
Text = header + ":", Text = header + ":",
TextSize = 20, Font = OsuFont.GetFont(size: 20, italics: true)
Font = @"Exo2.0-RegularItalic",
}, },
valueText = new OsuSpriteText valueText = new OsuSpriteText
{ {
Anchor = Anchor.BottomLeft, Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft, Origin = Anchor.BottomLeft,
Text = "0", Text = "0",
TextSize = 40, Font = OsuFont.GetFont(size: 40, italics: true),
UseFullGlyphHeight = false, UseFullGlyphHeight = false,
Font = @"Exo2.0-RegularItalic"
} }
} }
}, },
new OsuTextFlowContainer(t => { t.TextSize = 19; }) new OsuTextFlowContainer(t => t.Font = OsuFont.GetFont(t.Font, size: 19))
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,

View File

@ -6,6 +6,7 @@ using osu.Framework.Allocation;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
@ -43,9 +44,8 @@ namespace osu.Game.Overlays.Profile.Sections
{ {
new OsuSpriteText new OsuSpriteText
{ {
TextSize = 15,
Text = header, Text = header,
Font = "Exo2.0-RegularItalic", Font = OsuFont.GetFont(size: 15, italics: true),
Margin = new MarginPadding { Top = 10, Bottom = 10 }, Margin = new MarginPadding { Top = 10, Bottom = 10 },
}, },
ItemsContainer = new FillFlowContainer ItemsContainer = new FillFlowContainer
@ -63,7 +63,7 @@ namespace osu.Game.Overlays.Profile.Sections
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Child = new OsuSpriteText Child = new OsuSpriteText
{ {
TextSize = 14, Font = OsuFont.GetFont(size: 14),
Text = "show more", Text = "show more",
Padding = new MarginPadding {Vertical = 10, Horizontal = 15 }, Padding = new MarginPadding {Vertical = 10, Horizontal = 15 },
} }
@ -76,7 +76,7 @@ namespace osu.Game.Overlays.Profile.Sections
}, },
MissingText = new OsuSpriteText MissingText = new OsuSpriteText
{ {
TextSize = 14, Font = OsuFont.GetFont(size: 14),
Text = missing, Text = missing,
Alpha = 0, Alpha = 0,
}, },

View File

@ -28,8 +28,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
Text = $"{pp:0}pp", Text = $"{pp:0}pp",
Anchor = Anchor.TopRight, Anchor = Anchor.TopRight,
Origin = Anchor.TopRight, Origin = Anchor.TopRight,
TextSize = 18, Font = OsuFont.GetFont(size: 18, weight: FontWeight.Bold, italics: true)
Font = "Exo2.0-BoldItalic",
}); });
if (weight.HasValue) if (weight.HasValue)
@ -40,8 +39,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
Anchor = Anchor.TopRight, Anchor = Anchor.TopRight,
Origin = Anchor.TopRight, Origin = Anchor.TopRight,
Colour = colour.GrayA, Colour = colour.GrayA,
TextSize = 11, Font = OsuFont.GetFont(size: 11, italics: true)
Font = "Exo2.0-RegularItalic",
}); });
} }
} }

View File

@ -46,8 +46,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
Anchor = Anchor.TopRight, Anchor = Anchor.TopRight,
Origin = Anchor.TopRight, Origin = Anchor.TopRight,
Colour = colour.GrayA, Colour = colour.GrayA,
TextSize = 11, Font = OsuFont.GetFont(size: 11, italics: true)
Font = "Exo2.0-RegularItalic"
}; };
RightFlowContainer.Add(text); RightFlowContainer.Add(text);

View File

@ -3,6 +3,7 @@
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Scoring; using osu.Game.Scoring;
@ -23,8 +24,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
Text = Score.TotalScore.ToString("#,###"), Text = Score.TotalScore.ToString("#,###"),
Anchor = Anchor.TopRight, Anchor = Anchor.TopRight,
Origin = Anchor.TopRight, Origin = Anchor.TopRight,
TextSize = 18, Font = OsuFont.GetFont(size: 18, weight: FontWeight.Bold, italics: true)
Font = "Exo2.0-BoldItalic",
}); });
} }
} }

View File

@ -42,7 +42,7 @@ namespace osu.Game.Overlays.Profile.Sections.Recent
RightFlowContainer.Add(new DrawableDate(activity.CreatedAt) RightFlowContainer.Add(new DrawableDate(activity.CreatedAt)
{ {
TextSize = 13, Font = OsuFont.GetFont(size: 13),
Colour = OsuColour.Gray(0xAA), Colour = OsuColour.Gray(0xAA),
Anchor = Anchor.TopRight, Anchor = Anchor.TopRight,
Origin = Anchor.TopRight, Origin = Anchor.TopRight,

View File

@ -3,6 +3,7 @@
using osuTK.Graphics; using osuTK.Graphics;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.SearchableList namespace osu.Game.Overlays.SearchableList
@ -21,7 +22,7 @@ namespace osu.Game.Overlays.SearchableList
{ {
public HeaderTabItem(T value) : base(value) public HeaderTabItem(T value) : base(value)
{ {
Text.TextSize = 16; Text.Font = OsuFont.GetFont(Text.Font, size: 16);
} }
} }
} }

View File

@ -78,7 +78,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
{ {
Text = "ACCOUNT", Text = "ACCOUNT",
Margin = new MarginPadding { Bottom = 5 }, Margin = new MarginPadding { Bottom = 5 },
Font = @"Exo2.0-Black", Font = OsuFont.GetFont(weight: FontWeight.Black),
}, },
form = new LoginForm form = new LoginForm
{ {
@ -134,8 +134,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Text = "Signed in", Text = "Signed in",
TextSize = 18, Font = OsuFont.GetFont(size: 18, weight: FontWeight.Bold),
Font = @"Exo2.0-Bold",
Margin = new MarginPadding { Top = 5, Bottom = 5 }, Margin = new MarginPadding { Top = 5, Bottom = 5 },
}, },
}, },

View File

@ -56,14 +56,13 @@ namespace osu.Game.Overlays.Settings
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Text = game.Name, Text = game.Name,
TextSize = 18, Font = OsuFont.GetFont(size: 18, weight: FontWeight.Bold),
Font = @"Exo2.0-Bold",
}, },
new OsuSpriteText new OsuSpriteText
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
TextSize = 14, Font = OsuFont.GetFont(size: 14),
Text = game.Version, Text = game.Version,
Colour = DebugUtils.IsDebug ? colours.Red : Color4.White, Colour = DebugUtils.IsDebug ? colours.Red : Color4.White,
}, },

View File

@ -38,7 +38,7 @@ namespace osu.Game.Overlays.Settings
new OsuSpriteText new OsuSpriteText
{ {
Text = heading, Text = heading,
TextSize = 40, Font = OsuFont.GetFont(size: 40),
Margin = new MarginPadding Margin = new MarginPadding
{ {
Left = SettingsOverlay.CONTENT_MARGINS, Left = SettingsOverlay.CONTENT_MARGINS,
@ -49,7 +49,7 @@ namespace osu.Game.Overlays.Settings
{ {
Colour = colours.Pink, Colour = colours.Pink,
Text = subheading, Text = subheading,
TextSize = 18, Font = OsuFont.GetFont(size: 18),
Margin = new MarginPadding Margin = new MarginPadding
{ {
Left = SettingsOverlay.CONTENT_MARGINS, Left = SettingsOverlay.CONTENT_MARGINS,

View File

@ -77,7 +77,7 @@ namespace osu.Game.Overlays.Settings
{ {
new OsuSpriteText new OsuSpriteText
{ {
TextSize = header_size, Font = OsuFont.GetFont(size: header_size),
Text = Header, Text = Header,
Colour = colours.Yellow, Colour = colours.Yellow,
Margin = new MarginPadding { Left = SettingsOverlay.CONTENT_MARGINS, Right = SettingsOverlay.CONTENT_MARGINS } Margin = new MarginPadding { Left = SettingsOverlay.CONTENT_MARGINS, Right = SettingsOverlay.CONTENT_MARGINS }

View File

@ -8,6 +8,7 @@ using osu.Game.Graphics.Sprites;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Game.Graphics;
namespace osu.Game.Overlays.Settings namespace osu.Game.Overlays.Settings
{ {
@ -53,7 +54,7 @@ namespace osu.Game.Overlays.Settings
{ {
Text = Header.ToUpperInvariant(), Text = Header.ToUpperInvariant(),
Margin = new MarginPadding { Bottom = 10, Left = SettingsOverlay.CONTENT_MARGINS, Right = SettingsOverlay.CONTENT_MARGINS }, Margin = new MarginPadding { Bottom = 10, Left = SettingsOverlay.CONTENT_MARGINS, Right = SettingsOverlay.CONTENT_MARGINS },
Font = @"Exo2.0-Black", Font = OsuFont.GetFont(weight: FontWeight.Black),
}, },
FlowContent FlowContent
}); });

View File

@ -32,13 +32,12 @@ namespace osu.Game.Overlays.Social
new OsuSpriteText new OsuSpriteText
{ {
Text = "social ", Text = "social ",
TextSize = 25, Font = OsuFont.GetFont(size: 25),
}, },
browser = new OsuSpriteText browser = new OsuSpriteText
{ {
Text = "browser", Text = "browser",
TextSize = 25, Font = OsuFont.GetFont(size: 25, weight: FontWeight.Light),
Font = @"Exo2.0-Light",
}, },
}, },
}; };

View File

@ -129,15 +129,13 @@ namespace osu.Game.Overlays.Toolbar
Anchor = TooltipAnchor, Anchor = TooltipAnchor,
Origin = TooltipAnchor, Origin = TooltipAnchor,
Shadow = true, Shadow = true,
TextSize = 22, Font = OsuFont.GetFont(size: 22, weight: FontWeight.Bold),
Font = @"Exo2.0-Bold",
}, },
tooltip2 = new OsuSpriteText tooltip2 = new OsuSpriteText
{ {
Anchor = TooltipAnchor, Anchor = TooltipAnchor,
Origin = TooltipAnchor, Origin = TooltipAnchor,
Shadow = true, Shadow = true,
TextSize = 16
} }
} }
} }

View File

@ -99,11 +99,10 @@ namespace osu.Game.Overlays.Toolbar
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Y = -1, Y = -1,
TextSize = 14, Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold),
Padding = new MarginPadding(5), Padding = new MarginPadding(5),
Colour = Color4.White, Colour = Color4.White,
UseFullGlyphHeight = true, UseFullGlyphHeight = true,
Font = "Exo2.0-Bold",
} }
}; };
} }

View File

@ -5,6 +5,7 @@ using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Online.API; using osu.Game.Online.API;
using osu.Game.Users; using osu.Game.Users;
using osuTK; using osuTK;
@ -20,7 +21,7 @@ namespace osu.Game.Overlays.Toolbar
{ {
AutoSizeAxes = Axes.X; AutoSizeAxes = Axes.X;
DrawableText.Font = @"Exo2.0-MediumItalic"; DrawableText.Font = OsuFont.GetFont(weight: FontWeight.Medium, italics: true);
Add(new OpaqueBackground { Depth = 1 }); Add(new OpaqueBackground { Depth = 1 });

View File

@ -140,8 +140,7 @@ namespace osu.Game.Overlays.Volume
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Font = "Venera", Font = OsuFont.GetFont(Typeface.Venera, 0.16f * circleSize)
TextSize = 0.16f * circleSize
}).WithEffect(new GlowEffect }).WithEffect(new GlowEffect
{ {
Colour = Color4.Transparent, Colour = Color4.Transparent,
@ -169,7 +168,7 @@ namespace osu.Game.Overlays.Volume
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Font = "Exo2.0-Bold", Font = OsuFont.GetFont(weight: FontWeight.Bold),
Text = name Text = name
} }
} }

View File

@ -58,10 +58,9 @@ namespace osu.Game.Rulesets.Judgements
Child = new SkinnableDrawable($"Play/{Result.Type}", _ => JudgementText = new OsuSpriteText Child = new SkinnableDrawable($"Play/{Result.Type}", _ => JudgementText = new OsuSpriteText
{ {
Text = Result.Type.GetDescription().ToUpperInvariant(), Text = Result.Type.GetDescription().ToUpperInvariant(),
Font = @"Venera", Font = OsuFont.GetFont(Typeface.Venera, 12),
Colour = judgementColour(Result.Type), Colour = judgementColour(Result.Type),
Scale = new Vector2(0.85f, 1), Scale = new Vector2(0.85f, 1),
TextSize = 12
}, restrictSize: false) }, restrictSize: false)
}; };
} }

View File

@ -110,7 +110,8 @@ namespace osu.Game.Screens.Edit.Components.Menus
{ {
public TextContainer() public TextContainer()
{ {
NormalText.TextSize = BoldText.TextSize = 14; NormalText.Font = OsuFont.GetFont(NormalText.Font, size: 14);
BoldText.Font = OsuFont.GetFont(BoldText.Font, size: 14);
NormalText.Margin = BoldText.Margin = new MarginPadding { Horizontal = 10, Vertical = MARGIN_VERTICAL }; NormalText.Margin = BoldText.Margin = new MarginPadding { Horizontal = 10, Vertical = MARGIN_VERTICAL };
} }
} }

View File

@ -127,15 +127,14 @@ namespace osu.Game.Screens.Edit.Components
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Text = $"{value:0%}", Text = $"{value:0%}",
TextSize = 14, Font = OsuFont.GetFont(size: 14)
}, },
textBold = new OsuSpriteText textBold = new OsuSpriteText
{ {
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Text = $"{value:0%}", Text = $"{value:0%}",
TextSize = 14, Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold),
Font = @"Exo2.0-Bold",
Alpha = 0, Alpha = 0,
}, },
}; };

View File

@ -6,6 +6,7 @@ using osu.Game.Graphics.Sprites;
using System; using System;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Timing; using osu.Framework.Timing;
using osu.Game.Graphics;
namespace osu.Game.Screens.Edit.Components namespace osu.Game.Screens.Edit.Components
{ {
@ -23,8 +24,7 @@ namespace osu.Game.Screens.Edit.Components
{ {
Origin = Anchor.BottomLeft, Origin = Anchor.BottomLeft,
RelativePositionAxes = Axes.Y, RelativePositionAxes = Axes.Y,
TextSize = 22, Font = OsuFont.GetFont(size: 22, fixedWidth: true),
FixedWidth = true,
Y = 0.5f, Y = 0.5f,
} }
}; };

View File

@ -118,7 +118,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
}, },
new Drawable[] new Drawable[]
{ {
new TextFlowContainer(s => s.TextSize = 14) new TextFlowContainer(s => s.Font = OsuFont.GetFont(s.Font, size: 14))
{ {
Padding = new MarginPadding { Horizontal = 15 }, Padding = new MarginPadding { Horizontal = 15 },
Text = "beat snap divisor", Text = "beat snap divisor",

View File

@ -38,8 +38,8 @@ namespace osu.Game.Screens.Edit.Setup.Components.LabelledComponents
public float LabelTextSize public float LabelTextSize
{ {
get => label.TextSize; get => label.Font.Size;
set => label.TextSize = value; set => label.Font = OsuFont.GetFont(label.Font, size: value);
} }
public string PlaceholderText public string PlaceholderText
@ -103,8 +103,7 @@ namespace osu.Game.Screens.Edit.Setup.Components.LabelledComponents
Origin = Anchor.TopLeft, Origin = Anchor.TopLeft,
Padding = new MarginPadding { Left = default_label_left_padding, Top = default_label_top_padding }, Padding = new MarginPadding { Left = default_label_left_padding, Top = default_label_top_padding },
Colour = Color4.White, Colour = Color4.White,
TextSize = default_label_text_size, Font = OsuFont.GetFont(size: default_label_text_size, weight: FontWeight.Bold),
Font = @"Exo2.0-Bold",
}, },
textBox = new OsuTextBox textBox = new OsuTextBox
{ {

View File

@ -118,7 +118,6 @@ namespace osu.Game.Screens.Menu
AllowMultiline = false, AllowMultiline = false,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
TextSize = 16,
Position = new Vector2(0, 35), Position = new Vector2(0, 35),
Text = text Text = text
} }

View File

@ -64,25 +64,13 @@ namespace osu.Game.Screens.Menu
} }
}; };
textFlow.AddText("This is an ", t => textFlow.AddText("This is an ", t => t.Font = OsuFont.GetFont(t.Font, size: 30, weight: FontWeight.Light));
{ textFlow.AddText("early development build", t => t.Font = OsuFont.GetFont(t.Font, size: 30, weight: FontWeight.SemiBold));
t.TextSize = 30;
t.Font = @"Exo2.0-Light";
});
textFlow.AddText("early development build", t =>
{
t.TextSize = 30;
t.Font = @"Exo2.0-SemiBold";
});
textFlow.AddParagraph("Things may not work as expected", t => t.TextSize = 20); textFlow.AddParagraph("Things may not work as expected", t => t.Font = OsuFont.GetFont(t.Font, size: 20));
textFlow.NewParagraph(); textFlow.NewParagraph();
Action<SpriteText> format = t => Action<SpriteText> format = t => t.Font = OsuFont.GetFont(size: 15, weight: FontWeight.Bold);
{
t.TextSize = 15;
t.Font = @"Exo2.0-SemiBold";
};
textFlow.AddParagraph("Detailed bug reports are welcomed via github issues.", format); textFlow.AddParagraph("Detailed bug reports are welcomed via github issues.", format);
textFlow.NewParagraph(); textFlow.NewParagraph();
@ -102,7 +90,7 @@ namespace osu.Game.Screens.Menu
supporterDrawables.Add(heart = textFlow.AddIcon(FontAwesome.fa_heart, t => supporterDrawables.Add(heart = textFlow.AddIcon(FontAwesome.fa_heart, t =>
{ {
t.Padding = new MarginPadding { Left = 5 }; t.Padding = new MarginPadding { Left = 5 };
t.TextSize = 12; t.Font = OsuFont.GetFont(t.Font, size: 12);
t.Colour = colours.Pink; t.Colour = colours.Pink;
t.Origin = Anchor.Centre; t.Origin = Anchor.Centre;
}).First()); }).First());

View File

@ -102,9 +102,8 @@ namespace osu.Game.Screens.Menu
Origin = Anchor.Centre, Origin = Anchor.Centre,
Text = "welcome", Text = "welcome",
Padding = new MarginPadding { Bottom = 10 }, Padding = new MarginPadding { Bottom = 10 },
Font = @"Exo2.0-Light", Font = OsuFont.GetFont(weight: FontWeight.Light, size: 42),
Alpha = 0, Alpha = 0,
TextSize = 42,
Spacing = new Vector2(5), Spacing = new Vector2(5),
}, },
new CircularContainer new CircularContainer

Some files were not shown because too many files have changed in this diff Show More