From 0d50945ad11c87a8d2e567c98af6e27e5df7e425 Mon Sep 17 00:00:00 2001 From: "Marco Antonio J. Costa" Date: Thu, 9 Jan 2025 21:26:45 -0300 Subject: [PATCH] Fix a wrong #ifdef to runtime check conversion I didn't get this right the first time, non-Chinese text was looking funny in dialog boxes --- Utils/WordWrap.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Utils/WordWrap.cpp b/Utils/WordWrap.cpp index 900193c71..b0e8e4321 100644 --- a/Utils/WordWrap.cpp +++ b/Utils/WordWrap.cpp @@ -1733,7 +1733,8 @@ UINT16 IanWrappedStringHeight(UINT16 usPosX, UINT16 usPosY, UINT16 usWidth, UINT // get the length (in pixels) of this word usWordLengthPixels = WFStringPixLength(zWordString,uiLocalFont); - if (g_lang == i18n::Lang::zh && currentChar <= 255) + if (g_lang != i18n::Lang::zh || + g_lang == i18n::Lang::zh && currentChar <= 255) // add a space (in case we add another word to it) zWordString[usDestCounter++] = 32;