From d06d95df7da36e564d7afbae095612438cb734ba Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Thu, 6 Aug 2026 11:18:13 +0700 Subject: [PATCH] fix(wheelofnames): pad spoiler with figure space to match letter width in proportional font --- internal/modules/misc/wheelofnames_command.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/modules/misc/wheelofnames_command.go b/internal/modules/misc/wheelofnames_command.go index 62bea5a..e5b3f63 100644 --- a/internal/modules/misc/wheelofnames_command.go +++ b/internal/modules/misc/wheelofnames_command.go @@ -71,9 +71,11 @@ func wheelResultCaption(options []string, winner int) string { return `Result: ` + html.EscapeString(result) + `` } -// Non-breaking space: regular spaces at the caption edges get trimmed by -// Telegram, which would shrink the spoiler and reveal the winner's length. -const wheelCaptionPad = "\u00a0" +// Figure space: blank, non-breaking, and as wide as a digit, so in +// Telegram's proportional font one pad char roughly matches one letter; +// a regular space is far narrower and the spoiler width would still hint +// at the winner's length. +const wheelCaptionPad = "\u2007" // padWheelResultCaption prefixes shorter winners with blank padding so every // option renders a spoiler of equal length; otherwise the spoiler width