Skip to content

Commit 934c875

Browse files
Mark U+070F SYRIAC ABBREVIATION MARK as zero width
1 parent 7cb4f39 commit 934c875

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

scripts/unicode.py

+4
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,10 @@ def load_zero_widths() -> "list[bool]":
241241
# width 2. Therefore, we treat it as having width 2.
242242
zw_map[0x115F] = False
243243

244+
# Syriac abbreviation mark
245+
# This is a `Prepended_Concatenation_Mark`, but unlike the others it's zero-width
246+
zw_map[0x070F] = True
247+
244248
return zw_map
245249

246250

src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
//! - [`'\u{1B43}'` BALINESE VOWEL SIGN PEPET TEDUNG](https://util.unicode.org/UnicodeJsps/character.jsp?a=1B43).
5858
//! - [Characters](https://util.unicode.org/UnicodeJsps/list-unicodeset.jsp?a=%5Cp%7BHangul_Syllable_Type%3DV%7D%5Cp%7BHangul_Syllable_Type%3DT%7D)
5959
//! with a [`Hangul_Syllable_Type`] of `Vowel_Jamo` (`V`) or `Trailing_Jamo` (`T`).
60+
//! - `'\u{070F}'` [SYRIAC] ABBREVIATION MARK.
6061
//! 7. [Characters](https://util.unicode.org/UnicodeJsps/list-unicodeset.jsp?a=%5Cp%7BEast_Asian_Width%3DF%7D%5Cp%7BEast_Asian_Width%3DW%7D)
6162
//! with an [`East_Asian_Width`] of [`Fullwidth`] or [`Wide`] have width 2.
6263
//! 8. [Characters](https://util.unicode.org/UnicodeJsps/list-unicodeset.jsp?a=%5Cp%7BEast_Asian_Width%3DA%7D)
@@ -78,6 +79,7 @@
7879
//!
7980
//! [Enclosed Ideographic Supplement]: https://unicode.org/charts/PDF/U1F200.pdf
8081
//!
82+
//! [Syriac]: https://www.unicode.org/versions/Unicode15.0.0/ch09.pdf#G13006
8183
//! [Lisu tone letter]: https://www.unicode.org/versions/Unicode15.0.0/ch18.pdf#G42078
8284
//!
8385
//! ## Canonical equivalence

src/tables.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ pub mod charwidth {
323323
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x40, 0x54, 0x55, 0x55, 0x55, 0x55, 0x55,
324324
0x55, 0x55, 0x55, 0x55, 0x55, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x55, 0x55,
325325
0x54, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x05, 0x00, 0x14, 0x00, 0x14, 0x04,
326-
0x50, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x51, 0x55, 0x55, 0x55, 0x55, 0x55,
326+
0x50, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x15, 0x51, 0x55, 0x55, 0x55, 0x55, 0x55,
327327
0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
328328
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
329329
0x55, 0x05, 0x00, 0x00, 0x54, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,

tests/tests.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,17 @@ fn test_jamo() {
100100
#[test]
101101
fn test_prepended_concatenation_marks() {
102102
assert_eq!('\u{0600}'.width(), Some(1));
103-
assert_eq!('\u{070F}'.width(), Some(1));
104103
assert_eq!('\u{08E2}'.width(), Some(1));
105104
assert_eq!('\u{110BD}'.width(), Some(1));
106105
}
107106

107+
#[test]
108+
fn test_syriac_abbreviation_mark() {
109+
assert_eq!('\u{070F}'.width(), Some(0));
110+
assert_eq!("\u{070F}".width(), 0);
111+
}
112+
113+
108114
#[test]
109115
fn test_interlinear_annotation_chars() {
110116
assert_eq!('\u{FFF9}'.width(), Some(1));

0 commit comments

Comments
 (0)