From fd2bbf57e3660139b4278229835574488f38d256 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 25 Mar 2025 16:35:09 +0530 Subject: [PATCH] Make unicode category data useable in other modules --- gen/wcwidth.py | 11 ++++++-- kitty/char-props-data.h | 43 ++++--------------------------- kitty/char-props.c | 2 -- kitty/char-props.h | 41 ++++++++++++++++++++++++++++- tools/wcswidth/char-props-data.go | 12 ++++----- 5 files changed, 60 insertions(+), 49 deletions(-) diff --git a/gen/wcwidth.py b/gen/wcwidth.py index 2f6b37d9c..9a4d584a5 100755 --- a/gen/wcwidth.py +++ b/gen/wcwidth.py @@ -11,6 +11,7 @@ from collections.abc import Generator, Hashable, Iterable from contextlib import contextmanager from functools import lru_cache, partial from html.entities import html5 +from io import StringIO from math import ceil, log from typing import ( Callable, @@ -687,18 +688,23 @@ def gen_char_props() -> None: width=width_map.get(ch, 1), grapheme_break=gs_map.get(ch, 'None'), indic_conjunct_break=icb_map.get(ch, 'None'), is_invalid=ch in invalid, is_non_rendered=ch in non_printing, is_emoji=ch in all_emoji, is_symbol=ch in all_symbols, is_extended_pictographic=ch in extended_pictographic, is_emoji_presentation_base=ch in emoji_presentation_bases, - is_combining_char=ch in marks, category=cat_map.get(ch, 'None'), is_word_char=ch in is_word_char, + is_combining_char=ch in marks, category=cat_map.get(ch, 'Cn'), is_word_char=ch in is_word_char, is_punctuation=ch in is_punctuation, ) for ch in range(sys.maxunicode + 1)) t1, t2, t3, shift, mask, bytesz = splitbins(prop_array, CharProps.bitsize() // 8) print(f'Size of character properties table: {bytesz/1024:.1f}KB') + from .bitfields import make_bitfield + buf = StringIO() + cen = partial(print, file=buf) with create_header('kitty/char-props-data.h', include_data_types=False) as c, open('tools/wcswidth/char-props-data.go', 'w') as gof: gp = partial(print, file=gof) gp('package wcswidth') generate_enum(c, gp, 'GraphemeBreakProperty', 'AtStart', 'None', *grapheme_segmentation_maps, prefix='GBP_') generate_enum(c, gp, 'IndicConjunctBreak', 'None', *incb_map, prefix='ICB_') - generate_enum(c, gp, 'UnicodeCategory', 'None', *class_maps, prefix='UC_') + cen('// UCBDeclaration') + generate_enum(cen, gp, 'UnicodeCategory', 'Cn', *class_maps, prefix='UC_') + cen('// EndUCBDeclaration') bf = make_bitfield('tools/wcswidth', 'CharProps', *CharProps().go_fields, add_package=False)[1] gp(bf) gp(f''' @@ -711,6 +717,7 @@ func (s CharProps) Width() int {{ raw = f.read() nraw = re.sub(r'\d+/\*=width_shift\*/', f'{width_shift}/*=width_shift*/', raw) nraw = re.sub(r'// CharPropsDeclaration.+?// EndCharPropsDeclaration', CharProps.c_declaration(), nraw, flags=re.DOTALL) + nraw = re.sub(r'// UCBDeclaration.+?// EndUCBDeclaration', buf.getvalue(), nraw, flags=re.DOTALL) if nraw != raw: f.seek(0) f.truncate() diff --git a/kitty/char-props-data.h b/kitty/char-props-data.h index d76e4176f..0fd0224ee 100644 --- a/kitty/char-props-data.h +++ b/kitty/char-props-data.h @@ -28,39 +28,6 @@ typedef enum IndicConjunctBreak { ICB_Extend, } IndicConjunctBreak; -typedef enum UnicodeCategory { - UC_None, - UC_Cc, - UC_Zs, - UC_Po, - UC_Sc, - UC_Ps, - UC_Pe, - UC_Sm, - UC_Pd, - UC_Nd, - UC_Lu, - UC_Sk, - UC_Pc, - UC_Ll, - UC_So, - UC_Lo, - UC_Pi, - UC_Cf, - UC_No, - UC_Pf, - UC_Lt, - UC_Lm, - UC_Mn, - UC_Me, - UC_Mc, - UC_Nl, - UC_Zl, - UC_Zp, - UC_Cs, - UC_Co, -} UnicodeCategory; - static const char_type CharProps_mask = 255u; static const char_type CharProps_shift = 8u; static const uint8_t CharProps_t1[4352] = { @@ -107,7 +74,7 @@ static const CharProps CharProps_t3[108] = { {.shifted_width=5, .is_extended_pictographic=0, .grapheme_break=GBP_None, .indic_conjunct_break=ICB_None, .category=UC_Lm, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=0, .is_word_char=1, .is_punctuation=0}, {.shifted_width=2, .is_extended_pictographic=0, .grapheme_break=GBP_None, .indic_conjunct_break=ICB_None, .category=UC_Lm, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=0, .is_word_char=1, .is_punctuation=0}, {.shifted_width=4, .is_extended_pictographic=0, .grapheme_break=GBP_Extend, .indic_conjunct_break=ICB_Extend, .category=UC_Mn, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=1, .is_word_char=0, .is_punctuation=0}, - {.shifted_width=0, .is_extended_pictographic=0, .grapheme_break=GBP_None, .indic_conjunct_break=ICB_None, .category=UC_None, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=0, .is_word_char=0, .is_punctuation=0}, + {.shifted_width=0, .is_extended_pictographic=0, .grapheme_break=GBP_None, .indic_conjunct_break=ICB_None, .category=UC_Cn, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=0, .is_word_char=0, .is_punctuation=0}, {.shifted_width=4, .is_extended_pictographic=0, .grapheme_break=GBP_Extend, .indic_conjunct_break=ICB_Extend, .category=UC_Me, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=1, .is_word_char=0, .is_punctuation=0}, {.shifted_width=4, .is_extended_pictographic=0, .grapheme_break=GBP_Prepend, .indic_conjunct_break=ICB_None, .category=UC_Cf, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=1, .is_symbol=0, .is_combining_char=1, .is_word_char=0, .is_punctuation=0}, {.shifted_width=5, .is_extended_pictographic=0, .grapheme_break=GBP_None, .indic_conjunct_break=ICB_None, .category=UC_Nd, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=0, .is_word_char=1, .is_punctuation=0}, @@ -133,7 +100,7 @@ static const CharProps CharProps_t3[108] = { {.shifted_width=5, .is_extended_pictographic=0, .grapheme_break=GBP_Control, .indic_conjunct_break=ICB_None, .category=UC_Zl, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=0, .is_word_char=0, .is_punctuation=0}, {.shifted_width=5, .is_extended_pictographic=0, .grapheme_break=GBP_Control, .indic_conjunct_break=ICB_None, .category=UC_Zp, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=0, .is_word_char=0, .is_punctuation=0}, {.shifted_width=5, .is_extended_pictographic=1, .grapheme_break=GBP_None, .indic_conjunct_break=ICB_None, .category=UC_Po, .is_emoji=1, .is_emoji_presentation_base=1, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=0, .is_word_char=0, .is_punctuation=1}, - {.shifted_width=4, .is_extended_pictographic=0, .grapheme_break=GBP_Control, .indic_conjunct_break=ICB_None, .category=UC_None, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=1, .is_word_char=0, .is_punctuation=0}, + {.shifted_width=4, .is_extended_pictographic=0, .grapheme_break=GBP_Control, .indic_conjunct_break=ICB_None, .category=UC_Cn, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=1, .is_word_char=0, .is_punctuation=0}, {.shifted_width=5, .is_extended_pictographic=1, .grapheme_break=GBP_None, .indic_conjunct_break=ICB_None, .category=UC_Ll, .is_emoji=1, .is_emoji_presentation_base=1, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=0, .is_word_char=1, .is_punctuation=0}, {.shifted_width=2, .is_extended_pictographic=0, .grapheme_break=GBP_None, .indic_conjunct_break=ICB_None, .category=UC_Nl, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=0, .is_word_char=1, .is_punctuation=0}, {.shifted_width=2, .is_extended_pictographic=1, .grapheme_break=GBP_None, .indic_conjunct_break=ICB_None, .category=UC_Sm, .is_emoji=1, .is_emoji_presentation_base=1, .is_invalid=0, .is_non_rendered=0, .is_symbol=1, .is_combining_char=0, .is_word_char=0, .is_punctuation=0}, @@ -164,7 +131,7 @@ static const CharProps CharProps_t3[108] = { {.shifted_width=6, .is_extended_pictographic=0, .grapheme_break=GBP_LVT, .indic_conjunct_break=ICB_None, .category=UC_Lo, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=0, .is_word_char=1, .is_punctuation=0}, {.shifted_width=3, .is_extended_pictographic=0, .grapheme_break=GBP_None, .indic_conjunct_break=ICB_None, .category=UC_Cs, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=1, .is_non_rendered=1, .is_symbol=0, .is_combining_char=0, .is_word_char=0, .is_punctuation=0}, {.shifted_width=2, .is_extended_pictographic=0, .grapheme_break=GBP_None, .indic_conjunct_break=ICB_None, .category=UC_Co, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=0, .is_word_char=0, .is_punctuation=0}, - {.shifted_width=6, .is_extended_pictographic=0, .grapheme_break=GBP_None, .indic_conjunct_break=ICB_None, .category=UC_None, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=0, .is_word_char=0, .is_punctuation=0}, + {.shifted_width=6, .is_extended_pictographic=0, .grapheme_break=GBP_None, .indic_conjunct_break=ICB_None, .category=UC_Cn, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=0, .is_word_char=0, .is_punctuation=0}, {.shifted_width=6, .is_extended_pictographic=0, .grapheme_break=GBP_None, .indic_conjunct_break=ICB_None, .category=UC_Pc, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=0, .is_word_char=0, .is_punctuation=1}, {.shifted_width=6, .is_extended_pictographic=0, .grapheme_break=GBP_None, .indic_conjunct_break=ICB_None, .category=UC_Sm, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=1, .is_combining_char=0, .is_word_char=0, .is_punctuation=0}, {.shifted_width=6, .is_extended_pictographic=0, .grapheme_break=GBP_None, .indic_conjunct_break=ICB_None, .category=UC_Sc, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=1, .is_combining_char=0, .is_word_char=0, .is_punctuation=0}, @@ -173,10 +140,10 @@ static const CharProps CharProps_t3[108] = { {.shifted_width=6, .is_extended_pictographic=0, .grapheme_break=GBP_None, .indic_conjunct_break=ICB_None, .category=UC_Ll, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=0, .is_word_char=1, .is_punctuation=0}, {.shifted_width=5, .is_extended_pictographic=0, .grapheme_break=GBP_Extend, .indic_conjunct_break=ICB_Extend, .category=UC_Lm, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=0, .is_word_char=1, .is_punctuation=0}, {.shifted_width=4, .is_extended_pictographic=0, .grapheme_break=GBP_None, .indic_conjunct_break=ICB_None, .category=UC_Lo, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=1, .is_word_char=1, .is_punctuation=0}, - {.shifted_width=0, .is_extended_pictographic=1, .grapheme_break=GBP_None, .indic_conjunct_break=ICB_None, .category=UC_None, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=0, .is_word_char=0, .is_punctuation=0}, + {.shifted_width=0, .is_extended_pictographic=1, .grapheme_break=GBP_None, .indic_conjunct_break=ICB_None, .category=UC_Cn, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=0, .is_word_char=0, .is_punctuation=0}, {.shifted_width=6, .is_extended_pictographic=0, .grapheme_break=GBP_Regional_Indicator, .indic_conjunct_break=ICB_None, .category=UC_So, .is_emoji=1, .is_emoji_presentation_base=1, .is_invalid=0, .is_non_rendered=0, .is_symbol=1, .is_combining_char=1, .is_word_char=0, .is_punctuation=0}, {.shifted_width=6, .is_extended_pictographic=0, .grapheme_break=GBP_Extend, .indic_conjunct_break=ICB_Extend, .category=UC_Sk, .is_emoji=1, .is_emoji_presentation_base=1, .is_invalid=0, .is_non_rendered=0, .is_symbol=1, .is_combining_char=1, .is_word_char=0, .is_punctuation=0}, {.shifted_width=4, .is_extended_pictographic=0, .grapheme_break=GBP_Extend, .indic_conjunct_break=ICB_Extend, .category=UC_Cf, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=1, .is_symbol=0, .is_combining_char=1, .is_word_char=0, .is_punctuation=0}, - {.shifted_width=5, .is_extended_pictographic=0, .grapheme_break=GBP_None, .indic_conjunct_break=ICB_None, .category=UC_None, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=0, .is_word_char=0, .is_punctuation=0}, + {.shifted_width=5, .is_extended_pictographic=0, .grapheme_break=GBP_None, .indic_conjunct_break=ICB_None, .category=UC_Cn, .is_emoji=0, .is_emoji_presentation_base=0, .is_invalid=0, .is_non_rendered=0, .is_symbol=0, .is_combining_char=0, .is_word_char=0, .is_punctuation=0}, }; diff --git a/kitty/char-props.c b/kitty/char-props.c index 5b2df22e5..eeb872835 100644 --- a/kitty/char-props.c +++ b/kitty/char-props.c @@ -69,5 +69,3 @@ grapheme_segmentation_step(GraphemeSegmentationState *s, CharProps ch) { return add_to_cell; } -bool -is_private_use(CharProps ch) { return ch.category == UC_Co; } diff --git a/kitty/char-props.h b/kitty/char-props.h index c9666341c..494fa635a 100644 --- a/kitty/char-props.h +++ b/kitty/char-props.h @@ -9,6 +9,45 @@ #include "data-types.h" +// UCBDeclaration +typedef enum UnicodeCategory { + UC_Cn, + UC_Cc, + UC_Zs, + UC_Po, + UC_Sc, + UC_Ps, + UC_Pe, + UC_Sm, + UC_Pd, + UC_Nd, + UC_Lu, + UC_Sk, + UC_Pc, + UC_Ll, + UC_So, + UC_Lo, + UC_Pi, + UC_Cf, + UC_No, + UC_Pf, + UC_Lt, + UC_Lm, + UC_Mn, + UC_Me, + UC_Mc, + UC_Nl, + UC_Zl, + UC_Zp, + UC_Cs, + UC_Co, +} UnicodeCategory; + +// EndUCBDeclaration + + + + // CharPropsDeclaration // Uses 23 bits typedef union CharProps { @@ -61,4 +100,4 @@ CharProps char_props_for(char_type ch); void grapheme_segmentation_reset(GraphemeSegmentationState *s); bool grapheme_segmentation_step(GraphemeSegmentationState *s, CharProps ch); static inline int wcwidth_std(CharProps ch) { return (int)ch.shifted_width - 4/*=width_shift*/; } -bool is_private_use(CharProps ch); +static inline bool is_private_use(CharProps ch) { return ch.category == UC_Co; } diff --git a/tools/wcswidth/char-props-data.go b/tools/wcswidth/char-props-data.go index 7b8b305c1..448c9e5b6 100644 --- a/tools/wcswidth/char-props-data.go +++ b/tools/wcswidth/char-props-data.go @@ -32,7 +32,7 @@ const ( type UnicodeCategory uint8 const ( - UC_None UnicodeCategory = iota + UC_Cn UnicodeCategory = iota UC_Cc UC_Zs UC_Po @@ -235,7 +235,7 @@ var charprops_t3 = [108]CharProps{ ((0 & 0b1) << 0) | ((1 & 0b1) << 1) | ((0 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Lm) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_None) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((5 & 0b111) << 20), ((0 & 0b1) << 0) | ((1 & 0b1) << 1) | ((0 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Lm) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_None) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((2 & 0b111) << 20), ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((1 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Mn) & 0b11111) << 8) | ((CharProps(ICB_Extend) & 0b11) << 13) | ((CharProps(GBP_Extend) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((4 & 0b111) << 20), - ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((0 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_None) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_None) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((0 & 0b111) << 20), + ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((0 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Cn) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_None) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((0 & 0b111) << 20), ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((1 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Me) & 0b11111) << 8) | ((CharProps(ICB_Extend) & 0b11) << 13) | ((CharProps(GBP_Extend) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((4 & 0b111) << 20), ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((1 & 0b1) << 2) | ((0 & 0b1) << 3) | ((1 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Cf) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_Prepend) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((4 & 0b111) << 20), ((0 & 0b1) << 0) | ((1 & 0b1) << 1) | ((0 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Nd) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_None) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((5 & 0b111) << 20), @@ -261,7 +261,7 @@ var charprops_t3 = [108]CharProps{ ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((0 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Zl) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_Control) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((5 & 0b111) << 20), ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((0 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Zp) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_Control) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((5 & 0b111) << 20), ((1 & 0b1) << 0) | ((0 & 0b1) << 1) | ((0 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((1 & 0b1) << 6) | ((1 & 0b1) << 7) | ((CharProps(UC_Po) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_None) & 0b1111) << 15) | ((1 & 0b1) << 19) | ((5 & 0b111) << 20), - ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((1 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_None) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_Control) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((4 & 0b111) << 20), + ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((1 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Cn) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_Control) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((4 & 0b111) << 20), ((0 & 0b1) << 0) | ((1 & 0b1) << 1) | ((0 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((1 & 0b1) << 6) | ((1 & 0b1) << 7) | ((CharProps(UC_Ll) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_None) & 0b1111) << 15) | ((1 & 0b1) << 19) | ((5 & 0b111) << 20), ((0 & 0b1) << 0) | ((1 & 0b1) << 1) | ((0 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Nl) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_None) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((2 & 0b111) << 20), ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((0 & 0b1) << 2) | ((1 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((1 & 0b1) << 6) | ((1 & 0b1) << 7) | ((CharProps(UC_Sm) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_None) & 0b1111) << 15) | ((1 & 0b1) << 19) | ((2 & 0b111) << 20), @@ -292,7 +292,7 @@ var charprops_t3 = [108]CharProps{ ((0 & 0b1) << 0) | ((1 & 0b1) << 1) | ((0 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Lo) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_LVT) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((6 & 0b111) << 20), ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((0 & 0b1) << 2) | ((0 & 0b1) << 3) | ((1 & 0b1) << 4) | ((1 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Cs) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_None) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((3 & 0b111) << 20), ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((0 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Co) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_None) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((2 & 0b111) << 20), - ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((0 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_None) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_None) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((6 & 0b111) << 20), + ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((0 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Cn) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_None) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((6 & 0b111) << 20), ((1 & 0b1) << 0) | ((0 & 0b1) << 1) | ((0 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Pc) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_None) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((6 & 0b111) << 20), ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((0 & 0b1) << 2) | ((1 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Sm) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_None) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((6 & 0b111) << 20), ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((0 & 0b1) << 2) | ((1 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Sc) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_None) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((6 & 0b111) << 20), @@ -301,9 +301,9 @@ var charprops_t3 = [108]CharProps{ ((0 & 0b1) << 0) | ((1 & 0b1) << 1) | ((0 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Ll) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_None) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((6 & 0b111) << 20), ((0 & 0b1) << 0) | ((1 & 0b1) << 1) | ((0 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Lm) & 0b11111) << 8) | ((CharProps(ICB_Extend) & 0b11) << 13) | ((CharProps(GBP_Extend) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((5 & 0b111) << 20), ((0 & 0b1) << 0) | ((1 & 0b1) << 1) | ((1 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Lo) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_None) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((4 & 0b111) << 20), - ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((0 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_None) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_None) & 0b1111) << 15) | ((1 & 0b1) << 19) | ((0 & 0b111) << 20), + ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((0 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Cn) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_None) & 0b1111) << 15) | ((1 & 0b1) << 19) | ((0 & 0b111) << 20), ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((1 & 0b1) << 2) | ((1 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((1 & 0b1) << 6) | ((1 & 0b1) << 7) | ((CharProps(UC_So) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_Regional_Indicator) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((6 & 0b111) << 20), ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((1 & 0b1) << 2) | ((1 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((1 & 0b1) << 6) | ((1 & 0b1) << 7) | ((CharProps(UC_Sk) & 0b11111) << 8) | ((CharProps(ICB_Extend) & 0b11) << 13) | ((CharProps(GBP_Extend) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((6 & 0b111) << 20), ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((1 & 0b1) << 2) | ((0 & 0b1) << 3) | ((1 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Cf) & 0b11111) << 8) | ((CharProps(ICB_Extend) & 0b11) << 13) | ((CharProps(GBP_Extend) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((4 & 0b111) << 20), - ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((0 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_None) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_None) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((5 & 0b111) << 20), + ((0 & 0b1) << 0) | ((0 & 0b1) << 1) | ((0 & 0b1) << 2) | ((0 & 0b1) << 3) | ((0 & 0b1) << 4) | ((0 & 0b1) << 5) | ((0 & 0b1) << 6) | ((0 & 0b1) << 7) | ((CharProps(UC_Cn) & 0b11111) << 8) | ((CharProps(ICB_None) & 0b11) << 13) | ((CharProps(GBP_None) & 0b1111) << 15) | ((0 & 0b1) << 19) | ((5 & 0b111) << 20), }