Structs§
Constants§
- The version of Unicode that this version of unicode-width is based on.
- WIDTH_
LEAVES_ πLEN - WIDTH_
MIDDLE_ πLEN
Statics§
- 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.
- 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? - WIDTH_
LEAVES πAutogenerated. 180 sub-table(s). Consultlookup_width
for layout info. - WIDTH_
MIDDLE πAutogenerated. 4 sub-table(s). Consultlookup_width
for layout info. - WIDTH_
ROOT πAutogenerated. 1 sub-table(s). Consultlookup_width
for layout info.) - WIDTH_
ROOT_ πCJK Autogenerated. 17 sub-table(s). Consultlookup_width
for layout info.)
Functions§
- Returns
true
ifc
is anEmoji_Modifier_Base
. - Whether this character is a default-ignorable combining mark or ZWJ. These characters wonβt interrupt non-Arabic ligatures.
- Whether this character is transparent wrt the effect of U+0338 COMBINING LONG SOLIDUS OVERLAY on its base character.
- Whether this character is a zero-width character with
Joining_Type=Transparent
. Used by the Alef-Lamed ligatures. See alsois_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 ofc
by consulting a multi-level lookup table. - lookup_
width_ πcjk Returns the UAX #11 based width ofc
by consulting a multi-level lookup table. - Returns the UAX #11 based width of
c
, orNone
ifc
is a control character. Ambiguous width characters are treated as narrow. - Returns the UAX #11 based width of
c
, orNone
ifc
is a control character. Ambiguous width characters are treated as wide. - 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. - Returns
true
ifc
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. - width_
in_ πstr Returns the UAX #11 based width ofc
. Ambiguous width characters are treated as narrow. - width_
in_ πstr_ cjk Returns the UAX #11 based width ofc
. Ambiguous width characters are treated as wide.