diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-04-27 01:41:25 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-04-27 01:41:25 +0200 |
commit | 762562da00d0ec1d50e6d3c2a701156ab42e6d71 (patch) | |
tree | 2dc664caa951963a393b0a2a9c9c85d1db6b8e10 /tex/context/base/mkiv/font-otr.lua | |
parent | f2a20e191bf71094aa21d37dee2ecd2f804dbc56 (diff) | |
download | context-762562da00d0ec1d50e6d3c2a701156ab42e6d71.tar.gz |
2017-04-27 01:06:00
Diffstat (limited to 'tex/context/base/mkiv/font-otr.lua')
-rw-r--r-- | tex/context/base/mkiv/font-otr.lua | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/tex/context/base/mkiv/font-otr.lua b/tex/context/base/mkiv/font-otr.lua index fcfe6e824..4c29d05f6 100644 --- a/tex/context/base/mkiv/font-otr.lua +++ b/tex/context/base/mkiv/font-otr.lua @@ -83,6 +83,9 @@ local report = logs.reporter("otf reader") local trace_cmap = false -- only for checking issues local trace_cmap_detail = false -- only for checking issues +-- local trace_cmap = true +-- local trace_cmap_detail = true + fonts = fonts or { } local handlers = fonts.handlers or { } fonts.handlers = handlers @@ -1275,6 +1278,7 @@ local sequence = { -- variants { 0, 5, 14 }, -- last resort ranges +{ 0, 4, 12 }, { 3, 10, 13 }, } @@ -2075,19 +2079,27 @@ local function readdata(f,offset,specification) local instance = specification.instance if type(instance) == "string" then local factors = helpers.getfactors(fontdata,instance) - specification.factors = factors - fontdata.factors = factors - fontdata.instance = instance - report("user instance: %s, factors: % t",instance,factors) + if factors then + specification.factors = factors + fontdata.factors = factors + fontdata.instance = instance + report("user instance: %s, factors: % t",instance,factors) + else + report("user instance: %s, bad factors",instance) + end end end if not fontdata.factors then if fontdata.variabledata then local factors = helpers.getfactors(fontdata,true) - specification.factors = factors - fontdata.factors = factors - fontdata.instance = instance - report("font instance: %s, factors: % t",instance,factors) + if factors then + specification.factors = factors + fontdata.factors = factors + fontdata.instance = instance + report("font instance: %s, factors: % t",instance,factors) + else + report("user instance: %s, bad factors",instance) + end end end |