From e78e6a435c599ae17a2f56e557e2b25a1aaddca8 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sun, 7 May 2023 16:42:13 -0400 Subject: [PATCH] Scope: Improve stat text kerning. --- src/Scope.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Scope.cpp b/src/Scope.cpp index cd2ce7c..65330df 100644 --- a/src/Scope.cpp +++ b/src/Scope.cpp @@ -392,25 +392,25 @@ struct ScopeDisplay : LedDisplay { return; nvgFontSize(args.vg, 13); nvgFontFaceId(args.vg, font->handle); - nvgTextLetterSpacing(args.vg, -2); + nvgTextLetterSpacing(args.vg, -1); nvgFillColor(args.vg, nvgRGBA(0xff, 0xff, 0xff, 0x40)); nvgText(args.vg, pos.x + 6, pos.y + 11, title, NULL); nvgFillColor(args.vg, nvgRGBA(0xff, 0xff, 0xff, 0x80)); - pos = pos.plus(Vec(22, 11)); + pos = pos.plus(Vec(20, 11)); std::string text; text = "pp "; float pp = stats.max - stats.min; text += isNear(pp, 0.f, 100.f) ? string::f("% 6.2f", pp) : " ---"; nvgText(args.vg, pos.x, pos.y, text.c_str(), NULL); - text = "max "; + text = "max"; text += isNear(stats.max, 0.f, 100.f) ? string::f("% 6.2f", stats.max) : " ---"; - nvgText(args.vg, pos.x + 58 * 1, pos.y, text.c_str(), NULL); - text = "min "; + nvgText(args.vg, pos.x + 60 * 1, pos.y, text.c_str(), NULL); + text = "min"; text += isNear(stats.min, 0.f, 100.f) ? string::f("% 6.2f", stats.min) : " ---"; - nvgText(args.vg, pos.x + 58 * 2, pos.y, text.c_str(), NULL); + nvgText(args.vg, pos.x + 60 * 2, pos.y, text.c_str(), NULL); } void drawBackground(const DrawArgs& args) {