-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Define standard font specifications and update new beatmap panel designs accordingly #32673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,41 @@ public static class OsuFont | |
/// </summary> | ||
public static FontUsage Default => GetFont(); | ||
|
||
/// <summary> | ||
/// Equivalent to Torus with 32px size and semi-bold weight. | ||
/// </summary> | ||
public static FontUsage Display => GetFont(size: 32, weight: FontWeight.SemiBold); | ||
|
||
/// <summary> | ||
/// Equivalent to Torus with 28px size and semi-bold weight. | ||
/// </summary> | ||
public static FontUsage Subdisplay => GetFont(size: 28, weight: FontWeight.SemiBold); | ||
|
||
/// <summary> | ||
/// Equivalent to Torus with 22px size and semi-bold weight. | ||
/// </summary> | ||
public static FontUsage Heading => GetFont(size: 22, weight: FontWeight.SemiBold); | ||
|
||
/// <summary> | ||
/// Equivalent to Torus with 18px size and semi-bold weight. | ||
/// </summary> | ||
public static FontUsage Subheading => GetFont(size: 18, weight: FontWeight.SemiBold); | ||
|
||
/// <summary> | ||
/// Equivalent to Torus with 16px size and regular weight. | ||
/// </summary> | ||
public static FontUsage Body => GetFont(size: 16, weight: FontWeight.Regular); | ||
|
||
/// <summary> | ||
/// Equivalent to Torus with 14px size and regular weight. | ||
/// </summary> | ||
public static FontUsage Caption => GetFont(size: 14, weight: FontWeight.Regular); | ||
|
||
/// <summary> | ||
/// Equivalent to Torus with 12px size and regular weight. | ||
/// </summary> | ||
public static FontUsage Tiny => GetFont(size: 12, weight: FontWeight.Regular); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Having these next to definitions like "Numeric" doesn't work well for me. Maybe all these should be prefixed with Alternatively we remove or move the Open to suggestions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm in favour of removing all the properties below it as I foresee all components in the game using only any of the specifications defined here. However, removing will be a tough process to go through, so I would at least temporarily prefix those with For existing usages of these definitions, I foresee them using the new specifications with the typeface swapped with alternate, i.e. |
||
|
||
public static FontUsage Numeric => GetFont(Typeface.Venera, weight: FontWeight.Bold); | ||
|
||
public static FontUsage Torus => GetFont(Typeface.Torus, weight: FontWeight.Regular); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,7 +72,7 @@ private void load(OverlayColourProvider colourProvider) | |
|
||
Icon = difficultyIcon = new ConstrainedIconContainer | ||
{ | ||
Size = new Vector2(20), | ||
Size = new Vector2(16f), | ||
Margin = new MarginPadding { Horizontal = 5f }, | ||
Colour = colourProvider.Background5, | ||
}; | ||
|
@@ -99,12 +99,13 @@ private void load(OverlayColourProvider colourProvider) | |
{ | ||
Anchor = Anchor.CentreLeft, | ||
Origin = Anchor.CentreLeft, | ||
Scale = new Vector2(OsuFont.Caption.Size / OsuFont.Body.Size), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what on earth??? |
||
}, | ||
difficultyRank = new TopLocalRank | ||
{ | ||
Anchor = Anchor.CentreLeft, | ||
Origin = Anchor.CentreLeft, | ||
Scale = new Vector2(0.75f) | ||
Scale = new Vector2(0.5f) | ||
}, | ||
starCounter = new StarCounter | ||
{ | ||
|
@@ -122,22 +123,22 @@ private void load(OverlayColourProvider colourProvider) | |
{ | ||
keyCountText = new OsuSpriteText | ||
{ | ||
Font = OsuFont.GetFont(size: 18, weight: FontWeight.SemiBold), | ||
Font = OsuFont.Body.With(weight: FontWeight.SemiBold), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the weights should be part of the spec, not an afterthought. |
||
Anchor = Anchor.BottomLeft, | ||
Origin = Anchor.BottomLeft, | ||
Alpha = 0, | ||
}, | ||
difficultyText = new OsuSpriteText | ||
{ | ||
Font = OsuFont.GetFont(size: 18, weight: FontWeight.SemiBold), | ||
Font = OsuFont.Body.With(weight: FontWeight.SemiBold), | ||
Anchor = Anchor.BottomLeft, | ||
Origin = Anchor.BottomLeft, | ||
Margin = new MarginPadding { Right = 8f }, | ||
Margin = new MarginPadding { Right = 5f }, | ||
}, | ||
authorText = new OsuSpriteText | ||
{ | ||
Colour = colourProvider.Content2, | ||
Font = OsuFont.GetFont(weight: FontWeight.SemiBold), | ||
Font = OsuFont.Caption.With(weight: FontWeight.SemiBold), | ||
Anchor = Anchor.BottomLeft, | ||
Origin = Anchor.BottomLeft | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does "Display" mean here? I think we need to choose a better term.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to be a terminology in fonts indicating large text, but it's more commonly used for font variation rather than sizes. Better terminologies could be
Headline
orTitle
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Title and subtitle work fine enough. You don't need to invent new standards.
google docs:

microsoft word:
