mirror of
https://github.com/wez/wezterm.git
synced 2024-11-22 22:42:48 +03:00
termwiz: update widechar_width
Brings us up to date withc68f845054
Notably:ea5824d966
This commit is contained in:
parent
e7b8374c3f
commit
3b209c671d
@ -1007,6 +1007,16 @@ mod test {
|
||||
);
|
||||
assert_eq!(
|
||||
unicode_column_width(man_dancing, Some(UnicodeVersion(8))),
|
||||
2
|
||||
);
|
||||
|
||||
let raised_fist = "\u{270a}";
|
||||
assert_eq!(
|
||||
unicode_column_width(raised_fist, Some(UnicodeVersion(9))),
|
||||
2
|
||||
);
|
||||
assert_eq!(
|
||||
unicode_column_width(raised_fist, Some(UnicodeVersion(8))),
|
||||
1
|
||||
);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* widechar_width.rs, generated on 2022-01-01.
|
||||
* widechar_width.rs, generated on 2022-02-11.
|
||||
* See https://github.com/ridiculousfish/widecharwidth/
|
||||
*
|
||||
* SHA1 file hashes:
|
||||
@ -375,40 +375,7 @@ const COMBININGLETTERS_TABLE: &'static [R] = &[(0x01160, 0x011FF), (0x0D7B0, 0x0
|
||||
/// Width 2 characters.
|
||||
const DOUBLEWIDE_TABLE: &'static [R] = &[
|
||||
(0x01100, 0x0115F),
|
||||
(0x0231A, 0x0231B),
|
||||
(0x02329, 0x0232A),
|
||||
(0x023E9, 0x023EC),
|
||||
(0x023F0, 0x023F0),
|
||||
(0x023F3, 0x023F3),
|
||||
(0x025FD, 0x025FE),
|
||||
(0x02614, 0x02615),
|
||||
(0x02648, 0x02653),
|
||||
(0x0267F, 0x0267F),
|
||||
(0x02693, 0x02693),
|
||||
(0x026A1, 0x026A1),
|
||||
(0x026AA, 0x026AB),
|
||||
(0x026BD, 0x026BE),
|
||||
(0x026C4, 0x026C5),
|
||||
(0x026CE, 0x026CE),
|
||||
(0x026D4, 0x026D4),
|
||||
(0x026EA, 0x026EA),
|
||||
(0x026F2, 0x026F3),
|
||||
(0x026F5, 0x026F5),
|
||||
(0x026FA, 0x026FA),
|
||||
(0x026FD, 0x026FD),
|
||||
(0x02705, 0x02705),
|
||||
(0x0270A, 0x0270B),
|
||||
(0x02728, 0x02728),
|
||||
(0x0274C, 0x0274C),
|
||||
(0x0274E, 0x0274E),
|
||||
(0x02753, 0x02755),
|
||||
(0x02757, 0x02757),
|
||||
(0x02795, 0x02797),
|
||||
(0x027B0, 0x027B0),
|
||||
(0x027BF, 0x027BF),
|
||||
(0x02B1B, 0x02B1C),
|
||||
(0x02B50, 0x02B50),
|
||||
(0x02B55, 0x02B55),
|
||||
(0x02E80, 0x02E99),
|
||||
(0x02E9B, 0x02EF3),
|
||||
(0x02F00, 0x02FD5),
|
||||
@ -445,46 +412,29 @@ const DOUBLEWIDE_TABLE: &'static [R] = &[
|
||||
(0x1B150, 0x1B152),
|
||||
(0x1B164, 0x1B167),
|
||||
(0x1B170, 0x1B2FB),
|
||||
(0x1F004, 0x1F004),
|
||||
(0x1F0CF, 0x1F0CF),
|
||||
(0x1F18E, 0x1F18E),
|
||||
(0x1F191, 0x1F19A),
|
||||
(0x1F200, 0x1F202),
|
||||
(0x1F210, 0x1F23B),
|
||||
(0x1F200, 0x1F200),
|
||||
(0x1F202, 0x1F202),
|
||||
(0x1F210, 0x1F219),
|
||||
(0x1F21B, 0x1F22E),
|
||||
(0x1F230, 0x1F231),
|
||||
(0x1F237, 0x1F237),
|
||||
(0x1F23B, 0x1F23B),
|
||||
(0x1F240, 0x1F248),
|
||||
(0x1F250, 0x1F251),
|
||||
(0x1F260, 0x1F265),
|
||||
(0x1F300, 0x1F320),
|
||||
(0x1F32D, 0x1F335),
|
||||
(0x1F337, 0x1F37C),
|
||||
(0x1F37E, 0x1F393),
|
||||
(0x1F3A0, 0x1F3CA),
|
||||
(0x1F3CF, 0x1F3D3),
|
||||
(0x1F3E0, 0x1F3F0),
|
||||
(0x1F3F4, 0x1F3F4),
|
||||
(0x1F3F8, 0x1F43E),
|
||||
(0x1F440, 0x1F440),
|
||||
(0x1F442, 0x1F4FC),
|
||||
(0x1F4FF, 0x1F53D),
|
||||
(0x1F54B, 0x1F54E),
|
||||
(0x1F550, 0x1F567),
|
||||
(0x1F595, 0x1F596),
|
||||
(0x1F5FB, 0x1F64F),
|
||||
(0x1F680, 0x1F6C5),
|
||||
(0x1F6CC, 0x1F6CC),
|
||||
(0x1F6D0, 0x1F6D0),
|
||||
(0x1F57A, 0x1F57A),
|
||||
(0x1F5A4, 0x1F5A4),
|
||||
(0x1F6D1, 0x1F6D2),
|
||||
(0x1F6D5, 0x1F6D7),
|
||||
(0x1F6DD, 0x1F6DF),
|
||||
(0x1F6EB, 0x1F6EC),
|
||||
(0x1F6F9, 0x1F6FC),
|
||||
(0x1F6F4, 0x1F6FC),
|
||||
(0x1F7E0, 0x1F7EB),
|
||||
(0x1F7F0, 0x1F7F0),
|
||||
(0x1F90C, 0x1F918),
|
||||
(0x1F93F, 0x1F93F),
|
||||
(0x1F94D, 0x1F94F),
|
||||
(0x1F96C, 0x1F984),
|
||||
(0x1F998, 0x1F9CF),
|
||||
(0x1F9E7, 0x1F9FF),
|
||||
(0x1F90C, 0x1F90F),
|
||||
(0x1F919, 0x1F93A),
|
||||
(0x1F93C, 0x1F945),
|
||||
(0x1F947, 0x1F97F),
|
||||
(0x1F985, 0x1F9BF),
|
||||
(0x1F9C1, 0x1F9FF),
|
||||
(0x1FA70, 0x1FA74),
|
||||
(0x1FA78, 0x1FA7C),
|
||||
(0x1FA80, 0x1FA86),
|
||||
@ -1425,17 +1375,72 @@ const NONCHAR_TABLE: &'static [R] = &[
|
||||
|
||||
/// Characters that were widened from width 1 to 2 in Unicode 9.
|
||||
const WIDENED_TABLE: &'static [R] = &[
|
||||
(0x1F57A, 0x1F57A),
|
||||
(0x1F5A4, 0x1F5A4),
|
||||
(0x1F6D1, 0x1F6D2),
|
||||
(0x1F6F4, 0x1F6F8),
|
||||
(0x1F919, 0x1F93A),
|
||||
(0x1F93C, 0x1F93E),
|
||||
(0x1F940, 0x1F945),
|
||||
(0x1F947, 0x1F94C),
|
||||
(0x1F950, 0x1F96B),
|
||||
(0x1F985, 0x1F997),
|
||||
(0x1F9D0, 0x1F9E6),
|
||||
(0x0231A, 0x0231B),
|
||||
(0x023E9, 0x023EC),
|
||||
(0x023F0, 0x023F0),
|
||||
(0x023F3, 0x023F3),
|
||||
(0x025FD, 0x025FE),
|
||||
(0x02614, 0x02615),
|
||||
(0x02648, 0x02653),
|
||||
(0x0267F, 0x0267F),
|
||||
(0x02693, 0x02693),
|
||||
(0x026A1, 0x026A1),
|
||||
(0x026AA, 0x026AB),
|
||||
(0x026BD, 0x026BE),
|
||||
(0x026C4, 0x026C5),
|
||||
(0x026CE, 0x026CE),
|
||||
(0x026D4, 0x026D4),
|
||||
(0x026EA, 0x026EA),
|
||||
(0x026F2, 0x026F3),
|
||||
(0x026F5, 0x026F5),
|
||||
(0x026FA, 0x026FA),
|
||||
(0x026FD, 0x026FD),
|
||||
(0x02705, 0x02705),
|
||||
(0x0270A, 0x0270B),
|
||||
(0x02728, 0x02728),
|
||||
(0x0274C, 0x0274C),
|
||||
(0x0274E, 0x0274E),
|
||||
(0x02753, 0x02755),
|
||||
(0x02757, 0x02757),
|
||||
(0x02795, 0x02797),
|
||||
(0x027B0, 0x027B0),
|
||||
(0x027BF, 0x027BF),
|
||||
(0x02B1B, 0x02B1C),
|
||||
(0x02B50, 0x02B50),
|
||||
(0x02B55, 0x02B55),
|
||||
(0x1F004, 0x1F004),
|
||||
(0x1F0CF, 0x1F0CF),
|
||||
(0x1F18E, 0x1F18E),
|
||||
(0x1F191, 0x1F19A),
|
||||
(0x1F201, 0x1F201),
|
||||
(0x1F21A, 0x1F21A),
|
||||
(0x1F22F, 0x1F22F),
|
||||
(0x1F232, 0x1F236),
|
||||
(0x1F238, 0x1F23A),
|
||||
(0x1F250, 0x1F251),
|
||||
(0x1F300, 0x1F320),
|
||||
(0x1F32D, 0x1F335),
|
||||
(0x1F337, 0x1F37C),
|
||||
(0x1F37E, 0x1F393),
|
||||
(0x1F3A0, 0x1F3CA),
|
||||
(0x1F3CF, 0x1F3D3),
|
||||
(0x1F3E0, 0x1F3F0),
|
||||
(0x1F3F4, 0x1F3F4),
|
||||
(0x1F3F8, 0x1F43E),
|
||||
(0x1F440, 0x1F440),
|
||||
(0x1F442, 0x1F4FC),
|
||||
(0x1F4FF, 0x1F53D),
|
||||
(0x1F54B, 0x1F54E),
|
||||
(0x1F550, 0x1F567),
|
||||
(0x1F595, 0x1F596),
|
||||
(0x1F5FB, 0x1F64F),
|
||||
(0x1F680, 0x1F6C5),
|
||||
(0x1F6CC, 0x1F6CC),
|
||||
(0x1F6D0, 0x1F6D0),
|
||||
(0x1F6EB, 0x1F6EC),
|
||||
(0x1F910, 0x1F918),
|
||||
(0x1F980, 0x1F984),
|
||||
(0x1F9C0, 0x1F9C0),
|
||||
];
|
||||
|
||||
fn in_table(arr: &[R], c: u32) -> bool {
|
||||
@ -1516,7 +1521,7 @@ mod test {
|
||||
assert_eq!(WcWidth::from_char('\x1f'), WcWidth::NonPrint);
|
||||
assert_eq!(WcWidth::from_char('\u{e001}'), WcWidth::PrivateUse);
|
||||
assert_eq!(WcWidth::from_char('\u{2716}'), WcWidth::One);
|
||||
assert_eq!(WcWidth::from_char('\u{270a}'), WcWidth::Two);
|
||||
assert_eq!(WcWidth::from_char('\u{270a}'), WcWidth::WidenedIn9);
|
||||
assert_eq!(WcWidth::from_char('\u{3fffd}'), WcWidth::Two);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user