diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 4 |
1 files changed, 3 insertions, 1 deletions
| @@ -441,7 +441,7 @@ test "Display width" { | |||
| 441 | } | 441 | } |
| 442 | ``` | 442 | ``` |
| 443 | 443 | ||
| 444 | This has a build option, `"cjk"`, which will consider [ambiguous characters](https://www.unicode.org/reports/tr11/tr11-6.html) as double-width. | 444 | This module has build options. The first is `cjk`, which will consider [ambiguous characters](https://www.unicode.org/reports/tr11/tr11-6.html) as double-width. |
| 445 | 445 | ||
| 446 | To choose this option, add it to the dependency like so: | 446 | To choose this option, add it to the dependency like so: |
| 447 | 447 | ||
| @@ -451,6 +451,8 @@ const zg = b.dependency("zg", .{ | |||
| 451 | }); | 451 | }); |
| 452 | ``` | 452 | ``` |
| 453 | 453 | ||
| 454 | The other options are `c0_width` and `c1_width`. The standard behavior is to treat C0 and C1 control codes as zero-width, except for delete and backspace, which are -1 (the logic ensures that a `strWidth` is always at least 0). If printing control codes with replacement characters, it's necessary to assign these a width, hence the options. When provided these values must fit in an `i4`, this allows for C1s to be printed as `\u{80}` if desired. | ||
| 455 | |||
| 454 | ## Scripts | 456 | ## Scripts |
| 455 | 457 | ||
| 456 | Unicode categorizes code points by the Script in which they belong. A Script | 458 | Unicode categorizes code points by the Script in which they belong. A Script |