MaaAssistantArknights / MaaAssistantArknights/maa-cli
公开招募任务显示的星级字符在 Kitty 终端上显示不理想
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 117
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
## 描述
已知 kitty 会将部分 2 宽(但在 Unicode 标准中对应码位应该是 1 宽)的字符缩小到 1 宽显示,只有当其后面有空格是时候会显示为 2 宽。
这就导致下面这种情况:
最后一个星是大的,因为它使用了后面带的空格进行渲染。
作为对比,其他终端(如 Konsole):
这是因为它们会将多出的字形溢出到下一个单元格中。
## 可能的解决方案
- 在每个 `★` 后面统一加一个空格,这可以统一所有终端的显示
- 使用 [Kitty Text Sizing Protocol](https://sw.kovidgoyal.net/kitty/text-sizing-protocol/) 强制该字符以 2 宽显示,这样可以优化 Kitty 上的显示,而其他终端保持不变
- 使用 `\e]66;w=2;★\a`
- 其他终端的支持情况:
- foot 仅支持了 `w` 属性:https://codeberg.org/dnkl/foot/pulls/1927
- ghostty 正在计划中:https://github.com/ghostty-org/ghostty/issues/10333
## 额外信息
我可以为此提交 PR。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named; start by locating the CLI code that renders the ★ characters for the public recruitment task. Compare the trailing-space and Kitty Text Sizing Protocol options, then verify the chosen behavior in Kitty and another terminal so the star display is consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100