Expand description
Break-space insertion for the stock exe, which only wraps at U+0020. A faithful port of
insert_break_spaces in the TC tooling’s scripts/common.py:
- Original spaces become
wide_space(the CJK fonts give U+0020 ~0 advance). A$But…variable is followed byicon_pad[action]as gamepad icon room, which absorbs one original space right after it. Variables without icon room keep their spaces; at the end of a string they get a trailingwide_space. - U+0020 is inserted between two adjacent CJK characters (or after padding before a CJK character), unless the second is a no-line-start character, the first a no-line-end character, or the second is padding. After a wide space that replaced an original space, U+0020 is inserted before any character except no-line-start characters, padding and tokens.
Tokens ($But…, [br], [u…]) are atomic: nothing is inserted next to them.
breaks = false applies only rule 1 (short labels that never wrap).
Structs§
- Break
Space Options - Options for
insert_break_spaces; the defaults equal the TC tooling’s defaults.
Functions§
- default_
icon_ pad - Padding after each
$But<Action>whose default gamepad binding draws an icon (TC tooling:DEFAULT_ICON_PAD, derived fromconfig/default_user_keys_sdl2.cfgplus Exit = Start). LB/RB icons are 2 em wide. - insert_
break_ spaces - Port of
insert_break_spaces; see the module docs for the rules.