summaryrefslogtreecommitdiff
path: root/data/charwidths.jl
diff options
context:
space:
mode:
authorJiahao Chen <jiahao@mit.edu>2015-06-20 08:03:40 -0400
committerJiahao Chen <jiahao@mit.edu>2015-06-20 08:03:40 -0400
commitd18963cc4690980cd73075f34bd195262d85d11c (patch)
treef4c94e7cd7b4c4e3a841b37b96d0fe5f8e04efd3 /data/charwidths.jl
parentf7219d516efe7496737d041f22b0ba567174fb16 (diff)
downloadlibutf8proc-d18963cc4690980cd73075f34bd195262d85d11c.tar.gz
libutf8proc-d18963cc4690980cd73075f34bd195262d85d11c.tar.bz2
Minor fixes to work with Unicode 8.0.0 data
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