1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 22:47:24 +08:00

Made medium the default font weight

This commit is contained in:
smoogipoo 2019-02-20 16:52:36 +09:00
parent 0693ab8e7d
commit dbfa95b9e7
30 changed files with 44 additions and 45 deletions

View File

@ -67,7 +67,8 @@ namespace osu.Game.Graphics.Cursor
},
text = new OsuSpriteText
{
Padding = new MarginPadding(5)
Padding = new MarginPadding(5),
Font = OsuFont.GetFont(weight: FontWeight.Regular)
}
};
}

View File

@ -30,7 +30,7 @@ namespace osu.Game.Graphics
public DrawableDate(DateTimeOffset date)
{
Font = OsuFont.GetFont(italics: true);
Font = OsuFont.GetFont(weight: FontWeight.Regular, italics: true);
Date = date;
}

View File

@ -19,7 +19,7 @@ namespace osu.Game.Graphics
return new FontUsage(usage, familyString, size, weightString, italics, fixedWidth);
}
public static FontUsage GetFont(Typeface typeface = Typeface.Exo, float size = DEFAULT_FONT_SIZE, FontWeight weight = FontWeight.Regular, bool italics = false, bool fixedWidth = false)
public static FontUsage GetFont(Typeface typeface = Typeface.Exo, float size = DEFAULT_FONT_SIZE, FontWeight weight = FontWeight.Medium, bool italics = false, bool fixedWidth = false)
=> new FontUsage(getFamilyString(typeface), size, getWeightString(typeface, weight), italics, fixedWidth);
private static string getFamilyString(Typeface typeface)

View File

@ -173,7 +173,7 @@ namespace osu.Game.Graphics.UserInterface
new HoverClickSounds()
};
Active.BindValueChanged(val => Text.Font = OsuFont.GetFont(Text.Font, weight: val ? FontWeight.Bold : FontWeight.Regular), true);
Active.BindValueChanged(val => Text.Font = OsuFont.GetFont(Text.Font, weight: val ? FontWeight.Bold : FontWeight.Medium), true);
}
protected override void OnActivated() => fadeActive();

View File

@ -24,7 +24,7 @@ namespace osu.Game.Graphics.UserInterface
protected override SpriteText CreatePlaceholder() => new OsuSpriteText
{
Font = OsuFont.GetFont(weight: FontWeight.Medium, italics: true),
Font = OsuFont.GetFont(italics: true),
Colour = new Color4(180, 180, 180, 255),
Margin = new MarginPadding { Left = 2 },
};

View File

@ -59,7 +59,7 @@ namespace osu.Game.Graphics.UserInterface
new HoverClickSounds()
};
Active.BindValueChanged(val => Text.Font = OsuFont.GetFont(Text.Font, weight: val ? FontWeight.Bold : FontWeight.Regular), true);
Active.BindValueChanged(val => Text.Font = OsuFont.GetFont(Text.Font, weight: val ? FontWeight.Bold : FontWeight.Medium), true);
}
[BackgroundDependencyLoader]

View File

@ -76,7 +76,7 @@ namespace osu.Game.Online.Leaderboards
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Font = OsuFont.GetFont(size: 22, weight: FontWeight.Medium, italics: true),
Font = OsuFont.GetFont(size: 22, italics: true),
Text = RankPosition.ToString(),
},
},

View File

