-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in width calculation with multibyte characters. #109
Comments
Hi, I think we can make the situation better, but unfortunately it does not seem easy to fully fix it, because VS Code extension API does not expose width of each character or location of each character. So, blockman just calculates block width with 1 general character width times the count of characters in the line. For now, please try this Blockman command: With this experimental feature, Blockman will try to find Chinese/Japanese/Korean characters and it will try to treat each of them as two characters, so it will look something like this. It is still not correct width, but at least the rectangle is bigger, so the text does not overflow and it feels more natural probably. |
Thank you very much. |
Thank you a lot for your help. This is enough for me. Still confused for the one point, is this toggle command thing different from the extension settings since I couldn't find any changes on my VSCODE user settings? |
Yeah, it does not change the settings. It just changes the current state in memory. So, probably you have to rerun the command every time you restart VS Code. |
Thank you for your kind reply. Found a way to do this automatically. I would like to put it here in case anyone who has similar concern. Using VSCode's Tasks:
|
Still Looking Forward to a formal Setting for this feature. This is indeed a good enough one! I consider wider is better though some outlier cases might occur. |
Thanks for the feedback. I'll try to implement this feature as a formal setting for the next update of Blockman. |
Note: This text has been translated using DeepL.com.
English
When I use multibyte characters such as Japanese, the frame is not displayed correctly.
Multibyte characters are displayed wider, but all of them seem to be calculated with the same width as alphabets and symbols.
If it is technically possible, we would appreciate it if you could fix this.
Japanese(original)
日本語などのマルチバイト文字を使用した場合枠が正しく表示されません。
マルチバイト文字は幅が広く表示されますが、全てアルファベットや記号と同じ幅で計算されているようです。
技術的に可能でしたら修正していただけると助かります。
The text was updated successfully, but these errors were encountered: