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

change font weight for bold text

This commit is contained in:
Gagah Pangeran Rosfatiputra 2021-05-04 09:09:51 +07:00
parent 356b1e9a2d
commit bfc328c5ab
No known key found for this signature in database
GPG Key ID: 25F6F17FD29031E2

View File

@ -26,5 +26,12 @@ namespace osu.Game.Graphics.Containers.Markdown
// TODO : Add background (colour B6) and change font to monospace
protected override void AddCodeInLine(CodeInline codeInline)
=> AddText(codeInline.Content, t => { t.Colour = colourProvider.Light1; });
protected override SpriteText CreateEmphasisedSpriteText(bool bold, bool italic)
{
var spriteText = CreateSpriteText();
spriteText.Font = spriteText.Font.With(weight: bold ? FontWeight.Bold : FontWeight.Regular, italics: italic);
return spriteText;
}
}
}