Documentation
¶
Overview ¶
Command widthgen turns Unicode's EastAsianWidth.txt into the table the line editor measures with.
It exists because this module has no dependencies of its own and a width table cannot be derived from the standard library: Go ships the general categories, so combining marks come free, but not East Asian Width. The table is generated into the repository rather than imported, and this is the program that made it.
Usage:
go run ./internal/widthgen -in EastAsianWidth.txt -out internal/eastasian/eastasianwidth.go
The input is https://www.unicode.org/Public/<version>/ucd/EastAsianWidth.txt and is not checked in: it is read once, and what the build uses is the Go file this writes.
Click to show internal directories.
Click to hide internal directories.