https://github.com/diskdance/gadget-text-spacing
Adjust spacing between Chinese and other scripts automatically
https://github.com/diskdance/gadget-text-spacing
mediawiki mediawiki-gadget wikipedia
Last synced: 3 months ago
JSON representation
Adjust spacing between Chinese and other scripts automatically
- Host: GitHub
- URL: https://github.com/diskdance/gadget-text-spacing
- Owner: diskdance
- License: bsd-3-clause
- Created: 2023-08-06T10:43:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-23T09:26:50.000Z (6 months ago)
- Last Synced: 2025-01-30T18:02:59.360Z (3 months ago)
- Topics: mediawiki, mediawiki-gadget, wikipedia
- Language: TypeScript
- Homepage:
- Size: 60.5 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# 优化中文混排字距小工具 / Chinese Inter-script Spacing Optimization Gadget
本 MediaWiki 小工具借助 JavaScript 自动在中文和英文或数字混排时优化字距,以符合 [W3C 中文排版要求](https://www.w3.org/TR/clreq/#mixed_text_composition_in_horizontal_writing_mode),使排版更美观。
效果类似于 CSS Text Level 4 的 `text-autospace` 属性,目前(2023 年 8 月)主流浏览器并未实现该特性。
This MediaWiki gadget uses JavaScript to optimize spacing between Chinese with English and with numbers for better appearance, and to comply with [W3C's Requirements for Chinese Text Layout](https://www.w3.org/TR/clreq/#mixed_text_composition_in_horizontal_writing_mode).
The gadget works similar to `text-autospace` in CSS Text Level 4, which is not implemented in major browsers as of writing time (Aug 2023).
## 致谢 / Acknowledgements
本工具在开发过程中受到了 [CJ Typographer](https://github.com/hiugiak/cj-typo) 的启发,特此感谢。
This gadget is inspired by [CJ Typographer](https://github.com/hiugiak/cj-typo).
## 协议 / License
以 3 Clause BSD 协议授权。见 [LICENSE](./LICENSE) 以获取更多信息。
License under 3 Clause BSD. See [LICENSE](./LICENSE) file for more info.