mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-24 07:40:26 +01:00
daybreak: scale title font size
(cherry picked from commit 035b37c615183bd387210a54d269346e3a9b379a)
This commit is contained in:
parent
0a2440522f
commit
f636596ee2
@ -16,6 +16,7 @@
|
|||||||
#include "ui_util.hpp"
|
#include "ui_util.hpp"
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
namespace dbk {
|
namespace dbk {
|
||||||
|
|
||||||
@ -73,7 +74,7 @@ namespace dbk {
|
|||||||
nvgFill(vg);
|
nvgFill(vg);
|
||||||
|
|
||||||
/* Setup the font. */
|
/* Setup the font. */
|
||||||
nvgFontSize(vg, 32.0f);
|
nvgFontSize(vg, std::min(32.0f, -(strlen(title)*0.5f) + 47.0f));
|
||||||
nvgFontFace(vg, SwitchStandardFont);
|
nvgFontFace(vg, SwitchStandardFont);
|
||||||
nvgTextAlign(vg, NVG_ALIGN_LEFT | NVG_ALIGN_MIDDLE);
|
nvgTextAlign(vg, NVG_ALIGN_LEFT | NVG_ALIGN_MIDDLE);
|
||||||
nvgFillColor(vg, nvgRGB(0, 0, 0));
|
nvgFillColor(vg, nvgRGB(0, 0, 0));
|
||||||
|
Loading…
Reference in New Issue
Block a user