diff --git a/osu.Game.Tournament/Components/ControlPanel.cs b/osu.Game.Tournament/Components/ControlPanel.cs index 5f777fbf43..dee6cfbe0e 100644 --- a/osu.Game.Tournament/Components/ControlPanel.cs +++ b/osu.Game.Tournament/Components/ControlPanel.cs @@ -4,6 +4,7 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; +using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osuTK; using osuTK.Graphics; @@ -40,8 +41,7 @@ namespace osu.Game.Tournament.Components Origin = Anchor.TopCentre, Text = "Control Panel", - TextSize = 22f, - Font = "Exo2.0-Bold" + Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 22) }, buttons = new FillFlowContainer { diff --git a/osu.Game.Tournament/Components/SongBar.cs b/osu.Game.Tournament/Components/SongBar.cs index fc75bd59a4..a138dfaa1e 100644 --- a/osu.Game.Tournament/Components/SongBar.cs +++ b/osu.Game.Tournament/Components/SongBar.cs @@ -163,7 +163,7 @@ namespace osu.Game.Tournament.Components string hardRockExtra = ""; string srExtra = ""; - var ar = beatmap.BaseDifficulty.ApproachRate; + //var ar = beatmap.BaseDifficulty.ApproachRate; if ((mods & LegacyMods.HardRock) > 0) { hardRockExtra = "*"; @@ -225,8 +225,7 @@ namespace osu.Game.Tournament.Components void cp(SpriteText s, Color4 colour) { s.Colour = colour; - s.TextSize = 15; - s.Font = @"Exo2.0-Bold"; + s.Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 15); } bool first = true; diff --git a/osu.Game.Tournament/Components/TournamentBeatmapPanel.cs b/osu.Game.Tournament/Components/TournamentBeatmapPanel.cs index 94aa86d5cb..6b80094990 100644 --- a/osu.Game.Tournament/Components/TournamentBeatmapPanel.cs +++ b/osu.Game.Tournament/Components/TournamentBeatmapPanel.cs @@ -100,29 +100,25 @@ namespace osu.Game.Tournament.Components new OsuSpriteText { Text = "mapper", - Font = @"Exo2.0-RegularItalic", Padding = new MarginPadding { Right = 5 }, - TextSize = 14 + Font = OsuFont.GetFont(italics: true, weight: FontWeight.Regular, size: 14) }, new OsuSpriteText { Text = Beatmap.Metadata.AuthorString, - Font = @"Exo2.0-BoldItalic", Padding = new MarginPadding { Right = 20 }, - TextSize = 14 + Font = OsuFont.GetFont(italics: true, weight: FontWeight.Bold, size: 14) }, new OsuSpriteText { Text = "difficulty", - Font = @"Exo2.0-RegularItalic", Padding = new MarginPadding { Right = 5 }, - TextSize = 14 + Font = OsuFont.GetFont(italics: true, weight: FontWeight.Regular, size: 14) }, new OsuSpriteText { Text = Beatmap.Version, - Font = @"Exo2.0-BoldItalic", - TextSize = 14 + Font = OsuFont.GetFont(italics: true, weight: FontWeight.Bold, size: 14) }, } } diff --git a/osu.Game.Tournament/Screens/Drawings/Components/Group.cs b/osu.Game.Tournament/Screens/Drawings/Components/Group.cs index ca092cdf02..36ab7482a0 100644 --- a/osu.Game.Tournament/Screens/Drawings/Components/Group.cs +++ b/osu.Game.Tournament/Screens/Drawings/Components/Group.cs @@ -7,6 +7,7 @@ using System.Text; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; +using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osu.Game.Tournament.Components; using osuTK; @@ -49,8 +50,7 @@ namespace osu.Game.Tournament.Screens.Drawings.Components Position = new Vector2(0, 7f), Text = $"GROUP {name.ToUpperInvariant()}", - TextSize = 8f, - Font = @"Exo2.0-Bold", + Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 8), Colour = new Color4(255, 204, 34, 255), }, teams = new FillFlowContainer @@ -134,8 +134,7 @@ namespace osu.Game.Tournament.Screens.Drawings.Components AcronymText.Anchor = Anchor.TopCentre; AcronymText.Origin = Anchor.TopCentre; AcronymText.Text = team.Acronym.ToUpperInvariant(); - AcronymText.TextSize = 10f; - AcronymText.Font = @"Exo2.0-Bold"; + AcronymText.Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 10); InternalChildren = new Drawable[] { diff --git a/osu.Game.Tournament/Screens/Drawings/DrawingsScreen.cs b/osu.Game.Tournament/Screens/Drawings/DrawingsScreen.cs index f68adabb4c..c30caa5a00 100644 --- a/osu.Game.Tournament/Screens/Drawings/DrawingsScreen.cs +++ b/osu.Game.Tournament/Screens/Drawings/DrawingsScreen.cs @@ -120,8 +120,7 @@ namespace osu.Game.Tournament.Screens.Drawings Alpha = 0, - Font = "Exo2.0-Light", - TextSize = 42f + Font = OsuFont.GetFont(weight: FontWeight.Light, size: 42), } } }, diff --git a/osu.Game.Tournament/Screens/Gameplay/Components/MatchHeader.cs b/osu.Game.Tournament/Screens/Gameplay/Components/MatchHeader.cs index 364d437619..5bbdbe104f 100644 --- a/osu.Game.Tournament/Screens/Gameplay/Components/MatchHeader.cs +++ b/osu.Game.Tournament/Screens/Gameplay/Components/MatchHeader.cs @@ -7,6 +7,7 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Framework.Input.Events; +using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osu.Game.Graphics.UserInterface; using osu.Game.Tournament.Components; @@ -174,9 +175,8 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components Text = team?.FullName.ToUpper() ?? "???", X = (flip ? -1 : 1) * 90, Y = -10, - TextSize = 20, Colour = colour, - Font = "Aquatico-Regular", + Font = OsuFont.GetFont(typeface: Typeface.Aquatico, weight: FontWeight.Regular, size: 20), Origin = anchor, Anchor = anchor, }, @@ -219,8 +219,7 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components Origin = Anchor.Centre, Colour = Color4.White, Text = match.NewValue.Grouping.Value?.Name.Value ?? "Unknown Grouping", - Font = "Aquatico-Regular", - TextSize = 18, + Font = OsuFont.GetFont(typeface: Typeface.Aquatico, weight: FontWeight.Regular, size: 18), }, }; } diff --git a/osu.Game.Tournament/Screens/Gameplay/Components/MatchScoreDisplay.cs b/osu.Game.Tournament/Screens/Gameplay/Components/MatchScoreDisplay.cs index 30cd2b2e85..a648072d04 100644 --- a/osu.Game.Tournament/Screens/Gameplay/Components/MatchScoreDisplay.cs +++ b/osu.Game.Tournament/Screens/Gameplay/Components/MatchScoreDisplay.cs @@ -7,6 +7,7 @@ using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; +using osu.Game.Graphics; using osu.Game.Graphics.UserInterface; using osu.Game.Tournament.IPC; using osu.Game.Tournament.Screens.Ladder.Components; @@ -119,26 +120,15 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components public MatchScoreCounter() { Margin = new MarginPadding { Top = bar_height + 5, Horizontal = 10 }; - Winning = false; - DisplayedCountSpriteText.FixedWidth = false; + Winning = false; } public bool Winning { - set - { - if (value) - { - DisplayedCountSpriteText.Font = "Aquatico-Regular"; - DisplayedCountSpriteText.TextSize = 60; - } - else - { - DisplayedCountSpriteText.Font = "Aquatico-Light"; - DisplayedCountSpriteText.TextSize = 40; - } - } + set => DisplayedCountSpriteText.Font = value + ? OsuFont.GetFont(typeface: Typeface.Aquatico, weight: FontWeight.Regular, size: 60) + : OsuFont.GetFont(typeface: Typeface.Aquatico, weight: FontWeight.Light, size: 40); } } } diff --git a/osu.Game.Tournament/Screens/Ladder/Components/DrawableMatchTeam.cs b/osu.Game.Tournament/Screens/Ladder/Components/DrawableMatchTeam.cs index 63d15781ca..c4097848d7 100644 --- a/osu.Game.Tournament/Screens/Ladder/Components/DrawableMatchTeam.cs +++ b/osu.Game.Tournament/Screens/Ladder/Components/DrawableMatchTeam.cs @@ -67,7 +67,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components AcronymText.Anchor = AcronymText.Origin = Anchor.CentreLeft; AcronymText.Padding = new MarginPadding { Left = 50 }; - AcronymText.TextSize = 24; + AcronymText.Font = OsuFont.GetFont(size: 24); if (pairing != null) { @@ -121,7 +121,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components { Anchor = Anchor.Centre, Origin = Anchor.Centre, - TextSize = 20, + Font = OsuFont.GetFont(size: 20), } } } diff --git a/osu.Game.Tournament/Screens/Schedule/ScheduleScreen.cs b/osu.Game.Tournament/Screens/Schedule/ScheduleScreen.cs index 05343117bf..384f2f7ab2 100644 --- a/osu.Game.Tournament/Screens/Schedule/ScheduleScreen.cs +++ b/osu.Game.Tournament/Screens/Schedule/ScheduleScreen.cs @@ -112,14 +112,14 @@ namespace osu.Game.Tournament.Screens.Schedule Spacing = new Vector2(10, 0), Text = currentMatch.Value.Grouping.Value.Name.Value, Colour = Color4.Black, - TextSize = 20 + Font = OsuFont.GetFont(size: 20) }, new SchedulePairing(currentMatch.Value, false), new OsuSpriteText { Text = "Start Time " + pairing.NewValue.Date.Value.ToUniversalTime().ToString("HH:mm UTC"), Colour = Color4.Black, - TextSize = 20 + Font = OsuFont.GetFont(size: 20) }, } } @@ -179,7 +179,7 @@ namespace osu.Game.Tournament.Screens.Schedule Text = title, Colour = Color4.Black, Spacing = new Vector2(10, 0), - TextSize = 30 + Font = OsuFont.GetFont(size: 30) }, content = new FillFlowContainer { diff --git a/osu.Game.Tournament/Screens/TeamIntro/TeamIntroScreen.cs b/osu.Game.Tournament/Screens/TeamIntro/TeamIntroScreen.cs index a42c7775e6..94130cb383 100644 --- a/osu.Game.Tournament/Screens/TeamIntro/TeamIntroScreen.cs +++ b/osu.Game.Tournament/Screens/TeamIntro/TeamIntroScreen.cs @@ -104,10 +104,9 @@ namespace osu.Game.Tournament.Screens.TeamIntro Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Colour = col, - Font = "Exo2.0-Black", Text = "COMING UP NEXT", Spacing = new Vector2(2, 0), - TextSize = 15, + Font = OsuFont.GetFont(size: 15, weight: FontWeight.Black) }, new OsuSpriteText { @@ -115,9 +114,8 @@ namespace osu.Game.Tournament.Screens.TeamIntro Origin = Anchor.TopCentre, Colour = col, Text = pairing.Grouping.Value?.Name.Value ?? "Unknown Grouping", - Font = "Exo2.0-Light", Spacing = new Vector2(10, 0), - TextSize = 50, + Font = OsuFont.GetFont(size: 50, weight: FontWeight.Light) }, new OsuSpriteText { @@ -125,7 +123,7 @@ namespace osu.Game.Tournament.Screens.TeamIntro Origin = Anchor.TopCentre, Colour = col, Text = pairing.Date.Value.ToUniversalTime().ToString("dd MMMM HH:mm UTC"), - TextSize = 20, + Font = OsuFont.GetFont(size: 20) }, } } @@ -170,7 +168,7 @@ namespace osu.Game.Tournament.Screens.TeamIntro players.Add(new OsuSpriteText { Text = p.Username, - TextSize = 24, + Font = OsuFont.GetFont(size: 24), Colour = colour, Anchor = left ? Anchor.CentreRight : Anchor.CentreLeft, Origin = left ? Anchor.CentreRight : Anchor.CentreLeft, @@ -202,17 +200,15 @@ namespace osu.Game.Tournament.Screens.TeamIntro new OsuSpriteText { Text = team?.FullName.ToUpper() ?? "???", - TextSize = 40, + Font = OsuFont.GetFont(Typeface.Aquatico, 40, FontWeight.Light), Colour = Color4.Black, - Font = "Aquatico-Light", Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, }, new OsuSpriteText { Text = teamName.ToUpper(), - TextSize = 20, - Font = "Aquatico-Regular", + Font = OsuFont.GetFont(Typeface.Aquatico, 20, FontWeight.Regular), Colour = colour, Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, diff --git a/osu.Game.Tournament/Screens/TeamWin/TeamWinScreen.cs b/osu.Game.Tournament/Screens/TeamWin/TeamWinScreen.cs index f0f46f2dc8..1de9b6ae5c 100644 --- a/osu.Game.Tournament/Screens/TeamWin/TeamWinScreen.cs +++ b/osu.Game.Tournament/Screens/TeamWin/TeamWinScreen.cs @@ -127,8 +127,7 @@ namespace osu.Game.Tournament.Screens.TeamWin Origin = Anchor.TopCentre, Colour = col, Text = "WINNER", - Font = "Aquatico-Regular", - TextSize = 15, + Font = OsuFont.GetFont(Typeface.Aquatico, 15, FontWeight.Regular), }, new OsuSpriteText { @@ -136,18 +135,16 @@ namespace osu.Game.Tournament.Screens.TeamWin Origin = Anchor.TopCentre, Colour = col, Text = pairing.Grouping.Value?.Name.Value ?? "Unknown Grouping", - Font = "Aquatico-Light", + Font = OsuFont.GetFont(Typeface.Aquatico, 50, FontWeight.Light), Spacing = new Vector2(10, 0), - TextSize = 50, }, new OsuSpriteText { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, - Font = "Aquatico-Light", Colour = col, Text = pairing.Date.Value.ToUniversalTime().ToString("dd MMMM HH:mm UTC"), - TextSize = 20, + Font = OsuFont.GetFont(Typeface.Aquatico, 20, FontWeight.Light), }, } } @@ -207,16 +204,15 @@ namespace osu.Game.Tournament.Screens.TeamWin new OsuSpriteText { Text = team?.FullName.ToUpper() ?? "???", - TextSize = 40, + Font = OsuFont.GetFont(Typeface.Aquatico, 40, FontWeight.Light), Colour = Color4.Black, - Font = "Aquatico-Light", Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, }, new OsuSpriteText { Text = teamName.ToUpper(), - TextSize = 20, + Font = OsuFont.GetFont(size: 20), Colour = colour, Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, diff --git a/osu.Game/Graphics/OsuFont.cs b/osu.Game/Graphics/OsuFont.cs index dc660fd159..22937333d7 100644 --- a/osu.Game/Graphics/OsuFont.cs +++ b/osu.Game/Graphics/OsuFont.cs @@ -46,6 +46,8 @@ namespace osu.Game.Graphics return "FontAwesome"; case Typeface.Venera: return "Venera"; + case Typeface.Aquatico: + return "Aquatico"; } return null; @@ -103,6 +105,7 @@ namespace osu.Game.Graphics Exo, FontAwesome, Venera, + Aquatico // tournament use only } public enum FontWeight