diff options
author | Philipp Gesang <phg42.2a@gmail.com> | 2013-08-07 03:46:47 -0700 |
---|---|---|
committer | Philipp Gesang <phg42.2a@gmail.com> | 2013-08-07 03:46:47 -0700 |
commit | 276d4f282bc6b9899fb026a0b96c2eb1f9219e35 (patch) | |
tree | 36ca2231814c48e0f2b954ca12e7ce779a552aa6 /luaotfload-merged.lua | |
parent | 86a83bbbd05bdbec3c4d08b16dee864ab05b5dd7 (diff) | |
parent | 749917ae9796808d937c38375ebdb3fbfb0fcc1c (diff) | |
download | luaotfload-276d4f282bc6b9899fb026a0b96c2eb1f9219e35.tar.gz |
Merge pull request #119 from phi-gamma/master
type1 support, improve design size handling, better ``--find``, various fixes
Diffstat (limited to 'luaotfload-merged.lua')
-rw-r--r-- | luaotfload-merged.lua | 53 |
1 files changed, 29 insertions, 24 deletions
diff --git a/luaotfload-merged.lua b/luaotfload-merged.lua index c17a541..146ba36 100644 --- a/luaotfload-merged.lua +++ b/luaotfload-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 07/14/13 14:53:44 +-- merge date : 08/01/13 01:31:02 do -- begin closure to overcome local limits and interference @@ -2416,9 +2416,9 @@ function string.booleanstring(str) end function string.is_boolean(str,default) if type(str)=="string" then - if str=="true" or str=="yes" or str=="on" or str=="t" then + if str=="true" or str=="yes" or str=="on" or str=="t" or str=="1" then return true - elseif str=="false" or str=="no" or str=="off" or str=="f" then + elseif str=="false" or str=="no" or str=="off" or str=="f" or str=="0" then return false end end @@ -4880,33 +4880,38 @@ function mappings.addtounicode(data,filename) if not unicode or unicode=="" then local split=lpegmatch(namesplitter,name) local nsplit=split and #split or 0 - if nsplit>=2 then - local t,n={},0 - for l=1,nsplit do - local base=split[l] - local u=unicodes[base] or unicodevector[base] - if not u then + local t,n={},0 + unicode=true + for l=1,nsplit do + local base=split[l] + local u=unicodes[base] or unicodevector[base] + if not u then + break + elseif type(u)=="table" then + if u[1]>=private then + unicode=false break - elseif type(u)=="table" then - n=n+1 - t[n]=u[1] - else - n=n+1 - t[n]=u end - end - if n==0 then - elseif n==1 then - originals[index]=t[1] - tounicode[index]=tounicode16(t[1],name) + n=n+1 + t[n]=u[1] else - originals[index]=t - tounicode[index]=tounicode16sequence(t) + if u>=private then + unicode=false + break + end + n=n+1 + t[n]=u end - nl=nl+1 - unicode=true + end + if n==0 then + elseif n==1 then + originals[index]=t[1] + tounicode[index]=tounicode16(t[1],name) else + originals[index]=t + tounicode[index]=tounicode16sequence(t) end + nl=nl+1 end if not unicode or unicode=="" then local foundcodes,multiple=lpegmatch(uparser,name) |