-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat(UI): 补齐所有 U+2500~U+259F 区段的表格线和方块
基本策略如下: * 只有宽度不明确的字符才需要倍增宽度。 * 策略1: 双写。对于某些字符来说,重复它自己就可以了。 * 策略2: 延长。对于某些字符来说,需要在它后面延长适当的字符,比如横线或方块,使之视觉上连续。 * 策略3: 空格。无法通过双写或者延长来扩展宽度的字符,只能增加空格。 另外还有两种候选策略,暂不予以支持: * 替换字符。将宽度不明的字符,替换成外形和语义相似的另一个双倍宽度的字符。 例如用/来代替╱, 但这种方法由于会破坏语义,在不同字体下难以保持一致,因此暂时不予考虑。 * 向前检视。结合下一个字符的形状,综合考虑如何扩展可以使图形更平滑。 例如当█后面存在▁时,采用▄而不是█来扩展。实现相对比较复杂,暂时不予考虑。 另外,提供了一个 space 选项以强制采用策略3。 以及,增加了一个运行时调试开关以调试 ANSI codes。输入 /debug 可以开启或关闭。
- Loading branch information
Showing
2 changed files
with
66 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters