From d5b1e429eae1b893671d8b33fd931b86dd4c429e Mon Sep 17 00:00:00 2001 From: Eric House Date: Fri, 19 Feb 2021 17:45:31 -0800 Subject: [PATCH] fix assertion failure --- xwords4/wasm/wasmdraw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xwords4/wasm/wasmdraw.c b/xwords4/wasm/wasmdraw.c index c6020705a..272e29861 100644 --- a/xwords4/wasm/wasmdraw.c +++ b/xwords4/wasm/wasmdraw.c @@ -102,7 +102,6 @@ fontFor( WasmDrawCtx* wdctx, int height ) rec->size = height; rec->font = TTF_OpenFont( "assets_dir/FreeSans.ttf", height ); result = rec->font; - XP_LOGFF( "made font for size %d", height ); } return result; @@ -396,7 +395,7 @@ wasm_draw_measureScoreText( DrawCtx* dctx, XWEnv xwe, int width, height; measureText( wdctx, buf, fontHeight, &width, &height ); - *widthP = width; + *widthP = XP_MIN( width, rect->height ); *heightP = XP_MIN( height, rect->height ); }