Fix obsolete font usages

This commit is contained in:
Dean Herbert
2019-03-04 12:06:41 +09:00
parent 73d266fe10
commit 132ce541f3
12 changed files with 39 additions and 62 deletions

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; using osuTK;
using osuTK.Graphics; using osuTK.Graphics;
@ -40,8 +41,7 @@ namespace osu.Game.Tournament.Components
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Text = "Control Panel", Text = "Control Panel",
TextSize = 22f, Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 22)
Font = "Exo2.0-Bold"
}, },
buttons = new FillFlowContainer buttons = new FillFlowContainer
{ {

View File

@ -163,7 +163,7 @@ namespace osu.Game.Tournament.Components
string hardRockExtra = ""; string hardRockExtra = "";
string srExtra = ""; string srExtra = "";
var ar = beatmap.BaseDifficulty.ApproachRate; //var ar = beatmap.BaseDifficulty.ApproachRate;
if ((mods & LegacyMods.HardRock) > 0) if ((mods & LegacyMods.HardRock) > 0)
{ {
hardRockExtra = "*"; hardRockExtra = "*";
@ -225,8 +225,7 @@ namespace osu.Game.Tournament.Components
void cp(SpriteText s, Color4 colour) void cp(SpriteText s, Color4 colour)
{ {
s.Colour = colour; s.Colour = colour;
s.TextSize = 15; s.Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 15);
s.Font = @"Exo2.0-Bold";
} }
bool first = true; bool first = true;

View File

@ -100,29 +100,25 @@ namespace osu.Game.Tournament.Components
new OsuSpriteText new OsuSpriteText
{ {
Text = "mapper", Text = "mapper",
Font = @"Exo2.0-RegularItalic",
Padding = new MarginPadding { Right = 5 }, Padding = new MarginPadding { Right = 5 },
TextSize = 14 Font = OsuFont.GetFont(italics: true, weight: FontWeight.Regular, size: 14)
}, },
new OsuSpriteText new OsuSpriteText
{ {
Text = Beatmap.Metadata.AuthorString, Text = Beatmap.Metadata.AuthorString,
Font = @"Exo2.0-BoldItalic",
Padding = new MarginPadding { Right = 20 }, Padding = new MarginPadding { Right = 20 },
TextSize = 14 Font = OsuFont.GetFont(italics: true, weight: FontWeight.Bold, size: 14)
}, },
new OsuSpriteText new OsuSpriteText
{ {
Text = "difficulty", Text = "difficulty",
Font = @"Exo2.0-RegularItalic",
Padding = new MarginPadding { Right = 5 }, Padding = new MarginPadding { Right = 5 },
TextSize = 14 Font = OsuFont.GetFont(italics: true, weight: FontWeight.Regular, size: 14)
}, },
new OsuSpriteText new OsuSpriteText
{ {
Text = Beatmap.Version, Text = Beatmap.Version,
Font = @"Exo2.0-BoldItalic", Font = OsuFont.GetFont(italics: true, weight: FontWeight.Bold, size: 14)
TextSize = 14
}, },
} }
} }

View File

@ -7,6 +7,7 @@ using System.Text;
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 osu.Game.Tournament.Components; using osu.Game.Tournament.Components;
using osuTK; using osuTK;
@ -49,8 +50,7 @@ namespace osu.Game.Tournament.Screens.Drawings.Components
Position = new Vector2(0, 7f), Position = new Vector2(0, 7f),
Text = $"GROUP {name.ToUpperInvariant()}", Text = $"GROUP {name.ToUpperInvariant()}",
TextSize = 8f, Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 8),
Font = @"Exo2.0-Bold",
Colour = new Color4(255, 204, 34, 255), Colour = new Color4(255, 204, 34, 255),
}, },
teams = new FillFlowContainer<GroupTeam> teams = new FillFlowContainer<GroupTeam>
@ -134,8 +134,7 @@ namespace osu.Game.Tournament.Screens.Drawings.Components
AcronymText.Anchor = Anchor.TopCentre; AcronymText.Anchor = Anchor.TopCentre;
AcronymText.Origin = Anchor.TopCentre; AcronymText.Origin = Anchor.TopCentre;
AcronymText.Text = team.Acronym.ToUpperInvariant(); AcronymText.Text = team.Acronym.ToUpperInvariant();
AcronymText.TextSize = 10f; AcronymText.Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 10);
AcronymText.Font = @"Exo2.0-Bold";
InternalChildren = new Drawable[] InternalChildren = new Drawable[]
{ {

View File

@ -120,8 +120,7 @@ namespace osu.Game.Tournament.Screens.Drawings
Alpha = 0, Alpha = 0,
Font = "Exo2.0-Light", Font = OsuFont.GetFont(weight: FontWeight.Light, size: 42),
TextSize = 42f
} }
} }
}, },

