Skip to content
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

Define standard font specifications and update new beatmap panel designs accordingly #32673

Closed
wants to merge 3 commits into from

Conversation

frenzibyte
Copy link
Member

This PR features an important change meant to be eventually applied throughout the game. That is, OsuFont now contains standard font size definitions that should be used appropriately to keep a form of consistency in the scaling of all game components (whereas currently, some components appear larger than others, such as context menus in online overlays for example). For now, these definitions are only used on the implementation of the new song select screen, but they shall later on be expanded to cover the entire codebase.

This PR also features a minor change applied to the beatmap card title, where it's displayed in alternate/styled typeface similar to the wedge title.

Before:

CleanShot 2025-04-04 at 02 32 49

After:

CleanShot 2025-04-04 at 02 44 57

@frenzibyte frenzibyte force-pushed the song-select-v2-metrics branch from 337fbfc to 48575f4 Compare April 4, 2025 07:36
/// <summary>
/// Equivalent to Torus with 32px size and semi-bold weight.
/// </summary>
public static FontUsage Display => GetFont(size: 32, weight: FontWeight.SemiBold);
Copy link
Member

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.

Copy link
Member Author

@frenzibyte frenzibyte Apr 5, 2025

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 or Title.

Copy link
Member

@peppy peppy Apr 7, 2025

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:
Safari 2025-04-07 at 10 12 22

microsoft word:
Safari 2025-04-07 at 10 14 03

/// <summary>
/// Equivalent to Torus with 12px size and regular weight.
/// </summary>
public static FontUsage Tiny => GetFont(size: 12, weight: FontWeight.Regular);
Copy link
Member

Choose a reason for hiding this comment

The 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 Default or DefaultFor or something else.

Alternatively we remove or move the Numeric and Torus definitions below. Or move the new definitions somewhere else.

Open to suggestions.

Copy link
Member Author

Choose a reason for hiding this comment

The 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 Legacy/Old so it's clear that they shouldn't be used anymore.

For existing usages of these definitions, I foresee them using the new specifications with the typeface swapped with alternate, i.e. OsuFont.Title.With(typeface: FontWeight.TorusAlternate) or OsuFont.Body.With(typeface: FontWeight.Numeric).

@@ -99,12 +99,13 @@ private void load(OverlayColourProvider colourProvider)
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Scale = new Vector2(OsuFont.Caption.Size / OsuFont.Body.Size),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what on earth???

@@ -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),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the weights should be part of the spec, not an afterthought.

@peppy
Copy link
Member

peppy commented Apr 8, 2025

Closing this PR as un-reviewable due to chained PRs with unclear dependencies.

For changes of this size, it's nigh impossible to review on a per-PR basis. Some PRs in the sequence are very unclear on why they "depend" on the previous PR. There are hundreds of commits but individual commits are not meaningful.

#32673 -> #32480 -> #32496 -> #32533 -> #32715

will (attempt) review of #32715 alone

@peppy peppy closed this Apr 8, 2025
@peppy
Copy link
Member

peppy commented Apr 8, 2025

@frenzibyte if you have concerns over my actions here, i'm open to sit through this with you in voice or text or otherwise.

@peppy peppy self-requested a review April 10, 2025 12:01
@frenzibyte frenzibyte deleted the song-select-v2-metrics branch April 12, 2025 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants