Module tables

Source

StructsΒ§

Align32 πŸ”’
Align64 πŸ”’
Align128 πŸ”’
WidthInfo πŸ”’

ConstantsΒ§

UNICODE_VERSION
The version of Unicode that this version of unicode-width is based on.
WIDTH_LEAVES_LEN πŸ”’
WIDTH_MIDDLE_LEN πŸ”’

StaticsΒ§

EMOJI_MODIFIER_LEAF_0 πŸ”’
EMOJI_MODIFIER_LEAF_1 πŸ”’
EMOJI_MODIFIER_LEAF_2 πŸ”’
EMOJI_MODIFIER_LEAF_3 πŸ”’
EMOJI_MODIFIER_LEAF_4 πŸ”’
EMOJI_MODIFIER_LEAF_5 πŸ”’
EMOJI_MODIFIER_LEAF_6 πŸ”’
EMOJI_MODIFIER_LEAF_7 πŸ”’
EMOJI_PRESENTATION_LEAVES πŸ”’
Array of 1024-bit bitmaps. Index into the correct bitmap with the 10 LSB of your codepoint to get whether it can start an emoji presentation sequence.
NON_TRANSPARENT_ZERO_WIDTHS πŸ”’
Sorted list of codepoint ranges (inclusive) that are zero-width but not Joining_Type=Transparent FIXME: can we get better compression?
SOLIDUS_TRANSPARENT πŸ”’
Sorted list of codepoint ranges (inclusive) that don’t affect how the combining solidus applies (mostly ccc > 1). FIXME: can we get better compression?
TEXT_PRESENTATION_LEAF_0 πŸ”’
TEXT_PRESENTATION_LEAF_1 πŸ”’
TEXT_PRESENTATION_LEAF_2 πŸ”’
TEXT_PRESENTATION_LEAF_3 πŸ”’
TEXT_PRESENTATION_LEAF_4 πŸ”’
TEXT_PRESENTATION_LEAF_5 πŸ”’
TEXT_PRESENTATION_LEAF_6 πŸ”’
TEXT_PRESENTATION_LEAF_7 πŸ”’
TEXT_PRESENTATION_LEAF_8 πŸ”’
TEXT_PRESENTATION_LEAF_9 πŸ”’
WIDTH_LEAVES πŸ”’
Autogenerated. 180 sub-table(s). Consult lookup_width for layout info.
WIDTH_MIDDLE πŸ”’
Autogenerated. 4 sub-table(s). Consult lookup_width for layout info.
WIDTH_ROOT πŸ”’
Autogenerated. 1 sub-table(s). Consult lookup_width for layout info.)
WIDTH_ROOT_CJK πŸ”’
Autogenerated. 17 sub-table(s). Consult lookup_width for layout info.)

FunctionsΒ§

is_emoji_modifier_base
Returns true if c is an Emoji_Modifier_Base.
is_ligature_transparent πŸ”’
Whether this character is a default-ignorable combining mark or ZWJ. These characters won’t interrupt non-Arabic ligatures.
is_solidus_transparent πŸ”’
Whether this character is transparent wrt the effect of U+0338 COMBINING LONG SOLIDUS OVERLAY on its base character.
is_transparent_zero_width πŸ”’
Whether this character is a zero-width character with Joining_Type=Transparent. Used by the Alef-Lamed ligatures. See also is_ligature_transparent, a near-subset of this (only ZWJ is excepted) which is transparent for non-Arabic ligatures.
lookup_width πŸ”’
Returns the UAX #11 based width of c by consulting a multi-level lookup table.
lookup_width_cjk πŸ”’
Returns the UAX #11 based width of c by consulting a multi-level lookup table.
single_char_width
Returns the UAX #11 based width of c, or None if c is a control character. Ambiguous width characters are treated as narrow.
single_char_width_cjk
Returns the UAX #11 based width of c, or None if c is a control character. Ambiguous width characters are treated as wide.
starts_emoji_presentation_seq
Whether this character forms an [emoji presentation sequence] (https://www.unicode.org/reports/tr51/#def_emoji_presentation_sequence) when followed by '\u{FEOF}'. Emoji presentation sequences are considered to have width 2.
starts_non_ideographic_text_presentation_seq
Returns true if c has default emoji presentation, but forms a [text presentation sequence] (https://www.unicode.org/reports/tr51/#def_text_presentation_sequence) when followed by '\u{FEOE}', and is not ideographic. Such sequences are considered to have width 1.
str_width
str_width_cjk
width_in_str πŸ”’
Returns the UAX #11 based width of c. Ambiguous width characters are treated as narrow.
width_in_str_cjk πŸ”’
Returns the UAX #11 based width of c. Ambiguous width characters are treated as wide.