@ -49,7 +49,7 @@ namespace osu.Game.Overlays.BeatmapSet
fields.Children = new Drawable[]
{
new Field("mapped by", BeatmapSet.Metadata.Author.Username, OsuFont.GetFont(italics: true)),
new Field("mapped by", BeatmapSet.Metadata.Author.Username, OsuFont.GetFont(weight: FontWeight.Regular, italics: true)),
new Field("submitted on", online.Submitted.ToString(@"MMMM d, yyyy"), OsuFont.GetFont(weight: FontWeight.Bold))
{
Margin = new MarginPadding { Top = 5 },

View File

@ -46,7 +46,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Text = $"#{index + 1}",
Font = OsuFont.GetFont(italics: true),
Font = OsuFont.GetFont(weight: FontWeight.Regular, italics: true),
Margin = new MarginPadding { Left = side_margin }
},
new DrawableFlag(score.User.Country)
@ -96,7 +96,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreRight,
Text = $@"{score.Accuracy:P2}",
Font = OsuFont.GetFont(italics: true),
Font = OsuFont.GetFont(weight: FontWeight.Regular, italics: true),
RelativePositionAxes = Axes.X,
X = 0.85f
},
@ -105,7 +105,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
Text = $"{score.Statistics[HitResult.Great]}/{score.Statistics[HitResult.Good]}/{score.Statistics[HitResult.Meh]}",
Font = OsuFont.GetFont(italics: true),
Font = OsuFont.GetFont(weight: FontWeight.Regular, italics: true),
Margin = new MarginPadding { Right = side_margin }
},
};

View File

@ -224,7 +224,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
Text = header,
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold)
},
valueText = new OsuSpriteText { Font = OsuFont.GetFont(size: 25, italics: true) }
valueText = new OsuSpriteText { Font = OsuFont.GetFont(size: 25, weight: FontWeight.Regular, italics: true) }
};
}

View File

@ -159,7 +159,7 @@ namespace osu.Game.Overlays.Chat
{
if (Message.IsAction)
{
t.Font = OsuFont.GetFont(weight: FontWeight.Medium, italics: true);
t.Font = OsuFont.GetFont(italics: true);
if (senderHasBackground)
t.Colour = OsuColour.FromHex(message.Sender.Colour);

View File

@ -108,7 +108,7 @@ namespace osu.Game.Overlays.Music
text.Clear();
//space after the title to put a space between the title and artist
titleSprites = text.AddText(titleBind.Value + @" ", sprite => sprite.Font = OsuFont.Default).OfType<SpriteText>();
titleSprites = text.AddText(titleBind.Value + @" ", sprite => sprite.Font = OsuFont.GetFont(weight: FontWeight.Regular)).OfType<SpriteText>();
text.AddText(artistBind.Value, sprite =>
{

View File

@ -107,7 +107,7 @@ namespace osu.Game.Overlays
Origin = Anchor.BottomCentre,
Anchor = Anchor.TopCentre,
Position = new Vector2(0, 40),
Font = OsuFont.GetFont(size: 25, weight: FontWeight.Medium, italics: true),
Font = OsuFont.GetFont(size: 25, italics: true),
Colour = Color4.White,
Text = @"Nothing to play",
},

View File

@ -56,7 +56,7 @@ namespace osu.Game.Overlays.Profile.Header
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
Alpha = 0,
Font = OsuFont.GetFont(size: 12)
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Regular)
},
new Container
{

View File

@ -44,26 +44,26 @@ namespace osu.Game.Overlays.Profile.Header
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Text = "No recent plays",
Font = OsuFont.GetFont(size: 14, italics: true)
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Regular, italics: true)
},
rankText = new OsuSpriteText
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Font = OsuFont.GetFont(size: primary_textsize, italics: true),
Font = OsuFont.GetFont(size: primary_textsize, weight: FontWeight.Regular, italics: true),
},
relativeText = new OsuSpriteText
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Font = OsuFont.GetFont(size: secondary_textsize, italics: true),
Font = OsuFont.GetFont(size: secondary_textsize, weight: FontWeight.Regular, italics: true),
Y = 25,
},
performanceText = new OsuSpriteText
{
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
Font = OsuFont.GetFont(size: secondary_textsize, italics: true)
Font = OsuFont.GetFont(size: secondary_textsize, weight: FontWeight.Regular, italics: true)
},
graph = new RankChartLineGraph
{

View File

@ -118,7 +118,7 @@ namespace osu.Game.Overlays.Profile
usernameText = new OsuSpriteText
{
Text = user.Username,
Font = OsuFont.GetFont(size: 30, italics: true)
Font = OsuFont.GetFont(size: 30, weight: FontWeight.Regular, italics: true)
},
new ExternalLinkButton($@"https://osu.ppy.sh/users/{user.Id}")
{
@ -174,7 +174,7 @@ namespace osu.Game.Overlays.Profile
ParagraphSpacing = 0.8f,
LineSpacing = 0.2f
},
infoTextRight = new LinkFlowContainer(t => t.Font = OsuFont.GetFont(size: 14, italics: true))
infoTextRight = new LinkFlowContainer(t => t.Font = OsuFont.GetFont(size: 14, weight: FontWeight.Regular, italics: true))
{
X = UserProfileOverlay.CONTENT_X_MARGIN + info_width + 20,
Y = cover_height + 20,

View File

@ -35,7 +35,7 @@ namespace osu.Game.Overlays.Profile
new OsuSpriteText
{
Text = Title,
Font = OsuFont.GetFont(size: 20, italics: true),
Font = OsuFont.GetFont(size: 20, weight: FontWeight.Regular, italics: true),
Margin = new MarginPadding
{
Horizontal = UserProfileOverlay.CONTENT_X_MARGIN,
@ -66,7 +66,6 @@ namespace osu.Game.Overlays.Profile
Add(new OsuSpriteText
{
Text = @"coming soon!",
Font = OsuFont.GetFont(weight: FontWeight.Medium),
Colour = Color4.Gray,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,

View File

@ -55,7 +55,7 @@ namespace osu.Game.Overlays.Profile.Sections
{
Text = new LocalisedString((beatmap.Metadata.ArtistUnicode, beatmap.Metadata.Artist)),
Padding = new MarginPadding { Top = 3 },
Font = OsuFont.GetFont(size: 12, italics: true)
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Regular, italics: true)
},
},
};

View File

@ -85,7 +85,7 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight,
Text = @"times played ",
Font = OsuFont.GetFont(size: 12, italics: true)
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Regular, italics: true)
},
}
});

