1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 05:53:10 +08:00

change GetFontSizeByLevel to return actual font size

This commit is contained in:
Gagah Pangeran Rosfatiputra 2021-06-22 12:24:25 +07:00
parent 5b9bf54f1f
commit f89c154e18
No known key found for this signature in database
GPG Key ID: 25F6F17FD29031E2

View File

@ -28,27 +28,25 @@ namespace osu.Game.Graphics.Containers.Markdown
// 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;
}
}