From 727f6b7a54924bae4b45d3f7a069d3c2f01634b5 Mon Sep 17 00:00:00 2001 From: Robert Boerwinkle Date: Wed, 15 Apr 2026 05:44:06 +0000 Subject: [PATCH] SDL2_ttf/TTF_MeasureText: Add comment, produces garbage data otherwise. Live page is here: https://wiki.libsdl.org/SDL2_ttf/TTF_MeasureText --- SDL2_ttf/TTF_MeasureText.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SDL2_ttf/TTF_MeasureText.md b/SDL2_ttf/TTF_MeasureText.md index ff672f500..b74d89e77 100644 --- a/SDL2_ttf/TTF_MeasureText.md +++ b/SDL2_ttf/TTF_MeasureText.md @@ -34,6 +34,8 @@ This reports the number of characters that can be rendered before reaching This does not need to render the string to do this calculation. +`measure_width` should be non-zero. + You almost certainly want [TTF_MeasureUTF8](TTF_MeasureUTF8)() unless you're sure you have a 1-byte Latin1 encoding. US ASCII characters will work with either function, but most other Unicode characters packed into a