View File

@ -107,14 +107,14 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
Text = header + ":",
Font = OsuFont.GetFont(size: 20, italics: true)
Font = OsuFont.GetFont(size: 20, weight: FontWeight.Regular, italics: true)
},
valueText = new OsuSpriteText
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
Text = "0",
Font = OsuFont.GetFont(size: 40, italics: true),
Font = OsuFont.GetFont(size: 40, weight: FontWeight.Regular, italics: true),
UseFullGlyphHeight = false,
}
}

View File

@ -45,7 +45,7 @@ namespace osu.Game.Overlays.Profile.Sections
new OsuSpriteText
{
Text = header,
Font = OsuFont.GetFont(size: 15, italics: true),
Font = OsuFont.GetFont(size: 15, weight: FontWeight.Regular, italics: true),
Margin = new MarginPadding { Top = 10, Bottom = 10 },
},
ItemsContainer = new FillFlowContainer

View File

@ -39,7 +39,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
Colour = colour.GrayA,
Font = OsuFont.GetFont(size: 11, italics: true)
Font = OsuFont.GetFont(size: 11, weight: FontWeight.Regular, italics: true)
});
}
}

View File

@ -46,7 +46,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
Colour = colour.GrayA,
Font = OsuFont.GetFont(size: 11, italics: true)
Font = OsuFont.GetFont(size: 11, weight: FontWeight.Regular, italics: true)
};
RightFlowContainer.Add(text);

View File

@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Toolbar
{
AutoSizeAxes = Axes.X;
DrawableText.Font = OsuFont.GetFont(weight: FontWeight.Medium, italics: true);
DrawableText.Font = OsuFont.GetFont(italics: true);
Add(new OpaqueBackground { Depth = 1 });

View File

@ -96,7 +96,7 @@ namespace osu.Game.Screens.Multi.Lounge.Components
{
hostText.AddText("hosted by ");
hostText.AddLink(v.Username, null, LinkAction.OpenUserProfile, v.Id.ToString(), "Open profile",
s => s.Font = OsuFont.GetFont(Typeface.Exo, weight: FontWeight.Medium, italics: true));
s => s.Font = OsuFont.GetFont(Typeface.Exo, weight: FontWeight.Bold, italics: true));
flagContainer.Child = new DrawableFlag(v.Country) { RelativeSizeAxes = Axes.Both };
}
}, true);

