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

Fix emphasised markdown text not flowing correctly #5631

Merged
merged 4 commits into from
Jan 24, 2023

Conversation

Joehuu
Copy link
Member

@Joehuu Joehuu commented Jan 20, 2023

Before:
chrome_6FlAF9cz2f

After:
chrome_hqjKkCM4A7

Comment on lines -203 to -210
protected virtual SpriteText CreateEmphasisedSpriteText(bool bold, bool italic)
{
var textDrawable = CreateSpriteText();

textDrawable.Font = textDrawable.Font.With(weight: bold ? "Bold" : null, italics: italic);

return textDrawable;
}
Copy link
Member

Choose a reason for hiding this comment

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

I would've kept this method and used AddPart(CreateChunkFor(text, true, CreateEmphasisedSpriteText)) to avoid breaking changes, but it's not that bad to consider doing so.

Copy link
Member

@frenzibyte frenzibyte Jan 21, 2023

Choose a reason for hiding this comment

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

gonna request one more opinion from @ppy/team-client on whether it's fine to break this before I merge, we can avoid it but I feel the new method makes more sense.

@smoogipoo smoogipoo merged commit 9a50bc4 into ppy:master Jan 24, 2023
@Joehuu Joehuu deleted the fix-emphasised-text-not-flowing branch January 24, 2023 08:00
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.

3 participants