diff options
Diffstat (limited to 'Master/texmf-dist/tex')
6 files changed, 57 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua index ce2c201cc1a..cc3e3ed50ad 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua @@ -20,8 +20,8 @@ module('luaotfload', package.seeall) luaotfload.module = { name = "luaotfload", - version = 1.19, - date = "2010/09/12", + version = 1.20, + date = "2010/10/16", description = "OpenType layout system.", author = "Elie Roux & Hans Hagen", copyright = "Elie Roux", diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty index eb7f994ee68..4814924f393 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty @@ -25,7 +25,7 @@ \else \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{luaotfload}% - [2010/09/12 v1.19 OpenType layout system] + [2010/10/16 v1.20 OpenType layout system] \RequirePackage{luatextra} \fi diff --git a/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-clr.lua b/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-clr.lua index a6cf63ffc9f..e02d22a6db9 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-clr.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-clr.lua @@ -15,8 +15,23 @@ local initializers, format = fonts.initializers, string.format table.insert(fonts.triggers,"color") function initializers.common.color(tfmdata,value) + local sanitized + if value then - tfmdata.color = tostring(value) + value = tostring(value) + if #value == 6 or #value == 8 then + sanitized = value + elseif #value == 7 then + _, _, sanitized = value:find("(......)") + elseif #value > 8 then + _, _, sanitized = value:find("(........)") + else + -- broken color code ignored, issue a warning? + end + end + + if sanitized then + tfmdata.color = sanitized add_color_callback() end end diff --git a/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-nms.lua b/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-nms.lua index 1f37d164a75..938b6bd39cb 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-nms.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-nms.lua @@ -257,7 +257,7 @@ local function font_fullinfo(filename, subfont, texmf) if trace_loading then logs.report("error: failed to open %s", filename) end - return nil + return end local m = fontloader.to_table(f) fontloader.close(f) @@ -284,6 +284,12 @@ local function font_fullinfo(filename, subfont, texmf) } end end + else + -- no names table, propably a broken font + if trace_loading then + logs.report("broken font rejected: %s", basefile) + end + return end t.fontname = m.fontname t.fullname = m.fullname @@ -345,6 +351,9 @@ local function load_font(filename, fontnames, newfontnames, texmf) if type(info) == "table" and #info > 1 then for i in next, info do local fullinfo = font_fullinfo(filename, i-1, texmf) + if not fullinfo then + return + end local index = newstatus[basefile].index[i] if newstatus[basefile].index[i] then index = newstatus[basefile].index[i] @@ -356,6 +365,9 @@ local function load_font(filename, fontnames, newfontnames, texmf) end else local fullinfo = font_fullinfo(filename, false, texmf) + if not fullinfo then + return + end local index if newstatus[basefile].index[1] then index = newstatus[basefile].index[1] diff --git a/Master/texmf-dist/tex/luatex/luaotfload/otfl-luat-dum.lua b/Master/texmf-dist/tex/luatex/luaotfload/otfl-luat-dum.lua index e8e267a651e..96076977d0b 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/otfl-luat-dum.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/otfl-luat-dum.lua @@ -92,24 +92,26 @@ end do - local cachepaths = kpse.expand_path('$TEXMFCACHE') or "" + local cachepaths - if cachepaths == "" then - cachepaths = kpse.expand_path('$TEXMFVAR') + if kpse.expand_var('$TEXMFCACHE') ~= '$TEXMFCACHE' then + cachepaths = kpse.expand_var('$TEXMFCACHE') + elseif kpse.expand_var('$TEXMFVAR') ~= '$TEXMFVAR' then + cachepaths = kpse.expand_var('$TEXMFVAR') end - if cachepaths == "" then + if not cachepaths then cachepaths = "." end cachepaths = string.split(cachepaths,os.type == "windows" and ";" or ":") for i=1,#cachepaths do - if file.iswritable(cachepaths[i]) then - writable = file.join(cachepaths[i],"luatex-cache") - lfs.mkdir(writable) - writable = file.join(writable,caches.namespace) - lfs.mkdir(writable) + local done + writable = file.join(cachepaths[i], "luatex-cache") + writable = file.join(writable,caches.namespace) + writable, done = dir.mkdirs(writable) + if done then break end end @@ -121,10 +123,10 @@ do end if not writable then - texio.write_nl("quiting: fix your writable cache path") + texio.write_nl("quiting: fix your writable cache path\n") os.exit() elseif #readables == 0 then - texio.write_nl("quiting: fix your readable cache path") + texio.write_nl("quiting: fix your readable cache path\n") os.exit() elseif #readables == 1 and readables[1] == writable then texio.write(string.format("(using cache: %s)",writable)) diff --git a/Master/texmf-dist/tex/luatex/luaotfload/otfl-node-inj.lua b/Master/texmf-dist/tex/luatex/luaotfload/otfl-node-inj.lua index 5b55c8c2e85..fdea7f1f351 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/otfl-node-inj.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/otfl-node-inj.lua @@ -115,7 +115,7 @@ function nodes.set_mark(start,base,factor,rlmode,ba,ma,index) --ba=baseanchor, m set_attribute(base,markbase,bound) set_attribute(start,markmark,bound) set_attribute(start,markdone,index) - marks[bound] = { [index] = { dx, dy } } + marks[bound] = { [index] = { dx, dy, rlmode } } return dx, dy, bound end @@ -314,17 +314,23 @@ function nodes.inject_kerns(head,where,keep) local index = has_attribute(n,markdone) or 1 local d = mrks[index] if d then - -- local rlmode = d[3] -- not used - -- if rlmode and rlmode > 0 then - -- todo - -- else + local rlmode = d[3] + if rlmode and rlmode > 0 then + -- new per 2010-10-06 + local k = wx[p] + if k then -- maybe (d[1] - p.width) and/or + k[2] + n.xoffset = p.xoffset - (p.width - d[1]) - k[2] + else + n.xoffset = p.xoffset - (p.width - d[1]) + end + else local k = wx[p] if k then n.xoffset = p.xoffset - d[1] - k[2] else n.xoffset = p.xoffset - d[1] end - -- end + end if mk[p] then n.yoffset = p.yoffset + d[2] else |