View File

@ -88,7 +88,7 @@ namespace osu.Game.Screens.Play
new OsuSpriteText
{
Text = Header,
Font = OsuFont.GetFont(weight: FontWeight.Medium, size: 30),
Font = OsuFont.GetFont(size: 30),
Spacing = new Vector2(5, 0),
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre,

View File

@ -330,14 +330,14 @@ namespace osu.Game.Screens.Play
new OsuSpriteText
{
Text = new LocalisedString((metadata.TitleUnicode, metadata.Title)),
Font = OsuFont.GetFont(weight: FontWeight.Medium, size: 36, italics: true),
Font = OsuFont.GetFont(size: 36, italics: true),
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre,
},
new OsuSpriteText
{
Text = new LocalisedString((metadata.ArtistUnicode, metadata.Artist)),
Font = OsuFont.GetFont(weight: FontWeight.Medium, size: 26, italics: true),
Font = OsuFont.GetFont(size: 26, italics: true),
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre,
},
@ -365,7 +365,7 @@ namespace osu.Game.Screens.Play
new OsuSpriteText
{
Text = beatmap?.BeatmapInfo?.Version,
Font = OsuFont.GetFont(weight: FontWeight.Medium, size: 26, italics: true),
Font = OsuFont.GetFont(size: 26, italics: true),
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre,
Margin = new MarginPadding

View File

@ -368,7 +368,7 @@ namespace osu.Game.Screens.Ranking.Pages
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
Text = user.Username,
Font = OsuFont.GetFont(size: 30, italics: true),
Font = OsuFont.GetFont(size: 30, weight: FontWeight.Regular, italics: true),
Padding = new MarginPadding { Bottom = 10 },
}
};

View File

@ -204,7 +204,7 @@ namespace osu.Game.Screens.Select
VersionLabel = new OsuSpriteText
{
Text = beatmapInfo.Version,
Font = OsuFont.GetFont(weight: FontWeight.Medium, size: 24, italics: true),
Font = OsuFont.GetFont(size: 24, italics: true),
},
}
},
@ -239,11 +239,11 @@ namespace osu.Game.Screens.Select
{
TitleLabel = new OsuSpriteText
{
Font = OsuFont.GetFont(weight: FontWeight.Medium, size: 28, italics: true),
Font = OsuFont.GetFont(size: 28, italics: true),
},
ArtistLabel = new OsuSpriteText
{
Font = OsuFont.GetFont(weight: FontWeight.Medium, size: 17, italics: true),
Font = OsuFont.GetFont(size: 17, italics: true),
},
MapperContainer = new FillFlowContainer
{
@ -343,7 +343,7 @@ namespace osu.Game.Screens.Select
new OsuSpriteText
{
Text = "mapped by ",
Font = OsuFont.GetFont(weight: FontWeight.Medium, size: 15),
Font = OsuFont.GetFont(size: 15),
},
new OsuSpriteText
{

View File

@ -101,21 +101,20 @@ namespace osu.Game.Screens.Select.Carousel
new OsuSpriteText
{
Text = beatmap.Version,
Font = OsuFont.GetFont(weight: FontWeight.Medium, size: 20),
Font = OsuFont.GetFont(size: 20),
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft
},
new OsuSpriteText
{
Text = "mapped by",
Font = OsuFont.GetFont(weight: FontWeight.Medium),
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft
},
new OsuSpriteText
{
Text = $"{(beatmap.Metadata ?? beatmap.BeatmapSet.Metadata).Author.Username}",
Font = OsuFont.GetFont(weight: FontWeight.Medium, italics: true),
Font = OsuFont.GetFont(italics: true),
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft
},