diff options
author | Karl Berry <karl@freefriends.org> | 2013-05-18 22:21:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-05-18 22:21:33 +0000 |
commit | 2472c585a2dee03ef4665514cb651e5976fd134a (patch) | |
tree | cb0475ebdca2ed9ee248dd809f6bcce1671a0afb /Master/texmf-dist/tex/luatex/luaotfload/luaotfload-merged.lua | |
parent | 542dd7f24e76ac20da26d1c4d7ceb69baa248133 (diff) |
luaotfload (18may13)
git-svn-id: svn://tug.org/texlive/trunk@30561 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luaotfload/luaotfload-merged.lua')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luaotfload/luaotfload-merged.lua | 63 |
1 files changed, 46 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-merged.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-merged.lua index 008b02af7ab..82ea91f77ec 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-merged.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 05/10/13 15:05:28 +-- merge date : 05/18/13 02:06:59 do -- begin closure to overcome local limits and interference @@ -1986,7 +1986,7 @@ elseif not lfs.isfile then end end local insert,concat=table.insert,table.concat -local match,find=string.match,string.find +local match,find,gmatch=string.match,string.find,string.gmatch local lpegmatch=lpeg.match local getcurrentdir,attributes=lfs.currentdir,lfs.attributes local checkedsplit=string.checkedsplit @@ -2046,7 +2046,11 @@ function file.splitname(str,splitdrive) end end function file.splitbase(str) - return str and lpegmatch(pattern_d,str) + if str then + return lpegmatch(pattern_d,str) + else + return "",str + end end function file.nametotable(str,splitdrive) if str then @@ -2295,6 +2299,19 @@ function file.strip(name,dir) return a~="" and a or name end end +function lfs.mkdirs(path) + local full + for sub in gmatch(path,"([^\\/]+)") do + if full then + full=full.."/"..sub + else + full=sub + end + if not lfs.isdir(full) then + lfs.mkdir(full) + end + end +end end -- closure @@ -2896,8 +2913,13 @@ if context then texio.write_nl("fatal error: this module is not for context") os.exit() end -local dummyfunction=function() end -local dummyreporter=function(c) return function(...) texio.write_nl(c.." : "..string.formatters(...)) end end +local dummyfunction=function() +end +local dummyreporter=function(c) + return function(...) + (texio.reporter or texio.write_nl)(c.." : "..string.formatters(...)) + end +end statistics={ register=dummyfunction, starttiming=dummyfunction, @@ -2997,8 +3019,15 @@ do end cachepaths=string.split(cachepaths,os.type=="windows" and ";" or ":") for i=1,#cachepaths do - if file.is_writable(cachepaths[i]) then - writable=file.join(cachepaths[i],"luatex-cache") + local cachepath=cachepaths[i] + if not lfs.isdir(cachepath) then + lfs.mkdirs(cachepath) + if lfs.isdir(cachepath) then + texio.write(string.format("(created cache path: %s)",cachepath)) + end + end + if file.is_writable(cachepath) then + writable=file.join(cachepath,"luatex-cache") lfs.mkdir(writable) writable=file.join(writable,caches.namespace) lfs.mkdir(writable) @@ -4650,7 +4679,7 @@ local function fromunicode16(str) return tonumber(str,16) else local l,r=match(str,"(....)(....)") - return (tonumber(l,16)- 0xD800)*0x400+tonumber(r,16)-0xDC00 + return (tonumber(l,16))*0x400+tonumber(r,16)-0xDC00 end end mappings.loadlumtable=loadlumtable @@ -6800,7 +6829,7 @@ local function checkmathsize(tfmdata,mathsize) end registerotffeature { name="mathsize", - description="apply mathsize as specified in the font", + description="apply mathsize specified in the font", initializers={ base=checkmathsize, node=checkmathsize, @@ -7405,8 +7434,8 @@ local function featuresinitializer(tfmdata,value) end end end - if basepositions then - for feature,data in next,basepositions do + if basepositionings then + for feature,data in next,basepositionings do local value=features[feature] if value then local validlookups,lookuplist=collectlookups(rawdata,feature,script,language) @@ -8336,7 +8365,7 @@ local fonthashes=fonts.hashes local fontdata=fonthashes.identifiers local otffeatures=fonts.constructors.newfeatures("otf") local registerotffeature=otffeatures.register -local onetimemessage=fonts.loggers.onetimemessage +local onetimemessage=fonts.loggers.onetimemessage or function() end otf.defaultnodealternate="none" local tfmdata=false local characters=false @@ -8733,7 +8762,7 @@ function handlers.gpos_mark2base(head,start,kind,lookupname,markanchors,sequence logwarning("%s, no matching anchors for mark %s and base %s",pref(kind,lookupname),gref(markchar),gref(basechar)) end end - else + elseif trace_bugs then onetimemessage(currentfont,basechar,"no base anchors",report_fonts) end elseif trace_bugs then @@ -8799,7 +8828,7 @@ function handlers.gpos_mark2ligature(head,start,kind,lookupname,markanchors,sequ end end end - else + elseif trace_bugs then onetimemessage(currentfont,basechar,"no base anchors",report_fonts) end elseif trace_bugs then @@ -8852,7 +8881,7 @@ function handlers.gpos_mark2mark(head,start,kind,lookupname,markanchors,sequence end end end - else + elseif trace_bugs then onetimemessage(currentfont,basechar,"no base anchors",report_fonts) end elseif trace_bugs then @@ -8901,7 +8930,7 @@ function handlers.gpos_cursive(head,start,kind,lookupname,exitanchors,sequence) end end end - else + elseif trace_bugs then onetimemessage(currentfont,startchar,"no entry anchors",report_fonts) end break @@ -9449,7 +9478,7 @@ function chainprocs.gpos_cursive(head,start,stop,kind,chainname,currentcontext,l end end end - else + elseif trace_bugs then onetimemessage(currentfont,startchar,"no entry anchors",report_fonts) end break |