View File

@ -7,6 +7,7 @@ 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.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Tournament.Components; using osu.Game.Tournament.Components;
@ -174,9 +175,8 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
Text = team?.FullName.ToUpper() ?? "???", Text = team?.FullName.ToUpper() ?? "???",
X = (flip ? -1 : 1) * 90, X = (flip ? -1 : 1) * 90,
Y = -10, Y = -10,
TextSize = 20,
Colour = colour, Colour = colour,
Font = "Aquatico-Regular", Font = OsuFont.GetFont(typeface: Typeface.Aquatico, weight: FontWeight.Regular, size: 20),
Origin = anchor, Origin = anchor,
Anchor = anchor, Anchor = anchor,
}, },
@ -219,8 +219,7 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
Origin = Anchor.Centre, Origin = Anchor.Centre,
Colour = Color4.White, Colour = Color4.White,
Text = match.NewValue.Grouping.Value?.Name.Value ?? "Unknown Grouping", Text = match.NewValue.Grouping.Value?.Name.Value ?? "Unknown Grouping",
Font = "Aquatico-Regular", Font = OsuFont.GetFont(typeface: Typeface.Aquatico, weight: FontWeight.Regular, size: 18),
TextSize = 18,
}, },
}; };
} }

View File

@ -7,6 +7,7 @@ using osu.Framework.Bindables;
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.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Tournament.IPC; using osu.Game.Tournament.IPC;
using osu.Game.Tournament.Screens.Ladder.Components; using osu.Game.Tournament.Screens.Ladder.Components;
@ -119,26 +120,15 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
public MatchScoreCounter() public MatchScoreCounter()
{ {
Margin = new MarginPadding { Top = bar_height + 5, Horizontal = 10 }; Margin = new MarginPadding { Top = bar_height + 5, Horizontal = 10 };
Winning = false;
DisplayedCountSpriteText.FixedWidth = false; Winning = false;
} }
public bool Winning public bool Winning
{ {
set set => DisplayedCountSpriteText.Font = value
{ ? OsuFont.GetFont(typeface: Typeface.Aquatico, weight: FontWeight.Regular, size: 60)
if (value) : OsuFont.GetFont(typeface: Typeface.Aquatico, weight: FontWeight.Light, size: 40);
{
DisplayedCountSpriteText.Font = "Aquatico-Regular";
DisplayedCountSpriteText.TextSize = 60;
}
else
{
DisplayedCountSpriteText.Font = "Aquatico-Light";
DisplayedCountSpriteText.TextSize = 40;
}
}
} }
} }
} }

View File

@ -67,7 +67,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
AcronymText.Anchor = AcronymText.Origin = Anchor.CentreLeft; AcronymText.Anchor = AcronymText.Origin = Anchor.CentreLeft;
AcronymText.Padding = new MarginPadding { Left = 50 }; AcronymText.Padding = new MarginPadding { Left = 50 };
AcronymText.TextSize = 24; AcronymText.Font = OsuFont.GetFont(size: 24);
if (pairing != null) if (pairing != null)
{ {
@ -121,7 +121,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
TextSize = 20, Font = OsuFont.GetFont(size: 20),
} }
} }
} }

View File

