Fix CJK-Latin spacing incorrectly added around super/subscripts#7157
Fix CJK-Latin spacing incorrectly added around super/subscripts#7157hongjr03 wants to merge 3 commits intotypst:mainfrom
Conversation
|
What if there are both CJK and Latin characters in the superscript? |
The inner spacing should be preserved. I’ll fix it right away. |
|
I had the feeling that this could be simplified, so I gave it a shot. This required refactoring the original implementation a bit first, which I did in 4c0499f, to then add the shift handling in 0d63032. I've opened #7175 with this alternative approach. I kept your test and added you as a co-author. |
Alright! Should I close this pr or not? |
|
I'll just go ahead and close it now that I've merged the other one. Thanks for the quick fix that I could base my patch on! |
This pr fixes #7113.
This solution checks whether text has
shift_settings(which is only set by#super[],#sub[], and similar elements that render as actual superscripts/subscripts). This fixtracks super/subscript boundaries to only prevent spacing at the edges while
maintaining proper spacing for mixed CJK-Latin text inside.