diff options
author | Karl Berry <karl@freefriends.org> | 2017-02-05 23:20:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-02-05 23:20:18 +0000 |
commit | ea91e68aa17587b21113424f6ab4811f9d4cc5b3 (patch) | |
tree | 6c357ba1701d2ff92079b5ce8cf58d4209f9674d /Master/texmf-dist/tex | |
parent | 761d792aaf8db6f81f4a837f373e34f916ecda63 (diff) |
luaotfload (5feb17)
git-svn-id: svn://tug.org/texlive/trunk@43150 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luaotfload/fontloader-2017-02-04.lua (renamed from Master/texmf-dist/tex/luatex/luaotfload/fontloader-2017-01-29.lua) | 119 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-dsp.lua | 1 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua | 91 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua | 17 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luaotfload/luaotfload-parsers.lua | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luaotfload/luaotfload-status.lua | 18 |
6 files changed, 138 insertions, 110 deletions
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-2017-01-29.lua b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-2017-02-04.lua index 1b3df22da02..c1b90e1c280 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-2017-01-29.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-2017-02-04.lua @@ -1,6 +1,6 @@ --[[info----------------------------------------------------------------------- Luaotfload fontloader package - build 2017-01-29 21:08:57 by phg@phlegethon + build 2017-02-04 13:41:18 by phg@phlegethon ------------------------------------------------------------------------------- © 2017 PRAGMA ADE / ConTeXt Development Team @@ -52,7 +52,7 @@ --info]]----------------------------------------------------------------------- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “data-con” d8982c834ed9acc6193eee23067b9d5d] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “data-con” d8982c834ed9acc6193eee23067b9d5d] --- if not modules then modules={} end modules ['data-con']={ version=1.100, @@ -164,10 +164,10 @@ function containers.cleanname(name) return (gsub(lower(name),"[^%w\128-\255]+","-")) end -end --- [luaotfload, fontloader-2017-01-29.lua scope for “data-con”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “data-con”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “basics-nod” 9288471b8395bfb683aba0ff3964d950] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “basics-nod” 9288471b8395bfb683aba0ff3964d950] --- if not modules then modules={} end modules ['luatex-fonts-nod']={ version=1.001, @@ -421,10 +421,10 @@ end nodes.setprop=nodes.setproperty nodes.getprop=nodes.getproperty -end --- [luaotfload, fontloader-2017-01-29.lua scope for “basics-nod”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “basics-nod”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-ini” 10cb9a563a98e06ff79c35a8751e13dc] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-ini” 10cb9a563a98e06ff79c35a8751e13dc] --- if not modules then modules={} end modules ['font-ini']={ version=1.001, @@ -447,10 +447,10 @@ fonts.definers={ methods={} } fonts.loggers={ register=function() end } fontloader.totable=fontloader.to_table -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-ini”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-ini”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-con” 7575a7b4e6d04816072945e27d7d0b33] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-con” 7575a7b4e6d04816072945e27d7d0b33] --- if not modules then modules={} end modules ['font-con']={ version=1.001, @@ -1660,10 +1660,10 @@ function constructors.addcoreunicodes(unicodes) return unicodes end -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-con”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-con”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “fonts-enc” a7ace7c1969cd64a5ca9888838f3edb6] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “fonts-enc” a7ace7c1969cd64a5ca9888838f3edb6] --- if not modules then modules={} end modules ['luatex-font-enc']={ version=1.001, @@ -1733,10 +1733,10 @@ function encodings.load(filename) return containers.write(encodings.cache,name,data) end -end --- [luaotfload, fontloader-2017-01-29.lua scope for “fonts-enc”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “fonts-enc”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-cid” 52421d1fdaa07ec4b1d936c6ff5079be] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-cid” 52421d1fdaa07ec4b1d936c6ff5079be] --- if not modules then modules={} end modules ['font-cid']={ version=1.001, @@ -1887,10 +1887,10 @@ function cid.getmap(specification) return found end -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-cid”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-cid”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-map” 8708bde7467785c4d3b7afdaf2f9333a] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-map” 8708bde7467785c4d3b7afdaf2f9333a] --- if not modules then modules={} end modules ['font-map']={ version=1.001, @@ -2253,10 +2253,10 @@ function mappings.addtounicode(data,filename,checklookups) end end -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-map”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-map”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-oti” 8f48c06a1d632febd7231ad5dfadfc53] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-oti” 8f48c06a1d632febd7231ad5dfadfc53] --- if not modules then modules={} end modules ['font-oti']={ version=1.001, @@ -2399,10 +2399,10 @@ function otffeatures.checkeddefaultlanguage(featuretype,autolanguage,languages) end end -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-oti”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-oti”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-otr” 2bd0085b78027f261218d63034f43474] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-otr” 2bd0085b78027f261218d63034f43474] --- if not modules then modules={} end modules ['font-otr']={ version=1.001, @@ -4040,10 +4040,10 @@ function readers.extend(fontdata) end end -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-otr”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-otr”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-cff” f3fc74e8629f7a2825c34a34550c790d] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-cff” f3fc74e8629f7a2825c34a34550c790d] --- if not modules then modules={} end modules ['font-cff']={ version=1.001, @@ -5524,10 +5524,10 @@ function readers.cff(f,fontdata,specification) end end -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-cff”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-cff”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-ttf” e0893de6d0f3f421ee4386fa90429db8] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-ttf” e0893de6d0f3f421ee4386fa90429db8] --- if not modules then modules={} end modules ['font-ttf']={ version=1.001, @@ -5939,10 +5939,10 @@ function readers.glyf(f,fontdata,specification) end end -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-ttf”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-ttf”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-dsp” 7eda319c53a28de9d91de4a0cfba79c3] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-dsp” 4a5266ada979d5c2d48867dc3ffaefea] --- if not modules then modules={} end modules ['font-dsp']={ version=1.001, @@ -7418,6 +7418,7 @@ do sublookuplist[nofsublookups]=copy(h) sublookuphash[lookupid]=nofsublookups sublookupcheck[lookupid]=1 + h=nofsublookups else report_issue(i,what,sequence,"missing") rule.lookups=nil @@ -8077,10 +8078,10 @@ function readers.svg(f,fontdata,specification) end end -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-dsp”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-dsp”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-oup” f7237130b648a4c2b477dabedc7f90e8] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-oup” f7237130b648a4c2b477dabedc7f90e8] --- if not modules then modules={} end modules ['font-oup']={ version=1.001, @@ -10123,10 +10124,10 @@ function readers.expand(data) expandlookups(sublookups) end -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-oup”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-oup”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-otl” 2e7c8d9a331c46826211bd507f8e488a] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-otl” 2e7c8d9a331c46826211bd507f8e488a] --- if not modules then modules={} end modules ['font-otl']={ version=1.001, @@ -10771,10 +10772,10 @@ otf.coverup={ end } -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-otl”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-otl”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-oto” 5fbdd899624d4eef639f81b580afe9aa] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-oto” 5fbdd899624d4eef639f81b580afe9aa] --- if not modules then modules={} end modules ['font-oto']={ version=1.001, @@ -11148,10 +11149,10 @@ registerotffeature { } otf.basemodeinitializer=featuresinitializer -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-oto”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-oto”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-otj” 5ea70db9f1990dc1459425853c79f663] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-otj” 5ea70db9f1990dc1459425853c79f663] --- if not modules then modules={} end modules ['font-otj']={ version=1.001, @@ -12495,10 +12496,10 @@ function injections.handler(head,where) end end -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-otj”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-otj”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-ota” c281d18dfc89a8ca18af64f55e9fa92b] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-ota” c281d18dfc89a8ca18af64f55e9fa92b] --- if not modules then modules={} end modules ['font-ota']={ version=1.001, @@ -12878,10 +12879,10 @@ directives.register("otf.analyze.useunicodemarks",function(v) analyzers.useunicodemarks=v end) -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-ota”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-ota”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-ots” 7e1e55f9f728474372665e4a64a43f5a] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-ots” 7e1e55f9f728474372665e4a64a43f5a] --- if not modules then modules={} end modules ['font-ots']={ version=1.001, @@ -16105,10 +16106,10 @@ registerotffeature { }, } -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-ots”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-ots”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-osd” 10ecd4b375680b011e7c6a25e5ad74f7] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-osd” 10ecd4b375680b011e7c6a25e5ad74f7] --- if not modules then modules={} end modules ['font-osd']={ version=1.001, @@ -18071,10 +18072,10 @@ end methods.mlym=methods.deva methods.mlm2=methods.dev2 -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-osd”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-osd”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-ocl” fbc00782e4efb24a7569f99cd1574ffb] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-ocl” fbc00782e4efb24a7569f99cd1574ffb] --- if not modules then modules={} end modules ['font-ocl']={ version=1.001, @@ -18378,10 +18379,10 @@ fonts.handlers.otf.features.register { } } -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-ocl”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-ocl”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-otc” 85d63e257c748c624768aa7c8ec7f0bc] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-otc” 85d63e257c748c624768aa7c8ec7f0bc] --- if not modules then modules={} end modules ['font-otc']={ version=1.001, @@ -19150,10 +19151,10 @@ registerotffeature { description='arabic digits', } -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-otc”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-otc”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-onr” 205c8bc640715aecf3538a33b842f450] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-onr” 205c8bc640715aecf3538a33b842f450] --- if not modules then modules={} end modules ['font-onr']={ version=1.001, @@ -19496,10 +19497,10 @@ function readers.getinfo(filename) end end -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-onr”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-onr”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-one” 6fbf6b9e219a944cd1ad5933d77cc488] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-one” 6fbf6b9e219a944cd1ad5933d77cc488] --- if not modules then modules={} end modules ['font-one']={ version=1.001, @@ -20197,10 +20198,10 @@ registerafmenhancer("normalize features",enhance_normalize_features) registerafmenhancer("check extra features",otfenhancers.enhance) registerafmenhancer("fix names",enhance_fix_names) -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-one”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-one”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-afk” b36a76ceb835f41f8c05b471000ddc14] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-afk” b36a76ceb835f41f8c05b471000ddc14] --- if not modules then modules={} end modules ['font-afk']={ version=1.001, @@ -20367,10 +20368,10 @@ fonts.handlers.afm.helpdata={ } } -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-afk”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-afk”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-tfm” 3d813578dbf6c447e4b859c2bf0618f7] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-tfm” 3d813578dbf6c447e4b859c2bf0618f7] --- if not modules then modules={} end modules ['font-tfm']={ version=1.001, @@ -20876,10 +20877,10 @@ registertfmfeature { } } -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-tfm”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-tfm”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-lua” 1fbfdf7b689b2bdfd0e3bb9bf74ce136] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-lua” 1fbfdf7b689b2bdfd0e3bb9bf74ce136] --- if not modules then modules={} end modules ['font-lua']={ version=1.001, @@ -20919,10 +20920,10 @@ function readers.lua(specification) return check_lua(specification,fullname) end -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-lua”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-lua”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-def” 49fa2b50d8d2a1bb70b08b72f858ecd0] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-def” 49fa2b50d8d2a1bb70b08b72f858ecd0] --- if not modules then modules={} end modules ['font-def']={ version=1.001, @@ -21254,10 +21255,10 @@ function font.getfont(id) end callbacks.register('define_font',definers.read,"definition of fonts (tfmdata preparation)") -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-def”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-def”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “fonts-ext” aff3846f4c1f15de0a9f4fd7081e0c68] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “fonts-ext” aff3846f4c1f15de0a9f4fd7081e0c68] --- if not modules then modules={} end modules ['luatex-fonts-ext']={ version=1.001, @@ -21487,10 +21488,10 @@ otffeatures.register { } } -end --- [luaotfload, fontloader-2017-01-29.lua scope for “fonts-ext”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “fonts-ext”] --- -do --- [luaotfload, fontloader-2017-01-29.lua scope for “font-gbn” b65b8a0b19cc1b870e4c0569a94d8825] --- +do --- [luaotfload, fontloader-2017-02-04.lua scope for “font-gbn” b65b8a0b19cc1b870e4c0569a94d8825] --- if not modules then modules={} end modules ['font-gbn']={ version=1.001, @@ -21724,7 +21725,7 @@ function nodes.simple_font_handler(head) end end -end --- [luaotfload, fontloader-2017-01-29.lua scope for “font-gbn”] --- +end --- [luaotfload, fontloader-2017-02-04.lua scope for “font-gbn”] --- --- vim:ft=lua:sw=2:ts=8:et:tw=79 diff --git a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-dsp.lua b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-dsp.lua index 14e3a1d623b..13095f7e699 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-dsp.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-dsp.lua @@ -1733,6 +1733,7 @@ do sublookuplist[nofsublookups] = copy(h) -- we repack later sublookuphash[lookupid] = nofsublookups sublookupcheck[lookupid] = 1 + h = nofsublookups --- patch by Hans else report_issue(i,what,sequence,"missing") rule.lookups = nil diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua index 621a24ba11d..9c8c298636a 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua @@ -928,7 +928,7 @@ local choose_size = function (sizes, askedsize) --- exact match, this is what we were looking for exact = index goto skip - elseif askedsize < low then + elseif askedsize <= low then --- below range, add to the norange table local d = low - askedsize norange [#norange + 1] = { d, index } @@ -938,10 +938,19 @@ local choose_size = function (sizes, askedsize) norange [#norange + 1] = { d, index } else --- range match - local d = ((low + high) / 2) - askedsize + local d = 0 + + -- should always be true. Just in case there's some + -- weried fonts out there + if dsnsize > low and dsnsize < high then + d = dsnsize - askedsize + else + d = ((low + high) / 2) - askedsize + end if d < 0 then d = -d end + inrange [#inrange + 1] = { d, index } end end @@ -1042,26 +1051,54 @@ local lookup_fontname = function (specification, name, style) return nil, nil end -local design_size_dimension -local set_size_dimension +local design_size_dimension --- scale asked size if not using bp +local set_size_dimension --- called from config do - --- cf. TeXbook p. 57 + --- cf. TeXbook p. 57; the index stores sizes pre-scaled from bp to + --- sp. This allows requesting sizes we got from the TeX end + --- without further conversion. For the other options *pt* and *dd* + --- we scale the requested size as though the value in the font was + --- specified in the requested unit. + + --- From @zhouyan: + + --- Let P be the asked size in pt, and Aᵤ = CᵤP, where u is the + --- designed unit, pt, bp, or dd, and + --- + --- Cpt = 1, Cbp = 7200/7227, Cdd = 1157/1238. + --- + --- That is, Aᵤ is the asked size in the desired unit. Let D be the + --- de-sign size (assumed to be in the unit of bp) as reported by + --- the font (divided by 10; in all the following we ignore the + --- factor 2^16 ). + --- + --- For simplicity, consider only the case of exact match to the + --- design size. That is, we would like to have Aᵤ = D. Let A′ᵤ = αᵤP + --- and D′ = βD be the scaled values used in comparisons. For the + --- comparison to work correctly, we need, + --- + --- Aᵤ = D ⟺ A′ᵤ = D′ , + --- + --- and thus αᵤ = βCᵤ. The fix in PR 400 is the case of β = 1. The + --- fix for review is β = 7227/7200, and the value of αᵤ is thus + --- correct for pt, bp, but not for dd. + local dimens = { - pt = function (v) return v end, - bp = function (v) return (v * 7200) / 7227 end, - dd = function (v) return (v * 1157) / 1238 end, + bp = false, + pt = 7227 / 7200, + dd = (7227 / 7200) * (1157 / 1238), } design_size_dimension = dimens.bp set_size_dimension = function (dim) - local f = dimens [dim] - if f then + local conv = dimens [dim] + if conv ~= nil then logreport ("both", 4, "db", "Interpreting design sizes as %q, factor %.6f.", - dim, f (1.000000)) - design_size_dimension = f + dim, conv) + design_size_dimension = conv return end logreport ("both", 0, "db", @@ -1135,7 +1172,10 @@ lookup_font_name = function (specification) askedsize = 0 end end - askedsize = design_size_dimension (askedsize) + + if design_size_dimension ~= false then + askedsize = design_size_dimension * askedsize + end resolved, subfont = lookup_familyname (specification, name, @@ -1350,9 +1390,16 @@ local load_font_file = function (filename, subfont) return ret end +--- Design sizes in the fonts are specified in decipoints. For the +--- index these values are prescaled to sp which is what we’re dealing +--- with at the TeX end. + local get_size_info do --- too many upvalues :/ --- rawdata -> (int * int * int | bool) + local sp = 2^16 -- pt + local bp = 7227 / 7200 -- pt + get_size_info = function (rawinfo) local design_size = rawinfo.design_size local design_range_top = rawinfo.design_range_top @@ -1363,13 +1410,13 @@ local get_size_info do --- too many upvalues :/ or design_range_top ~= 0 and design_range_top if fallback_size then - design_size = ((design_size or fallback_size) * 2^16) / 10 - design_range_top = ((design_range_top or fallback_size) * 2^16) / 10 - design_range_bottom = ((design_range_bottom or fallback_size) * 2^16) / 10 + design_size = ((design_size or fallback_size) * sp) / 10 + design_range_top = ((design_range_top or fallback_size) * sp) / 10 + design_range_bottom = ((design_range_bottom or fallback_size) * sp) / 10 - design_size = (design_size * 7200) / 7227 - design_range_top = (design_range_top * 7200) / 7227 - design_range_bottom = (design_range_bottom * 7200) / 7227 + design_size = design_size * bp + design_range_top = design_range_top * bp + design_range_bottom = design_range_bottom * bp return { design_size, design_range_top, design_range_bottom, @@ -2111,15 +2158,13 @@ process_dir_tree = function (acc, dirs, done) elseif lfsisfile (fullpath) then ent = stringlower (ent) if lpegmatch (p_font_filter, ent) then - newfiles[#newfiles+1] = fullpath if filesuffix (ent) == "afm" then local pfbpath = locate_matching_pfb (ent, dir) if pfbpath then newfiles[#newfiles+1] = pfbpath end - else - newfiles[#newfiles+1] = fullpath end + newfiles[#newfiles+1] = fullpath end end end @@ -3635,7 +3680,7 @@ return { fonts.definers = fonts.definers or { resolvers = { } } names.blacklist = blacklist - names.version = 4 --- increase monotonically + names.version = 5 --- increase monotonically names.data = nil --- contains the loaded database names.lookups = nil --- contains the lookup cache diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua index a57aac3ea6f..5c350315f17 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua @@ -1288,10 +1288,6 @@ local tlig_specification = { data = { [0x2013] = {0x002D, 0x002D}, -- endash [0x2014] = {0x002D, 0x002D, 0x002D}, -- emdash - [0x201C] = {0x2018, 0x2018}, -- quotedblleft - [0x201D] = {0x2019, 0x2019}, -- quotedblright - [0x00A1] = {0x0021, 0x2018}, -- exclamdown - [0x00BF] = {0x003F, 0x2018}, -- questiondown --- next three originate in T1 encoding; Xetex applies --- them too [0x201E] = {0x002C, 0x002C}, -- quotedblbase @@ -1302,19 +1298,6 @@ local tlig_specification = { order = { "tlig" }, prepend = true, }, - { - type = "ligature", - features = everywhere, - data = { - [0x201C] = {0x0060, 0x0060}, -- quotedblleft - [0x201D] = {0x0027, 0x0027}, -- quotedblright - [0x00A1] = {0x0021, 0x0060}, -- exclamdown - [0x00BF] = {0x003F, 0x0060}, -- questiondown - }, - flags = noflags, - order = { "tlig" }, - prepend = true, - }, } local rot13_specification = { diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-parsers.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-parsers.lua index ffb64010846..c2b4f2ea7a9 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-parsers.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-parsers.lua @@ -615,9 +615,7 @@ local prefixed = P"name:" * ws * Cg(fontname, "name") --- we’ll emit a warning. + P"file:" * ws * Cg(unsupported, "path") + P"file:" * ws * Cg(fontname, "file") ---- EXPERIMENTAL: kpse lookup + P"kpse:" * ws * Cg(fontname, "kpse") ---- EXPERIMENTAL: custom lookup + P"my:" * ws * Cg(fontname, "my") local unprefixed = Cg(fontname, "anon") local path_lookup = lbrk * Cg(C((1-rbrk)^1), "path") * rbrk diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-status.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-status.lua index 02c77bd93bc..ff0cf30053e 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-status.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-status.lua @@ -1,6 +1,6 @@ return { ["hashes"]={ - { "fontloader-2017-01-29.lua", "36658a109ba00bf525c7746196f236c8" }, + { "fontloader-2017-02-04.lua", "adde1f5085b93d480334f467175acfd2" }, { "fontloader-util-fil.lua", "0573e91847e722ffe0fcdb465ba89e6b" }, { "fontloader-util-str.lua", "513836cfea6a8027c1451a95bc74649f" }, { "fontloader-swiglib-test.lua", "2f0b431faf53d3e19bfae22035bdc77e" }, @@ -27,7 +27,7 @@ return { { "fontloader-font-oto.lua", "5fbdd899624d4eef639f81b580afe9aa" }, { "fontloader-font-otl.lua", "2e7c8d9a331c46826211bd507f8e488a" }, { "fontloader-font-oup.lua", "f7237130b648a4c2b477dabedc7f90e8" }, - { "fontloader-font-dsp.lua", "7eda319c53a28de9d91de4a0cfba79c3" }, + { "fontloader-font-dsp.lua", "4a5266ada979d5c2d48867dc3ffaefea" }, { "fontloader-font-ttf.lua", "e0893de6d0f3f421ee4386fa90429db8" }, { "fontloader-font-cff.lua", "f3fc74e8629f7a2825c34a34550c790d" }, { "fontloader-font-otr.lua", "2bd0085b78027f261218d63034f43474" }, @@ -62,24 +62,24 @@ return { { "luaotfload-characters.lua", "99578c3eff8b68cae3da45a4a7cbfcf2" }, { "luaotfload-tool.lua", "e6ca512e0620ccaac968ccc17239ee39" }, { "luaotfload-resolvers.lua", "bcdde7940630c4b563f3884b64ae3c84" }, - { "luaotfload-parsers.lua", "d8820cfe256f9590fb02f54850c1ffff" }, + { "luaotfload-parsers.lua", "4ba8ee0290d52d298e4cdba66ae02a26" }, { "luaotfload-main.lua", "8411e662c9867c423dc0229b12eb174c" }, { "luaotfload-log.lua", "cc79197903756cde068d3c197844be99" }, { "luaotfload-loaders.lua", "09883d592a3fe6327654d28b0d880b00" }, { "luaotfload-letterspace.lua", "0f4bd9bc0365e96f099e68f4a8114d3e" }, { "luaotfload-init.lua", "e5c4c96fc7e3bf150229013fb56e77b5" }, - { "luaotfload-features.lua", "c523b1137190a2bbc9266f218cade394" }, + { "luaotfload-features.lua", "5843b8d6f2ae4c3df7d13c7fb8c8867d" }, { "luaotfload-diagnostics.lua", "7b35c9f91e3e73fc5a61dbfe1f0e7ad9" }, - { "luaotfload-database.lua", "d78a5e357374b3753acace6a2032fe37" }, + { "luaotfload-database.lua", "62fee5ba6afb4ee38aa1a2b183d59ff8" }, { "luaotfload-configuration.lua", "64fa81f2f8fe6815f109873fb27f78aa" }, { "luaotfload-colors.lua", "2582a42a68739087a72e5ea6440cf0d8" }, { "luaotfload-auxiliary.lua", "a6c092c006660ee6e6fbdcddf104a99b" }, }, ["notes"]={ ["committer"]="Philipp Gesang <phg@phi-gamma.net>", - ["description"]="v2.8", - ["loader"]="fontloader-2017-01-29.lua", - ["revision"]="616b9077567fd670341696cb6ff2bfc71cf691a9", - ["timestamp"]="2017-01-29 20:52:03 +0100", + ["description"]="v2.8-fix-1", + ["loader"]="fontloader-2017-02-04.lua", + ["revision"]="0842c371132e76fbe67c357b61207e6d5730f553", + ["timestamp"]="2017-02-04 13:35:56 +0100", }, }
\ No newline at end of file |