Use a multistage lookup table for grapheme segmentation

This commit is contained in:
Kovid Goyal 2025-03-22 11:50:04 +05:30
parent 272045287a
commit 583a858769
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
9 changed files with 33798 additions and 7730 deletions

32
tools/wcswidth/char-props-data.go generated Normal file
View file

@ -0,0 +1,32 @@
package wcswidth
type GraphemeBreakProperty uint8
const (
GBP_AtStart GraphemeBreakProperty = iota
GBP_None
GBP_Prepend
GBP_CR
GBP_LF
GBP_Control
GBP_Extend
GBP_Regional_Indicator
GBP_SpacingMark
GBP_L
GBP_V
GBP_T
GBP_LV
GBP_LVT
GBP_ZWJ
)
type IndicConjunctBreak uint8
const (
ICB_None IndicConjunctBreak = iota
ICB_Linker
ICB_Consonant
ICB_Extend
)

File diff suppressed because one or more lines are too long