mirror of
https://github.com/ppy/osu.git
synced 2025-01-18 06:22:56 +08:00
Move venera bold check to OsuFont
This commit is contained in:
parent
5204bd0ecd
commit
cb95b0dea6
@ -87,6 +87,10 @@ namespace osu.Game.Graphics
|
||||
// torus doesn't have a medium; fallback to regular.
|
||||
weight = FontWeight.Regular;
|
||||
|
||||
// venera only has bold; switch to bold if it isn't
|
||||
if (family == GetFamilyString(Typeface.Venera) && weight != FontWeight.Bold)
|
||||
weight = FontWeight.Bold;
|
||||
|
||||
return weight.ToString();
|
||||
}
|
||||
}
|
||||
|
@ -120,10 +120,7 @@ namespace osu.Game.Screens.Play.HUD
|
||||
|
||||
Font.BindValueChanged(typeface =>
|
||||
{
|
||||
// We only have bold weight for venera, so let's force that.
|
||||
FontWeight fontWeight = typeface.NewValue == Typeface.Venera ? FontWeight.Bold : FontWeight.Regular;
|
||||
|
||||
FontUsage f = OsuFont.GetFont(typeface.NewValue, weight: fontWeight);
|
||||
FontUsage f = OsuFont.GetFont(typeface.NewValue, weight: FontWeight.Regular);
|
||||
|
||||
// Fixed width looks better on venera only in my opinion.
|
||||
text.Font = f.With(size: 16, fixedWidth: typeface.NewValue == Typeface.Venera);
|
||||
|
@ -128,10 +128,7 @@ namespace osu.Game.Screens.Play.HUD.ClicksPerSecond
|
||||
|
||||
Font.BindValueChanged(typeface =>
|
||||
{
|
||||
// We only have bold weight for venera, so let's force that.
|
||||
FontWeight fontWeight = typeface.NewValue == Typeface.Venera ? FontWeight.Bold : FontWeight.Regular;
|
||||
|
||||
FontUsage f = OsuFont.GetFont(typeface.NewValue, weight: fontWeight);
|
||||
FontUsage f = OsuFont.GetFont(typeface.NewValue, weight: FontWeight.Regular);
|
||||
|
||||
// align baseline with fonts that aren't venera
|
||||
secLabel.Padding = new MarginPadding { Bottom = typeface.NewValue == Typeface.Venera ? 3f : 2f };
|
||||
|
@ -114,10 +114,7 @@ namespace osu.Game.Screens.Play.HUD
|
||||
|
||||
Font.BindValueChanged(typeface =>
|
||||
{
|
||||
// We only have bold weight for venera, so let's force that.
|
||||
FontWeight fontWeight = typeface.NewValue == Typeface.Venera ? FontWeight.Bold : FontWeight.Regular;
|
||||
|
||||
FontUsage f = OsuFont.GetFont(typeface.NewValue, weight: fontWeight);
|
||||
FontUsage f = OsuFont.GetFont(typeface.NewValue, weight: FontWeight.Regular);
|
||||
|
||||
// align baseline with fonts that aren't venera
|
||||
comboLabel.Padding = new MarginPadding { Bottom = typeface.NewValue == Typeface.Venera ? 3f : 1f };
|
||||
|
@ -156,10 +156,7 @@ namespace osu.Game.Screens.Play.HUD
|
||||
|
||||
Font.BindValueChanged(typeface =>
|
||||
{
|
||||
// We only have bold weight for venera, so let's force that.
|
||||
FontWeight fontWeight = typeface.NewValue == Typeface.Venera ? FontWeight.Bold : FontWeight.Regular;
|
||||
|
||||
FontUsage f = OsuFont.GetFont(typeface.NewValue, weight: fontWeight);
|
||||
FontUsage f = OsuFont.GetFont(typeface.NewValue, weight: FontWeight.Regular);
|
||||
|
||||
// Fixed width looks better on venera only in my opinion.
|
||||
text.Font = f.With(size: 16, fixedWidth: typeface.NewValue == Typeface.Venera);
|
||||
|
@ -37,10 +37,7 @@ namespace osu.Game.Skinning
|
||||
|
||||
Font.BindValueChanged(e =>
|
||||
{
|
||||
// We only have bold weight for venera, so let's force that.
|
||||
FontWeight fontWeight = e.NewValue == Typeface.Venera ? FontWeight.Bold : FontWeight.Regular;
|
||||
|
||||
FontUsage f = OsuFont.GetFont(e.NewValue, weight: fontWeight);
|
||||
FontUsage f = OsuFont.GetFont(e.NewValue, weight: FontWeight.Regular);
|
||||
SetFont(f);
|
||||
}, true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user