diff options
author | Karl Berry <karl@freefriends.org> | 2019-02-25 22:22:50 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-02-25 22:22:50 +0000 |
commit | ab8a74099e59b1e4a16672820198419ae0b07ce0 (patch) | |
tree | 8d61990071fa5f5c8c375dc4b2b308ca4d0734c4 /Master | |
parent | c0f152092e12b8eb497c5d9e206a8fc1ad9ed5c2 (diff) |
luaotfload (25feb19)
git-svn-id: svn://tug.org/texlive/trunk@50131 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
36 files changed, 440 insertions, 502 deletions
diff --git a/Master/texmf-dist/doc/luatex/luaotfload/NEWS b/Master/texmf-dist/doc/luatex/luaotfload/NEWS index f37ea2139a3..7c8085ee562 100644 --- a/Master/texmf-dist/doc/luatex/luaotfload/NEWS +++ b/Master/texmf-dist/doc/luatex/luaotfload/NEWS @@ -1,5 +1,11 @@ Change History -------------- +2019-01-28 luaotfload v2.96 + * repaired broken letterspace (issue #38) + * changed handling of spaces in letterspacing + * changed handling of ligatures in letterspacing + * corrected detection of bold fonts (issue #41) + 2019-01-28 luaotfload v2.95 * imported context files of 2019-01-28 * changed bold indification (for lucida demi bold) (issue #33) diff --git a/Master/texmf-dist/doc/luatex/luaotfload/README.md b/Master/texmf-dist/doc/luatex/luaotfload/README.md index 1cb6f02e702..97164c8be48 100644 --- a/Master/texmf-dist/doc/luatex/luaotfload/README.md +++ b/Master/texmf-dist/doc/luatex/luaotfload/README.md @@ -1,8 +1,8 @@ # The Luaotfload Package -VERSION: 2.95 +VERSION: 2.96 -DATE: 2019-01-28 +DATE: 2019-02-14 ## Description diff --git a/Master/texmf-dist/doc/luatex/luaotfload/filegraph.pdf b/Master/texmf-dist/doc/luatex/luaotfload/filegraph.pdf Binary files differindex 5aa4a359f4f..400ca4408d7 100644 --- a/Master/texmf-dist/doc/luatex/luaotfload/filegraph.pdf +++ b/Master/texmf-dist/doc/luatex/luaotfload/filegraph.pdf diff --git a/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-conf.pdf b/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-conf.pdf Binary files differindex 32b43817ad7..22342387768 100644 --- a/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-conf.pdf +++ b/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-conf.pdf diff --git a/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-latex.pdf b/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-latex.pdf Binary files differindex 762c8f52cab..6b5628bbfdc 100644 --- a/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-latex.pdf +++ b/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-latex.pdf diff --git a/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-latex.tex b/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-latex.tex index 5cde1893267..e85ab5451e0 100644 --- a/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-latex.tex +++ b/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-latex.tex @@ -65,7 +65,7 @@ ]{Linux Libertine O} \setmonofont[Ligatures=TeX,Scale=MatchLowercase]{InconsolataN-Regular.otf} %setsansfont[Ligatures=TeX]{Linux Biolinum O} -\setsansfont[Ligatures=TeX,Scale=MatchLowercase]{Iwona Medium} +\setsansfont[Ligatures=TeX,Scale=MatchLowercase]{IwonaMedium-Regular.otf} %setmathfont{XITS Math} \usepackage{hologo} diff --git a/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-main.tex b/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-main.tex index e10532efb73..f4a9bf06359 100644 --- a/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-main.tex +++ b/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-main.tex @@ -32,7 +32,7 @@ \beginfrontmatter \setdocumenttitle {The \identifier{luaotfload} package} - \setdocumentdate {2019-01-28 v2.95} + \setdocumentdate {2019-02-14 v2.96} \setdocumentauthor {Elie Roux · Khaled Hosny · Philipp Gesang · Ulrike Fischer\\ Home: \hyperlink {https://github.com/lualatex/luaotfload}\\ New Home: \hyperlink {https://github.com/u-fischer/luaotfload}\\ @@ -56,6 +56,18 @@ \pdfbookmark[1]{\contentsname}{table} \typesetcontent +\beginsection {New in version 2.96 (by Ulrike Fischer)} +\begin{itemize} +\item In\marginpar{\mbox{}\hfill \textbf{Incompatible change!}} +version 2.95 letterspacing was broken due to a change in the fontloader (issue 38). This has been repaired. At the same time a number of oddities and bugs in the letterspacing has been corrected. This can change existing documents. See page~\pageref{p:letterspace} for more information. + +\item A problem with the detection of bold fonts has been corrected (issue 41, pull request 42). + +\end{itemize} +\endsection + + + \beginsection {New in version 2.95 (by Ulrike Fischer)} \begin{itemize} \item @@ -748,7 +760,7 @@ obviously, \inlinecode{random}. \endlisting \endaltitem - \beginaltitem {kernfactor \& letterspace} + \beginaltitem {kernfactor \& letterspace}\label{p:letterspace} Define a font with letterspacing (tracking) enabled. % In \identifier{luaotfload}, letterspacing is implemented by @@ -771,8 +783,41 @@ obviously, \inlinecode{random}. results in $4.2$ pt of additional kerning applied to each pair of glyphs. % - Ligatures are split into their component glyphs unless - explicitly ignored (see below). + + Spaces\marginpar{\mbox{}\hfill NEW in v2.96!} between words are now stretched too. This is consistent with the \XETEX behaviour (and the amount of stretching should be similar). This + naturally changes the output of a document. In case you want the old behaviour back use + \beginlisting + \directlua{luaotfload.letterspace.keepwordspacing = true} + \endlisting + + The difference between both options is obvious: + + \begingroup + \fontspec{IwonaMedium-Regular.otf}[LetterSpace=60] + New: hello world + + \directlua{luaotfload.letterspace.keepwordspacing = true} + + Old: hello world + + \directlua{luaotfload.letterspace.keepwordspacing = false} + \endgroup + + + Ligatures\marginpar{\mbox{}\hfill NEW in v2.96!} are no longer split into their component glyphs. + This change too make the \identifier{luaotfload} more compatible with \XETEX. It also makes it much easier to activate or deactivate ligature sets in letterspaced fonts. + If you want to split ligatures, you should deactivate as you would do it with a not-letterspaced font, e.g. with the fontspec \identifier{Ligatures} option, or the low-level \identifier{-liga} and similar. + + + {\font \test = "file:Iwona-Regular.otf:mode=base;+liga;+tlig;letterspace=12.5" + \test With standard ligatures: fi -- ff\par + + \font \test = "file:Iwona-Regular.otf:mode=base;-liga;+tlig;letterspace=12.5" + \test Only with tlig: fi -- ff \par + + \font \test = "file:Iwona-Regular.otf:mode=base;-liga;letterspace=12.5" + \test No ligatures: fi -- ff \par + } For compatibility with \XETEX an alternative \identifier{letterspace} option is supplied that interprets the @@ -787,7 +832,10 @@ obviously, \inlinecode{random}. \font \iwonakernedB = "file:Iwona-Regular.otf:letterspace=12.5" \endlisting - Specific pairs of letters and ligatures may be exempt from + The \identifier{microtype} package uses a special implementation of letterspacing, and the commands \inlinecode{\lsstyle} and \inlinecode{\textls} are not affected by these changes. + + Setting the ligatures with the font options is the recommended way, to activate or deactivate them. In case of special requirements + specific pairs of letters and ligatures may be exempt from letterspacing by defining the \LUA functions \luaident{keeptogether} and \luaident{keepligature}, respectively, inside the namespace \inlinecode {luaotfload.letterspace}. diff --git a/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-tool.pdf b/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-tool.pdf Binary files differindex 9d581e36b49..3289076c15d 100644 --- a/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-tool.pdf +++ b/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-tool.pdf diff --git a/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-tool.rst b/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-tool.rst index 8dbaeadcd68..440e8158608 100644 --- a/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-tool.rst +++ b/Master/texmf-dist/doc/luatex/luaotfload/luaotfload-tool.rst @@ -6,9 +6,9 @@ generate and query the Luaotfload font names database ----------------------------------------------------------------------- -:Date: 2019-01-28 +:Date: 2019-02-14 :Copyright: GPL v2.0 -:Version: 2.95 +:Version: 2.96 :Manual section: 1 :Manual group: text processing diff --git a/Master/texmf-dist/doc/luatex/luaotfload/luaotfload.conf.rst b/Master/texmf-dist/doc/luatex/luaotfload/luaotfload.conf.rst index dd75e365084..a03b4831508 100644 --- a/Master/texmf-dist/doc/luatex/luaotfload/luaotfload.conf.rst +++ b/Master/texmf-dist/doc/luatex/luaotfload/luaotfload.conf.rst @@ -6,9 +6,9 @@ Luaotfload configuration file ----------------------------------------------------------------------- -:Date: 2019-01-28 +:Date: 2019-02-14 :Copyright: GPL v2.0 -:Version: 2.95 +:Version: 2.96 :Manual section: 5 :Manual group: text processing diff --git a/Master/texmf-dist/doc/man/man1/luaotfload-tool.1 b/Master/texmf-dist/doc/man/man1/luaotfload-tool.1 index 50606371960..df30b840a57 100644 --- a/Master/texmf-dist/doc/man/man1/luaotfload-tool.1 +++ b/Master/texmf-dist/doc/man/man1/luaotfload-tool.1 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH LUAOTFLOAD-TOOL 1 "2019-01-28" "2.95" "text processing" +.TH LUAOTFLOAD-TOOL 1 "2019-02-14" "2.96" "text processing" .SH NAME luaotfload-tool \- generate and query the Luaotfload font names database . diff --git a/Master/texmf-dist/doc/man/man1/luaotfload-tool.man1.pdf b/Master/texmf-dist/doc/man/man1/luaotfload-tool.man1.pdf Binary files differindex 010c69228dc..3a58eb2cd2a 100644 --- a/Master/texmf-dist/doc/man/man1/luaotfload-tool.man1.pdf +++ b/Master/texmf-dist/doc/man/man1/luaotfload-tool.man1.pdf diff --git a/Master/texmf-dist/doc/man/man5/luaotfload.conf.5 b/Master/texmf-dist/doc/man/man5/luaotfload.conf.5 index 9b92e543833..67b2e125867 100644 --- a/Master/texmf-dist/doc/man/man5/luaotfload.conf.5 +++ b/Master/texmf-dist/doc/man/man5/luaotfload.conf.5 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH LUAOTFLOAD.CONF 5 "2019-01-28" "2.95" "text processing" +.TH LUAOTFLOAD.CONF 5 "2019-02-14" "2.96" "text processing" .SH NAME luaotfload.conf \- Luaotfload configuration file . diff --git a/Master/texmf-dist/doc/man/man5/luaotfload.conf.man5.pdf b/Master/texmf-dist/doc/man/man5/luaotfload.conf.man5.pdf Binary files differindex ea7d1f25e24..61af4259ad9 100644 --- a/Master/texmf-dist/doc/man/man5/luaotfload.conf.man5.pdf +++ b/Master/texmf-dist/doc/man/man5/luaotfload.conf.man5.pdf diff --git a/Master/texmf-dist/scripts/luaotfload/luaotfload-tool.lua b/Master/texmf-dist/scripts/luaotfload/luaotfload-tool.lua index f09bc748bac..a7bbf1114c8 100755 --- a/Master/texmf-dist/scripts/luaotfload/luaotfload-tool.lua +++ b/Master/texmf-dist/scripts/luaotfload/luaotfload-tool.lua @@ -9,8 +9,8 @@ local ProvidesLuaModule = { name = "luaotfload-tool", - version = "2.95", --TAGVERSION - date = "2019-01-28", --TAGDATE + version = "2.96", --TAGVERSION + date = "2019-02-14", --TAGDATE description = "luaotfload-tool / database functionality", license = "GPL v2.0" } diff --git a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-2019-01-28.lua b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-2019-02-14.lua index 99e084ba9af..8d675e10006 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-2019-01-28.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-2019-02-14.lua @@ -1,6 +1,6 @@ --[[info----------------------------------------------------------------------- Luaotfload fontloader package - build 2019-01-30 23:31:07 + build 2019-02-22 23:32:55 ------------------------------------------------------------------------------- © 2019 PRAGMA ADE / ConTeXt Development Team @@ -62,7 +62,7 @@ --info]]----------------------------------------------------------------------- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “data-con” 7ce546725b1550f655c78ac9d69419ca] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “data-con” 7ce546725b1550f655c78ac9d69419ca] --- if not modules then modules={} end modules ['data-con']={ version=1.100, @@ -174,10 +174,10 @@ function containers.cleanname(name) return (gsub(lower(name),"[^%w\128-\255]+","-")) end -end --- [luaotfload, fontloader-2019-01-30.lua scope for “data-con”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “data-con”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “basics-nod” 31e53bc2d299eda36a0f6592a0d0693f] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “basics-nod” c5185eab8319653452cc5957c787f4be] --- if not modules then modules={} end modules ['luatex-fonts-nod']={ version=1.001, @@ -374,8 +374,10 @@ if not nuts.getdirection then end local propertydata=direct.get_properties_table() nodes.properties={ data=propertydata } -direct.set_properties_mode(true,true) -function direct.set_properties_mode() end +if direct.set_properties_mode then + direct.set_properties_mode(true,true) + function direct.set_properties_mode() end +end nuts.getprop=function(n,k) local p=propertydata[n] if p then @@ -453,10 +455,10 @@ do } end -end --- [luaotfload, fontloader-2019-01-30.lua scope for “basics-nod”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “basics-nod”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “basics-chr” a8b8316248b40cc9bc1be19050f7074f] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “basics-chr” a8b8316248b40cc9bc1be19050f7074f] --- characters=characters or {} @@ -3695,10 +3697,10 @@ characters.indicgroups={ }, } -end --- [luaotfload, fontloader-2019-01-30.lua scope for “basics-chr”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “basics-chr”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-ini” 4299a02110bbd7c0d27e131235c5319d] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-ini” 4299a02110bbd7c0d27e131235c5319d] --- if not modules then modules={} end modules ['font-ini']={ version=1.001, @@ -3736,10 +3738,10 @@ fonts.privateoffsets={ keepnames=false, } -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-ini”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-ini”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “fonts-mis” bc9eb43c27f63ce9d0fff67e104fe1c6] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “fonts-mis” bc9eb43c27f63ce9d0fff67e104fe1c6] --- if not modules then modules={} end modules ['luatex-font-mis']={ version=1.001, @@ -3771,10 +3773,10 @@ function font.each() return table.sortedhash(fonts.hashes.identifiers) end -end --- [luaotfload, fontloader-2019-01-30.lua scope for “fonts-mis”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “fonts-mis”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-con” 6308f40e1b4fecfbe05b01c571d46936] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-con” ecfc697058b63e508300b6133f97c74c] --- if not modules then modules={} end modules ['font-con']={ version=1.001, @@ -3807,7 +3809,8 @@ constructors.namemode="fullpath" constructors.version=1.01 constructors.cache=containers.define("fonts","constructors",constructors.version,false) constructors.privateoffset=fonts.privateoffsets.textbase or 0xF0000 -constructors.cacheintex=true +constructors.cacheintex=true +constructors.addtounicode=true local designsizes=allocate() constructors.designsizes=designsizes local loadedfonts=allocate() @@ -4067,6 +4070,7 @@ function constructors.scale(tfmdata,specification) targetparameters.textsize=textsize targetparameters.forcedsize=forcedsize targetparameters.extrafactor=extrafactor + local addtounicode=constructors.addtounicode local tounicode=fonts.mappings.tounicode local unknowncode=tounicode(0xFFFD) local defaultwidth=resources.defaultwidth or 0 @@ -4320,11 +4324,17 @@ function constructors.scale(tfmdata,specification) end end local isunicode=description.unicode - if isunicode then - chr.unicode=isunicode - chr.tounicode=tounicode(isunicode) + if addtounicode then + if isunicode then + chr.unicode=isunicode + chr.tounicode=tounicode(isunicode) + else + chr.tounicode=unknowncode + end else - chr.tounicode=unknowncode + if isunicode then + chr.unicode=isunicode + end end if hasquality then local ve=character.expansion_factor @@ -5113,10 +5123,10 @@ function constructors.addcoreunicodes(unicodes) return unicodes end -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-con”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-con”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “fonts-enc” 3e71a54297e8f85a1ac438bb0f20dd79] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “fonts-enc” 3e71a54297e8f85a1ac438bb0f20dd79] --- if not modules then modules={} end modules ['luatex-font-enc']={ version=1.001, @@ -5185,10 +5195,10 @@ function encodings.load(filename) return containers.write(encodings.cache,name,data) end -end --- [luaotfload, fontloader-2019-01-30.lua scope for “fonts-enc”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “fonts-enc”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-cid” 4d87988efa86020a14708ee03c23415f] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-cid” 4d87988efa86020a14708ee03c23415f] --- if not modules then modules={} end modules ['font-cid']={ version=1.001, @@ -5339,10 +5349,10 @@ function cid.getmap(specification) return found end -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-cid”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-cid”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-map” 210b9288eef0df624da638b65d27291b] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-map” 210b9288eef0df624da638b65d27291b] --- if not modules then modules={} end modules ['font-map']={ version=1.001, @@ -5729,10 +5739,10 @@ function mappings.addtounicode(data,filename,checklookups,forceligatures) end end -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-map”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-map”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-vfc” 94937140f2c909e9c831ba021f1ab303] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-vfc” 94937140f2c909e9c831ba021f1ab303] --- if not modules then modules={} end modules ['font-vfc']={ version=1.001, @@ -5830,10 +5840,10 @@ helpers.commands=utilities.storage.allocate { dummy=dummy, } -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-vfc”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-vfc”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-otr” 2c35abf43f9a64bdd99240593d432d8a] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-otr” 2c35abf43f9a64bdd99240593d432d8a] --- if not modules then modules={} end modules ['font-otr']={ version=1.001, @@ -7656,10 +7666,10 @@ function readers.extend(fontdata) end end -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-otr”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-otr”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-oti” dbae7722baae24d917a17176553825cf] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-oti” dbae7722baae24d917a17176553825cf] --- if not modules then modules={} end modules ['font-oti']={ version=1.001, @@ -7802,10 +7812,10 @@ function otffeatures.checkeddefaultlanguage(featuretype,autolanguage,languages) end end -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-oti”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-oti”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-ott” a8b78a27cbb22d4f697a8dd801a73eea] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-ott” a8b78a27cbb22d4f697a8dd801a73eea] --- if not modules then modules={} end modules ["font-ott"]={ version=1.001, @@ -8859,10 +8869,10 @@ function otffeatures.normalize(features,wrap) end end -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-ott”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-ott”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-cff” fda3887cbaad0b82d06d3cbffdfff560] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-cff” fda3887cbaad0b82d06d3cbffdfff560] --- if not modules then modules={} end modules ['font-cff']={ version=1.001, @@ -10881,10 +10891,10 @@ function readers.cffcheck(filename) end end -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-cff”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-cff”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-ttf” fe1b771df5d6442a10fcfa1388f3eed2] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-ttf” fe1b771df5d6442a10fcfa1388f3eed2] --- if not modules then modules={} end modules ['font-ttf']={ version=1.001, @@ -12024,10 +12034,10 @@ function readers.gvar(f,fontdata,specification,glyphdata,shapedata) end end -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-ttf”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-ttf”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-dsp” 7959312318af6ed8fbd9edbeb2b1a335] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-dsp” 7959312318af6ed8fbd9edbeb2b1a335] --- if not modules then modules={} end modules ['font-dsp']={ version=1.001, @@ -15249,10 +15259,10 @@ function readers.mvar(f,fontdata,specification) end end -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-dsp”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-dsp”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-oup” 26b481cd9efebf7047810800930dff58] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-oup” 26b481cd9efebf7047810800930dff58] --- if not modules then modules={} end modules ['font-oup']={ version=1.001, @@ -17873,10 +17883,10 @@ function readers.expand(data) expandlookups(sublookups) end -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-oup”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-oup”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-otl” 0836c8396cae2bcfd4020186e5e8d7e0] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-otl” 0836c8396cae2bcfd4020186e5e8d7e0] --- if not modules then modules={} end modules ['font-otl']={ version=1.001, @@ -18579,10 +18589,10 @@ otf.coverup={ end } -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-otl”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-otl”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-oto” 6ba2e73177b18007e74de324c324806c] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-oto” 6ba2e73177b18007e74de324c324806c] --- if not modules then modules={} end modules ['font-oto']={ version=1.001, @@ -19035,10 +19045,10 @@ registerotffeature { } otf.basemodeinitializer=featuresinitializer -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-oto”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-oto”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-otj” e49771140e5ed2f28ce680ad9d672dc7] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-otj” e49771140e5ed2f28ce680ad9d672dc7] --- if not modules then modules={} end modules ['font-otj']={ version=1.001, @@ -20494,10 +20504,10 @@ function injections.handler(head,where) end end -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-otj”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-otj”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-ota” 5503fc4d2bd8c6a2cbb2db1b1651e402] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-ota” 5503fc4d2bd8c6a2cbb2db1b1651e402] --- if not modules then modules={} end modules ['font-ota']={ version=1.001, @@ -20874,10 +20884,10 @@ directives.register("otf.analyze.useunicodemarks",function(v) analyzers.useunicodemarks=v end) -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-ota”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-ota”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-ots” e2bfdc0d27729ce54048d94ff701f37f] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-ots” e2bfdc0d27729ce54048d94ff701f37f] --- if not modules then modules={} end modules ['font-ots']={ version=1.001, @@ -24487,10 +24497,10 @@ registerotffeature { }, } -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-ots”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-ots”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-osd” 883c29eaccf966c9ad9ab205a920de08] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-osd” 883c29eaccf966c9ad9ab205a920de08] --- if not modules then modules={} end modules ['font-osd']={ version=1.001, @@ -26425,10 +26435,10 @@ for i=1,nofscripts do methods[scripts_two[i]]=method_two end -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-osd”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-osd”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-ocl” 280ad7888c7c386010598e9fdb83f466] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-ocl” 280ad7888c7c386010598e9fdb83f466] --- if not modules then modules={} end modules ['font-ocl']={ version=1.001, @@ -26926,10 +26936,10 @@ fonts.handlers.otf.features.register { } } -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-ocl”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-ocl”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-otc” 088ba25667dfc5036867d007797e1602] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-otc” 088ba25667dfc5036867d007797e1602] --- if not modules then modules={} end modules ['font-otc']={ version=1.001, @@ -27678,10 +27688,10 @@ end otf.enhancers.enhance=enhance otf.enhancers.register("check extra features",enhance) -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-otc”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-otc”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-onr” 20b0d2753f58ff91180947ce4078571e] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-onr” 20b0d2753f58ff91180947ce4078571e] --- if not modules then modules={} end modules ['font-onr']={ version=1.001, @@ -28053,10 +28063,10 @@ function readers.getinfo(filename) end end -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-onr”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-onr”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-one” b0a175e8f123feb797c7a5a9b02b85a0] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-one” b0a175e8f123feb797c7a5a9b02b85a0] --- if not modules then modules={} end modules ['font-one']={ version=1.001, @@ -28756,10 +28766,10 @@ registerafmenhancer("normalize features",enhance_normalize_features) registerafmenhancer("check extra features",otfenhancers.enhance) registerafmenhancer("fix names",enhance_fix_names) -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-one”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-one”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-afk” 54d554530e75c57c56ee76234724e26d] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-afk” 54d554530e75c57c56ee76234724e26d] --- if not modules then modules={} end modules ['font-afk']={ version=1.001, @@ -28926,10 +28936,10 @@ fonts.handlers.afm.helpdata={ } } -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-afk”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-afk”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-tfm” f1a3796cce3838210248eb1daee6ea83] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-tfm” f1a3796cce3838210248eb1daee6ea83] --- if not modules then modules={} end modules ['font-tfm']={ version=1.001, @@ -29479,10 +29489,10 @@ registertfmfeature { } } -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-tfm”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-tfm”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-lua” 55b281fb98f7bd848fc19928f376f647] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-lua” 55b281fb98f7bd848fc19928f376f647] --- if not modules then modules={} end modules ['font-lua']={ version=1.001, @@ -29522,10 +29532,10 @@ function readers.lua(specification) return check_lua(specification,fullname) end -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-lua”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-lua”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-def” f66c365dae4499f982d8bf16e5d37de3] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-def” f66c365dae4499f982d8bf16e5d37de3] --- if not modules then modules={} end modules ['font-def']={ version=1.001, @@ -29927,10 +29937,10 @@ function font.getfont(id) end callbacks.register('define_font',definers.read,"definition of fonts (tfmdata preparation)") -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-def”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-def”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “fonts-def” 5ad79120ebc5e60f4d322fb3ee13bffe] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “fonts-def” 5ad79120ebc5e60f4d322fb3ee13bffe] --- if not modules then modules={} end modules ['luatex-fonts-def']={ version=1.001, @@ -30011,10 +30021,10 @@ function fonts.definers.applypostprocessors(tfmdata) return tfmdata end -end --- [luaotfload, fontloader-2019-01-30.lua scope for “fonts-def”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “fonts-def”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “fonts-ext” 01015ab3758cdc2af29394e6d502a91a] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “fonts-ext” 01015ab3758cdc2af29394e6d502a91a] --- if not modules then modules={} end modules ['luatex-fonts-ext']={ version=1.001, @@ -30200,10 +30210,10 @@ registerotffeature { } } -end --- [luaotfload, fontloader-2019-01-30.lua scope for “fonts-ext”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “fonts-ext”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-imp-tex” 77c374b0ef00c2fb12188ec42beb4257] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-imp-tex” 77c374b0ef00c2fb12188ec42beb4257] --- if not modules then modules={} end modules ['font-imp-tex']={ version=1.001, @@ -30302,10 +30312,10 @@ registerotffeature { description="arabic digits", } -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-imp-tex”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-imp-tex”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-imp-ligatures” 043daa4fcccf2560868da359d71d3a4a] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-imp-ligatures” 043daa4fcccf2560868da359d71d3a4a] --- if not modules then modules={} end modules ['font-imp-ligatures']={ version=1.001, @@ -30419,10 +30429,10 @@ if context then } end -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-imp-ligatures”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-imp-ligatures”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-imp-italics” fe1ca80fb5ea4a2f8d2d5c484e7ba913] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-imp-italics” fe1ca80fb5ea4a2f8d2d5c484e7ba913] --- if not modules then modules={} end modules ['font-imp-italics']={ version=1.001, @@ -30528,10 +30538,10 @@ if context then registerafmfeature(dimensions_specification) end -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-imp-italics”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-imp-italics”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “font-imp-effects” 73a660359a0ec71e44cc2b7225a715ac] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “font-imp-effects” 73a660359a0ec71e44cc2b7225a715ac] --- if not modules then modules={} end modules ['font-imp-effects']={ version=1.001, @@ -30888,10 +30898,10 @@ local specification={ registerotffeature(specification) registerafmfeature(specification) -end --- [luaotfload, fontloader-2019-01-30.lua scope for “font-imp-effects”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “font-imp-effects”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “fonts-lig” b9dbe77ce747d4c35bb2a20ffbe5aa51] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “fonts-lig” b9dbe77ce747d4c35bb2a20ffbe5aa51] --- fonts.handlers.otf.addfeature { @@ -32960,10 +32970,10 @@ fonts.handlers.otf.addfeature { ["type"]="ligature", } -end --- [luaotfload, fontloader-2019-01-30.lua scope for “fonts-lig”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “fonts-lig”] --- -do --- [luaotfload, fontloader-2019-01-30.lua scope for “fonts-gbn” d25472d54c4841db43a745764a63533e] --- +do --- [luaotfload, fontloader-2019-02-22.lua scope for “fonts-gbn” d25472d54c4841db43a745764a63533e] --- if not modules then modules={} end modules ['luatex-fonts-gbn']={ version=1.001, @@ -33228,7 +33238,7 @@ function nodes.simple_font_handler(head,groupcode,size,packtype,direction) return head end -end --- [luaotfload, fontloader-2019-01-30.lua scope for “fonts-gbn”] --- +end --- [luaotfload, fontloader-2019-02-22.lua scope for “fonts-gbn”] --- --- vim:ft=lua:sw=2:ts=8:et:tw=79 diff --git a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-basics-nod.lua b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-basics-nod.lua index 276c7efa516..e22f170ef90 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-basics-nod.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-basics-nod.lua @@ -259,9 +259,10 @@ end local propertydata = direct.get_properties_table() nodes.properties = { data = propertydata } -direct.set_properties_mode(true,true) -- needed for injection - -function direct.set_properties_mode() end -- we really need the set modes +if direct.set_properties_mode then + direct.set_properties_mode(true,true) + function direct.set_properties_mode() end +end nuts.getprop = function(n,k) local p = propertydata[n] diff --git a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-con.lua b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-con.lua index 81ea7c859cf..9f85ee20839 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-con.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-con.lua @@ -49,6 +49,8 @@ constructors.cache = containers.define("fonts", "constructors", constr constructors.privateoffset = fonts.privateoffsets.textbase or 0xF0000 constructors.cacheintex = true -- so we see the original table in fonts.font +constructors.addtounicode = true + -- This might become an interface: local designsizes = allocate() @@ -424,6 +426,8 @@ function constructors.scale(tfmdata,specification) targetparameters.forcedsize = forcedsize -- context specific targetparameters.extrafactor = extrafactor -- context specific -- + local addtounicode = constructors.addtounicode + -- local tounicode = fonts.mappings.tounicode local unknowncode = tounicode(0xFFFD) -- @@ -736,13 +740,19 @@ function constructors.scale(tfmdata,specification) end end local isunicode = description.unicode - if isunicode then - chr.unicode = isunicode - chr.tounicode = tounicode(isunicode) - -- in luatex > 0.85 we can do this: - -- chr.tounicode = isunicode + if addtounicode then + if isunicode then + chr.unicode = isunicode + chr.tounicode = tounicode(isunicode) + -- in luatex > 0.85 we can do this: + -- chr.tounicode = isunicode + else + chr.tounicode = unknowncode + end else - chr.tounicode = unknowncode + if isunicode then + chr.unicode = isunicode + end end if hasquality then -- we could move these calculations elsewhere (saves calculations) diff --git a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-reference.lua b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-reference.lua index 89ae7d64d27..d470094fcf1 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-reference.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-reference.lua @@ -1,6 +1,6 @@ -- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/sources/luatex-fonts.lua --- merge date : 01/28/19 16:58:09 +-- merge date : 02/14/19 16:57:24 do -- begin closure to overcome local limits and interference @@ -3386,6 +3386,7 @@ local environment={ formattedfloat=number.formattedfloat, stripzero=lpeg.patterns.stripzero, stripzeros=lpeg.patterns.stripzeros, + FORMAT=string.f9, } local arguments={ "a1" } setmetatable(arguments,{ __index=function(t,k) @@ -4855,8 +4856,10 @@ if not nuts.getdirection then end local propertydata=direct.get_properties_table() nodes.properties={ data=propertydata } -direct.set_properties_mode(true,true) -function direct.set_properties_mode() end +if direct.set_properties_mode then + direct.set_properties_mode(true,true) + function direct.set_properties_mode() end +end nuts.getprop=function(n,k) local p=propertydata[n] if p then @@ -8283,7 +8286,8 @@ constructors.namemode="fullpath" constructors.version=1.01 constructors.cache=containers.define("fonts","constructors",constructors.version,false) constructors.privateoffset=fonts.privateoffsets.textbase or 0xF0000 -constructors.cacheintex=true +constructors.cacheintex=true +constructors.addtounicode=true local designsizes=allocate() constructors.designsizes=designsizes local loadedfonts=allocate() @@ -8543,6 +8547,7 @@ function constructors.scale(tfmdata,specification) targetparameters.textsize=textsize targetparameters.forcedsize=forcedsize targetparameters.extrafactor=extrafactor + local addtounicode=constructors.addtounicode local tounicode=fonts.mappings.tounicode local unknowncode=tounicode(0xFFFD) local defaultwidth=resources.defaultwidth or 0 @@ -8796,11 +8801,17 @@ function constructors.scale(tfmdata,specification) end end local isunicode=description.unicode - if isunicode then - chr.unicode=isunicode - chr.tounicode=tounicode(isunicode) + if addtounicode then + if isunicode then + chr.unicode=isunicode + chr.tounicode=tounicode(isunicode) + else + chr.tounicode=unknowncode + end else - chr.tounicode=unknowncode + if isunicode then + chr.unicode=isunicode + end end if hasquality then local ve=character.expansion_factor diff --git a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-util-str.lua b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-util-str.lua index 410a4a547e4..713c294ebe7 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-util-str.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-util-str.lua @@ -612,6 +612,8 @@ local environment = { formattedfloat = number.formattedfloat, stripzero = lpeg.patterns.stripzero, stripzeros = lpeg.patterns.stripzeros, + + FORMAT = string.f9, } -- -- -- @@ -730,6 +732,17 @@ local format_F = function(f) -- beware, no cast to number end end +-- if string.f9 then +-- format_F = function(f) -- beware, no cast to number +-- n = n + 1 +-- if not f or f == "" then +-- return format("(((a%s > -0.0000000005 and a%s < 0.0000000005) and '0') or FORMAT(a%s))",n,n,n,n,n) +-- else +-- return format("((a%s %% 1 == 0) and format('%%i',a%s) or FORMAT(a%s,'%%%sf'))",n,n,n,f) +-- end +-- end +-- end + local format_k = function(b,a) -- slow n = n + 1 return format("formattedfloat(a%s,%i,%i)",n,b or 0, a or 0) diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-auxiliary.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-auxiliary.lua index 1bb66a997a9..428bfddcff7 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-auxiliary.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-auxiliary.lua @@ -6,8 +6,8 @@ local ProvidesLuaModule = { name = "luaotfload-auxiliary", - version = "2.95", --TAGVERSION - date = "2019-01-28", --TAGDATE + version = "2.96", --TAGVERSION + date = "2019-02-14", --TAGDATE description = "luaotfload submodule / auxiliary functions", license = "GPL v2.0" } diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-colors.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-colors.lua index 60c0483a0ef..17536b21647 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-colors.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-colors.lua @@ -5,8 +5,8 @@ local ProvidesLuaModule = { name = "luaotfload-colors", - version = "2.95", --TAGVERSION - date = "2019-01-28", --TAGDATE + version = "2.96", --TAGVERSION + date = "2019-02-14", --TAGDATE description = "luaotfload submodule / color", license = "GPL v2.0", author = "Khaled Hosny, Elie Roux, Philipp Gesang, Dohyun Kim, David Carlisle", diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-configuration.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-configuration.lua index 24c2a14a175..d88c9ed7713 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-configuration.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-configuration.lua @@ -7,8 +7,8 @@ local ProvidesLuaModule = { name = "luaotfload-configuration", - version = "2.95", --TAGVERSION - date = "2019-01-28", --TAGDATE + version = "2.96", --TAGVERSION + date = "2019-02-14", --TAGDATE description = "luaotfload submodule / config file reader", license = "GPL v2.0" } diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua index 95a8162b4b3..6918c4abf87 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua @@ -5,8 +5,8 @@ do -- block to avoid to many local variables error local ProvidesLuaModule = { name = "luaotfload-database", - version = "2.95", --TAGVERSION - date = "2019-01-28", --TAGDATE + version = "2.96", --TAGVERSION + date = "2019-02-14", --TAGDATE description = "luaotfload submodule / database", license = "GPL v2.0", author = "Khaled Hosny, Elie Roux, Philipp Gesang, Marcel Krüger", @@ -370,7 +370,6 @@ This is a sketch of the luaotfload db: index : int; // index in the mappings table italicangle : float; // italic angle; non-zero with oblique faces location : string; // "texmf" | "system" | "local" - metafamily : string; // alternative family identifier if appropriate, sanitized plainname : string; // unsanitized font name typographicsubfamily : string; // sanitized preferred subfamily (names table 14) psname : string; // PostScript name @@ -606,21 +605,14 @@ local regular_synonym = { roman = true, } -local italic_synonym = { - oblique = true, - slanted = true, - italic = true, -} - -local style_category = { - regular = "r", - bold = "b", - bolditalic = "bi", - italic = "i", - r = "regular", - b = "bold", - bi = "bolditalic", - i = "italic", +local style_synonym = { + oblique = 'i', + slanted = 'i', + italic = 'i', + boldoblique = 'bi', + boldslanted = 'bi', + bolditalic = 'bi', + bold = 'b', } -- MK Determine if casefold search is requested @@ -939,9 +931,8 @@ end --doc]]-- --- int * int * int * int list -> int -> int -local choose_size = function (sizes, askedsize) +local function choose_size (sizes, askedsize) local mappings = name_index.mappings - local match = sizes.default local exact local inrange = { } --- distance * index list local norange = { } --- distance * index list @@ -953,8 +944,7 @@ local choose_size = function (sizes, askedsize) local dsnsize, high, low, index = unpack (sizes [i]) if dsnsize == askedsize then --- exact match, this is what we were looking for - exact = index - goto skip + return index elseif askedsize <= low then --- below range, add to the norange table local d = low - askedsize @@ -983,14 +973,15 @@ local choose_size = function (sizes, askedsize) end end ::skip:: - if exact then - match = exact - elseif #inrange > 0 then - match = choose_closest (inrange) + if #inrange > 0 then + return choose_closest (inrange) elseif #norange > 0 then - match = choose_closest (norange) + return choose_closest (norange) + elseif sizes.default then + return sizes.default + elseif askedsize == 0 then + return choose_size(sizes, 655360) -- If there is no default size and no size specified, just guess end - return match end --[[doc-- @@ -1000,11 +991,12 @@ end The parameters “name” and “style” are pre-sanitized. --doc]]-- ---- spec -> string -> string -> int -> string * int +--- spec -> string -> string -> int -> string * int * bool local lookup_familyname = function (specification, name, style, askedsize) local families = name_index.families local mappings = name_index.mappings local candidates = nil + local fallback = true --- arrow code alert for i = 1, #location_precedence do local location = location_precedence [i] @@ -1018,13 +1010,16 @@ local lookup_familyname = function (specification, name, style, askedsize) local stylegroup = familygroup [style] if stylegroup then --- suitable match candidates = stylegroup + fallback = false goto done + elseif not candidates then + candidates = familygroup.r end end end end end - if true then + if not candidates then return nil, nil end ::done:: @@ -1035,14 +1030,13 @@ local lookup_familyname = function (specification, name, style, askedsize) end logreport ("info", 2, "db", "Match found: %s(%d).", resolved, subfont or 0) - return resolved, subfont + return resolved, subfont, fallback end -local lookup_fontname = function (specification, name, style) +local lookup_fontname = function (specification, name) local mappings = name_index.mappings local fallback = nil local lastresort = nil - style = style_category [style] for i = 1, #mappings do local face = mappings [i] local typographicsubfamily = face.typographicsubfamily @@ -1052,29 +1046,8 @@ local lookup_fontname = function (specification, name, style) or face.psname == name then return face.fullpath, face.subfont - elseif face.familyname == name then - if typographicsubfamily == style - or subfamily == style - then - fallback = face - elseif regular_synonym [typographicsubfamily] - or regular_synonym [subfamily] - then - lastresort = face - end - elseif face.metafamily == name - and ( regular_synonym [typographicsubfamily] - or regular_synonym [subfamily]) - then - lastresort = face end end - if fallback then - return fallback.fullpath, fallback.subfont - end - if lastresort then - return lastresort.fullpath, lastresort.subfont - end return nil, nil end @@ -1185,7 +1158,6 @@ end --- table -> string * (int | bool) lookup_font_name = function (specification) - local resolved, subfont if not name_index then name_index = load_names () end local name = sanitize_fontname (specification.name) local style = sanitize_fontname (specification.style) or "r" @@ -1204,14 +1176,17 @@ lookup_font_name = function (specification) askedsize = design_size_dimension * askedsize end - resolved, subfont = lookup_familyname (specification, - name, - style, - askedsize) - if not resolved then - resolved, subfont = lookup_fontname (specification, - name, - style) + local resolved, subfont, fallback = lookup_familyname (specification, + name, + style, + askedsize) + if not resolved or fallback then + local new_resolved, new_subfont = lookup_fontname (specification, + name, + style) + if new_resolved then + resolved, subfont = new_resolved, new_subfont + end end if not resolved then @@ -1402,7 +1377,6 @@ end --- find_closest() local read_font_file = function (filename, subfont) local fontdata = otfhandler.readers.getinfo (filename, { subfont = subfont - , details = false , platformnames = true , rawfamilynames = true }) @@ -1669,7 +1643,6 @@ ot_fullinfo = function (filename, local style = organize_styledata (metadata, rawinfo, info) - local res = { file = { base = basename, full = filename, @@ -1708,7 +1681,6 @@ t1_fullinfo = function (filename, _subfont, location, basename, format) sanitized = sanitize_fontnames ({ fontname = fontname, psname = fullname, - metafamily = familyname, familyname = familyname, weight = metadata.weight, --- string identifier typographicsubfamily = style, @@ -2728,38 +2700,8 @@ local pick_fallback_style local check_regular do - local choose_exact = function (field) - --- only clean matches, without guessing - if italic_synonym [field] then - return "i" - end - - if stringsub (field, 1, 10) == "bolditalic" - or stringsub (field, 1, 11) == "boldoblique" then - return "bi" - end - - if stringsub (field, 1, 4) == "bold" then - return "b" - end - - if stringsub (field, 1, 6) == "italic" then - return "i" - end - - return false - end - pick_style = function (typographicsubfamily, subfamily) - local style - if typographicsubfamily then - style = choose_exact (typographicsubfamily) - if style then return style end - elseif subfamily then - style = choose_exact (subfamily) - if style then return style end - end - return false + return style_synonym [typographicsubfamily or subfamily or ""] end pick_fallback_style = function (italicangle, pfmweight, width) @@ -2893,6 +2835,18 @@ local add_family = function (name, subtable, modifier, entry) } end +local add_lastresort_regular = function (name, subtable, entry) + if not name then --- probably borked font + return + end + local familytable = subtable [name] + if not familytable then + familytable = { } + subtable [name] = familytable + end + familytable.fallback = entry.index +end + local get_subtable = function (families, entry) local location = entry.location local format = entry.format @@ -2948,6 +2902,9 @@ local collect_families = function (mappings) if modifier then add_family (familyname, subtable, modifier, entry) end + if modifier ~= 'r' and regular_synonym[typographicsubfamily or subfamily or ''] then + add_lastresort_regular (familyname, subtable, entry) + end end collectgarbage "collect" @@ -2974,6 +2931,8 @@ group_modifiers = function (mappings, families) for format, format_data in next, location_data do for familyname, collected in next, format_data do local styledata = { } --- will replace the “collected” table + local lastresort_regular = collected.fallback + collected.fallback = nil --- First, fill in the ordinary style data that --- fits neatly into the four relevant modifier --- categories. @@ -3002,6 +2961,9 @@ group_modifiers = function (mappings, families) styledata [modifier] = entries end end + if not styledata.r and lastresort_regular then + styledata.r = {default = lastresort_regular} + end --- At this point the family set may still lack --- entries for bold or bold italic. We will fill diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-diagnostics.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-diagnostics.lua index 60d46f3ae24..bec72097433 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-diagnostics.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-diagnostics.lua @@ -7,8 +7,8 @@ local ProvidesLuaModule = { name = "luaotfload-diagnostics", - version = "2.95", --TAGVERSION - date = "2019-01-28", --TAGDATE + version = "2.96", --TAGVERSION + date = "2019-02-14", --TAGDATE description = "luaotfload-tool submodule / diagnostics", license = "GPL v2.0" } diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua index d4b24f73dc6..20406fd8122 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua @@ -5,8 +5,8 @@ local ProvidesLuaModule = { name = "luaotfload-features", - version = "2.95", --TAGVERSION - date = "2019-01-28", --TAGDATE + version = "2.96", --TAGVERSION + date = "2019-02-14", --TAGDATE description = "luaotfload submodule / features", license = "GPL v2.0", author = "Hans Hagen, Khaled Hosny, Elie Roux, Philipp Gesang, Marcel Krüger", diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-filelist.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-filelist.lua index 3eb0ff9891a..e20d17c153b 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-filelist.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-filelist.lua @@ -6,8 +6,8 @@ local ProvidesLuaModule = { name = "luaotfload-filelist", - version = "2.95", --TAGVERSION - date = "2019-01-28", --TAGDATE + version = "2.96", --TAGVERSION + date = "2019-02-14", --TAGDATE description = "luaotfload submodule / filelist", license = "GPL v2.0" } diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-glyphlist.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-glyphlist.lua index c859eefcf61..897385116c1 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-glyphlist.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-glyphlist.lua @@ -1,7 +1,7 @@ local ProvidesLuaModule = { name = "luaotfload-glyphlist", - version = "2.95", --TAGVERSION - date = "2019-01-28", --TAGDATE + version = "2.96", --TAGVERSION + date = "2019-02-14", --TAGDATE description = "luaotfload submodule / autogenerated glyphlist", copyright = "derived from https://raw.githubusercontent.com/adobe-type-tools/agl-aglfn/master/glyphlist.txt", original = "Adobe Glyph List, version 2.0, September 20, 2002", diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-init.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-init.lua index c7ca2c05bd0..a78883ad992 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-init.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-init.lua @@ -7,8 +7,8 @@ local ProvidesLuaModule = { name = "luaotfload-init", - version = "2.95", --TAGVERSION - date = "2019-01-28", --TAGDATE + version = "2.96", --TAGVERSION + date = "2019-02-14", --TAGDATE description = "luaotfload submodule / initialization", license = "GPL v2.0" } diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-letterspace.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-letterspace.lua index 292e05bbbfe..c89d89cfded 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-letterspace.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-letterspace.lua @@ -5,12 +5,12 @@ local ProvidesLuaModule = { name = "luaotfload-letterspace", - version = "2.95", --TAGVERSION - date = "2019-01-28", --TAGDATE + version = "2.96", --TAGVERSION + date = "2019-02-14", --TAGDATE description = "luaotfload submodule / color", license = "GPL v2.0", copyright = "PRAGMA ADE / ConTeXt Development Team", - author = "Hans Hagen, PRAGMA-ADE, Hasselt NL; adapted by Philipp Gesang, Ulrike Fischer" + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL; adapted by Philipp Gesang, Ulrike Fischer, Marcel Krüger" } if luatexbase and luatexbase.provides_module then @@ -20,80 +20,66 @@ end --- This code diverged quite a bit from its origin in Context. Please --- do *not* report bugs on the Context list. -local log = luaotfload.log -local logreport = log.report +local logreport = luaotfload.log.report local getmetatable = getmetatable -local require = require local setmetatable = setmetatable local tonumber = tonumber +local unpack = table.unpack local next = next -local nodes, node, fonts = nodes, node, fonts +local node, fonts = node, fonts -local nodedirect = nodes.nuts +local nodedirect = node.direct local getfield = nodedirect.getfield local setfield = nodedirect.setfield -local field_setter = function (name) return function (n, ...) setfield (n, name, ...) end end -local field_getter = function (name) return function (n, ...) getfield (n, name, ...) end end - local getfont = nodedirect.getfont local getid = nodedirect.getid -local getnext = nodedirect.getnext or field_getter "next" -local setnext = nodedirect.setnext or field_setter "next" +local getnext = nodedirect.getnext +local setnext = nodedirect.setnext -local getprev = nodedirect.getprev or field_getter "prev" -local setprev = nodedirect.setprev or field_setter "prev" +local getprev = nodedirect.getprev +local setprev = nodedirect.setprev ---- since r5336 -local getboth = nodedirect.getboth or function (n) - return getprev (n), getnext (n) -end +local getboth = nodedirect.getboth -local setlink = nodedirect.setlink or function (a, b) - setnext (a, b) - setprev (b, a) -end +local setlink = nodedirect.setlink + +local getdisc = nodedirect.getdisc +local setdisc = nodedirect.setdisc -local getdisc = nodedirect.getdisc or field_getter "disc" -local setdisc = nodedirect.setdisc or field_setter "disc" +local getsubtype = nodedirect.getsubtype +local setsubtype = nodedirect.setsubtype -local getsubtype = nodedirect.getsubtype or field_getter "subtype" -local setsubtype = nodedirect.setsubtype or field_setter "subtype" +local getchar = nodedirect.getchar +local setchar = nodedirect.setchar -local getchar = nodedirect.getchar or field_getter "subtype" -local setchar = nodedirect.setchar or field_setter "subtype" +local getkern = nodedirect.getkern +local setkern = nodedirect.setkern + +local getglue = nodedirect.getglue +local setglue = nodedirect.setglue local find_node_tail = nodedirect.tail -local todirect = nodedirect.tonut +local todirect = nodedirect.todirect local tonode = nodedirect.tonode local insert_node_before = nodedirect.insert_before -local free_node = nodedirect.free -- may cause double free -local free_node = function (n) - logreport ("term", 5, "letterspace", "not calling free_node(%d)", n) - -- free_node (n) -end +local free_node = nodedirect.free local copy_node = nodedirect.copy local new_node = nodedirect.new -local nodepool = nodedirect.pool --- local new_kern = nodepool.kern -- UF removed 2017-07-14 - -local nodecodes = nodes.nodecodes - -local glyph_code = nodecodes.glyph -local kern_code = nodecodes.kern -local disc_code = nodecodes.disc -local math_code = nodecodes.math -local glue_code = nodecodes.glue +local glyph_code = node.id"glyph" +local kern_code = node.id"kern" +local disc_code = node.id"disc" +local glue_code = node.id"glue" local fonthashes = fonts.hashes +local identifiers = fonthashes.identifiers local chardata = fonthashes.characters -local quaddata = fonthashes.quads local otffeatures = fonts.constructors.newfeatures "otf" --[[doc-- @@ -107,8 +93,10 @@ local otffeatures = fonts.constructors.newfeatures "otf" luaotfload.letterspace = luaotfload.letterspace or { } local letterspace = luaotfload.letterspace -letterspace.keepligature = false +local lectured = false +letterspace.keepligature = true letterspace.keeptogether = false +letterspace.keepwordspacing = false ---=================================================================--- --- preliminary definitions @@ -119,105 +107,19 @@ letterspace.keeptogether = false --- node-ini ----------------------------------------------------------------------- -local bothways = function (t) return table.swapped (t, t) end -local kerncodes = bothways { [0] = "fontkern" - , [1] = "userkern" - , [2] = "accentkern" - } -local skipcodes = bothways { [0] = "userskip" - , [13] = "spaceskip" - , [14] = "xspaceskip" - } - -kerncodes.kerning = kerncodes.fontkern --- idiosyncrasy -local kerning_code = kerncodes.kerning -local userkern_code = kerncodes.userkern -local userskip_code = skipcodes.userskip -local spaceskip_code = skipcodes.spaceskip -local xspaceskip_code = skipcodes.xspaceskip - ------------------------------------------------------------------------ ---- node-res ------------------------------------------------------------------------ - -local glue_spec = new_node "glue_spec" - -local new_gluespec = function (width, - stretch, shrink, - stretch_order, shrink_order) - local spec = copy_node(glue_spec) - if width then setfield(spec, "width" , width ) end - if stretch then setfield(spec, "stretch" , stretch ) end - if shrink then setfield(spec, "shrink" , shrink ) end - if stretch_order then setfield(spec, "stretch_order", stretch_order) end - if shrink_order then setfield(spec, "shrink_order" , shrink_order ) end - return spec -end - -local new_glue = function (width, stretch, shrink, - stretch_order, shrink_order) - local n = new_node "glue" - if not width then return n end - -- no spec - if width == false then - local width = tonumber(width) - if width then - setfield(n, "spec", - new_gluespec(width, stretch, shrink, - stretch_order, shrink_order)) - end - else - -- shared - setfield(n, "spec", copy_node(width)) - end - return n -end - ------------------------------------------------------------------------ ---- font-hsh ------------------------------------------------------------------------ ---- some initialization resembling font-hsh -local fonthashes = fonts.hashes -local identifiers = fonthashes.identifiers --- was: fontdata -local chardata = fonthashes.characters -local quaddata = fonthashes.quads -local parameters = fonthashes.parameters - ---- ('a, 'a) hash -> (('a, 'a) hash -> 'a -> 'a) -> ('a, 'a) hash -local setmetatableindex = function (t, f) - local mt = getmetatable(t) - if mt then - mt.__index = f - else - setmetatable(t, { __index = f }) - end - return t -end - -if not parameters then - parameters = { } - setmetatableindex(parameters, function(t, k) - if k == true then - return parameters[currentfont()] - else - local parameters = identifiers[k].parameters - t[k] = parameters - return parameters - end - end) - --fonthashes.parameters = parameters -end +local kerning_code = 0 +local userkern_code = 1 +local userskip_code = 0 +local spaceskip_code = 13 +local xspaceskip_code = 14 if not chardata then chardata = { } - setmetatableindex(chardata, function(t, k) + table.setmetatableindex(chardata, function(t, k) if k == true then return chardata[currentfont()] else - local tfmdata = identifiers[k] - if not tfmdata then --- unsafe - tfmdata = font.fonts[k] - end + local tfmdata = font.getfont(k) or font.fonts[k] if tfmdata then local characters = tfmdata.characters t[k] = characters @@ -228,37 +130,19 @@ if not chardata then fonthashes.characters = chardata end -if not quaddata then - quaddata = { } - setmetatableindex(quaddata, function(t, k) - if k == true then - return quads[currentfont()] - else - local parameters = parameters[k] - local quad = parameters and parameters.quad or 0 - t[k] = quad - return quad - end - end) - --fonthashes.quads = quaddata -end - ---=================================================================--- --- character kerning functionality ---=================================================================--- -- UF changed 2017-07-14 -local nodedirectnew = node.direct.new - local kern_injector = function (fillup, kern) if fillup then - local g = nodedirectnew("glue") - setfield(g, "stretch", kern) - setfield(g, "stretch_order", 1) + local g = new_node(glue_code) + setglue(g, 0, kern, 0, 1, 0) return g end - local g = nodedirectnew("kern") - setfield(g,"kern",kern) + local g = new_node(kern_code) + setkern(g,kern) return g end -- /UF @@ -270,15 +154,6 @@ local kernable_skip = function (n) or st == xspaceskip_code end -local function spec_injector (fillup, width, stretch, shrink) - if fillup then - local spec = new_gluespec(width, 2 * stretch, 2 * shrink) - setfield(spec, "stretch_order", 1) - return spec - end - return new_gluespec(width,stretch,shrink) -end - --[[doc-- Caveat lector. @@ -290,67 +165,78 @@ end --doc]]-- -local kernfactors = { } --- fontid -> factor +local kernamounts = table.setmetatableindex(function (t, f) --- fontid -> {kern, fill} + local tfmdata = font.getfont(f) or font.fonts[f] + if tfmdata then + local fontproperties = tfmdata.properties + local fontparameters = tfmdata.parameters + if fontproperties and fontparameters then + local r + if fontproperties.kerncharacters == "max" then + r = {fontparameters.quad/4, true} + elseif fontproperties.kerncharacters then + r = {fontproperties.kerncharacters * fontparameters.quad, false} + else + r = {} + end + t[f] = r + return r + end + end + return {} +end) local kerncharacters kerncharacters = function (head) local start = head local lastfont = nil - local keepligature = letterspace.keepligature --- function local keeptogether = letterspace.keeptogether --- function - local fillup = false + local keepligature = letterspace.keepligature +-- if not lectured and keepligature ~= true then +-- logreport ("both", 0, "letterspace", +-- "Breaking ligatures through letterspacing is deprecated and " +-- .. "will be removed soon. Please disable unwanted ligatures through " +-- .. "font features instead and reset luaotfload.letterspace.keepligature " +-- .. "to true to maintain compatibility with future versions of luaotfload.") +-- lectured = true +-- end + if type(keepligature) ~= "function" then + local savedligature = keepligature + keepligature = function() return savedligature end + end + local keepwordspacing = letterspace.keepwordspacing + if type(keepwordspacing) ~= "function" then + local savedwordspacing = keepwordspacing + keepwordspacing = function() return savedwordspacing end + end - local identifiers = fonthashes.identifiers - local kernfactors = kernfactors + local kernamounts = kernamounts local firstkern = true while start do local id = getid(start) if id == glyph_code then --- 1) look up kern factor (slow, but cached rudimentarily) - local krn local fontid = getfont(start) - do - krn = kernfactors[fontid] - if not krn then - local tfmdata = identifiers[fontid] - if not tfmdata then -- unsafe - tfmdata = font.fonts[fontid] - end - if tfmdata then - fontproperties = tfmdata.properties - if fontproperties then - krn = fontproperties.kerncharacters - end - end - kernfactors[fontid] = krn - end - if not krn or krn == 0 then - firstkern = true + local krn, fillup = unpack(kernamounts[fontid]) + if not krn or krn == 0 then + firstkern = true + goto nextnode + elseif firstkern then + firstkern = false + if (id ~= disc_code) and (not getfield(start, "components")) then + --- not a ligature, skip node goto nextnode - elseif firstkern then - firstkern = false - if (id ~= disc_code) and (not getfield(start, "components")) then - --- not a ligature, skip node - goto nextnode - end end end - if krn == "max" then - krn = .25 - fillup = true - else - fillup = false - end - lastfont = fontid --- 2) resolve ligatures local c = getfield(start, "components") if c then - if keepligature and keepligature(start) then + if keepligature(start) then -- keep 'm c = nil else @@ -382,18 +268,18 @@ kerncharacters = function (head) if not pid then -- nothing - elseif pid == glue_code and kernable_skip(prev) then - local spec = getfield(prev, "spec") - local wd = getfield(spec, "width") + elseif pid == glue_code and kernable_skip(prev) + and not keepwordspacing(prev, lastfont) then + local wd, stretch, shrink = getglue(prev) if wd > 0 then - --- formula taken from Context - --- existing_width extended by four times the - --- width times the font’s kernfactor - local newwd = wd + --[[two en to a quad]] 4 * wd * krn - local stretched = (getfield(spec,"stretch") * newwd) / wd - local shrunk = (getfield(spec,"shrink") * newwd) / wd - setfield(prev, "spec", - spec_injector(fillup, newwd, stretched, shrunk)) + local newwd = wd + krn + local stretched = (stretch * newwd) / wd + local shrunk = (shrink * newwd) / wd + if fillup then + setglue(prev, newwd, 2 * stretched, 2 * shrunk, 1, 0) + else + setglue(prev, newwd, stretched, shrunk, 0, 0) + end end elseif pid == kern_code then @@ -412,9 +298,9 @@ kerncharacters = function (head) -- keep else setsubtype (prev, userkern_code) - local prev_kern = getfield(prev, "kern") - prev_kern = prev_kern + quaddata[lastfont] * krn - setfield (prev, "kern", prev_kern) + local prev_kern = getkern(prev) + prev_kern = prev_kern + krn + setkern (prev, prev_kern) end end @@ -434,13 +320,12 @@ kerncharacters = function (head) local kern = 0 local kerns = prevchardata.kerns if kerns then kern = kerns[lastchar] or kern end - krn = kern + quaddata[lastfont]*krn -- here + krn = kern + krn -- here insert_node_before(head,start,kern_injector(fillup,krn)) end end end else - krn = quaddata[lastfont]*krn -- here insert_node_before(head,start,kern_injector(fillup,krn)) end @@ -470,7 +355,7 @@ kerncharacters = function (head) setprev(after, tail) setnext(after, nil) post = kerncharacters (post) - setnext(tail, nil) + setnext(getprev(after), nil) setfield(disc, "post", post) free_node(after) end @@ -489,7 +374,7 @@ kerncharacters = function (head) replace = getnext(replace) setprev(replace, nil) setnext(getprev(after), nil) - setfield(disc, "replace", replace) + setfield(disc, "replace", replace) free_node(after) free_node(before) @@ -511,9 +396,7 @@ kerncharacters = function (head) if kerns then kern = kerns[lastchar] or kern end end end - krn = kern + quaddata[lastfont]*krn -- here - else - krn = quaddata[lastfont]*krn -- here + krn = kern + krn -- here end setfield(disc, "replace", kern_injector(false, krn)) end --[[if replace and prv and nxt]] @@ -535,7 +418,6 @@ end --- · callback: kerncharacters --- · enabler: enablefontkerning ---- · disabler: disablefontkerning --- callback wrappers @@ -592,11 +474,6 @@ local enablefontkerning = function ( ) , "hpack_filter") end ---- unit -> bool ----al disablefontkerning = function ( ) ----eturn remove_processor "luaotfload.letterspace" ---- - --[[doc-- Fontwise kerning is enabled via the “kernfactor” option at font diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-loaders.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-loaders.lua index 429f611361b..52ddb635974 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-loaders.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-loaders.lua @@ -8,8 +8,8 @@ local ProvidesLuaModule = { name = "luaotfload-loaders", - version = "2.95", --TAGVERSION - date = "2019-01-28", --TAGDATE + version = "2.96", --TAGVERSION + date = "2019-02-14", --TAGDATE description = "luaotfload submodule / callback handling", license = "GPL v2.0" } diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-log.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-log.lua index 3963933ff84..88b48dd9901 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-log.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-log.lua @@ -6,8 +6,8 @@ local ProvidesLuaModule = { name = "luaotfload-log", - version = "2.95", --TAGVERSION - date = "2019-01-28", --TAGDATE + version = "2.96", --TAGVERSION + date = "2019-02-14", --TAGDATE description = "luaotfload submodule / logging", license = "GPL v2.0", author = "Khaled Hosny, Elie Roux, Philipp Gesang", diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-main.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-main.lua index 29721890b16..c5bc6e148df 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-main.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-main.lua @@ -20,8 +20,8 @@ local authors = "\z -- version number is used below! local ProvidesLuaModule = { name = "luaotfload-main", - version = "2.95", --TAGVERSION - date = "2019-01-28", --TAGDATE + version = "2.96", --TAGVERSION + date = "2019-02-14", --TAGDATE description = "luaotfload entry point", author = authors, copyright = authors, diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-parsers.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-parsers.lua index 0696a87f586..737b4784aa3 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-parsers.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-parsers.lua @@ -7,8 +7,8 @@ local ProvidesLuaModule = { name = "luaotfload-parsers", - version = "2.95", --TAGVERSION - date = "2019-01-28", --TAGDATE + version = "2.96", --TAGVERSION + date = "2019-02-14", --TAGDATE description = "luaotfload submodule / filelist", license = "GPL v2.0" } diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-resolvers.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-resolvers.lua index 9f203f16fb9..d71ddd75f3d 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-resolvers.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-resolvers.lua @@ -11,8 +11,8 @@ local ProvidesLuaModule = { name = "luaotfload-resolvers", - version = "2.95", --TAGVERSION - date = "2019-01-28", --TAGDATE + version = "2.96", --TAGVERSION + date = "2019-02-14", --TAGDATE description = "luaotfload submodule / resolvers", license = "GPL v2.0" } diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-status.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-status.lua index ad22d66b5a5..3fce3009c26 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-status.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-status.lua @@ -1,8 +1,8 @@ return { ["hashes"]={ - { "fontloader-2019-01-28.lua", "9a9f04f33d7b2da6062323563f095589" }, + { "fontloader-2019-02-14.lua", "6d0a7150bf73b0e7fd3d9b13b0f511f4" }, { "fontloader-util-fil.lua", "a12919215a51a443ad0128ff9d9f8b36" }, - { "fontloader-util-str.lua", "587e640a353cac68488cbff5b37c3495" }, + { "fontloader-util-str.lua", "5ad378f7733e22062bc70596c6a75c67" }, { "fontloader-l-unicode.lua", "d46cc6cf18fb3f368ef1e404dc9fcb5c" }, { "fontloader-l-math.lua", "a373be3ed2db0d5f98588fa81abca48f" }, { "fontloader-l-boolean.lua", "18ed6c4b2c40dd87224ea33229548d20" }, @@ -20,7 +20,7 @@ return { { "fontloader-fonts-enc.lua", "3e71a54297e8f85a1ac438bb0f20dd79" }, { "fontloader-fonts-mis.lua", "bc9eb43c27f63ce9d0fff67e104fe1c6" }, { "fontloader-basics-chr.lua", "a8b8316248b40cc9bc1be19050f7074f" }, - { "fontloader-basics-nod.lua", "31e53bc2d299eda36a0f6592a0d0693f" }, + { "fontloader-basics-nod.lua", "c5185eab8319653452cc5957c787f4be" }, { "fontloader-font-imp-effects.lua", "73a660359a0ec71e44cc2b7225a715ac" }, { "fontloader-font-imp-italics.lua", "fe1ca80fb5ea4a2f8d2d5c484e7ba913" }, { "fontloader-font-imp-ligatures.lua", "043daa4fcccf2560868da359d71d3a4a" }, @@ -49,39 +49,39 @@ return { { "fontloader-font-vfc.lua", "94937140f2c909e9c831ba021f1ab303" }, { "fontloader-font-map.lua", "210b9288eef0df624da638b65d27291b" }, { "fontloader-font-cid.lua", "4d87988efa86020a14708ee03c23415f" }, - { "fontloader-font-con.lua", "6308f40e1b4fecfbe05b01c571d46936" }, + { "fontloader-font-con.lua", "ecfc697058b63e508300b6133f97c74c" }, { "fontloader-font-ini.lua", "4299a02110bbd7c0d27e131235c5319d" }, { "fontloader-data-con.lua", "7ce546725b1550f655c78ac9d69419ca" }, - { "fontloader-reference.lua", "59efe902c1cc292e6e8da012575d5ac4" }, + { "fontloader-reference.lua", "a0176453bfa9952a793ed7377f053f42" }, { "fontloader-basics-gen.lua", "b21e91bbd534f77e368f0ec13f865aed" }, { "mktests", "c7cff7025962922944376acc1ffa9c47" }, { "mkstatus", "2dc1052ac96cce3dfe7100a203346440" }, { "mkcharacters", "92c24bb582fc84c0365634f29eb89863" }, { "mkglyphlist", "557836886d4f0e6d656eac3ded4456a2" }, { "mkimport", "1788927ee10b87112e200466151f1fbf" }, - { "luaotfload-glyphlist.lua", "d70705bee53dc9804babeffe6951c8f6" }, + { "luaotfload-glyphlist.lua", "4e368a6a6d5cee2423edcb322035ffd7" }, { "luaotfload-characters.lua", "1ef110e1710f53689b2e22783f648b14" }, - { "luaotfload-resolvers.lua", "2aeac5844783d3ae645b6951237b101d" }, - { "luaotfload-parsers.lua", "bb2f4f0980126a742b336b7f75e4652d" }, - { "luaotfload-loaders.lua", "48bb12fa126087a141cb021547a0a081" }, - { "luaotfload-letterspace.lua", "87b2752f246691003732a658c576c27b" }, - { "luaotfload-features.lua", "e3e317fd5647ec84f6aec0403422ec4b" }, - { "luaotfload-database.lua", "9e4f4907471881aa16a796de6d453cbc" }, - { "luaotfload-configuration.lua", "20a4f4548621f82ddc005dd5845540e4" }, - { "luaotfload-colors.lua", "fed6f263a68fcf29d2e22a1955db4cf0" }, - { "luaotfload-auxiliary.lua", "5d020d63f5715c79b8b3985c515f7962" }, - { "luaotfload-filelist.lua", "7f8caf604c3915de255bbfe4e7df26ac" }, - { "luaotfload-tool.lua", "0f6629f73c82b1063caceb026cc39046" }, - { "luaotfload-diagnostics.lua", "33f4668aa185f3462e6cb476676724da" }, - { "luaotfload-log.lua", "548a43c2e01290aec920cc223dcd02eb" }, - { "luaotfload-init.lua", "d32caa3f4a87192d59de65d43d0640f6" }, - { "luaotfload-main.lua", "7286232aad21b427a40dc427ab3a1800" }, + { "luaotfload-resolvers.lua", "263efbb207740d71173ac9b8d406dbe9" }, + { "luaotfload-parsers.lua", "08ba2d4ef8220fc1fcc71f95c3adfa4b" }, + { "luaotfload-loaders.lua", "322049c77ff38d3b4070a9d216ed6c8d" }, + { "luaotfload-letterspace.lua", "962196d328f20aac9c185a7a0c989c11" }, + { "luaotfload-features.lua", "12d72cb68c8de4084de38f18eeb8eb35" }, + { "luaotfload-database.lua", "c839bbb78d78759f761e030ae68ff00b" }, + { "luaotfload-configuration.lua", "d015920c510ff47a48f8c2cf76193520" }, + { "luaotfload-colors.lua", "56e7199ec45542b6f5f9a8c304ffa8c3" }, + { "luaotfload-auxiliary.lua", "aab59a311785dfdccb25f9337b210e94" }, + { "luaotfload-filelist.lua", "32027c3ca011e8a3c892045ee7aba6d2" }, + { "luaotfload-tool.lua", "834da97f3cdb4f8725a45084606adbad" }, + { "luaotfload-diagnostics.lua", "f9e38e6fd30ef1544e9e4988ecbcd4dd" }, + { "luaotfload-log.lua", "6dce33a06f2f84803181a017b3e0b7f6" }, + { "luaotfload-init.lua", "0a03643156fb4f11edac7b611a45e372" }, + { "luaotfload-main.lua", "92421306444906f60d55cfaec75b5020" }, }, ["notes"]={ ["committer"]="Ulrike Fischer <fischer@troubleshooting-tex.de>", - ["description"]="v2.95", - ["loader"]="fontloader-2019-01-28.lua", - ["revision"]="d081c7de5e8a51aa722f246be9898abd0cb298cf", - ["timestamp"]="2019-02-06 20:49:24 +0100", + ["description"]="v2.96", + ["loader"]="fontloader-2019-02-14.lua", + ["revision"]="a4b43cefc8f0c45a2ff7b1b627124c57f176ce09", + ["timestamp"]="2019-02-24 22:12:26 +0100", }, }
\ No newline at end of file |