diff --git a/osu.Android.props b/osu.Android.props
index 1dc99bb60a..3c4380e355 100644
--- a/osu.Android.props
+++ b/osu.Android.props
@@ -52,7 +52,7 @@
-
+
diff --git a/osu.Game/Graphics/Containers/Markdown/OsuMarkdownHeading.cs b/osu.Game/Graphics/Containers/Markdown/OsuMarkdownHeading.cs
index 40eb4cad15..a3a86df678 100644
--- a/osu.Game/Graphics/Containers/Markdown/OsuMarkdownHeading.cs
+++ b/osu.Game/Graphics/Containers/Markdown/OsuMarkdownHeading.cs
@@ -20,7 +20,8 @@ public OsuMarkdownHeading(HeadingBlock headingBlock)
public override MarkdownTextFlowContainer CreateTextFlow() => new HeadingTextFlowContainer
{
- Weight = GetFontWeightByLevel(level),
+ FontSize = GetFontSizeByLevel(level),
+ FontWeight = GetFontWeightByLevel(level),
};
protected override float GetFontSizeByLevel(int level)
@@ -28,27 +29,25 @@ protected override float GetFontSizeByLevel(int level)
// Reference for this font size
// https://github.com/ppy/osu-web/blob/376cac43a051b9c85ce95e2c446099be187b3e45/resources/assets/less/bem/osu-md.less#L9
// https://github.com/ppy/osu-web/blob/376cac43a051b9c85ce95e2c446099be187b3e45/resources/assets/less/variables.less#L161
- const float base_font_size = 14;
-
switch (level)
{
case 1:
- return 30 / base_font_size;
+ return 30;
case 2:
- return 26 / base_font_size;
+ return 26;
case 3:
- return 20 / base_font_size;
+ return 20;
case 4:
- return 18 / base_font_size;
+ return 18;
case 5:
- return 16 / base_font_size;
+ return 16;
default:
- return 1;
+ return 14;
}
}
@@ -67,9 +66,11 @@ protected virtual FontWeight GetFontWeightByLevel(int level)
private class HeadingTextFlowContainer : OsuMarkdownTextFlowContainer
{
- public FontWeight Weight { get; set; }
+ public float FontSize;
+ public FontWeight FontWeight;
- protected override SpriteText CreateSpriteText() => base.CreateSpriteText().With(t => t.Font = t.Font.With(weight: Weight));
+ protected override SpriteText CreateSpriteText()
+ => base.CreateSpriteText().With(t => t.Font = t.Font.With(size: FontSize, weight: FontWeight));
}
}
}
diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj
index 3c52405f8e..f91620bd25 100644
--- a/osu.Game/osu.Game.csproj
+++ b/osu.Game/osu.Game.csproj
@@ -36,7 +36,7 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
diff --git a/osu.iOS.props b/osu.iOS.props
index 3689ce51f2..22c4340ba2 100644
--- a/osu.iOS.props
+++ b/osu.iOS.props
@@ -70,7 +70,7 @@
-
+
@@ -93,7 +93,7 @@
-
+