@ -112,14 +112,14 @@ namespace osu.Game.Tournament.Screens.Schedule
Spacing = new Vector2(10, 0), Spacing = new Vector2(10, 0),
Text = currentMatch.Value.Grouping.Value.Name.Value, Text = currentMatch.Value.Grouping.Value.Name.Value,
Colour = Color4.Black, Colour = Color4.Black,
TextSize = 20 Font = OsuFont.GetFont(size: 20)
}, },
new SchedulePairing(currentMatch.Value, false), new SchedulePairing(currentMatch.Value, false),
new OsuSpriteText new OsuSpriteText
{ {
Text = "Start Time " + pairing.NewValue.Date.Value.ToUniversalTime().ToString("HH:mm UTC"), Text = "Start Time " + pairing.NewValue.Date.Value.ToUniversalTime().ToString("HH:mm UTC"),
Colour = Color4.Black, Colour = Color4.Black,
TextSize = 20 Font = OsuFont.GetFont(size: 20)
}, },
} }
} }
@ -179,7 +179,7 @@ namespace osu.Game.Tournament.Screens.Schedule
Text = title, Text = title,
Colour = Color4.Black, Colour = Color4.Black,
Spacing = new Vector2(10, 0), Spacing = new Vector2(10, 0),
TextSize = 30 Font = OsuFont.GetFont(size: 30)
}, },
content = new FillFlowContainer content = new FillFlowContainer
{ {

View File

@ -104,10 +104,9 @@ namespace osu.Game.Tournament.Screens.TeamIntro
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Colour = col, Colour = col,
Font = "Exo2.0-Black",
Text = "COMING UP NEXT", Text = "COMING UP NEXT",
Spacing = new Vector2(2, 0), Spacing = new Vector2(2, 0),
TextSize = 15, Font = OsuFont.GetFont(size: 15, weight: FontWeight.Black)
}, },
new OsuSpriteText new OsuSpriteText
{ {
@ -115,9 +114,8 @@ namespace osu.Game.Tournament.Screens.TeamIntro
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Colour = col, Colour = col,
Text = pairing.Grouping.Value?.Name.Value ?? "Unknown Grouping", Text = pairing.Grouping.Value?.Name.Value ?? "Unknown Grouping",
Font = "Exo2.0-Light",
Spacing = new Vector2(10, 0), Spacing = new Vector2(10, 0),
TextSize = 50, Font = OsuFont.GetFont(size: 50, weight: FontWeight.Light)
}, },
new OsuSpriteText new OsuSpriteText
{ {
@ -125,7 +123,7 @@ namespace osu.Game.Tournament.Screens.TeamIntro
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Colour = col, Colour = col,
Text = pairing.Date.Value.ToUniversalTime().ToString("dd MMMM HH:mm UTC"), 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 players.Add(new OsuSpriteText
{ {
Text = p.Username, Text = p.Username,
TextSize = 24, Font = OsuFont.GetFont(size: 24),
Colour = colour, Colour = colour,
Anchor = left ? Anchor.CentreRight : Anchor.CentreLeft, Anchor = left ? Anchor.CentreRight : Anchor.CentreLeft,
Origin = left ? Anchor.CentreRight : Anchor.CentreLeft, Origin = left ? Anchor.CentreRight : Anchor.CentreLeft,
@ -202,17 +200,15 @@ namespace osu.Game.Tournament.Screens.TeamIntro
new OsuSpriteText new OsuSpriteText
{ {
Text = team?.FullName.ToUpper() ?? "???", Text = team?.FullName.ToUpper() ?? "???",
TextSize = 40, Font = OsuFont.GetFont(Typeface.Aquatico, 40, FontWeight.Light),
Colour = Color4.Black, Colour = Color4.Black,
Font = "Aquatico-Light",
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
}, },
new OsuSpriteText new OsuSpriteText
{ {
Text = teamName.ToUpper(), Text = teamName.ToUpper(),
TextSize = 20, Font = OsuFont.GetFont(Typeface.Aquatico, 20, FontWeight.Regular),
Font = "Aquatico-Regular",
Colour = colour, Colour = colour,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,

View File

@ -127,8 +127,7 @@ namespace osu.Game.Tournament.Screens.TeamWin
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Colour = col, Colour = col,
Text = "WINNER", Text = "WINNER",
Font = "Aquatico-Regular", Font = OsuFont.GetFont(Typeface.Aquatico, 15, FontWeight.Regular),
TextSize = 15,
}, },
new OsuSpriteText new OsuSpriteText
{ {
@ -136,18 +135,16 @@ namespace osu.Game.Tournament.Screens.TeamWin
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Colour = col, Colour = col,
Text = pairing.Grouping.Value?.Name.Value ?? "Unknown Grouping", Text = pairing.Grouping.Value?.Name.Value ?? "Unknown Grouping",
Font = "Aquatico-Light", Font = OsuFont.GetFont(Typeface.Aquatico, 50, FontWeight.Light),
Spacing = new Vector2(10, 0), Spacing = new Vector2(10, 0),
TextSize = 50,
}, },
new OsuSpriteText new OsuSpriteText
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Font = "Aquatico-Light",
Colour = col, Colour = col,
Text = pairing.Date.Value.ToUniversalTime().ToString("dd MMMM HH:mm UTC"), 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 new OsuSpriteText
{ {
Text = team?.FullName.ToUpper() ?? "???", Text = team?.FullName.ToUpper() ?? "???",
TextSize = 40, Font = OsuFont.GetFont(Typeface.Aquatico, 40, FontWeight.Light),
Colour = Color4.Black, Colour = Color4.Black,
Font = "Aquatico-Light",
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
}, },
new OsuSpriteText new OsuSpriteText
{ {
Text = teamName.ToUpper(), Text = teamName.ToUpper(),
TextSize = 20, Font = OsuFont.GetFont(size: 20),
Colour = colour, Colour = colour,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,

View File

@ -46,6 +46,8 @@ namespace osu.Game.Graphics
return "FontAwesome"; return "FontAwesome";
case Typeface.Venera: case Typeface.Venera:
return "Venera"; return "Venera";
case Typeface.Aquatico:
return "Aquatico";
} }
return null; return null;
@ -103,6 +105,7 @@ namespace osu.Game.Graphics
Exo, Exo,
FontAwesome, FontAwesome,
Venera, Venera,
Aquatico // tournament use only
} }
public enum FontWeight public enum FontWeight