Add is_emoji_presentation_base to char props table
This commit is contained in:
parent
f02245af79
commit
7697a1650d
4 changed files with 67102 additions and 67091 deletions
|
|
@ -707,6 +707,7 @@ class CharProps(NamedTuple):
|
|||
is_invalid: bool = True
|
||||
is_extended_pictographic: bool = True
|
||||
is_non_rendered: bool = True
|
||||
is_emoji_presentation_base: bool = True
|
||||
|
||||
@property
|
||||
def go_fields(self) -> Iterable[str]:
|
||||
|
|
@ -745,7 +746,7 @@ def as_c(self) -> str:
|
|||
f' .shifted_width={self.width + width_shift}, .grapheme_break=GBP_{self.grapheme_break},'
|
||||
f' .indic_conjunct_break=ICB_{self.indic_conjunct_break},'
|
||||
f' .is_invalid={int(self.is_invalid)}, .is_extended_pictographic={int(self.is_extended_pictographic)},'
|
||||
f' .is_non_rendered={int(self.is_non_rendered)},'
|
||||
f' .is_non_rendered={int(self.is_non_rendered)}, .is_emoji_presentation_base={int(self.is_emoji_presentation_base)}'
|
||||
' }')
|
||||
|
||||
|
||||
|
|
@ -795,7 +796,7 @@ def aw(s: Iterable[int], width: int) -> None:
|
|||
CharProps(
|
||||
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_extended_pictographic=ch in extended_pictographic
|
||||
is_extended_pictographic=ch in extended_pictographic, is_emoji_presentation_base=ch in emoji_presentation_bases,
|
||||
) for ch in range(sys.maxunicode + 1))
|
||||
t1, t2, shift, mask, bytesz = splitbins(prop_array, 2)
|
||||
print(f'Size of character properties table: {bytesz/1024:.1f}KB')
|
||||
|
|
|
|||
67072
kitty/char-props-data.h
generated
67072
kitty/char-props-data.h
generated
File diff suppressed because one or more lines are too long
|
|
@ -17,7 +17,8 @@ typedef union CharProps {
|
|||
uint8_t is_invalid: 1;
|
||||
uint8_t shifted_width : 3;
|
||||
uint8_t is_non_rendered : 1;
|
||||
uint8_t : 4;
|
||||
uint8_t is_emoji_presentation_base : 1;
|
||||
uint8_t : 3;
|
||||
};
|
||||
uint16_t val;
|
||||
} CharProps;
|
||||
|
|
|
|||
67113
tools/wcswidth/char-props-data.go
generated
67113
tools/wcswidth/char-props-data.go
generated
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue