Adjust font sizes and spacing in BeatmapSetOverlay to match osu-web values #7863
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Brings all font and drawable sizes in
BeatmapSetOverlay
in line with osu-web, laying ground for potentialOsuFont
scale fix to fully match web without the need to manually pixel-check every single part of the overlay.Most font sizes were a pixel or two bigger - that made them look closer to osu-web, but as mentioned in #7730, after this PR, we could experiment with scaling inside
OsuFont
itself to match osu-web look and feel while also having correct size values in the code.I tried my best to make all the boxes (details, top scores etc.) match osu-web dimensions (where possible) 1:1, +- 1px. This can be checked by comparing values from the draw visualizer with osu-web values from your web browser's dev tools, and I'd be glad if someone verified that because I had to manually check every single thing and probably missed something during that process.
Explanation
The reason why the sizes were off is because fonts are rendered differently than other drawables when is comes to size. It seems like they are just visibly smaller when compared to a drawable of a theoretical same size:
As visible here, rendered font doesn't actually fill all the vertical space that it occupies - effectively reducing its size.
This is especially visible in the scoreboard - with the row height set to
22
and the text size set to12
, it looks different (more spaced) than web with same dimensions set:lazer scoreboard:
web scoreboard:
Remarks
changed
ScoreTable
's column dimensions to closer match web, but left them a bit wider in some cases, because lazer scales the table horizontally while in osu-web it's fixed width. Changes were made based on how it looked in my opinion, so I'd appreciate feedback in that matter.changed
AdvancedStats
spacing a bit - side effect is that it's also been affected in song select, but I think that's acceptableheader still needs changes - in osu-web the amount of space between the diff picker and the title is scaled dynamically (the artist text and everything below is anchored to the bottom), while right now lazer uses static spacing:
lazer header:
web header:
there are a couple small differences due to osu-web using different
line-height
values, I made up for that using margins / paddings around font elements (couldn't find a better way to accomplish this)TopScoreStatisticsSection
for example looks off, but that's mainly due to the aforementioned font scaling issue, plus osu-web hard-scales the second statistic row to 18px which I haven't done here (yet? idk if we want this though)I'm not sure about whether I've added spacing properly in a few places (code-quality wise), please let me know if I can improve anything