tid-kijyun / XcodeSourceEditorExtension-Alignment

This Xcode source editor extension align your assignment statement.
MIT License
217 stars 24 forks source link

Incorrect alignment Chinese characters #7

Closed hex2010 closed 7 years ago

hex2010 commented 7 years ago

In most cases Chinese characters are double width:

        //  Chinese, not works
        c["黑"]      = _bgr(0x000000)
        c["昏灰"]     = _bgr(0x696969)
        c["灰"]      = _bgr(0x808080)
        c["暗灰"]     = _bgr(0xA9A9A9)

chnsaw

tid-kijyun commented 7 years ago

It is not possible to align the code that contains multi-byte characters.

BTW, Is it possible to align the code manually? Please tell me if there is a way.

hex2010 commented 7 years ago

my bad. In a "correct" configured editor environment, Chinese characters should display as exact double width squares, so we can simply double the size for those chars.

cjk

tid-kijyun commented 7 years ago

I agree with you, so I can not deal with this issue.

Thanks