From 661de3ad3a5c5df652763780a4d5897b018ac842 Mon Sep 17 00:00:00 2001 From: ske Date: Sun, 7 Jul 2024 12:06:30 -0300 Subject: [PATCH] Fix default font measure (#191) * Reset width on newline (#186) * Add -t flag to win-buildmodules.bat --- src/staembed.c | 3 ++- umka/canvas.um | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/staembed.c b/src/staembed.c index aac19b4..a8db717 100644 --- a/src/staembed.c +++ b/src/staembed.c @@ -1,4 +1,4 @@ -#include "tophat.h" +#include "tophat.h" const char *th_em_modulesrc[] = { "\n" "import (\n" @@ -1268,6 +1268,7 @@ const char *th_em_modulesrc[] = { "\t\t\tif w > maxw {\n" "\t\t\t\tmaxw = w\n" "\t\t\t}\n" +"\t\t\tw = 0\n" "\n" "\t\t\tcontinue\n" "\t\t}\n" diff --git a/umka/canvas.um b/umka/canvas.um index 94f41a0..950cdeb 100644 --- a/umka/canvas.um +++ b/umka/canvas.um @@ -32,6 +32,7 @@ fn textSize*(text: str, scale: th::fu): th::Vf2 { if w > maxw { maxw = w } + w = 0 continue }