diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2016-05-02 18:39:42 +0200 |
---|---|---|
committer | Philipp Gesang <phg@phi-gamma.net> | 2016-05-02 18:39:42 +0200 |
commit | 9deb7fdf2296191efffd3324bb4d77e3d2bb224f (patch) | |
tree | 485cb5cbe730d4a7570de40c9a67b6d3dcdb575e /src/fontloader/misc | |
parent | bdbac97964c26fa5a6a22244ed374e7f477b43d2 (diff) | |
download | luaotfload-9deb7fdf2296191efffd3324bb4d77e3d2bb224f.tar.gz |
[fontloader] sync with Context as of 2016-05-02
Diffstat (limited to 'src/fontloader/misc')
-rw-r--r-- | src/fontloader/misc/fontloader-font-afm.lua | 16 | ||||
-rw-r--r-- | src/fontloader/misc/fontloader-font-dsp.lua | 4 | ||||
-rw-r--r-- | src/fontloader/misc/fontloader-font-otj.lua | 8 | ||||
-rw-r--r-- | src/fontloader/misc/fontloader-font-otl.lua | 2 | ||||
-rw-r--r-- | src/fontloader/misc/fontloader-font-ots.lua | 2 | ||||
-rw-r--r-- | src/fontloader/misc/fontloader-l-file.lua | 2 |
6 files changed, 22 insertions, 12 deletions
diff --git a/src/fontloader/misc/fontloader-font-afm.lua b/src/fontloader/misc/fontloader-font-afm.lua index 99b8577..0d6b7cb 100644 --- a/src/fontloader/misc/fontloader-font-afm.lua +++ b/src/fontloader/misc/fontloader-font-afm.lua @@ -228,7 +228,8 @@ do -- old font loader - local fontloader = fontloader + local fontloader = fontloader + local get_indexes_old = false if fontloader then @@ -236,7 +237,7 @@ do local open_font = fontloader.open local close_font = fontloader.close - local function get_indexes_old(data,pfbname) + get_indexes_old = function(data,pfbname) local pfbblob = open_font(pfbname) if pfbblob then local characters = data.characters @@ -394,7 +395,7 @@ do end end - if fontloader then + if get_indexes_old then afm.use_new_indexer = true get_indexes_new = get_indexes @@ -598,7 +599,15 @@ unify = function(data, filename) resources.private = private end +local everywhere = { ["*"] = { ["*"] = true } } -- or: { ["*"] = { "*" } } +local noflags = { false, false, false, false } + +afm.experimental_normalize = false + normalize = function(data) + if type(afm.experimental_normalize) == "function" then + afm.experimental_normalize(data) + end end fixnames = function(data) @@ -616,7 +625,6 @@ fixnames = function(data) end end - --[[ldx-- <p>These helpers extend the basic table with extra ligatures, texligatures and extra kerns. This saves quite some lookups later.</p> diff --git a/src/fontloader/misc/fontloader-font-dsp.lua b/src/fontloader/misc/fontloader-font-dsp.lua index 85a80bd..330a940 100644 --- a/src/fontloader/misc/fontloader-font-dsp.lua +++ b/src/fontloader/misc/fontloader-font-dsp.lua @@ -1144,8 +1144,8 @@ local function handlemark(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyp end for i=1,nofbaserecords do local components = baserecords[i] - local b = basecoverage[i] if components then + local b = basecoverage[i] for c=1,#components do local classes = components[c] if classes then @@ -1160,7 +1160,7 @@ local function handlemark(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyp end end end - components[i] = classes +-- components[i] = classes end end end diff --git a/src/fontloader/misc/fontloader-font-otj.lua b/src/fontloader/misc/fontloader-font-otj.lua index ebda723..6ff80d8 100644 --- a/src/fontloader/misc/fontloader-font-otj.lua +++ b/src/fontloader/misc/fontloader-font-otj.lua @@ -1202,9 +1202,11 @@ local function inject_everything(head,where) else -- local i = rawget(p,"emptyinjections") local i = p.emptyinjections - local leftkern = i.leftkern - if leftkern and leftkern ~= 0 then - setfield(prev,"replace",newkern(leftkern)) -- maybe also leftkern + if i then + local leftkern = i.leftkern + if leftkern and leftkern ~= 0 then + setfield(prev,"replace",newkern(leftkern)) -- maybe also leftkern + end end end if done then diff --git a/src/fontloader/misc/fontloader-font-otl.lua b/src/fontloader/misc/fontloader-font-otl.lua index bcea275..f7b6eb5 100644 --- a/src/fontloader/misc/fontloader-font-otl.lua +++ b/src/fontloader/misc/fontloader-font-otl.lua @@ -53,7 +53,7 @@ local report_otf = logs.reporter("fonts","otf loading") local fonts = fonts local otf = fonts.handlers.otf -otf.version = 3.018 -- beware: also sync font-mis.lua and in mtx-fonts +otf.version = 3.019 -- beware: also sync font-mis.lua and in mtx-fonts otf.cache = containers.define("fonts", "otl", otf.version, true) local otfreaders = otf.readers diff --git a/src/fontloader/misc/fontloader-font-ots.lua b/src/fontloader/misc/fontloader-font-ots.lua index 90fcde2..21225c2 100644 --- a/src/fontloader/misc/fontloader-font-ots.lua +++ b/src/fontloader/misc/fontloader-font-ots.lua @@ -3347,7 +3347,7 @@ local function txtdirstate(start,stack,top,rlparmode) new = rlparmode end if trace_directions then - report_process("directions after txtdir %a: parmode %a, txtmode %a, level %a",dir,mref(rlparmode),mref(new),topstack) + report_process("directions after txtdir %a: parmode %a, txtmode %a, level %a",dir,mref(rlparmode),mref(new),top) end return getnext(start), top, new end diff --git a/src/fontloader/misc/fontloader-l-file.lua b/src/fontloader/misc/fontloader-l-file.lua index 7ed6370..b6822e9 100644 --- a/src/fontloader/misc/fontloader-l-file.lua +++ b/src/fontloader/misc/fontloader-l-file.lua @@ -436,7 +436,7 @@ local deslasher = lpeg.replacer(S("\\/")^1,"/") function file.join(one, two, three, ...) if not two then - return one == "" and one or lpegmatch(stripper,one) + return one == "" and one or lpegmatch(reslasher,one) end if one == "" then return lpegmatch(stripper,three and concat({ two, three, ... },"/") or two) |