BezierInfo-2 icon indicating copy to clipboard operation
BezierInfo-2 copied to clipboard

Improve zh-CN styling for CN/ascii transitions

Open Pomax opened this issue 7 years ago • 4 comments

Pomax avatar Mar 21 '17 18:03 Pomax

the styling space problem is that in most Chinese font, font kerning is too small between CJK characters and ascii characters, can't set the CSS value separately, I'll see if there's any webpack-loader like lib that handles this.

josherich avatar Mar 22 '17 03:03 josherich

CSS can do anything, if you add some JS to it. A custom loader is easy enough to write though, the build chain already uses enough of them, inserting a CJK spacer component for CJK/Latin boundaries that renders as a <wbr class='cjks-spacer'> or something should be pretty trivial.

I'm spending more time on the build system tomorrow, to figure out a purer HTML/CSS/JS delivery for the user, while keeping things nice and build-based for development, I can take a stab at adding that in too.

Pomax avatar Mar 22 '17 04:03 Pomax

could be something like https://github.com/mastermay/text-autospace.js/blob/master/text-autospace.js

josherich avatar Mar 22 '17 12:03 josherich

I'll write something custom, but it'll do something similar to this (I've written block switchers before, to make things happen when switching between different unicode blocks, I can turn that into a webpack loader with not too much effort).

Pomax avatar Mar 22 '17 18:03 Pomax