From 0e626c18129ec69d136267022f62c75fbcfcf511 Mon Sep 17 00:00:00 2001 From: Caleb Connolly Date: Tue, 5 Jul 2022 14:07:16 +0100 Subject: [PATCH] pbsplash: offset text slightly below the logo --- src/pbsplash.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pbsplash.c b/src/pbsplash.c index b9db5e9..b523e67 100644 --- a/src/pbsplash.c +++ b/src/pbsplash.c @@ -29,6 +29,8 @@ #define DEBUGRENDER 0 +#define MM_TO_PX(dpi, mm) (dpi / 25.4) * mm + volatile sig_atomic_t terminate = 0; bool debug = false; @@ -327,7 +329,7 @@ int main(int argc, char **argv) getTextDimensions(font, message, fontsz, &textWidth, &textHeight); int tx = w / 2.f - textWidth / 2.f; - int ty = y + image_h + textHeight * 0.5f; + int ty = y + image_h + textHeight * 0.5f + MM_TO_PX(dpi, 2); draw_text(font, message, tx, ty, textWidth, textHeight, fontsz, tfb_gray); }