Minor fixes to work with Unicode 8.0.0 data
authorJiahao Chen <jiahao@mit.edu>
Sat, 20 Jun 2015 12:03:40 +0000 (08:03 -0400)
committerJiahao Chen <jiahao@mit.edu>
Sat, 20 Jun 2015 12:03:40 +0000 (08:03 -0400)
data/charwidths.jl

index 72d695fc01d84d05c062de75bf62e42d046542cb..34323b7dc0cfcec213a8bf99c4163dcd1885ce46 100644 (file)
@@ -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