1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-09 13:41:43 +00:00

daybreak: scale title font size

(cherry picked from commit 035b37c615183bd387210a54d269346e3a9b379a)
This commit is contained in:
Adubbz 2023-02-25 10:52:45 +11:00
parent 0a2440522f
commit f636596ee2

View file

@ -16,6 +16,7 @@
#include "ui_util.hpp"
#include <cstdio>
#include <math.h>
#include <cstring>
namespace dbk {
@ -73,7 +74,7 @@ namespace dbk {
nvgFill(vg);
/* Setup the font. */
nvgFontSize(vg, 32.0f);
nvgFontSize(vg, std::min(32.0f, -(strlen(title)*0.5f) + 47.0f));
nvgFontFace(vg, SwitchStandardFont);
nvgTextAlign(vg, NVG_ALIGN_LEFT | NVG_ALIGN_MIDDLE);
nvgFillColor(vg, nvgRGB(0, 0, 0));