summaryrefslogtreecommitdiff
path: root/data/charwidths.jl
diff options
context:
space:
mode:
authorJiahao Chen <jiahao@mit.edu>2015-06-23 17:18:59 -0400
committerJiahao Chen <jiahao@mit.edu>2015-06-23 17:18:59 -0400
commit327bf100795363d77745752a7f414c54e8dce716 (patch)
tree5dfd148fc63b9de81ccda66d04c2758e2e42ea69 /data/charwidths.jl
parentf075dcd70d35bca837320cb23a771072ce30a5eb (diff)
parent9a6a3a416701ce94d7d734d91130c3b5f8aa3672 (diff)
downloadlibutf8proc-327bf100795363d77745752a7f414c54e8dce716.tar.gz
libutf8proc-327bf100795363d77745752a7f414c54e8dce716.tar.bz2
Merge pull request #45 from JuliaLang/cjh/unicode8
Update data to Unicode 8.0.0 standard
Diffstat (limited to 'data/charwidths.jl')
-rw-r--r--data/charwidths.jl5
1 files changed, 3 insertions, 2 deletions
diff --git a/data/charwidths.jl b/data/charwidths.jl
index 72d695f..34323b7 100644
--- a/data/charwidths.jl
+++ b/data/charwidths.jl
@@ -27,6 +27,7 @@ end
function parsesfd(filename::String, CharWidths::Dict{Int,Int}=Dict{Int,Int}())
state=:seekchar
lineno = 0
+ codepoint = width = nothing
for line in readlines(open(filename))
lineno += 1
if state==:seekchar #StartChar: nonmarkingreturn
@@ -91,7 +92,7 @@ function catcode(c)
end
# use Base.UTF8proc module to get category codes constants, since
-# we aren't goint to change these in utf8proc.
+# we won't change these in utf8proc.
import Base.UTF8proc
for c in keys(CharWidths)
@@ -116,7 +117,7 @@ for c in keys(CharWidths)
if cat==UTF8proc.UTF8PROC_CATEGORY_CO || cat==UTF8proc.UTF8PROC_CATEGORY_CN
CharWidths[c]=0
end
-
+
# for some reason, Unifont has width-2 glyphs for ASCII control chars
if cat==UTF8proc.UTF8PROC_CATEGORY_CC
CharWidths[c]=0