Skip to content
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

Extension supports only locales that use wide characters. #7

Open
ohir opened this issue Oct 27, 2023 · 1 comment
Open

Extension supports only locales that use wide characters. #7

ohir opened this issue Oct 27, 2023 · 1 comment

Comments

@ohir
Copy link

ohir commented Oct 27, 2023

Trying to draw with normal width font under western locales doubles space.

┌───────┬─────────┐
│              │                  │
│              │                  │
└───────┴─────────┤
indent is with spaces, ts=1

There are two spaces produced for each horizontal line above. I know from where likely it came:
VSC with Asia locales (using a mostly wide glyphs font) probably adjust the display, but VSC with western locales does not.

For now it would be good to have a knob to say "boxdraw.use.single": "yes" somewhere
and have boxdraw emit a single space per single horizontal line above, if set.

In vscode, many double-byte symbols are treated as half-width characters internally. As a result, moving the cursor up and down will cause it to rattle left and right. See isFullWidthCharacter() in https://github.com/microsoft/vscode/blob/main/src/vs/base/common/strings.ts

IMO this is not a source of the problem. Frame drawing glyphs in unicode (and fonts) are all "narrow", and how many bytes a codepoint is written with has no correlation to the glyph being wide, half-width, or narrow.

Thanks!

@taizod1024
Copy link
Owner

コメントありがとうございます。
返信が遅れてすみません。

western localeのことは考慮していませんでした。
(western localeでこの拡張機能を使おうとしてくれたことに感動しています)
提案を取り込みます。しばらくお待ちください。

あなたが言う通り、unicodeでの描画はいつもnarrowですね。
asia localeでは「wide gryphで表示されることが多い」というだけですね。
double-byte symbolについての説明はasia locale限定の現象の見え方です。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants