Skip to content

Commit 2097dec

Browse files
committed
remove special-casing for arabic control characters affecting a span of numbers, which are sometimes zero-width and sometimes not
1 parent 0e6eba7 commit 2097dec

File tree

2 files changed

+3207
-3206
lines changed

2 files changed

+3207
-3206
lines changed

data/charwidths.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,11 @@ end
114114
for c in keys(CharWidths)
115115
cat = catcode(c)
116116

117-
# make sure format control character (category Cf) have width 0,
118-
# except for the Arabic characters 0x06xx (see unicode std 6.2, sec. 8.2)
119-
if cat==UTF8proc.UTF8PROC_CATEGORY_CF && c [0x0601,0x0602,0x0603,0x06dd]
117+
# make sure format control character (category Cf) have width 0
118+
# (some of these, like U+0601, can have a width in some cases
119+
# but normally act like prepended combining marks. U+fff9 etc
120+
# are also odd, but have zero width in typical terminal contexts)
121+
if cat==UTF8proc.UTF8PROC_CATEGORY_CF
120122
CharWidths[c]=0
121123
end
122124

0 commit comments

Comments
 (0)