summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-05-22 03:00:53 +0000
committerNorbert Preining <norbert@preining.info>2021-05-22 03:00:53 +0000
commit58aa1ac09b1d9e4769d0a0661cf12e2b2db41b14 (patch)
tree366a7a5e1310dc291fa9969ce6ed1af604bb8d89 /macros
parent6a52d8839d334ac56f36195aa404fac667862830 (diff)
CTAN sync 202105220300
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/acmart/README8
-rw-r--r--macros/latex/contrib/acmart/acmart.dtx71
-rw-r--r--macros/latex/contrib/acmart/acmart.pdfbin838066 -> 842246 bytes
-rw-r--r--macros/latex/contrib/acmart/acmguide.pdfbin413166 -> 414201 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmlarge.pdfbin586356 -> 586372 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdfbin1030676 -> 1030499 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdfbin598701 -> 598702 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmsmall.pdfbin596222 -> 596225 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmtog.pdfbin543920 -> 543905 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-authordraft.pdfbin1022847 -> 1022861 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-lualatex.pdfbin768548 -> 768566 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-manuscript.pdfbin598262 -> 598279 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-sigconf.pdfbin1019039 -> 1019048 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-sigplan.pdfbin1028132 -> 1028143 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-xelatex.pdfbin653950 -> 653971 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/samples.dtx15
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx73
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin312209 -> 312353 bytes
-rw-r--r--macros/latex/contrib/fontsize/fontsize.dtx56
-rw-r--r--macros/latex/contrib/fontsize/fontsize.pdfbin405591 -> 378517 bytes
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-cn.pdfbin222025 -> 222934 bytes
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-cn.tex16
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-en.pdfbin145010 -> 143188 bytes
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-en.tex24
-rw-r--r--macros/latex/contrib/projlib/ProjLib.dtx94
-rw-r--r--macros/latex/contrib/siunitx/CHANGELOG.md12
-rw-r--r--macros/latex/contrib/siunitx/siunitx-code.pdfbin1441368 -> 1441845 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx-number.dtx35
-rw-r--r--macros/latex/contrib/siunitx/siunitx-table.dtx14
-rw-r--r--macros/latex/contrib/siunitx/siunitx.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx.pdfbin605429 -> 605308 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx.tex15
-rw-r--r--macros/latex/contrib/tiscreen/README5
-rw-r--r--macros/latex/contrib/tiscreen/doc/tiscreen-doc.pdfbin122211 -> 121968 bytes
-rw-r--r--macros/latex/contrib/tiscreen/doc/tiscreen-doc.tex2
-rw-r--r--macros/latex/contrib/tiscreen/tex/tiscreen.sty5
-rw-r--r--macros/luatex/generic/lualibs/NEWS2
-rw-r--r--macros/luatex/generic/lualibs/README.md6
-rw-r--r--macros/luatex/generic/lualibs/lualibs-basic-merged.lua28
-rw-r--r--macros/luatex/generic/lualibs/lualibs-extended-merged.lua60
-rw-r--r--macros/luatex/generic/lualibs/lualibs-lpeg.lua2
-rw-r--r--macros/luatex/generic/lualibs/lualibs-number.lua52
-rw-r--r--macros/luatex/generic/lualibs/lualibs-os.lua2
-rw-r--r--macros/luatex/generic/lualibs/lualibs-package.lua22
-rw-r--r--macros/luatex/generic/lualibs/lualibs-trac-inf.lua2
-rw-r--r--macros/luatex/generic/lualibs/lualibs-url.lua100
-rw-r--r--macros/luatex/generic/lualibs/lualibs-util-str.lua70
-rw-r--r--macros/luatex/generic/lualibs/lualibs.dtx35
-rw-r--r--macros/luatex/generic/lualibs/lualibs.pdfbin81487 -> 81627 bytes
-rw-r--r--macros/luatex/generic/luaotfload/NEWS6
-rw-r--r--macros/luatex/generic/luaotfload/README.md4
-rw-r--r--macros/luatex/generic/luaotfload/filegraph.pdfbin41362 -> 40024 bytes
-rw-r--r--macros/luatex/generic/luaotfload/fontloader-2021-05-20.lua (renamed from macros/luatex/generic/luaotfload/fontloader-2021-01-07.lua)1360
-rw-r--r--macros/luatex/generic/luaotfload/fontloader-basics-nod.lua221
-rw-r--r--macros/luatex/generic/luaotfload/fontloader-font-cff.lua43
-rw-r--r--macros/luatex/generic/luaotfload/fontloader-font-imp-effects.lua172
-rw-r--r--macros/luatex/generic/luaotfload/fontloader-font-ocl.lua27
-rw-r--r--macros/luatex/generic/luaotfload/fontloader-font-one.lua1
-rw-r--r--macros/luatex/generic/luaotfload/fontloader-font-osd.lua28
-rw-r--r--macros/luatex/generic/luaotfload/fontloader-font-ota.lua10
-rw-r--r--macros/luatex/generic/luaotfload/fontloader-font-otj.lua115
-rw-r--r--macros/luatex/generic/luaotfload/fontloader-font-otl.lua3
-rw-r--r--macros/luatex/generic/luaotfload/fontloader-font-otr.lua4
-rw-r--r--macros/luatex/generic/luaotfload/fontloader-font-ots.lua740
-rw-r--r--macros/luatex/generic/luaotfload/fontloader-font-ott.lua6
-rw-r--r--macros/luatex/generic/luaotfload/fontloader-font-oup.lua91
-rw-r--r--macros/luatex/generic/luaotfload/fontloader-font-shp.lua2
-rw-r--r--macros/luatex/generic/luaotfload/fontloader-fonts-gbn.lua44
-rw-r--r--macros/luatex/generic/luaotfload/fontloader-l-lpeg.lua2
-rw-r--r--macros/luatex/generic/luaotfload/fontloader-reference.lua1250
-rw-r--r--macros/luatex/generic/luaotfload/fontloader-util-str.lua70
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-auxiliary.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-case-el.lua294
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-colors.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-conf.pdfbin78522 -> 77497 bytes
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-configuration.lua6
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-database.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-diagnostics.lua6
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-dvi.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-embolden.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-fakesc.lua204
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-fallback.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-features.lua15
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-filelist.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-glyphlist.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-harf-define.lua24
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-harf-plug.lua47
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-init.lua6
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-latex.pdfbin501958 -> 494977 bytes
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-letterspace.lua28
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-loaders.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-log.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-main.tex10
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-multiscript.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-notdef.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-parsers.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-resolvers.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-scripts.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-status.lua100
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-suppress.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-szss.lua5
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-tool.17
-rwxr-xr-x[-rw-r--r--]macros/luatex/generic/luaotfload/luaotfload-tool.lua58
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-tool.pdfbin78960 -> 77067 bytes
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-tool.rst8
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-tounicode.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-unicode.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload.conf.52
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload.conf.rst4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload.sty2
-rw-r--r--macros/luatex/generic/luaotfload/scripts-demo.pdfbin21837 -> 21837 bytes
-rw-r--r--macros/luatex/generic/luaotfload/shaper-demo-graphite.pdfbin8559 -> 8559 bytes
-rw-r--r--macros/luatex/generic/luaotfload/shaper-demo.pdfbin8479 -> 8479 bytes
-rw-r--r--macros/luatex/generic/luatexja/README8
-rw-r--r--macros/luatex/generic/luatexja/doc/luatexja-en.pdfbin693538 -> 693535 bytes
-rw-r--r--macros/luatex/generic/luatexja/doc/luatexja-ja.pdfbin1130313 -> 1130307 bytes
-rw-r--r--macros/luatex/generic/luatexja/src/ltj-inputbuf.lua8
-rw-r--r--macros/luatex/generic/luatexja/src/luatexja-core.sty4
-rw-r--r--macros/luatex/generic/luatexja/src/luatexja.sty4
-rw-r--r--macros/unicodetex/latex/aalok/README.txt4
-rw-r--r--macros/unicodetex/latex/aalok/aalok.dtx88
-rw-r--r--macros/unicodetex/latex/aalok/aalok.ins14
-rw-r--r--macros/unicodetex/latex/aalok/aalok.pdfbin178189 -> 153734 bytes
124 files changed, 3102 insertions, 2957 deletions
diff --git a/macros/latex/contrib/acmart/README b/macros/latex/contrib/acmart/README
index 9b623902ff..40cbff3a83 100644
--- a/macros/latex/contrib/acmart/README
+++ b/macros/latex/contrib/acmart/README
@@ -286,4 +286,10 @@ Version 1.76. Added many journal abbreviations to the bst.
New experimental option: pbalance
ORCID linking code
-Version 1.77. Changed the way to typset multiple affiliations (Christoph Sommer) \ No newline at end of file
+Version 1.77. Changed the way to typeset multiple affiliations (Christoph Sommer)
+
+Version 1.78. Documentation update.
+ Magic texcount comments for samples.
+ Title page now is split if there are too many authors
+ Bug fixes.
+ \ No newline at end of file
diff --git a/macros/latex/contrib/acmart/acmart.dtx b/macros/latex/contrib/acmart/acmart.dtx
index c0e62e554c..d113dd5043 100644
--- a/macros/latex/contrib/acmart/acmart.dtx
+++ b/macros/latex/contrib/acmart/acmart.dtx
@@ -1679,6 +1679,36 @@
% uppercasing.
%
%
+%\subsection{Counting words}
+%\label{sec:ug_counting}
+%
+% Some ACM conferences use word count limits for papers. The
+% calculation of word number for a paper with math, tables and figures
+% is not a trivial task. Currently the authoritative word count is
+% done by translating the PDF to text and using |wc -w| on the
+% output. Authors can use the package |texcount| (used by Overleaf)
+% to get an estimate of the word count. To faciliate this one adds to the
+% beginning of the package metacomments
+% \begin{verbatim}
+% %TC:macro \cite [option:text,text]
+% %TC:macro \citep [option:text,text]
+% %TC:macro \citet [option:text,text]
+% %TC:envir table 0 1
+% %TC:envir table* 0 1
+% %TC:envir tabular [ignore] word
+% %TC:envir displaymath 0 word
+% %TC:envir math 0 word
+% %TC:envir comment 0 0
+% \end{verbatim}
+% and uses |\begin{math}...\end{math}| instead of dollar signs for
+% math. Note that the count is in any case approximate, and the final
+% decision of editors is based on PDF count.
+%
+% The script |texcount| provides a report of word count in the
+% document.
+%
+%
+%
%
%\subsection{Disabled or forbidden commands}
%\label{sec:ug_disabled}
@@ -1907,7 +1937,7 @@
\ProvidesFile{acmart.dtx}
%</gobble>
%<class>\ProvidesClass{acmart}
-[2021/04/16 v1.77 Typesetting articles for the Association for Computing Machinery]
+[2021/05/01 v1.78 Typesetting articles for the Association for Computing Machinery]
% \end{macrocode}
%
% \changes{v1.00}{2016/04/14}{First released version}
@@ -2014,6 +2044,7 @@
% \changes{1.71}{2020/05/02}{LuaTeX now uses the OTF versions of
% fonts}
% \changes{1.75}{2020/10/29}{Documentation update}
+% \changes{1.78}{2021/05/01}{Documentation update: Word count}
%
% And the driver code:
% \begin{macrocode}
@@ -4669,8 +4700,11 @@
% \begin{macrocode}
\AtEndDocument{\if@ACM@nonacm\else\if@ACM@printacmref\else
\ifnum\getrefnumber{TotPages}>1\relax
- \ClassWarningNoLine{\@classname}{ACM reference format is mandatory
- for papers over one page}%
+ \ClassWarningNoLine{\@classname}{%
+ ACM reference format is mandatory \MessageBreak
+ for papers over one page. \MessageBreak
+ Please add printacmref=true to the \MessageBreak
+ \string\settopmatter\space command.}%
\fi\fi\fi}
% \end{macrocode}
%
@@ -5417,9 +5451,12 @@
% its argument. Added a bugfix}
% \changes{v1.68}{2020/01/19}{Deleted grouping altogether}
% \changes{v1.69}{2020/02/02}{Changed dot to colon for sigplan}
+% \changes{v1.78}{2021/05/02}{Again suppressed \cs{vspace} warning}
% This macro starts sections for proceedings and uses \cs{small} for journals
% \begin{macrocode}
\def\@specialsection#1{%
+ \let\@vspace\@vspace@orig
+ \let\@vspacer\@vspacer@orig
\ifcase\ACM@format@nr
\relax % manuscript
\par\medskip\small\noindent#1: %
@@ -5440,6 +5477,8 @@
\or % sigchi-a
\section*{#1}%
\fi
+ \let\@vspace\@vspace@acm
+ \let\@vspacer\@vspacer@acm
}
% \end{macrocode}
%
@@ -5449,9 +5488,14 @@
% \begin{macro}{\@printtopmatter}
% \changes{v1.06}{2016/05/01}{Added processing badges}
% \changes{v1.46}{2017/08/29}{Deleted rule}
+% \changes{v1.78}{2021/05/16}{Added processing the overflowing title box}
% The printing of top matter starts a new page and uses the given
% title box. Note that for |sigchi-a| we print badges here rather
% than in \cs{mktitle} since we want them in the margins.
+%
+% Note that if there are too many authors, |\mktitle@bx| might
+% overflow the page. Therefore we start with checking this and if
+% this happens, we split the box and print it page by page.
% \begin{macrocode}
\def\@printtopmatter{%
\ifx\@startPage\@empty
@@ -5459,6 +5503,18 @@
\else
\setcounter{page}{\@startPage}%
\fi
+ \@tempdima=\ht\mktitle@bx
+ \advance\@tempdima by \dp\mktitle@bx
+ \ifdim\@tempdima>0.9\textheight
+ \loop
+ \setbox\@tempboxa=\vsplit \mktitle@bx to 0.9\textheight
+ \thispagestyle{firstpagestyle}%
+ \noindent\unvbox\@tempboxa
+ \clearpage
+ \@tempdima=\ht\mktitle@bx
+ \advance\@tempdima by \dp\mktitle@bx
+ \ifdim\@tempdima>0.9\textheight\repeat
+ \fi
\thispagestyle{firstpagestyle}%
\noindent
\ifcase\ACM@format@nr
@@ -5954,6 +6010,7 @@
% \changes{v1.40}{2017/06/04}{Switched to MakeTextUppercase}
% \changes{v1.73}{2020/09/07}{Check the presence of required elements
% for affiliations}
+% \changes{v1.78}{2021/05/16}{Unboxing \cs{mktitle@bx}}
% This version is used in most journal formats. Note that \cs{and} between
% authors with the same affiliation becomes \verb*| and |:
% \begin{macrocode}
@@ -5985,7 +6042,7 @@
\fi
\fi
\global\let\and\@typeset@author@line}%
- \global\setbox\mktitle@bx=\vbox{\noindent\box\mktitle@bx\par\medskip
+ \global\setbox\mktitle@bx=\vbox{\noindent\unvbox\mktitle@bx\par\medskip
\noindent\addresses\@typeset@author@line
\par\medskip}%
}
@@ -6050,6 +6107,7 @@
% \changes{v1.36}{2017/05/12}{Added authorsperrow overrride}
% \changes{v1.73}{2020/09/07}{Check the presence of required elements
% for affiliations}
+% \changes{v1.78}{2021/05/16}{Unboxing \cs{mktitle@bx}}
% The |sigconf| version. Here we use a centered design with each
% author in a separate box.
% \begin{macrocode}
@@ -6116,7 +6174,7 @@
% \begin{macrocode}
\hsize=\textwidth
\global\setbox\mktitle@bx=\vbox{\noindent
- \box\mktitle@bx\par\medskip\leavevmode
+ \unvbox\mktitle@bx\par\medskip\leavevmode
\lineskip=1pc\relax\centering\hspace*{-1em}%
\addresses\let\and\@typeset@author@bx\and\par\bigskip}}
% \end{macrocode}
@@ -6261,12 +6319,13 @@
% \begin{macro}{\@mkteasers}
% Typesetting the teasers
% \changes{v1.56}{2018/11/1}{Added check for description}
+% \changes{v1.78}{2021/05/16}{Unboxing \cs{mktitle@bx}}
% \begin{macrocode}
\def\@mkteasers{%
\ifx\@teaserfigures\@empty\else
\def\@teaser##1{\par\bigskip\bgroup
\captionsetup{type=figure}##1\egroup\par}
- \global\setbox\mktitle@bx=\vbox{\noindent\box\mktitle@bx\par
+ \global\setbox\mktitle@bx=\vbox{\noindent\unvbox\mktitle@bx\par
\noindent\@Description@presentfalse
\@teaserfigures\par\if@Description@present\else
\global\@undescribed@imagestrue
diff --git a/macros/latex/contrib/acmart/acmart.pdf b/macros/latex/contrib/acmart/acmart.pdf
index c6d2536d6a..263327bbc5 100644
--- a/macros/latex/contrib/acmart/acmart.pdf
+++ b/macros/latex/contrib/acmart/acmart.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/acmguide.pdf b/macros/latex/contrib/acmart/acmguide.pdf
index b78e8dc8b5..88691decd5 100644
--- a/macros/latex/contrib/acmart/acmguide.pdf
+++ b/macros/latex/contrib/acmart/acmguide.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf b/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf
index d82e7482eb..97525d134e 100644
--- a/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf
index 113cc1abbd..d92aacd297 100644
--- a/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf
index 1906e776a7..76848b87b3 100644
--- a/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf
index 27aae47e2d..a7310de528 100644
--- a/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmtog.pdf b/macros/latex/contrib/acmart/samples/sample-acmtog.pdf
index 91359df33c..c192a9190f 100644
--- a/macros/latex/contrib/acmart/samples/sample-acmtog.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-acmtog.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-authordraft.pdf b/macros/latex/contrib/acmart/samples/sample-authordraft.pdf
index c2c9075ba6..f53ec3d520 100644
--- a/macros/latex/contrib/acmart/samples/sample-authordraft.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-authordraft.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-lualatex.pdf b/macros/latex/contrib/acmart/samples/sample-lualatex.pdf
index 0b4fbd4d3d..2f5d4eb0e8 100644
--- a/macros/latex/contrib/acmart/samples/sample-lualatex.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-lualatex.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-manuscript.pdf b/macros/latex/contrib/acmart/samples/sample-manuscript.pdf
index effe8aa896..d2dc2faf4e 100644
--- a/macros/latex/contrib/acmart/samples/sample-manuscript.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-manuscript.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-sigconf.pdf b/macros/latex/contrib/acmart/samples/sample-sigconf.pdf
index 5a9c0f6cf8..43c162e86c 100644
--- a/macros/latex/contrib/acmart/samples/sample-sigconf.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-sigconf.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-sigplan.pdf b/macros/latex/contrib/acmart/samples/sample-sigplan.pdf
index 2237485dcc..81112ed95d 100644
--- a/macros/latex/contrib/acmart/samples/sample-sigplan.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-sigplan.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-xelatex.pdf b/macros/latex/contrib/acmart/samples/sample-xelatex.pdf
index 74fcfe089f..928edaf286 100644
--- a/macros/latex/contrib/acmart/samples/sample-xelatex.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-xelatex.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/samples.dtx b/macros/latex/contrib/acmart/samples/samples.dtx
index d826fd4e4a..1599f8670e 100644
--- a/macros/latex/contrib/acmart/samples/samples.dtx
+++ b/macros/latex/contrib/acmart/samples/samples.dtx
@@ -1,4 +1,19 @@
%<*manuscript|acmsmall|acmsmall-submission|acmlarge|acmtog|sigconf|authordraft|sigplan|sigchi|sigchi-a|acmsmall-conf>
+%%
+%%
+%% Commands for TeXCount
+%<<TCMACROS
+%TC:macro \cite [option:text,text]
+%TC:macro \citep [option:text,text]
+%TC:macro \citet [option:text,text]
+%TC:envir table 0 1
+%TC:envir table* 0 1
+%TC:envir tabular [ignore] word
+%TC:envir displaymath 0 word
+%TC:envir math 0 word
+%TC:envir comment 0 0
+%TCMACROS
+%%
%%
%% The first command in your LaTeX source must be the \documentclass command.
%<manuscript>\documentclass[manuscript,screen,review]{acmart}
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index c9295ed617..b990509cef 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -23,11 +23,11 @@
%
% \changes{v1.20}{2021/01/09}{修改和完善用户文档。}
% \changes{v1.20}{2021/01/09}{模板更改为使用 CC-BY 许可协议。}
-% \changes{v1.25m}{2021/05/03}{取消附带的示例文件,可查看历史版本及其它来源的使用样例。}
+% \changes{v1.25n}{2021/05/03}{取消附带的示例文件,可查看历史版本及其它来源的使用样例。}
%
% \title{\sffamily easybook 文档类手册}
% \author{瞿毅}
-% \date{2021/05/19\hskip\ccwd\relax v1.25m\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/05/21\hskip\ccwd\relax v1.25n\thanks{\url{https://gitee.com/texl3/easybook}}}
%
% \maketitle
% \begin{abstract}
@@ -117,7 +117,7 @@
% \end{syntax}
% 传递给 \cls{ctexbook} 设置字体,最好不要使用原有的 \opt{fontset} 选项,默认情况下使用自定义字体而不开启这个选项,可根据安装的字体及电脑系统选取。\opt{noto} 与 \opt{none} 选项的相关描述见小节 \ref{subsec:font settings},\opt{overleaf} 是一个各系统通用选项,会检测系统环境选取对应字体。
% \changes{v1.21}{2021/01/12}{默认字体与 \CTeX 一致,不再是自定义字体。}
-% \changes{v1.25m}{2021/05/04}{修复使用 \pkg{xeCJK} 与 \pkg{fontspec} 宏包的字体设置命令在 \hologo{LuaLaTeX} 下失效的问题。}
+% \changes{v1.25n}{2021/05/04}{修复使用 \pkg{xeCJK} 与 \pkg{fontspec} 宏包的字体设置命令在 \hologo{LuaLaTeX} 下失效的问题。}
% \end{function}
%
% \begin{function}[rEXP,added = 2021-01-05,updated = 2021-01-13]{paper}
@@ -168,7 +168,7 @@
% \tn{listoflistings*+}\oarg{键值列表}
% \end{syntax}
% \tn{listoffigures} 命令输出图片目录,\tn{listoftables} 输出表格目录,\tn{listoflistings} 输出代码目录。带有星号的目录命令不将标题添加进主文档目录,带有+号的目录命令可以使当前标题编号。\tn{tableofcontents+} 与其它命令不同是用于输出双语目录,需要与双语目录标题命令 \tn{bichapter} 等或设置图片、表格和代码等英文目录的标题配合使用,附加代码是中文与英文目录之间的代码,可以插入文本和换页命令等。目录的键值列表选项如下
-% \changes{v1.25m}{2021/05/05}{命令 \tn{tableofcontents} 可以输出双语目录。}
+% \changes{v1.25n}{2021/05/05}{命令 \tn{tableofcontents} 可以输出双语目录。}
% \end{function}
%
% \begin{function}{multoc,title,format,aftertitle,pagestyle,book,article}
@@ -199,7 +199,7 @@
% 双语目录的标题命令目前设置了常用的三个级别,它们将中文标题正常输出,并使中英文标题加入双语目录,这个功能是为国内一些大学的学位论文模板的要求设计,在一般情况和英文模式下不需要使用。
%
% 它们的星号变体命令使文中标题不编号,但是仍然加入双语目录,若英文标题参数空置那么仅加入中文目录而不加入英文目录,这一特点与 \tn{chapter*} 等命令的行为不太一样,在一些情况下会用到。可选参数是目录中的中文标题,默认与中文标题一致,正文标题过长时可用它设置在目录中显示的标题。双语目录的格式是一致的,共享使用 \tn{tocset} 的设置,英文目录的章级别标题名及编号的修改方式如下
-% \changes{v1.25m}{2021/05/05}{增加与双语目录配合的标题命令。}
+% \changes{v1.25n}{2021/05/05}{增加与双语目录配合的标题命令。}
% \end{function}
%
% \begin{function}{biname,binmuber}
@@ -299,7 +299,7 @@
% \changes{v1.10}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。}
% \changes{v1.23}{2021/03/19}{修复在 \pkg{ctex} v2.5.6 更新后 \cls{easybook} 与 \pkg{hyperref} 冲突问题。}
% \changes{v1.24}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。}
-% \changes{v1.25m}{2021/05/06}{模块名 \opt{link} 改为 \opt{refset},\opt{link} 作为兼容性保留。}
+% \changes{v1.25n}{2021/05/06}{模块名 \opt{link} 改为 \opt{refset},\opt{link} 作为兼容性保留。}
% \end{function}
%
% \begin{optdesc}
@@ -356,7 +356,7 @@
% \ding{229} 以上选项路径为 \opt{subfont/...}
% \changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。}
% \changes{v1.23}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。}
-% \changes{v1.25m}{2021/05/19}{其它字体模块名由 \opt{elsefont} 改为 \opt{subfont},并增加数学字体的选项 \opt{subfont/math}。}
+% \changes{v1.25n}{2021/05/21}{其它字体模块名由 \opt{elsefont} 改为 \opt{subfont},并增加数学字体的选项 \opt{subfont/math}。}
% \end{function}
%
% \begin{optdesc}
@@ -381,7 +381,7 @@
% \changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。}
% \changes{v1.23}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
% \changes{v1.24}{2021/04/09}{可以不载入参考文献包手动配置参考文献格式。}
-% \changes{v1.25m}{2021/05/12}{取消 \opt{bib-loadpkg} 选项,由是否设置参考文献数据库来决定载入宏包。}
+% \changes{v1.25n}{2021/05/12}{取消 \opt{bib-loadpkg} 选项,由是否设置参考文献数据库来决定载入宏包。}
% \end{function}
%
% \begin{optdesc}
@@ -574,8 +574,8 @@
% \ding{229} 以上选项路径为 \opt{hdrset/...} \\
% 上面几个选项用于设置脚注格式,\opt{fnparskip} 和 \opt{fnparindent} 选项仅在 \opt{fnhang = true} 时有效。\opt{fnhang} 用于将脚注设置为悬挂缩进的格式,\opt{fnmark-pos} 选项设置脚注编号的位置,正常文本或是上标形式。\opt{fnmark-num} 选项设置脚注编号的格式,默认为原生样式 \opt{plain},还可以改为 \opt{pifont} 的各个版本,从左往右依次为普通版、阴文衬线版、阳文无衬线版和阴文无衬线版,缺点是它们的编号仅包括1-10。
%
-% \opt{fnmark-form} 是脚注标记的格式,默认为空,在此设置字体命令会覆盖 \opt{subfont/footnote} 的设置,最后一个格式命令可以带有一个参数,这个参数接受脚注编号,一般配合 \opt{fnmark-num = plain} 使用。\opt{afterfnmark} 是脚注标记后的代码,一般用于设置标记与文本间的距离。
-% \changes{v1.25m}{2021/05/12}{增加脚注样式设置选项。}
+% \opt{fnmark-form} 是脚注标记的格式,在此设置字体命令会覆盖 \opt{subfont/footnote} 的设置,最后一个格式命令可以带有一个参数,这个参数接受脚注编号,一般配合 \opt{fnmark-num = plain} 使用。\opt{afterfnmark} 是脚注标记后的代码,一般用于设置标记与文本间的距离。
+% \changes{v1.25n}{2021/05/12}{增加脚注样式设置选项。}
% \end{function}
%
% \subsection{目录样式}
@@ -594,7 +594,7 @@
% \opt{format} 是目录中标题的格式,可以设置字体和加入垂直间距等,垂直间距最好使用无间距重合的 \tn{addvspace} 命令,带有加号的 \opt{format+} 选项用于在已有的格式命令后附加内容。\opt{indent} 是目录中标题在页面左侧的缩进距离,应该有长度单位。\opt{rule} 选项中一般应当使用 \tn{tocrule} 命令,将会在接下来介绍。\opt{numsep} 是有编号的标题在目录中编号与标题的间距。
% \changes{v1.21}{2021/01/13}{增加配置目录样式的选项。}
% \changes{v1.24}{2021/04/20}{增加目录中编号与标题的间距选项 \opt{numsep}。}
-% \changes{v1.25m}{2021/05/14}{可以分别设置图片、表格和代码目录的格式。}
+% \changes{v1.25n}{2021/05/14}{可以分别设置图片、表格和代码目录的格式。}
% \end{function}
%
% \begin{function}[added = 2021-01-13,updated = 2021-04-20]{\tocrule,\EbNumberLine}
@@ -642,7 +642,7 @@
%
% \begin{optdesc}
% \item[lolskip] \opt{lolskip} 是代码目录中章之间的代码标题的距离,与 \CTeX 的表格目录和图片目录中章之间的标题距离选项 \opt{lotskip} 和 \opt{lofskip} 类似,它们的值均默认0.8 pc,在 \opt{article} 模式中此选项失效。
-% \item[belowoffset] \opt{belowoffset} 选项为主目录标题 \tn{contentsname} 后的间距补偿,一般为负值,用于抵消 \opt{format} 中设置的垂直间距。\opt{(level)} 中的 \opt{belowoffset} 与之意义类似,代表 figure、table 和 lstlisting 三个级别,也可以使用 \opt{list} 统一设置,一般为正值。建议距离 \opt{lolskip(0.8pc) + (level)/format/addvspace(0.2pc) + (level)/belowoffset(0pc) = belowoffset(-1pc)}。
+% \item[belowoffset] \opt{belowoffset} 选项为主文档目录标题下方的间距补偿,一般为负值,用于抵消 \opt{format} 中额外的垂直间距。\opt{(level)} 中的 \opt{belowoffset} 与之意义类似,代表 figure、table 和 lstlisting 三个级别,也可以使用 \opt{list} 统一设置,一般为正值。
% \item[tocline] 目录标签整体使用 \opt{tocline} 设置,在图表标签的参数中 \#1 代表编号,代码标签中则是 \tn{thelstlisting} 代表编号,标签中还可包含标签名称,默认标签名称与图、表和代码环境的标题名称一致。下面举个设置标签的例子
% \begin{ctexexam}
% \tocset
@@ -679,7 +679,7 @@
% \tn{end}\marg{环境名}
% \end{syntax}
% \pkg{tabularray} 是一个较新的宏包,不仅提供了 \pkg{tabularx}、\pkg{multirow}、和 \pkg{booktabs} 宏包的功能,并且不依赖其它宏包与它们同时使用不会产生冲突,还实现了用简便的键值列表方式设置表格样式。目前除了表头斜线以及跨页功能存在不足,其它方面已满足对表格绝大多数格式的需求,具体用法可见宏包的说明文档。
-% \changes{v1.25m}{2021/05/17}{使用功能更便捷齐全的 \pkg{tabularray} 宏包设置表格样式。}
+% \changes{v1.25n}{2021/05/17}{使用功能更便捷齐全的 \pkg{tabularray} 宏包设置表格样式。}
% \end{function}
%
% \subsection{列表}
@@ -744,13 +744,13 @@
%
% \subsection{习题}
% \label{subsec:exercise}
-% \begin{function}[added = 2021-01-05,updated = 2021-04-19]{exercise}
+% \begin{function}[added = 2021-01-05,updated = 2021-05-21]{exercise}
% \begin{syntax}
% \tn{begin}\marg{exercise}*+\oarg{颜色名|(LightSkyBlue)}\oarg{编号|(1.)}\parg{标题|(习题)}\oarg{配置选项}\oarg{序言}
% \ \tn{item} <习题内容>
% \tn{end}\marg{exercise}
% \end{syntax}
-% 习题环境 \env{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号参数时不进行编号,使用+号参数启用 \pkg{tcolorbox} 支持生成标题。\meta{颜色名} 选项在使用+号参数时有效,其中颜色为自定义或 \pkg{xcolor} 包含的颜色名称。题目编号格式与小节 \ref{subsec:sort list} 排序列表相同,标题名默认为习题。
+% 习题环境 \env{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号参数时不进行编号,使用+号参数独立编号并启用 \pkg{tcolorbox} 支持生成标题。\meta{颜色名} 选项在使用+号参数时有效,其中颜色为自定义或 \pkg{xcolor} 包含的颜色名称。题目编号格式与小节 \ref{subsec:sort list} 排序列表相同,标题名默认为习题。
%
% 配置选项在是否使用+号参数时用法不同,使用+号参数时为 \pkg{tcolorbox} 的盒子选项,例如 \opt{boxrule} 和 \opt{fontupper}。不使用+号参数时相当于设置 \tn{ctexset}\{section = {\#1}\} 键值选项列表,例如 \opt{format} 和 \opt{beforeskip}。\meta{序言} 选项用于在习题环境开始前插入一段内容,可以是文本或者代码。注意,环境具有相同定界符的可选参数只能\textbf{从右往左}省略,省略的参数使用默认值。
% \changes{v1.23}{2021/02/08}{增加准确的习题盒子标题目录锚点。}
@@ -843,7 +843,7 @@
% \tn{qtyrange}\oarg{键值列表}\marg{数字1}\marg{数字2}\marg{单位}
% \end{syntax}
% \pkg{siunitx} 宏包的 \tn{num} 命令可以输出以科学计数法表示的数值,单位格式化命令 \tn{unit} 包含文字项目(例如字母或数字)时,使用 . 和 \~{} 放置在单元乘积中间,并使用 \_ 和 \^{} 正确放置指定的下标和上标。格式化方法可在数学和文本模式下使用。而 \tn{qty} 命令可用来输出带有单位的量,\tn{qtyrange} 可以输出带有范围和单位的量。
-% \changes{v1.25m}{2021/05/18}{\pkg{siunitx} 宏包 v3.0.0 更新后用法改变,修改相关配置选项。}
+% \changes{v1.25n}{2021/05/18}{\pkg{siunitx} 宏包 v3.0.0 更新后用法改变,修改相关配置选项。}
% \end{function}
%
% \begin{ctexexam}
@@ -980,7 +980,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplClass{easybook}{2021/05/19}{1.25m}{beta}
+\ProvidesExplClass{easybook}{2021/05/21}{1.25n}{beta}
\cs_generate_variant:Nn \eb_ctex_define:nn { nx }
\cs_generate_variant:Nn \int_to_arabic:n { v }
@@ -1953,10 +1953,10 @@
\ifbool{@twocolumn}
{
\booltrue{@restonecol}
- \bool_if:NTF \l__eb_multoc_bool { \twocolumn } { \onecolumn }
+ \bool_if:NF \l__eb_multoc_bool { \onecolumn }
}{
\boolfalse{@restonecol}
- \bool_if:NTF \l__eb_multoc_bool { \twocolumn } { \onecolumn }
+ \bool_if:NT \l__eb_multoc_bool { \twocolumn }
}
}
{ \tl_set:Nn \l__eb_toc_type_tl { article } }
@@ -2294,8 +2294,8 @@
itemsep = .75ex plus .1ex,topsep = .75ex plus .1ex,
partopsep = 0ex,parsep = 0ex
}
-\newlist{outlinelist}{itemize}{1}
-\setlist[outlinelist]{label = outline,itemsep = .5ex plus .1ex}
+\newlist{eb@outline@list}{itemize}{1}
+\setlist[eb@outline@list]{label = outline,itemsep = .5ex plus .1ex}
\setlist[itemize,1]{label = bullet}
\setlist[itemize,2]{label = endash}
\setlist[itemize,3]{label = asterisk}
@@ -2517,12 +2517,13 @@
fonttitle = \sffamily,
boxrule = \l__eb_rule_width_dim
}
+ \newtcbox[auto~counter]{\eb@exercise@box}[1]{tc-exercise,#1}
\NewDocumentEnvironment{outline}{O{}D(){\abstractname}o+b}
{
\begin{tcolorbox}[tc-outline,title = #2,IfValueT = {#3}{#3}]
- \begin{outlinelist}[#1]
+ \begin{eb@outline@list}[#1]
#4
- \end{outlinelist}
+ \end{eb@outline@list}
\end{tcolorbox}
}{}
\NewDocumentEnvironment{exercise}
@@ -2530,19 +2531,19 @@
{
\IfBooleanTF{#2}
{
- \tcbox[
- tc-exercise,
- fuzzy~halo = 5pt~with~#3,
- IfValueT = {#6}{#6},
- phantom =
- \IfBooleanF{#1}
- {
- \CTEX@ifnametrue
- \refstepcounter{section}
- \markright{\CTEXthesection\hspace{0.5\ccwd}#5}
- \CTEX@addtocline{section}{#5}
- }
- ]{\IfBooleanF{#1}{\CTEXthesection\hspace{0.5\ccwd}}#5}
+ \eb@exercise@box
+ {
+ fuzzy~halo = 5pt~with~#3,
+ IfValueT = {#6}{#6},
+ phantom =
+ \IfBooleanF{#1}
+ {
+ \markright{\thetcbcounter\hspace{0.5\ccwd}#5}
+ \addcontentsline{toc}{section}
+ {\thetcbcounter\hspace{\eb@toc@section@numsep}#5}
+ }
+ }
+ {\IfBooleanF{#1}{\thetcbcounter\hspace{0.5\ccwd}}#5}
}{
\group_begin:
\ctex_set:nn { section } { format += \centering }
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index 8e42cef60f..2e2c1c01c6 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/fontsize/fontsize.dtx b/macros/latex/contrib/fontsize/fontsize.dtx
index 9c9c7fdeb5..53dab90cc0 100644
--- a/macros/latex/contrib/fontsize/fontsize.dtx
+++ b/macros/latex/contrib/fontsize/fontsize.dtx
@@ -56,7 +56,7 @@ This work has the LPPL maintenance status "author-maintained".
%<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
%<package>\ProvidesPackage{fontsize}
%<*package>
- [2021/04/18 v0.8.3 'fontsize' package. Set main font sizes (Ivan Valbusa)]
+ [2021/05/21 v0.8.4 'fontsize' package. Set main font sizes (Ivan Valbusa)]
%</package>
%<*driver>
\documentclass[12pt]{ltxdoc}
@@ -287,6 +287,7 @@ This work has the LPPL maintenance status "author-maintained".
% Right brace \} Tilde \~}
%
%
+% \changes{v0.8.4}{2021/05/21}{Maintenance release.}
% \changes{v0.8.3}{2021/04/18}{Corrected a bug in the \cmd{parindent} option.
% Updated documentation.}
% \changes{v0.8.2}{2021/04/17}{New \cmd{parindent} option. Updated documentation.}
@@ -741,16 +742,30 @@ This work has the LPPL maintenance status "author-maintained".
%
%^^A---------------------------------------------------------------------
%
-% \section{Some text samples}\label{sec:example}
+% \subsection{Some text samples}\label{sec:example}
%
%^^A--------------------------------------------------------------------
% The following samples are obtained with the \cmd{printsamples}
% command (see section \ref{sec:commands}):
%\begin{verbatim}
-%\printsamples{12.6pt}{10.6pt}[normalsizerr,normalsizerrr,large,larger,largerr]
+% \printsamples{12.6pt}{10.6pt}[normalsize,normalsizer,normalsizerr,
+% normalsizerrr,large,larger,largerr,largerr]
%\end{verbatim}
+% \printsamples{12.6pt}{10.6pt}[%
+% normalsize,normalsizer,normalsizerr,
+% normalsizerrr,large,larger,largerr,largerr]
%
-% \printsamples{12.6pt}{10.6pt}[normalsizerr,normalsizerrr,large,larger,largerr]
+%^^A---------------------------------------------------------------------
+%
+% \section{Known issues}
+%
+%^^A--------------------------------------------------------------------
+%
+% The \opt{parindent} option does not work with classes and packages which sets \cmd{parindent}
+% inside the \cmd{AtBeginDocument} hook (and other hooks). Among these is the \sty{tufte}
+% class \parencite{tufte}. In such cases you can set the default
+% indentation, for example, with \cmd{setlength}|{parindent}|\arm{dimen}
+% declared \textit{after} |\begin{document}|.
%
% \StopEventually{%
% \printbibliography[heading=bibintoc]
@@ -877,7 +892,8 @@ This work has the LPPL maintenance status "author-maintained".
% the maximum dimension that may be stored in plain
% \TeX\ and \LaTeX.
% The problem, which is probably more theoretical than practical,
-% can be solved (thanks to Claudio Beccari) simply by changing it to this:
+% can be solved simply by replacing
+% the above code with this (thanks to Claudio Beccari):
% \baddition
% \begin{macrocode}
\setlength{\@tempdimc}{\fpeval{100*\@tempdimb/\@tempdima}pt}%
@@ -1295,13 +1311,16 @@ This work has the LPPL maintenance status "author-maintained".
% \eaddition
% For the following lengths, all values are calculated proportionally to the main font.
% I took the \file{bk11.clo} file as a reference point. Note that the differences
-% in lengths affected by \sty{fontsize} inside the \file{bk*.clo} files only concern
+% in the lengths affected by \sty{fontsize} inside the \file{bk*.clo} files only concern
% \cmd{headheight}, \cmd{headsep}, \cmd{topskip} and \cmd{footskip}.
% \baddition
% \begin{macrocode}
-\setlength\smallskipamount{\fpeval{1.090909091\@tempdimb/4}pt \@plus 1\p@ \@minus 1\p@}%
-\setlength\medskipamount{\fpeval{1.090909091\@tempdimb/2}pt \@plus 2\p@ \@minus 2\p@}%
-\setlength\bigskipamount{\fpeval{1.090909091\@tempdimb}pt \@plus 4\p@ \@minus 4\p@}%
+\setlength\smallskipamount{
+ \fpeval{1.090909091\@tempdimb/4}pt \@plus 1\p@ \@minus 1\p@}%
+\setlength\medskipamount{
+ \fpeval{1.090909091\@tempdimb/2}pt \@plus 2\p@ \@minus 2\p@}%
+\setlength\bigskipamount{
+ \fpeval{1.090909091\@tempdimb}pt \@plus 4\p@ \@minus 4\p@}%
% \end{macrocode}
% \eaddition
% \def\tabfontsize{\fontsize{10.5}{12.5}\selectfont}
@@ -1456,7 +1475,7 @@ This work has the LPPL maintenance status "author-maintained".
%
% Here is a portion of the \sty{scrfontsizes} package. It simply provides the
% \cmd{generateclofile} command, without the KOMA related definitions.
-% There are no reserved names for the \file{.clo} files. The command name is
+% There are no reserved names for the \file{.clo} files. The name of the command is
% a new name for the KOMA \cmd{generatefontfile}. In fact what the command
% generates is a \file{.clo} file.
% \begin{macrocode}
@@ -2058,7 +2077,7 @@ This work has the LPPL maintenance status "author-maintained".
LARGE,LARGEr,LARGErr,LARGErrr,
huge,huger,hugerr,hugerrr,
Huge,Huger,Hugerr,Hugerrr,
- HGE,HUGEr,HUGErr,HUGErrr,
+ HUGE,HUGEr,HUGErr,HUGErrr,
}
}
{
@@ -2103,7 +2122,7 @@ This work has the LPPL maintenance status "author-maintained".
% \iffalse
%<*bib>
@manual{xkeyval,
- title = {The \textsf{xkeyval} package},
+ title = {The \sty{xkeyval} package},
subtitle = {Extension of the keyval package},
author = {Adriaens, Hendri},
url = {http://www.ctan.org/pkg/xkeyval},
@@ -2150,12 +2169,23 @@ This work has the LPPL maintenance status "author-maintained".
}
@manual{xfp,
- title = {The \textit{xfp} package Floating Point Unit},
+ title = {The \sty{xfp} package Floating Point Unit},
author = {{The \LaTeX\ Project}},
url = {https://www.ctan.org/pkg/xfp},
urldate = {2021-03-14},
date = {2021-03-12},
}
+
+@manual{tufte,
+ title = {\sty{tufte-latex} – Document classes inspired by the work of Edward Tufte},
+ author = {Kevin Godby},
+ url = {https://www.ctan.org/pkg/tufte-latex},
+ urldate = {2021-05-18},
+ date = {2015},
+ version = {3.5.2}
+}
+
+
%</bib>
% \fi
% \Finale
diff --git a/macros/latex/contrib/fontsize/fontsize.pdf b/macros/latex/contrib/fontsize/fontsize.pdf
index 7dd7a0d45b..adfe679760 100644
--- a/macros/latex/contrib/fontsize/fontsize.pdf
+++ b/macros/latex/contrib/fontsize/fontsize.pdf
Binary files differ
diff --git a/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf b/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf
index 760b4b99c8..090fa0463b 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf
+++ b/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf
Binary files differ
diff --git a/macros/latex/contrib/projlib/ProjLib-doc-cn.tex b/macros/latex/contrib/projlib/ProjLib-doc-cn.tex
index dfbedaf726..65c2f0ac2c 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc-cn.tex
+++ b/macros/latex/contrib/projlib/ProjLib-doc-cn.tex
@@ -78,7 +78,7 @@
\title{\ProjLib{} 工具集\\[.3\baselineskip]\normalsize 使用指南}
\author{许锦文}
-\thanks{对应版本.~~\texttt{\ProjLib{}~2021/05/19}}
+\thanks{对应版本.~~\texttt{\ProjLib{}~2021/05/20}}
\date{2021年5月,北京}
\maketitle
@@ -124,9 +124,9 @@
\begin{itemize}
\item 加载 \PJLamssim{}。关于其详细功能,请参阅有关这一宏包的小节。
\end{itemize}
- \item \texttt{nothms}
+ \item \texttt{nothms}、\texttt{regionalref}
\begin{itemize}
- \item 不设定定理类环境。如果你希望使用自己的定理样式,可以使用这一选项。
+ \item 来自 \PJLthm{} 的选项,详细信息请参阅有关这一宏包的小节。
\end{itemize}
\end{itemize}
另外,还有一些组件的参数可以作为文档类的全局参数传递,例如 \PJLpaper{} 的 \texttt{paperstyle} 和 \texttt{preview} 等。详细信息可以参阅对应的小节。
@@ -271,6 +271,10 @@
\begin{itemize}
\item 不设定定理类环境。如果你希望使用自己的定理样式,可以使用这一选项。
\end{itemize}
+ \item \texttt{regionalref}
+ \begin{itemize}
+ \item 在智能引用时,定理类环境的名称随当前语言而变化(默认情况下,引用时会始终采用定理类环境所处语境下的名称;例如,在英文语境中书写的定理,即使稍后在中文语境下引用时,仍将显示为 Theorem)。在 \texttt{fast} 模式下,这一选项默认启用。
+ \end{itemize}
\end{itemize}
预设的定理类环境包括:\texttt{assumption}、\texttt{axiom}、\texttt{conjecture}、\texttt{convention}、\texttt{corollary}、\texttt{definition}、\texttt{definition-proposition}、\texttt{definition-theorem}、\texttt{example}、\texttt{exercise}、\texttt{fact}、\texttt{hypothesis}、\texttt{lemma}、\texttt{notation}、\texttt{problem}、\texttt{property}、\texttt{proposition}、\texttt{question}、\texttt{remark}、\texttt{theorem},以及相应的带有星号 \lstinline|*| 的无编号版本。这些定理类环境在显示时会依据当前语言而相应变化,例如在中文模式下 \texttt{theorem} 会显示为“定理”,而在英文模式下则会显示为“Theorem”。关于如何选定语言,请参阅关于 \PJLlang{} 的小节。
@@ -346,17 +350,17 @@
\end{proofidea}
-\bigskip
+\medskip
\section{目前存在的问题}
-\begin{itemize}[itemsep=1em]
+\begin{itemize}[itemsep=.6em]
\item \PJLauthor{} 仍然处于初步阶段,在很多方面还远远比不上相对成熟的 \textsf{authblk}。
\item \PJLlang{}:针对 \textsf{polyglossia} 的设置仍然存在许多问题,因此现在主要功能都是通过 \textsf{babel} 实现的。
\item \PJLpaper{} 的 \texttt{preview} 功能主要是通过 \textsf{geometry} 宏包实现的,因此在 \textsc{\textsf{Koma}} 文档类中效果不好。
\item \PJLthm{} 对于定理类环境的编号与样式设定目前还无法由用户更改。
\item \PJLthm{}:智能引用针对所有 \PJLlang{} 已支持语言的本地化尚不完整,主要是中文、日文与俄文。
\item 错误处理功能不完善,在出现一些问题时没有相应的错误提示。
- \item 代码中有许多可优化之处,有些部分耗时过长,特别是 \PJLthm{} 对定理类环境的定义。
+ \item 代码中仍有许多可优化之处,有些部分耗时过长,特别是 \PJLthm{} 对定理类环境的定义。
\end{itemize}
diff --git a/macros/latex/contrib/projlib/ProjLib-doc-en.pdf b/macros/latex/contrib/projlib/ProjLib-doc-en.pdf
index 9f651971aa..f4ebb70a96 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc-en.pdf
+++ b/macros/latex/contrib/projlib/ProjLib-doc-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/projlib/ProjLib-doc-en.tex b/macros/latex/contrib/projlib/ProjLib-doc-en.tex
index 82a1aeda3b..b89c62a660 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc-en.tex
+++ b/macros/latex/contrib/projlib/ProjLib-doc-en.tex
@@ -76,7 +76,7 @@
\title{\ProjLib{}~~Toolkit\\[.3\baselineskip]\normalsize User Manual}
\author{Jinwen Xu}
-\thanks{Corresponding to: \texttt{\ProjLib{}~2021/05/19}}
+\thanks{Corresponding to: \texttt{\ProjLib{}~2021/05/20}}
\date{May 2021, Beijing}
\maketitle
@@ -110,7 +110,7 @@ Just add the following line to your preamble:
\begin{itemize}
\item Fast mode. The functionality is appropriately reduced to get faster compilation speed, recommended to use during the writing phase.
\end{itemize}
- \item \texttt{palatino}、\texttt{times}、\texttt{garamond}、\texttt{biolinum}
+ \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{biolinum}
\begin{itemize}
\item Font options. As the name suggest, font with corresponding name will be loaded.
\end{itemize}
@@ -122,9 +122,9 @@ Just add the following line to your preamble:
\begin{itemize}
\item Load \PJLamssim{}. For more information about its functionality, see the section on this package.
\end{itemize}
- \item \texttt{nothms}
+ \item \texttt{nothms}, \texttt{regionalref}
\begin{itemize}
- \item The theorem-like environments will not be defined. You should use this option if you wish to apply your own theorem styles.
+ \item Options from \PJLthm{}, please refer to the section on this package for details.
\end{itemize}
\end{itemize}
In addition, there are also some options of the components that can (and should) be passed as global options of the document class, such as \texttt{paperstyle} and \texttt{preview} of \PJLpaper{}. For more information, please refer to the corresponding section.
@@ -246,7 +246,7 @@ For example, \lstinline|\AddLanguageSetting(German){\color{orange}}| can make al
\begin{itemize}
\item Set the paper color style. The options available for \meta{paper style name} are: \texttt{yellow}, \texttt{dark} and \texttt{nord}.
\end{itemize}
- \item \texttt{yellowpaper}、\texttt{darkpaper}、\texttt{nordpaper}
+ \item \texttt{yellowpaper}, \texttt{darkpaper}, \texttt{nordpaper}
\begin{itemize}
\item Set the paper color style. The effect is the same as \texttt{paperstyle} with the corresponding \meta{paper style name} specified.
\end{itemize}
@@ -261,11 +261,15 @@ It is recommended to pass these options as global options of the document class.
\subsection{PJLthm}
\PJLthm{} offers the configuration of theorem-like environments. It has the following option:
-% \vspace{-.3\baselineskip}
+
\begin{itemize}
\item \texttt{nothms}
\begin{itemize}
- \item The theorem-like environments will not be defined. You should use this option if you wish to apply your own theorem styles.
+ \item The theorem-like environments will not be defined. You may use this option if you wish to apply your own theorem styles.
+ \end{itemize}
+ \item \texttt{regionalref}
+ \begin{itemize}
+ \item When referencing, the name of the theorem-like environment changes with the current language (by default, the name will always remain the same; for example, when referencing a theorem written in the French context, even if one is currently in the English context, it will still be displayed as ``Théorème''). In \texttt{fast} mode, this option is automatically enabled.
\end{itemize}
\end{itemize}
@@ -287,7 +291,7 @@ If you need to define a new theorem-like environment, you must first define the
If you want to define an environment with an asterisk \lstinline|*| after the name, you don't need to write an asterisk in the \meta{name of environment} above. See the example below.
\end{remind}
-\medskip
+\clearpage% \medskip
And then define this environment in one of following five ways:
\begin{itemize}
\item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
@@ -354,11 +358,11 @@ defines an unnumbered environment \lstinline|proofidea*| and a numbered environm
\item \PJLthm{}: The numbering and theorem-style settings of the theorem-like environments cannot be accessed by the user at present.
\item \PJLthm{}: The localization of \textsf{cleveref} is not yet complete for all supported languages of \PJLlang{}, especially for Chinese, Japanese and Russian.
\item The error handling mechanism is incomplete: there is no corresponding error prompt when some problems occur.
- \item There are many things that can be optimized in the code. Some codes take too long to run, especially the definition of theorem-like environments in \PJLthm{}.
+ \item There are still many things that can be optimized in the code. Some takes too long to run, especially the definition of theorem-like environments in \PJLthm{}.
\end{itemize}
-\clearpage
+\medskip % \clearpage
\section{Usage example}
\subsection{Standard classes}
diff --git a/macros/latex/contrib/projlib/ProjLib.dtx b/macros/latex/contrib/projlib/ProjLib.dtx
index 94e4aa5d8e..12abe0328e 100644
--- a/macros/latex/contrib/projlib/ProjLib.dtx
+++ b/macros/latex/contrib/projlib/ProjLib.dtx
@@ -18,47 +18,47 @@
%
%<*PJLamssim>
\ProvidesPackage{PJLamssim}
- [2021/05/19 Simulate some features of amsart]
+ [2021/05/20 Simulate some features of amsart]
%</PJLamssim>
%
%<*PJLauthor>
\ProvidesPackage{PJLauthor}
- [2021/05/19 Enhanced author information block]
+ [2021/05/20 Enhanced author information block]
%</PJLauthor>
%
%<*PJLdate>
\ProvidesPackage{PJLdate}
- [2021/05/19 Convert yyyy-mm-dd to normal datetime format]
+ [2021/05/20 Convert yyyy-mm-dd to normal datetime format]
%</PJLdate>
%
%<*PJLdraft>
\ProvidesPackage{PJLdraft}
- [2021/05/19 Some useful macros for the draft stage]
+ [2021/05/20 Some useful macros for the draft stage]
%</PJLdraft>
%
%<*PJLlang>
\ProvidesPackage{PJLlang}
- [2021/05/19 Multi-language configuration]
+ [2021/05/20 Multi-language configuration]
%</PJLlang>
%
%<*PJLlogo>
\ProvidesPackage{PJLlogo}
- [2021/05/19 The ProjLib logo]
+ [2021/05/20 The ProjLib logo]
%</PJLlogo>
%
%<*PJLpaper>
\ProvidesPackage{PJLpaper}
- [2021/05/19 Paper style configuration]
+ [2021/05/20 Paper style configuration]
%</PJLpaper>
%
%<*PJLthm>
\ProvidesPackage{PJLthm}
- [2021/05/19 Theorem setup and configuration]
+ [2021/05/20 Theorem setup and configuration]
%</PJLthm>
%
%<*PJLtoolkit>
\ProvidesPackage{PJLtoolkit}
- [2021/05/19 Collective interface of ProjLib Toolkit]
+ [2021/05/20 Collective interface of ProjLib Toolkit]
%</PJLtoolkit>
%
\RequirePackage{kvoptions}
@@ -764,7 +764,12 @@
prefix = @PJLthm@
}
\DeclareBoolOption[false]{nothms}
+\DeclareBoolOption[false]{fast}
+\DeclareBoolOption[false]{regionalref}
\ProcessKeyvalOptions*\relax
+\if@PJLthm@fast
+ \@PJLthm@regionalreftrue
+\fi
\RequirePackage{PJLlang}
\RequirePackage{amsmath,amsthm}
@@ -787,6 +792,69 @@
{\expandafter\PassFirstToSecond%
\expandafter{\temp}{\endgroup\InnerCreateTheorem{#1}}}%
}%
+\if@PJLthm@regionalref
+\NewDocumentCommand{\InnerCreateTheorem}{mmmod<>d()}{%
+% #1 = star or no star
+% #2 = name of environment
+% #3 = emptiness or star to append to name of environment
+% #4 = numbered like
+% #5 = numbered within
+% #6 = existed environment
+ \IfBooleanTF{#1}{%
+ \IfValueTF{#4}
+ {\@firstoftwo}
+ {\IfValueTF{#5}{\@firstoftwo}{\@secondoftwo}}%
+ }{%
+ \IfValueTF{#4}
+ {\IfValueTF{#5}{\@firstoftwo}{\@secondoftwo}}{
+ \@secondoftwo}
+ }%
+ {%
+ \GenericError{}%
+ {\string\CreateTheorem\space syntax error\on@line}{%
+ You cannot call the starred variant with optional argument,\MessageBreak
+ nor call the unstarred variant with several optional arguments.}%
+ {}%
+ }{%
+ \IfValueTF{#6}{%
+ \IfBooleanTF{#1}{%
+ \ifcsmacro{#2#3}%
+ {\renewenvironment{#2#3}{\begin{#6*}}{\end{#6*}}}%
+ {\newenvironment{#2#3}{\begin{#6*}}{\end{#6*}}}%
+ }{%
+ \ifcsmacro{#2#3}%
+ {\renewenvironment{#2#3}{\begin{#6}}{\end{#6}}}%
+ {\newenvironment{#2#3}{\begin{#6}}{\end{#6}}}%
+ }
+ }{%
+ \IfBooleanTF{#1}{%
+ \newtheorem*{#2#3}{\csname#2name\csname\languagename ABBR\endcsname\endcsname}
+ }{%
+ \IfValueTF{#5}{%
+ \newtheorem{PJL#2#3}{\csname#2name\csname\languagename ABBR\endcsname\endcsname}[#5]%
+ \newaliascnt{#2#3}{PJL#2#3}%
+ }{%
+ \IfValueTF{#4}{%
+ \newtheorem{PJL#2#3}[#4]{\csname#2name\csname\languagename ABBR\endcsname\endcsname}
+ }{%
+ \newtheorem{PJL#2#3}{\csname#2name\csname\languagename ABBR\endcsname\endcsname}
+ \newaliascnt{#2#3}{PJL#2#3}%
+ }%
+ }%
+ \crefname{PJL#2#3}%
+ {\csname#2name\csname\languagename ABBR\endcsname\endcsname}%
+ {\csname#2name\csname\languagename ABBR\endcsname\endcsname}%
+ \Crefname{PJL#2#3}%
+ {\csname#2name\csname\languagename ABBR\endcsname\endcsname}%
+ {\csname#2name\csname\languagename ABBR\endcsname\endcsname}%
+ \NewDocumentEnvironment{#2#3}{}
+ {\begin{PJL#2#3}}
+ {\end{PJL#2#3}}
+ }%
+ }%
+ }%
+}%
+\else
\NewDocumentCommand{\InnerCreateTheorem}{mmmod<>d()}{%
% #1 = star or no star
% #2 = name of environment
@@ -853,7 +921,7 @@
\NewDocumentEnvironment{#2#3}{}
{\csname#2\csname\languagename ABBR\endcsname#3\endcsname}%
{\csname end#2\csname\languagename ABBR\endcsname#3\endcsname}%
- }
+ }%
}%
}%
\NewDocumentCommand{\CreateTheoremNumberedLikeAliasCounter}{mmm}{%
@@ -867,6 +935,7 @@
{\csname#1name#2\endcsname}%
{\csname#1name#2\endcsname}%
}%
+\fi
%% English theorems names
\def\theoremnameEN{Theorem}
@@ -1158,6 +1227,7 @@
\DeclareBoolOption[false]{author}
\DeclareBoolOption[false]{amssim}
\DeclareBoolOption[false]{nothms}
+\DeclareBoolOption[false]{regionalref}
\DeclareBoolOption[false]{palatino}
\DeclareBoolOption[false]{times}
\DeclareBoolOption[false]{garamond}
@@ -1170,10 +1240,14 @@
\PassOptionsToPackage{fast}{PJLdate}
\PassOptionsToPackage{fast}{PJLdraft}
\PassOptionsToPackage{fast}{PJLlogo}
+ \PassOptionsToPackage{fast}{PJLthm}
\fi
\if@PJLtoolkit@nothms
\PassOptionsToPackage{nothms}{PJLthm}
\fi
+\if@PJLtoolkit@regionalref
+ \PassOptionsToPackage{regionalref}{PJLthm}
+\fi
\if@PJLtoolkit@author
\RequirePackage{PJLauthor}
diff --git a/macros/latex/contrib/siunitx/CHANGELOG.md b/macros/latex/contrib/siunitx/CHANGELOG.md
index 3215c8926b..093b87bada 100644
--- a/macros/latex/contrib/siunitx/CHANGELOG.md
+++ b/macros/latex/contrib/siunitx/CHANGELOG.md
@@ -7,6 +7,15 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
## [Unreleased]
+## [v3.0.4]
+
+### Changed
+- Standardise and document the position of `\color` in negative values
+ within the code-level API
+
+### Fixed
+- Alignment of integers in tables when `parse-numbers = tables` (issue #442)
+
## [v3.0.3]
### Changed
@@ -1280,7 +1289,8 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
### Added
- First public testing release (as `si`)
-[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.3...HEAD
+[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.4...HEAD
+[v3.0.4]: https://github.com/josephwright/siunitx/compare/v3.0.3...v3.0.4
[v3.0.3]: https://github.com/josephwright/siunitx/compare/v3.0.2...v3.0.3
[v3.0.2]: https://github.com/josephwright/siunitx/compare/v3.0.1...v3.0.2
[v3.0.1]: https://github.com/josephwright/siunitx/compare/v3.0.0...v3.0.1
diff --git a/macros/latex/contrib/siunitx/siunitx-code.pdf b/macros/latex/contrib/siunitx/siunitx-code.pdf
index 16510233a4..718aeef446 100644
--- a/macros/latex/contrib/siunitx/siunitx-code.pdf
+++ b/macros/latex/contrib/siunitx/siunitx-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx-number.dtx b/macros/latex/contrib/siunitx/siunitx-number.dtx
index 3bedf3794c..dec433df02 100644
--- a/macros/latex/contrib/siunitx/siunitx-number.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-number.dtx
@@ -68,7 +68,9 @@
% \cs{color} is assumed to be available. Where the latter may apply, numbers
% should be printed inside a group: note that \TeX{} grouping is not added
% \emph{within} formatted numbers as they may need to be decomposed into parts
-% (see \cs{siunitx_number_output:NN}).
+% (see \cs{siunitx_number_output:NN}). Such a color will be the \emph{first}
+% part of the result, meaning that a test for an initial |\color| and following
+% brace group may be used to detect/remove/adjust this part.
%
% \section{Formatting numbers}
%
@@ -3008,6 +3010,7 @@
}
\cs_new:Npn \@@_output:nnnnnnn #1#2#3#4#5#6#7#8
{
+ \@@_output_color:n {#2}
\@@_output_comparator:nn {#1} {#8}
\@@_output_bracket:nn {#5} {#7}
\@@_output_sign:nnn {#1} {#2} {#8}
@@ -3045,6 +3048,17 @@
\@@_output_exponent:nnnn
}
% \end{macrocode}
+% As color for negative values applies to the \emph{whole} output, we have
+% to deal with it before anything else.
+% \begin{macrocode}
+\cs_new:Npn \@@_output_color:n #1
+ {
+ \bool_lazy_and:nnT
+ { \str_if_eq_p:nn {#1} { - } }
+ { ! \tl_if_empty_p:N \l_@@_negative_color_tl }
+ { \exp_not:N \color { \exp_not:V \l_@@_negative_color_tl } }
+ }
+% \end{macrocode}
% To get the spacing correct this needs to be an ordinary math character.
% \begin{macrocode}
\cs_new:Npn \@@_output_comparator:nn #1#2
@@ -3055,11 +3069,11 @@
}
% \end{macrocode}
% Formatting signs has to deal with some additional formatting requirements
-% for negative numbers. Both making such numbers a fixed color and bracketing
-% them needs some rearrangement of the order of tokens, which is set up in
-% the main formatting macro by the dedicated do-nothing end function. We
-% also have the comparator passed here: if it is present, we need to deal
-% with tighter spacing.
+% for negative numbers. Making such numbers by bracketing them needs some
+% rearrangement of the order of tokens, which is set up in the main
+% formatting macro by the dedicated do-nothing end function. We also have
+% the comparator passed here: if it is present, we need to deal with
+% tighter spacing.
% \begin{macrocode}
\cs_new:Npn \@@_output_sign:nnn #1#2#3
{
@@ -3071,8 +3085,6 @@
{
\str_if_eq:nnTF {#2} { - }
{
- \tl_if_empty:NF \l_@@_negative_color_tl
- { \@@_output_sign_color:w }
\bool_if:NTF \l_@@_bracket_negative_bool
{ \@@_output_sign_brackets:w }
{ \@@_output_sign:nN {#1} #2 }
@@ -3094,13 +3106,6 @@
{ \exp_not:n {#1} }
}
\cs_new:Npn
- \@@_output_sign_color:w #1 \@@_output_end:
- {
- \exp_not:N \color { \exp_not:V \l_@@_negative_color_tl }
- #1
- \@@_output_end:
- }
-\cs_new:Npn
\@@_output_sign_brackets:w #1 \@@_output_end:
{
\exp_not:V \l_@@_bracket_open_tl
diff --git a/macros/latex/contrib/siunitx/siunitx-table.dtx b/macros/latex/contrib/siunitx/siunitx-table.dtx
index f4ca1ec529..3f8673c2fc 100644
--- a/macros/latex/contrib/siunitx/siunitx-table.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-table.dtx
@@ -671,10 +671,11 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\@@_fil:}
-% A primitive renamed.
+% \begin{macro}{\@@_fil:, \@@_fill:}
+% Primitives renamed.
% \begin{macrocode}
\cs_new_eq:NN \@@_fil: \tex_hfil:D
+\cs_new_eq:NN \@@_fill: \tex_hfill:D
% \end{macrocode}
% \end{macro}
%
@@ -695,10 +696,10 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_color_check:N #1
{ \exp_after:wN \@@_color_check:w #1 \q_stop }
-\cs_new_protected:Npn \@@_color_check:w #1 \q_nil #2 \q_nil #3 \q_stop
+\cs_new_protected:Npn \@@_color_check:w #1 \q_nil #2 \q_stop
{
- \tl_if_head_eq_meaning:nNT {#2} \color
- { \@@_color_check:Nnw #2 \q_stop }
+ \tl_if_head_eq_meaning:nNT {#1} \color
+ { \@@_color_check:Nnw #1 \q_stop }
}
\cs_new_protected:Npn \@@_color_check:Nnw #1#2#3 \q_stop
{ \keys_set:nn { siunitx } { number-color = #2 } }
@@ -958,7 +959,6 @@
{
\tl_set:Nx \l_@@_tmp_tl
{ \siunitx_number_output:NN \l_@@_model_tl \q_nil }
- \@@_color_check:N \l_@@_tmp_tl
\exp_after:wN \@@_direct_format_aux:w
\l_@@_tmp_tl \q_stop
}
@@ -979,7 +979,7 @@
\char_set_active_eq:NN ##1 \@@_direct_format_switch:
\char_set_mathcode:nn { `##1 } { "8000 }
}
- \@@_fil:
+ \@@_fill:
}
\cs_new_protected:Npn \@@_direct_format_switch:
{
diff --git a/macros/latex/contrib/siunitx/siunitx.dtx b/macros/latex/contrib/siunitx/siunitx.dtx
index b8b6b79b02..40ba293d81 100644
--- a/macros/latex/contrib/siunitx/siunitx.dtx
+++ b/macros/latex/contrib/siunitx/siunitx.dtx
@@ -121,7 +121,7 @@
%
% Identify the package and give the over all version information.
% \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2021-05-20} {3.0.3}
+\ProvidesExplPackage {siunitx} {2021-05-21} {3.0.4}
{A comprehensive (SI) units package}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/siunitx/siunitx.pdf b/macros/latex/contrib/siunitx/siunitx.pdf
index 2c3c742c94..3a8e7d0277 100644
--- a/macros/latex/contrib/siunitx/siunitx.pdf
+++ b/macros/latex/contrib/siunitx/siunitx.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx.tex b/macros/latex/contrib/siunitx/siunitx.tex
index 191e619490..857a1569a6 100644
--- a/macros/latex/contrib/siunitx/siunitx.tex
+++ b/macros/latex/contrib/siunitx/siunitx.tex
@@ -1693,7 +1693,7 @@ There are certain combinations of numerical input which can be ambiguous. This
can be corrected by adding brackets in the appropriate place, and is controlled
by the \opt{bracket-ambiguous-numbers} switch. This option only applies to pure
numbers: when formatting quantities, the need for brackets also depends on the
-placement of units, so is controlled by \opt{seperate-uncertainty-units}.
+placement of units, so is controlled by \opt{separate-uncertainty-units}.
\begin{LaTeXdemo}
\sisetup{separate-uncertainty}
\num{1.2(3)e4} \\
@@ -3147,7 +3147,6 @@ also be done using \pkg{siunitx} (Table~\ref{tbl:xmpl:unrel}).
S[
table-format = 5.0,
parse-numbers = false,
- input-digits = .0123456789,
input-decimal-markers = x
]
@{}
@@ -3393,9 +3392,9 @@ these units, needing no others and with no redundancy.
All other units within the \acro{SI} system are regarded as \enquote{derived}
from the seven base units. At the most basic, all other \acro{SI} units can be
expressed as combinations of the base units. However, many units (listed in
-Tables~\ref{tab:unit:derived} and~\ref{tab:unit:accepted}) have a special name
-and symbol. Most of these units are simple combinations of one or more base
-units (raised to powers as appropriate).
+Table~\ref{tab:unit:derived}) have a special name and symbol. Most of these
+units are simple combinations of one or more base units (raised to powers as
+appropriate).
A series of \acro{SI} prefixes for decimal multiples and sub-multiples are
provided, and can be used as modifiers for any \acro{SI} unit (either base or
@@ -3525,7 +3524,7 @@ but mathematically poor.\footnote{For example, for an acceleration \(a\), the
expression $[a]$ is the dimensions of $a$, \foreign{i.e.}~length per time
squared in this case.} Much better is to show division of all quantities by the
unit, which leaves the entries as unitless ratios. This is illustrated in
-Tables~\ref{tab:xmpl:unitless} and~\ref{fig:xmpl:unitless}.
+Table~\ref{tab:xmpl:unitless} and Figure~\ref{fig:xmpl:unitless}.
\begin{LaTeXdemo}[code and float]
\begin{table}
\caption{An example of table labelling.%
@@ -3580,7 +3579,7 @@ Tables~\ref{tab:xmpl:unitless} and~\ref{fig:xmpl:unitless}.
the titles are followed by \enquote{\unit{\kilo\gram}}!
\begin{LaTeXdemo}[code and float]
\begin{table}
- \caption{Good and bad columns.%
+ \caption{Bad and good columns.%
\label{tab:good}}
\sisetup{table-number-alignment = center}
\begin{tabular}{
@@ -3618,7 +3617,7 @@ unzip this in your local \path{texmf} directory.
The package requires \LaTeX3 support as provided in the \pkg{l3kernel} and
\pkg{l3packages} bundles. Both of these are included in \TeX{} Live and
-MiK\TeX{}, or are again available in ready-to-install from \acro{CTAN}.
+MiK\TeX{}, or are again available in ready-to-install form from \acro{CTAN}.
\section{Thanks}
diff --git a/macros/latex/contrib/tiscreen/README b/macros/latex/contrib/tiscreen/README
index 23693c804f..55292264d4 100644
--- a/macros/latex/contrib/tiscreen/README
+++ b/macros/latex/contrib/tiscreen/README
@@ -1,15 +1,16 @@
tiscreen (TI calculator screen)
-v1.0
+v1.0.1
This package mimics the screen of older Texas instruments dot matrix display
calculators, specifically the TI-82 STATS.
Changes:
+- 2021/05/21 Minor README and documentation issues
- 2021/05/17 Initial version
For more information, please see the documentation.
-Copyright 2021
+Copyright (C) 2021 Mustafa Ibrahim
This work may be distributed and/or modified under the conditions of the LaTeX
Project Public License, either version 1.3c or higher. The latest version the
license is at: http://www.latex-project.org/lppl.txt
diff --git a/macros/latex/contrib/tiscreen/doc/tiscreen-doc.pdf b/macros/latex/contrib/tiscreen/doc/tiscreen-doc.pdf
index 4c0f4f9f05..de6991dc04 100644
--- a/macros/latex/contrib/tiscreen/doc/tiscreen-doc.pdf
+++ b/macros/latex/contrib/tiscreen/doc/tiscreen-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/tiscreen/doc/tiscreen-doc.tex b/macros/latex/contrib/tiscreen/doc/tiscreen-doc.tex
index f959f56640..22baf4949b 100644
--- a/macros/latex/contrib/tiscreen/doc/tiscreen-doc.tex
+++ b/macros/latex/contrib/tiscreen/doc/tiscreen-doc.tex
@@ -1,4 +1,5 @@
\documentclass[a4paper,12pt]{article}
+\usepackage[iso,english]{isodate}
\usepackage[margin=1in]{geometry}
\usepackage[english]{babel}
\usepackage{parskip}
@@ -18,7 +19,6 @@
\title{TI calculator display\\{\small(TI-82 STATS)}}
\author{Mustafa Ibrahim}
-\date{2021/05/17}
\begin{document}
diff --git a/macros/latex/contrib/tiscreen/tex/tiscreen.sty b/macros/latex/contrib/tiscreen/tex/tiscreen.sty
index 2d911d6b2e..45c2b46292 100644
--- a/macros/latex/contrib/tiscreen/tex/tiscreen.sty
+++ b/macros/latex/contrib/tiscreen/tex/tiscreen.sty
@@ -1,3 +1,8 @@
+% Copyright (C) 2021 Mustafa Ibrahim
+% This work may be distributed and/or modified under the conditions of the LaTeX
+% Project Public License, either version 1.3c or higher. The latest version the
+% license is at: http://www.latex-project.org/lppl.txt
+
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{tiscreen}[2021/05/17 Ti calculator screen]
diff --git a/macros/luatex/generic/lualibs/NEWS b/macros/luatex/generic/lualibs/NEWS
index 4c80d06987..cf8a853b6c 100644
--- a/macros/luatex/generic/lualibs/NEWS
+++ b/macros/luatex/generic/lualibs/NEWS
@@ -1,4 +1,6 @@
History of the lualibs package
+2021/05/20 v2.74/
+ * sync with Context current as of 2021/05/20.
2020/12/30 v2.73/
* sync with Context current as of 2020/12/30.
diff --git a/macros/luatex/generic/lualibs/README.md b/macros/luatex/generic/lualibs/README.md
index cf330df159..e2cd6be9bd 100644
--- a/macros/luatex/generic/lualibs/README.md
+++ b/macros/luatex/generic/lualibs/README.md
@@ -1,10 +1,10 @@
# The Lualibs Package
-VERSION: 2.73
+VERSION: 2.74
-DATE: 2020-12-30
+DATE: 2021-05-20
-FONTLOADERDATE: 2020-12-30
+FONTLOADERDATE: 2021-05-20
Lualibs is a collection of Lua modules useful for general programming.
diff --git a/macros/luatex/generic/lualibs/lualibs-basic-merged.lua b/macros/luatex/generic/lualibs/lualibs-basic-merged.lua
index 92e571a7cc..ac98df379a 100644
--- a/macros/luatex/generic/lualibs/lualibs-basic-merged.lua
+++ b/macros/luatex/generic/lualibs/lualibs-basic-merged.lua
@@ -1,6 +1,6 @@
-- merged file : lualibs-basic-merged.lua
-- parent file : lualibs-basic.lua
--- merge date : Wed Dec 30 17:55:54 2020
+-- merge date : 2021-05-20 23:14
do -- begin closure to overcome local limits and interference
@@ -133,7 +133,7 @@ if not modules then modules={} end modules ['l-package']={
copyright="PRAGMA ADE / ConTeXt Development Team",
license="see context related readme files"
}
-local type=type
+local type,unpack=type,unpack
local gsub,format,find=string.gsub,string.format,string.find
local insert,remove=table.insert,table.remove
local P,S,Cs,lpegmatch=lpeg.P,lpeg.S,lpeg.Cs,lpeg.match
@@ -163,6 +163,7 @@ local helpers=package.helpers or {
},
methods={},
sequence={
+ "reset loaded",
"already loaded",
"preload table",
"qualified path",
@@ -179,6 +180,7 @@ local methods=helpers.methods
local builtin=helpers.builtin
local extraluapaths={}
local extralibpaths={}
+local checkedfiles={}
local luapaths=nil
local libpaths=nil
local oldluapath=nil
@@ -312,10 +314,16 @@ end
local function loadedaslib(resolved,rawname)
local base=gsub(rawname,"%.","_")
local init="luaopen_"..gsub(base,"%.","_")
+ local data={ resolved,init,"" }
+ checkedfiles[#checkedfiles+1]=data
if helpers.trace then
helpers.report("calling loadlib with '%s' with init '%s'",resolved,init)
end
- return package.loadlib(resolved,init)
+ local a,b,c=package.loadlib(resolved,init)
+ if not a and type(b)=="string" then
+ data[3]=string.fullstrip(b or "unknown error")
+ end
+ return a,b,c
end
helpers.loadedaslib=loadedaslib
local function loadedbypath(name,rawname,paths,islib,what)
@@ -354,6 +362,10 @@ local function loadedbyname(name,rawname)
end
end
helpers.loadedbyname=loadedbyname
+methods["reset loaded"]=function(name)
+ checkedfiles={}
+ return false
+end
methods["already loaded"]=function(name)
return package.loaded[name]
end
@@ -395,6 +407,9 @@ end
methods["not loaded"]=function(name)
if helpers.trace then
helpers.report("unable to locate '%s'",name or "?")
+ for i=1,#checkedfiles do
+ helpers.report("checked file '%s', initializer '%s', message '%s'",unpack(checkedfiles[i]))
+ end
end
return nil
end
@@ -2591,13 +2606,13 @@ do -- begin closure to overcome local limits and interference
if not modules then modules={} end modules ['l-number']={
version=1.001,
- comment="companion to luat-lib.mkiv",
+ comment="companion to luat-lib.mkxl",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
license="see context related readme files"
}
local tostring,tonumber=tostring,tonumber
-local format,floor,match,rep=string.format,math.floor,string.match,string.rep
+local format,match,rep=string.format,string.match,string.rep
local concat,insert=table.concat,table.insert
local lpegmatch=lpeg.match
local floor=math.floor
@@ -3371,7 +3386,7 @@ elseif name=="macosx" then
elseif find(architecture,"x86_64",1,true) then
platform="osx-64"
elseif find(architecture,"arm64",1,true) then
- platform="osx-64"
+ platform="osx-arm"
else
platform="osx-ppc"
end
@@ -4698,7 +4713,6 @@ if not modules then modules={} end modules ['l-unicode']={
license="see context related readme files"
}
utf=utf or {}
--- unicode=nil
if not string.utfcharacters then
local gmatch=string.gmatch
function string.characters(str)
diff --git a/macros/luatex/generic/lualibs/lualibs-extended-merged.lua b/macros/luatex/generic/lualibs/lualibs-extended-merged.lua
index cac8889ca3..9cd4487bf2 100644
--- a/macros/luatex/generic/lualibs/lualibs-extended-merged.lua
+++ b/macros/luatex/generic/lualibs/lualibs-extended-merged.lua
@@ -1,6 +1,6 @@
-- merged file : lualibs-extended-merged.lua
-- parent file : lualibs-extended.lua
--- merge date : Wed Dec 30 17:55:44 2020
+-- merge date : 2021-05-20 23:14
do -- begin closure to overcome local limits and interference
@@ -54,25 +54,59 @@ local function points(n)
n=n*ptf
if n%1==0 then
return format("%ipt",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fpt",n))
+ end
+end
+local function nupoints(n)
+ if n==0 then
+ return "0"
+ end
+ n=tonumber(n)
+ if not n or n==0 then
+ return "0"
+ end
+ n=n*ptf
+ if n%1==0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n)
end
- return lpegmatch(stripzeros,format("%.5fpt",n))
end
local function basepoints(n)
if n==0 then
- return "0pt"
+ return "0bp"
end
n=tonumber(n)
if not n or n==0 then
- return "0pt"
+ return "0bp"
end
n=n*bpf
if n%1==0 then
return format("%ibp",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fbp",n))
+ end
+end
+local function nubasepoints(n)
+ if n==0 then
+ return "0"
+ end
+ n=tonumber(n)
+ if not n or n==0 then
+ return "0"
+ end
+ n=n*bpf
+ if n%1==0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n)
end
- return lpegmatch(stripzeros,format("%.5fbp",n))
end
number.points=points
+number.nupoints=nupoints
number.basepoints=basepoints
+number.nubasepoints=nubasepoints
local rubish=spaceortab^0*newline
local anyrubish=spaceortab+newline
local stripped=(spaceortab^1/"")*newline
@@ -350,7 +384,9 @@ local environment={
concat=table.concat,
signed=number.signed,
points=number.points,
+ nupoints=number.nupoints,
basepoints=number.basepoints,
+ nubasepoints=number.nubasepoints,
utfchar=utf.char,
utfbyte=utf.byte,
lpegmatch=lpeg.match,
@@ -545,10 +581,18 @@ local format_p=function()
n=n+1
return format("points(a%s)",n)
end
+local format_P=function()
+ n=n+1
+ return format("nupoints(a%s)",n)
+end
local format_b=function()
n=n+1
return format("basepoints(a%s)",n)
end
+local format_B=function()
+ n=n+1
+ return format("nubasepoints(a%s)",n)
+end
local format_t=function(f)
n=n+1
if f and f~="" then
@@ -701,7 +745,7 @@ local builder=Cs { "start",
+V("n")
+V("N")
+V("k")
-+V("r")+V("h")+V("H")+V("u")+V("U")+V("p")+V("b")+V("t")+V("T")+V("l")+V("L")+V("I")+V("w")
++V("r")+V("h")+V("H")+V("u")+V("U")+V("p")+V("P")+V("b")+V("B")+V("t")+V("T")+V("l")+V("L")+V("I")+V("w")
+V("W")
+V("a")
+V("A")
@@ -739,7 +783,9 @@ local builder=Cs { "start",
["u"]=(prefix_any*P("u"))/format_u,
["U"]=(prefix_any*P("U"))/format_U,
["p"]=(prefix_any*P("p"))/format_p,
+ ["P"]=(prefix_any*P("P"))/format_P,
["b"]=(prefix_any*P("b"))/format_b,
+ ["B"]=(prefix_any*P("B"))/format_B,
["t"]=(prefix_tab*P("t"))/format_t,
["T"]=(prefix_tab*P("T"))/format_T,
["l"]=(prefix_any*P("l"))/format_l,
@@ -3312,10 +3358,8 @@ local function stoptiming(instance)
timer.loadtime=timer.loadtime+loadtime
timer.timing=0
timer.starttime=0
- return loadtime
end
end
- return 0
end
local function benchmarktimer(instance)
local timer=timers[instance or "notimer"]
diff --git a/macros/luatex/generic/lualibs/lualibs-lpeg.lua b/macros/luatex/generic/lualibs/lualibs-lpeg.lua
index b0868ba488..50306e4ab6 100644
--- a/macros/luatex/generic/lualibs/lualibs-lpeg.lua
+++ b/macros/luatex/generic/lualibs/lualibs-lpeg.lua
@@ -507,7 +507,7 @@ end
-- todo: cache when string
-function lpeg.replacer(one,two,makefunction,isutf) -- in principle we should sort the keys
+function lpeg.replacer(one,two,makefunction,isutf) -- in principle we should sort the keys but we have a better one anyway
local pattern
local u = isutf and utf8char or 1
if type(one) == "table" then
diff --git a/macros/luatex/generic/lualibs/lualibs-number.lua b/macros/luatex/generic/lualibs/lualibs-number.lua
index 9fd2f82f78..0ec60880d7 100644
--- a/macros/luatex/generic/lualibs/lualibs-number.lua
+++ b/macros/luatex/generic/lualibs/lualibs-number.lua
@@ -1,16 +1,13 @@
if not modules then modules = { } end modules ['l-number'] = {
version = 1.001,
- comment = "companion to luat-lib.mkiv",
+ comment = "companion to luat-lib.mkxl",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files"
}
--- this module will be replaced when we have the bit library .. the number based sets
--- might go away
-
local tostring, tonumber = tostring, tonumber
-local format, floor, match, rep = string.format, math.floor, string.match, string.rep
+local format, match, rep = string.format, string.match, string.rep
local concat, insert = table.concat, table.insert
local lpegmatch = lpeg.match
local floor = math.floor
@@ -18,51 +15,6 @@ local floor = math.floor
number = number or { }
local number = number
--- begin obsolete code --
-
--- if bit32 then
---
--- local btest, bor = bit32.btest, bit32.bor
---
--- function number.bit(p)
--- return 2 ^ (p - 1) -- 1-based indexing
--- end
---
--- number.hasbit = btest
--- number.setbit = bor
---
--- function number.setbit(x,p) -- why not bor?
--- return btest(x,p) and x or x + p
--- end
---
--- function number.clearbit(x,p)
--- return btest(x,p) and x - p or x
--- end
---
--- else
---
--- -- http://ricilake.blogspot.com/2007/10/iterating-bits-in-lua.html
---
--- function number.bit(p)
--- return 2 ^ (p - 1) -- 1-based indexing
--- end
---
--- function number.hasbit(x, p) -- typical call: if hasbit(x, bit(3)) then ...
--- return x % (p + p) >= p
--- end
---
--- function number.setbit(x, p)
--- return (x % (p + p) >= p) and x or x + p
--- end
---
--- function number.clearbit(x, p)
--- return (x % (p + p) >= p) and x - p or x
--- end
---
--- end
-
--- end obsolete code --
-
-- print(number.tobitstring(8))
-- print(number.tobitstring(14))
-- print(number.tobitstring(66))
diff --git a/macros/luatex/generic/lualibs/lualibs-os.lua b/macros/luatex/generic/lualibs/lualibs-os.lua
index 73841074c4..c7584ccce9 100644
--- a/macros/luatex/generic/lualibs/lualibs-os.lua
+++ b/macros/luatex/generic/lualibs/lualibs-os.lua
@@ -359,7 +359,7 @@ elseif name == "macosx" then
elseif find(architecture,"x86_64",1,true) then
platform = "osx-64"
elseif find(architecture,"arm64",1,true) then
- platform = "osx-64"
+ platform = "osx-arm"
else
platform = "osx-ppc"
end
diff --git a/macros/luatex/generic/lualibs/lualibs-package.lua b/macros/luatex/generic/lualibs/lualibs-package.lua
index a35ec3e2a9..ef37aebe74 100644
--- a/macros/luatex/generic/lualibs/lualibs-package.lua
+++ b/macros/luatex/generic/lualibs/lualibs-package.lua
@@ -16,7 +16,7 @@ if not modules then modules = { } end modules ['l-package'] = {
-- -- local mylib = require("libtest")
-- -- local mysql = require("luasql.mysql")
-local type = type
+local type, unpack = type, unpack
local gsub, format, find = string.gsub, string.format, string.find
local insert, remove = table.insert, table.remove
@@ -70,6 +70,7 @@ local helpers = package.helpers or {
methods = {
},
sequence = {
+ "reset loaded",
"already loaded",
"preload table",
"qualified path", -- beware, lua itself doesn't handle qualified paths (prepends ./)
@@ -91,6 +92,7 @@ local builtin = helpers.builtin
local extraluapaths = { }
local extralibpaths = { }
+local checkedfiles = { }
local luapaths = nil -- delayed
local libpaths = nil -- delayed
local oldluapath = nil
@@ -245,10 +247,17 @@ local function loadedaslib(resolved,rawname) -- todo: strip all before first -
-- so, we can do a require("foo/bar") and initialize bar
-- local base = gsub(file.basename(rawname),"%.","_")
local init = "luaopen_" .. gsub(base,"%.","_")
+ local data = { resolved, init, "" }
+ checkedfiles[#checkedfiles+1] = data
if helpers.trace then
helpers.report("calling loadlib with '%s' with init '%s'",resolved,init)
end
- return package.loadlib(resolved,init)
+ local a, b, c = package.loadlib(resolved,init)
+ if not a and type(b) == "string" then
+-- data[3] = gsub(b or "unknown error","[\n\r]","")
+ data[3] = string.fullstrip(b or "unknown error")
+ end
+ return a, b, c -- c can be 'init'
end
helpers.loadedaslib = loadedaslib
@@ -295,6 +304,12 @@ end
helpers.loadedbyname = loadedbyname
+methods["reset loaded"] = function(name)
+ checkedfiles = { }
+ return false
+end
+
+
methods["already loaded"] = function(name)
return package.loaded[name]
end
@@ -344,6 +359,9 @@ end
methods["not loaded"] = function(name)
if helpers.trace then
helpers.report("unable to locate '%s'",name or "?")
+ for i=1,#checkedfiles do
+ helpers.report("checked file '%s', initializer '%s', message '%s'",unpack(checkedfiles[i]))
+ end
end
return nil
end
diff --git a/macros/luatex/generic/lualibs/lualibs-trac-inf.lua b/macros/luatex/generic/lualibs/lualibs-trac-inf.lua
index 3db912be1f..e2736cfb6e 100644
--- a/macros/luatex/generic/lualibs/lualibs-trac-inf.lua
+++ b/macros/luatex/generic/lualibs/lualibs-trac-inf.lua
@@ -129,10 +129,8 @@ local function stoptiming(instance)
timer.loadtime = timer.loadtime + loadtime
timer.timing = 0
timer.starttime = 0
- return loadtime
end
end
- return 0
end
local function benchmarktimer(instance)
diff --git a/macros/luatex/generic/lualibs/lualibs-url.lua b/macros/luatex/generic/lualibs/lualibs-url.lua
index 6f834d778d..2e01ad4080 100644
--- a/macros/luatex/generic/lualibs/lualibs-url.lua
+++ b/macros/luatex/generic/lualibs/lualibs-url.lua
@@ -379,53 +379,53 @@ end
-- print(url.barepath("/test"),url.barepath("test/"),url.barepath("/test/"),url.barepath("test"))
-- print(url.barepath("/x/yz"),url.barepath("x/yz/"),url.barepath("/x/yz/"),url.barepath("x/yz"))
---~ print(url.filename("file:///c:/oeps.txt"))
---~ print(url.filename("c:/oeps.txt"))
---~ print(url.filename("file:///oeps.txt"))
---~ print(url.filename("file:///etc/test.txt"))
---~ print(url.filename("/oeps.txt"))
-
---~ from the spec on the web (sort of):
-
---~ local function test(str)
---~ local t = url.hashed(str)
---~ t.constructed = url.construct(t)
---~ print(table.serialize(t))
---~ end
-
---~ inspect(url.hashed("http://www.pragma-ade.com/test%20test?test=test%20test&x=123%3d45"))
---~ inspect(url.hashed("http://www.pragma-ade.com/test%20test?test=test%20test&x=123%3d45"))
-
---~ test("sys:///./colo-rgb")
-
---~ test("/data/site/output/q2p-develop/resources/ecaboperception4_res/topicresources/58313733/figuur-cow.jpg")
---~ test("file:///M:/q2p/develop/output/q2p-develop/resources/ecaboperception4_res/topicresources/58313733")
---~ test("M:/q2p/develop/output/q2p-develop/resources/ecaboperception4_res/topicresources/58313733")
---~ test("file:///q2p/develop/output/q2p-develop/resources/ecaboperception4_res/topicresources/58313733")
---~ test("/q2p/develop/output/q2p-develop/resources/ecaboperception4_res/topicresources/58313733")
-
---~ test("file:///cow%20with%20spaces")
---~ test("file:///cow%20with%20spaces.pdf")
---~ test("cow%20with%20spaces.pdf")
---~ test("some%20file")
---~ test("/etc/passwords")
---~ test("http://www.myself.com/some%20words.html")
---~ test("file:///c:/oeps.txt")
---~ test("file:///c|/oeps.txt")
---~ test("file:///etc/oeps.txt")
---~ test("file://./etc/oeps.txt")
---~ test("file:////etc/oeps.txt")
---~ test("ftp://ftp.is.co.za/rfc/rfc1808.txt")
---~ test("http://www.ietf.org/rfc/rfc2396.txt")
---~ test("ldap://[2001:db8::7]/c=GB?objectClass?one#what")
---~ test("mailto:John.Doe@example.com")
---~ test("news:comp.infosystems.www.servers.unix")
---~ test("tel:+1-816-555-1212")
---~ test("telnet://192.0.2.16:80/")
---~ test("urn:oasis:names:specification:docbook:dtd:xml:4.1.2")
---~ test("http://www.pragma-ade.com/spaced%20name")
-
---~ test("zip:///oeps/oeps.zip#bla/bla.tex")
---~ test("zip:///oeps/oeps.zip?bla/bla.tex")
-
---~ table.print(url.hashed("/test?test"))
+-- print(url.filename("file:///c:/oeps.txt"))
+-- print(url.filename("c:/oeps.txt"))
+-- print(url.filename("file:///oeps.txt"))
+-- print(url.filename("file:///etc/test.txt"))
+-- print(url.filename("/oeps.txt"))
+
+-- from the spec on the web (sort of):
+
+-- local function test(str)
+-- local t = url.hashed(str)
+-- t.constructed = url.construct(t)
+-- print(table.serialize(t))
+-- end
+
+-- inspect(url.hashed("http://www.pragma-ade.com/test%20test?test=test%20test&x=123%3d45"))
+-- inspect(url.hashed("http://www.pragma-ade.com/test%20test?test=test%20test&x=123%3d45"))
+
+-- test("sys:///./colo-rgb")
+
+-- test("/data/site/output/q2p-develop/resources/ecaboperception4_res/topicresources/58313733/figuur-cow.jpg")
+-- test("file:///M:/q2p/develop/output/q2p-develop/resources/ecaboperception4_res/topicresources/58313733")
+-- test("M:/q2p/develop/output/q2p-develop/resources/ecaboperception4_res/topicresources/58313733")
+-- test("file:///q2p/develop/output/q2p-develop/resources/ecaboperception4_res/topicresources/58313733")
+-- test("/q2p/develop/output/q2p-develop/resources/ecaboperception4_res/topicresources/58313733")
+
+-- test("file:///cow%20with%20spaces")
+-- test("file:///cow%20with%20spaces.pdf")
+-- test("cow%20with%20spaces.pdf")
+-- test("some%20file")
+-- test("/etc/passwords")
+-- test("http://www.myself.com/some%20words.html")
+-- test("file:///c:/oeps.txt")
+-- test("file:///c|/oeps.txt")
+-- test("file:///etc/oeps.txt")
+-- test("file://./etc/oeps.txt")
+-- test("file:////etc/oeps.txt")
+-- test("ftp://ftp.is.co.za/rfc/rfc1808.txt")
+-- test("http://www.ietf.org/rfc/rfc2396.txt")
+-- test("ldap://[2001:db8::7]/c=GB?objectClass?one#what")
+-- test("mailto:John.Doe@example.com")
+-- test("news:comp.infosystems.www.servers.unix")
+-- test("tel:+1-816-555-1212")
+-- test("telnet://192.0.2.16:80/")
+-- test("urn:oasis:names:specification:docbook:dtd:xml:4.1.2")
+-- test("http://www.pragma-ade.com/spaced%20name")
+
+-- test("zip:///oeps/oeps.zip#bla/bla.tex")
+-- test("zip:///oeps/oeps.zip?bla/bla.tex")
+
+-- table.print(url.hashed("/test?test"))
diff --git a/macros/luatex/generic/lualibs/lualibs-util-str.lua b/macros/luatex/generic/lualibs/lualibs-util-str.lua
index 2d3f4d669f..0d1f39de9d 100644
--- a/macros/luatex/generic/lualibs/lualibs-util-str.lua
+++ b/macros/luatex/generic/lualibs/lualibs-util-str.lua
@@ -70,27 +70,63 @@ local function points(n)
n = n * ptf
if n % 1 == 0 then
return format("%ipt",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fpt",n)) -- plural as we need to keep the pt
+ end
+end
+
+local function nupoints(n)
+ if n == 0 then
+ return "0"
+ end
+ n = tonumber(n)
+ if not n or n == 0 then
+ return "0"
+ end
+ n = n * ptf
+ if n % 1 == 0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n) -- no strip
end
- return lpegmatch(stripzeros,format("%.5fpt",n)) -- plural as we need to keep the pt
end
local function basepoints(n)
if n == 0 then
- return "0pt"
+ return "0bp"
end
n = tonumber(n)
if not n or n == 0 then
- return "0pt"
+ return "0bp"
end
n = n * bpf
if n % 1 == 0 then
return format("%ibp",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fbp",n)) -- plural as we need to keep the pt
+ end
+end
+
+local function nubasepoints(n)
+ if n == 0 then
+ return "0"
+ end
+ n = tonumber(n)
+ if not n or n == 0 then
+ return "0"
+ end
+ n = n * bpf
+ if n % 1 == 0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n) -- no strip
end
- return lpegmatch(stripzeros,format("%.5fbp",n)) -- plural as we need to keep the pt
end
-number.points = points
-number.basepoints = basepoints
+number.points = points
+number.nupoints = nupoints
+number.basepoints = basepoints
+number.nubasepoints = nubasepoints
-- str = " \n \ntest \n test\ntest "
-- print("["..string.gsub(string.collapsecrlf(str),"\n","+").."]")
@@ -357,7 +393,9 @@ end
-- U+hexadecimal %...u character number
-- U+HEXADECIMAL %...U character number
-- points %p number (scaled points)
+-- nupoints %P number (scaled points) / without unit / always 5 decimals
-- basepoints %b number (scaled points)
+-- nubasepoints %B number (scaled points) / without unit / always 5 decimals
-- table concat %...t table
-- table concat %{.}t table
-- serialize %...T sequenced (no nested tables)
@@ -616,7 +654,9 @@ local environment = {
concat = table.concat,
signed = number.signed,
points = number.points,
+ nupoints = number.nupoints,
basepoints = number.basepoints,
+ nubasepoints = number.nubasepoints,
utfchar = utf.char,
utfbyte = utf.byte,
lpegmatch = lpeg.match,
@@ -879,11 +919,21 @@ local format_p = function()
return format("points(a%s)",n)
end
+local format_P = function()
+ n = n + 1
+ return format("nupoints(a%s)",n)
+end
+
local format_b = function()
n = n + 1
return format("basepoints(a%s)",n)
end
+local format_B = function()
+ n = n + 1
+ return format("nubasepoints(a%s)",n)
+end
+
local format_t = function(f)
n = n + 1
if f and f ~= "" then
@@ -1125,7 +1175,7 @@ local builder = Cs { "start",
--
+ V("r")
+ V("h") + V("H") + V("u") + V("U")
- + V("p") + V("b")
+ + V("p") + V("P") + V("b") + V("B")
+ V("t") + V("T")
+ V("l") + V("L")
+ V("I")
@@ -1174,8 +1224,10 @@ local builder = Cs { "start",
["H"] = (prefix_any * P("H")) / format_H, -- %H => 0x0A1B2 (when - no 0x) was V
["u"] = (prefix_any * P("u")) / format_u, -- %u => u+0a1b2 (when - no u+)
["U"] = (prefix_any * P("U")) / format_U, -- %U => U+0A1B2 (when - no U+)
- ["p"] = (prefix_any * P("p")) / format_p, -- %p => 12.345pt / maybe: P (and more units)
- ["b"] = (prefix_any * P("b")) / format_b, -- %b => 12.342bp / maybe: B (and more units)
+ ["p"] = (prefix_any * P("p")) / format_p, -- %p => 12.345pt
+ ["P"] = (prefix_any * P("P")) / format_P, -- %p => 12.345
+ ["b"] = (prefix_any * P("b")) / format_b, -- %b => 12.342bp
+ ["B"] = (prefix_any * P("B")) / format_B, -- %b => 12.342
["t"] = (prefix_tab * P("t")) / format_t, -- %t => concat
["T"] = (prefix_tab * P("T")) / format_T, -- %t => sequenced
["l"] = (prefix_any * P("l")) / format_l, -- %l => boolean
diff --git a/macros/luatex/generic/lualibs/lualibs.dtx b/macros/luatex/generic/lualibs/lualibs.dtx
index 7246e8541e..73c5aafcc1 100644
--- a/macros/luatex/generic/lualibs/lualibs.dtx
+++ b/macros/luatex/generic/lualibs/lualibs.dtx
@@ -1,9 +1,9 @@
% \iffalse meta-comment
%
-% Copyright (C) 2009--2019 by
+% Copyright (C) 2009--2021 by
%
% PRAGMA ADE / ConTeXt Development Team
-% The LuaLaTeX Dev Team
+% The LaTeX Project Team
%
% See ConTeXt's mreadme.pdf for the license.
%
@@ -37,7 +37,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: lualibs 2020-12-30 v2.73 Lua additional functions.}
+\Msg{* Package: lualibs 2021-05-20 v2.74 Lua additional functions.}
\Msg{************************************************************************}
\keepsilent
@@ -48,9 +48,9 @@
\preamble
This is a generated file.
-Copyright (C) 2009--2019 by
+Copyright (C) 2009--2021 by
PRAGMA ADE / ConTeXt Development Team
- The LuaLaTeX Dev Team
+ The LaTeX Project Team
See ConTeXt's mreadme.pdf for the license.
@@ -107,7 +107,7 @@ and lualibs-extended.lua.
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{lualibs.drv}
- [2020/12/30 v2.73 Lua Libraries.]
+ [2021/05/20 v2.74 Lua Libraries.]
\documentclass{ltxdoc}
\usepackage{fancyvrb,xspace}
\usepackage[x11names]{xcolor}
@@ -115,8 +115,7 @@ and lualibs-extended.lua.
\def\primarycolor{DodgerBlue4} %%-> rgb 16 78 139 | #104e8b
\def\secondarycolor{Goldenrod4} %%-> rgb 139 105 200 | #8b6914
%
-\usepackage[
- bookmarks=true,
+\hypersetup{
colorlinks=true,
linkcolor=\primarycolor,
urlcolor=\secondarycolor,
@@ -124,8 +123,8 @@ and lualibs-extended.lua.
pdftitle={The lualibs package},
pdfsubject={Port of the ConTeXt Lua libraries},
pdfauthor={Elie Roux & Philipp Gesang},
- pdfkeywords={luatex, lualatex, unicode, opentype}
-]{hyperref}
+ pdfkeywords={luatex, lualatex, unicode, opentype}}
+
\newcommand*\email[1]{\href{mailto:#1}{#1}}
\usepackage{fontspec}
\setmainfont[
@@ -208,10 +207,10 @@ and lualibs-extended.lua.
% \GetFileInfo{lualibs.drv}
%
% \title{The \identifier{lualibs} package}
-% \date{2020/12/30 v2.73}
+% \date{2021/05/20 v2.74}
% \author{Élie Roux · \email{elie.roux@telecom-bretagne.eu}\\
% Philipp Gesang · \email{phg@phi-gamma.net}\\
-% The \LaTeX3 Project · \email{https://github.com/latex3/lualibs/}\\
+% The \LaTeX{} Project · \email{https://github.com/latex3/lualibs/}\\
% }
%
% \maketitle
@@ -429,8 +428,8 @@ lualibs = lualibs or { }
lualibs.module_info = {
name = "lualibs",
- version = "2.73", --TAGVERSION
- date = "2020-12-30", --TAGDATE
+ version = "2.74", --TAGVERSION
+ date = "2021-05-20", --TAGDATE
description = "ConTeXt Lua standard libraries.",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -583,8 +582,8 @@ local loadmodule = lualibs.loadmodule
local lualibs_basic_module = {
name = "lualibs-basic",
- version = "2.73", --TAGVERSION
- date = "2020-12-30", --TAGDATE
+ version = "2.74", --TAGVERSION
+ date = "2021-05-20", --TAGDATE
description = "ConTeXt Lua libraries -- basic collection.",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -665,8 +664,8 @@ lualibs = lualibs or { }
local lualibs_extended_module = {
name = "lualibs-extended",
- version = "2.73", --TAGVERSION
- date = "2020-12-30", --TAGDATE
+ version = "2.74", --TAGVERSION
+ date = "2021-05-20", --TAGDATE
description = "ConTeXt Lua libraries -- extended collection.",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
copyright = "PRAGMA ADE / ConTeXt Development Team",
diff --git a/macros/luatex/generic/lualibs/lualibs.pdf b/macros/luatex/generic/lualibs/lualibs.pdf
index 10274b447b..23df3045e6 100644
--- a/macros/luatex/generic/lualibs/lualibs.pdf
+++ b/macros/luatex/generic/lualibs/lualibs.pdf
Binary files differ
diff --git a/macros/luatex/generic/luaotfload/NEWS b/macros/luatex/generic/luaotfload/NEWS
index 5b17fe46c1..f6e4e0fcb7 100644
--- a/macros/luatex/generic/luaotfload/NEWS
+++ b/macros/luatex/generic/luaotfload/NEWS
@@ -1,5 +1,11 @@
Change History
--------------
+2021-05-21 luaotfload v3.18
+
+ * Allow using variable fonts without explicitly specifying any axis values
+ * The fontloader has been synced with the context code from 2021-05-20
+ * Multiple small fixes, mostly concerning discretionaries in harf mode.
+
2021-01-08 luaotfload v3.17
* The fontloader has been synced with the context code from 2021-01-07.
diff --git a/macros/luatex/generic/luaotfload/README.md b/macros/luatex/generic/luaotfload/README.md
index 6704e66b90..a58b1c99fb 100644
--- a/macros/luatex/generic/luaotfload/README.md
+++ b/macros/luatex/generic/luaotfload/README.md
@@ -1,8 +1,8 @@
# The Luaotfload Package
-VERSION: 3.17
+VERSION: 3.18
-DATE: 2021-01-08
+DATE: 2021-05-21
## Description
diff --git a/macros/luatex/generic/luaotfload/filegraph.pdf b/macros/luatex/generic/luaotfload/filegraph.pdf
index c019d96ba8..0704762fd1 100644
--- a/macros/luatex/generic/luaotfload/filegraph.pdf
+++ b/macros/luatex/generic/luaotfload/filegraph.pdf
Binary files differ
diff --git a/macros/luatex/generic/luaotfload/fontloader-2021-01-07.lua b/macros/luatex/generic/luaotfload/fontloader-2021-05-20.lua
index e333584b00..f541668099 100644
--- a/macros/luatex/generic/luaotfload/fontloader-2021-01-07.lua
+++ b/macros/luatex/generic/luaotfload/fontloader-2021-05-20.lua
@@ -1,6 +1,6 @@
--[[info-----------------------------------------------------------------------
Luaotfload fontloader package
- build 2021-01-07 23:19:37
+ build 2021-05-20 19:43:52
-------------------------------------------------------------------------------
© 2021 PRAGMA ADE / ConTeXt Development Team
@@ -63,7 +63,7 @@
--info]]-----------------------------------------------------------------------
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “data-con” 23a0f5386d46a1c157ae82a373e35fa0] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “data-con” 23a0f5386d46a1c157ae82a373e35fa0] ---
if not modules then modules={} end modules ['data-con']={
version=1.100,
@@ -184,10 +184,10 @@ function containers.cleanname(name)
return (gsub(lower(name),"[^%w\128-\255]+","-"))
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “data-con”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “data-con”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “basics-nod” 4b5c3c63e19df1b3f37fae7f87c25bda] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “basics-nod” b2e0a0e5e1e27349aed464fa738b8db1] ---
if not modules then modules={} end modules ['luatex-fonts-nod']={
version=1.001,
@@ -241,8 +241,8 @@ nodes.nodecodes=nodecodes
nodes.glyphcodes=glyphcodes
nodes.disccodes=disccodes
nodes.dirvalues={ lefttoright=0,righttoleft=1 }
-nodes.handlers.protectglyphs=node.protect_glyphs
-nodes.handlers.unprotectglyphs=node.unprotect_glyphs
+nodes.handlers.protectglyphs=node.protectglyphs or node.protect_glyphs
+nodes.handlers.unprotectglyphs=node.unprotectglyphs or node.unprotect_glyphs
local direct=node.direct
local nuts={}
nodes.nuts=nuts
@@ -286,31 +286,33 @@ nuts.setprev=direct.setprev
nuts.setsplit=direct.setsplit
nuts.setsubtype=direct.setsubtype
nuts.setwidth=direct.setwidth
-nuts.getglyphdata=nuts.getattr
-nuts.setglyphdata=nuts.setattr
-nuts.ischar=direct.is_char
-nuts.isglyph=direct.is_glyph
+nuts.getglyphdata=nuts.getattribute or nuts.getattr
+nuts.setglyphdata=nuts.setattribute or nuts.setattr
+nuts.ischar=direct.ischar or direct.is_char
+nuts.isglyph=direct.isglyph or direct.is_glyph
nuts.copy=direct.copy
-nuts.copy_list=direct.copy_list
-nuts.copy_node=direct.copy
-nuts.end_of_math=direct.end_of_math
+nuts.copynode=direct.copy
+nuts.copylist=direct.copylist or direct.copy_list
+nuts.endofmath=direct.endofmath or direct.end_of_math
nuts.flush=direct.flush
-nuts.flush_list=direct.flush_list
-nuts.flush_node=direct.flush_node
+nuts.flushlist=direct.flushlist or direct.flush_list
+nuts.flushnode=direct.flushnode or direct.flush_node
nuts.free=direct.free
-nuts.insert_after=direct.insert_after
-nuts.insert_before=direct.insert_before
-nuts.is_node=direct.is_node
+nuts.insertafter=direct.insertafter or direct.insert_after
+nuts.insertbefore=direct.insertbefore or direct.insert_before
+nuts.isnode=direct.isnode or direct.is_node
+nuts.isdirect=direct.isdirect or direct.is_direct
+nuts.isnut=direct.isdirect or direct.is_direct
nuts.kerning=direct.kerning
nuts.ligaturing=direct.ligaturing
nuts.new=direct.new
nuts.remove=direct.remove
nuts.tail=direct.tail
nuts.traverse=direct.traverse
-nuts.traverse_char=direct.traverse_char
-nuts.traverse_glyph=direct.traverse_glyph
-nuts.traverse_id=direct.traverse_id
-local propertydata=direct.get_properties_table()
+nuts.traversechar=direct.traversechar or direct.traverse_char
+nuts.traverseglyph=direct.traverseglyph or direct.traverse_glyph
+nuts.traverseid=direct.traverseid or direct.traverse_id
+local propertydata=(direct.getpropertiestable or direct.get_properties_table)()
nodes.properties={ data=propertydata }
if direct.set_properties_mode then
direct.set_properties_mode(true,true)
@@ -343,10 +345,10 @@ local setfield=nuts.setfield
local getsubtype=nuts.getsubtype
local isglyph=nuts.isglyph
local find_tail=nuts.tail
-local flush_list=nuts.flush_list
-local flush_node=nuts.flush_node
-local traverse_id=nuts.traverse_id
-local copy_node=nuts.copy_node
+local flushlist=nuts.flushlist
+local flushnode=nuts.flushnode
+local traverseid=nuts.traverseid
+local copynode=nuts.copynode
local glyph_code=nodes.nodecodes.glyph
local ligature_code=nodes.glyphcodes.ligature
do
@@ -359,31 +361,31 @@ do
end
end
do
- local get_components=node.direct.getcomponents
- local set_components=node.direct.setcomponents
- local function copy_no_components(g,copyinjection)
- local components=get_components(g)
+ local getcomponents=node.direct.getcomponents
+ local setcomponents=node.direct.setcomponents
+ local function copynocomponents(g,copyinjection)
+ local components=getcomponents(g)
if components then
- set_components(g)
- local n=copy_node(g)
+ setcomponents(g)
+ local n=copynode(g)
if copyinjection then
copyinjection(n,g)
end
- set_components(g,components)
+ setcomponents(g,components)
return n
else
- local n=copy_node(g)
+ local n=copynode(g)
if copyinjection then
copyinjection(n,g)
end
return n
end
end
- local function copy_only_glyphs(current)
+ local function copyonlyglyphs(current)
local head=nil
local previous=nil
- for n in traverse_id(glyph_code,current) do
- n=copy_node(n)
+ for n in traverseid(glyph_code,current) do
+ n=copynode(n)
if head then
setlink(previous,n)
else
@@ -393,14 +395,14 @@ do
end
return head
end
- local function count_components(start,marks)
+ local function countcomponents(start,marks)
local char=isglyph(start)
if char then
if getsubtype(start)==ligature_code then
local n=0
- local components=get_components(start)
+ local components=getcomponents(start)
while components do
- n=n+count_components(components,marks)
+ n=n+countcomponents(components,marks)
components=getnext(components)
end
return n
@@ -410,24 +412,26 @@ do
end
return 0
end
- local function flush_components()
+ local function flushcomponents()
end
- nuts.set_components=set_components
- nuts.get_components=get_components
- nuts.copy_only_glyphs=copy_only_glyphs
- nuts.copy_no_components=copy_no_components
- nuts.count_components=count_components
- nuts.flush_components=flush_components
+ nuts.components={
+ set=setcomponents,
+ get=getcomponents,
+ copyonlyglyphs=copyonlyglyphs,
+ copynocomponents=copynocomponents,
+ count=countcomponents,
+ flush=flushcomponents,
+ }
end
-nuts.uses_font=direct.uses_font
+nuts.usesfont=direct.usesfont or direct.uses_font
do
local dummy=tonut(node.new("glyph"))
nuts.traversers={
- glyph=nuts.traverse_id(nodecodes.glyph,dummy),
- glue=nuts.traverse_id(nodecodes.glue,dummy),
- disc=nuts.traverse_id(nodecodes.disc,dummy),
- boundary=nuts.traverse_id(nodecodes.boundary,dummy),
- char=nuts.traverse_char(dummy),
+ glyph=nuts.traverseid(nodecodes.glyph,dummy),
+ glue=nuts.traverseid(nodecodes.glue,dummy),
+ disc=nuts.traverseid(nodecodes.disc,dummy),
+ boundary=nuts.traverseid(nodecodes.boundary,dummy),
+ char=nuts.traversechar(dummy),
node=nuts.traverse(dummy),
}
end
@@ -444,16 +448,16 @@ if not nuts.setreplace then
end
do
local getsubtype=nuts.getsubtype
- function nuts.start_of_par(n)
+ function nuts.startofpar(n)
local s=getsubtype(n)
return s==0 or s==2
end
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “basics-nod”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “basics-nod”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “basics-chr” 64fafe4eaf55d64aead6513c1e74a024] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “basics-chr” 64fafe4eaf55d64aead6513c1e74a024] ---
characters=characters or {}
@@ -4063,10 +4067,10 @@ characters.indicgroups={
},
}
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “basics-chr”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “basics-chr”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-ini” 5343de60613adb24cdd7a8d2ee1d153c] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-ini” 5343de60613adb24cdd7a8d2ee1d153c] ---
if not modules then modules={} end modules ['font-ini']={
version=1.001,
@@ -4107,10 +4111,10 @@ if node and not tex.getfontoffamily then
tex.getfontoffamily=node.family_font
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-ini”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-ini”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “fonts-mis” 17e967c9ec4d001deefd43ddf25e98f7] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “fonts-mis” 17e967c9ec4d001deefd43ddf25e98f7] ---
if not modules then modules={} end modules ['luatex-font-mis']={
version=1.001,
@@ -4142,10 +4146,10 @@ function font.each()
return table.sortedhash(fonts.hashes.identifiers)
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “fonts-mis”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “fonts-mis”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-con” 724e5dd14aec2d4d189f8619898004cf] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-con” 724e5dd14aec2d4d189f8619898004cf] ---
if not modules then modules={} end modules ['font-con']={
version=1.001,
@@ -5513,10 +5517,10 @@ function constructors.addcoreunicodes(unicodes)
return unicodes
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-con”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-con”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “fonts-enc” 5ff4ca50493d7c4ecea0e15c203099f0] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “fonts-enc” 5ff4ca50493d7c4ecea0e15c203099f0] ---
if not modules then modules={} end modules ['luatex-font-enc']={
version=1.001,
@@ -5585,10 +5589,10 @@ function encodings.load(filename)
return containers.write(encodings.cache,name,data)
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “fonts-enc”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “fonts-enc”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-cid” 22b0367742fb253deef84ef7ccf5e8de] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-cid” 22b0367742fb253deef84ef7ccf5e8de] ---
if not modules then modules={} end modules ['font-cid']={
version=1.001,
@@ -5739,10 +5743,10 @@ function cid.getmap(specification)
return found
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-cid”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-cid”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-map” c4a39db5ad822b348aa61bca5f4a599a] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-map” c4a39db5ad822b348aa61bca5f4a599a] ---
if not modules then modules={} end modules ['font-map']={
version=1.001,
@@ -6150,10 +6154,10 @@ function mappings.addtounicode(data,filename,checklookups,forceligatures)
end
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-map”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-map”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-vfc” a81c29eda98cd62cbebdb6c93544b50d] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-vfc” a81c29eda98cd62cbebdb6c93544b50d] ---
if not modules then modules={} end modules ['font-vfc']={
version=1.001,
@@ -6250,10 +6254,10 @@ helpers.commands=utilities.storage.allocate {
dummy=dummy,
}
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-vfc”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-vfc”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-otr” 64dcbbc7107538723990e1119a80a9f8] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-otr” ad238624c9ebd488d4bbe9af3b620189] ---
if not modules then modules={} end modules ['font-otr']={
version=1.001,
@@ -7010,8 +7014,6 @@ readers.post=function(f,fontdata,specification)
if length>0 then
glyphs[mapping].name=readstring(f,length)
else
- report("quit post name fetching at %a of %a: %s",i,maxnames,"overflow")
- break
end
end
end
@@ -8097,10 +8099,10 @@ function readers.extend(fontdata)
end
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-otr”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-otr”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-oti” 309a75f9c14b77d87e94eba827dc4e71] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-oti” 309a75f9c14b77d87e94eba827dc4e71] ---
if not modules then modules={} end modules ['font-oti']={
version=1.001,
@@ -8243,10 +8245,10 @@ function otffeatures.checkeddefaultlanguage(featuretype,autolanguage,languages)
end
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-oti”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-oti”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-ott” 673ed11e1d159997f535bfec5fa73808] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-ott” 3f67b1b1d40bbc222681d8db4aff0f42] ---
if not modules then modules={} end modules ["font-ott"]={
version=1.001,
@@ -9362,10 +9364,10 @@ function otffeatures.normalize(features,wrap)
end
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-ott”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-ott”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-cff” 2b677fad52d9999d0685e8525271a8cc] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-cff” 01e7c6fbc8961a566f4e4f8cbedb7004] ---
if not modules then modules={} end modules ['font-cff']={
version=1.001,
@@ -9377,7 +9379,7 @@ if not modules then modules={} end modules ['font-cff']={
}
local next,type,tonumber,rawget=next,type,tonumber,rawget
local byte,char,gmatch,sub=string.byte,string.char,string.gmatch,string.sub
-local concat,remove,unpack=table.concat,table.remove,table.unpack
+local concat,insert,remove,unpack=table.concat,table.insert,table.remove,table.unpack
local floor,abs,round,ceil,min,max=math.floor,math.abs,math.round,math.ceil,math.min,math.max
local P,C,R,S,C,Cs,Ct=lpeg.P,lpeg.C,lpeg.R,lpeg.S,lpeg.C,lpeg.Cs,lpeg.Ct
local lpegmatch=lpeg.match
@@ -10981,8 +10983,34 @@ do
showstate(reverse[t] or "<action>")
end
if top>0 then
- for i=1,top do
- r=r+1;result[r]=encode[stack[i]]
+ if t==8 and top>48 then
+ local n=0
+ for i=1,top do
+ if n==48 then
+ local zero=encode[0]
+ local res3=result[r-3]
+ local res2=result[r-2]
+ local res1=result[r-1]
+ local res0=result[r]
+ result[r-3]=zero
+ result[r-2]=zero
+ r=r+1;result[r]=chars[t]
+ r=r+1;result[r]=zero
+ r=r+1;result[r]=zero
+ r=r+1;result[r]=res3
+ r=r+1;result[r]=res2
+ r=r+1;result[r]=res1
+ r=r+1;result[r]=res0
+ n=1
+ else
+ n=n+1
+ end
+ r=r+1;result[r]=encode[stack[i]]
+ end
+ else
+ for i=1,top do
+ r=r+1;result[r]=encode[stack[i]]
+ end
end
top=0
end
@@ -11564,10 +11592,10 @@ function readers.cffcheck(filename)
end
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-cff”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-cff”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-ttf” ffffc827e1bcddc33a2b615340ecff7f] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-ttf” ffffc827e1bcddc33a2b615340ecff7f] ---
if not modules then modules={} end modules ['font-ttf']={
version=1.001,
@@ -12738,10 +12766,10 @@ function readers.gvar(f,fontdata,specification,glyphdata,shapedata)
end
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-ttf”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-ttf”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-dsp” 174ce11f3ba0bddf270f48d8d2addd56] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-dsp” 174ce11f3ba0bddf270f48d8d2addd56] ---
if not modules then modules={} end modules ['font-dsp']={
version=1.001,
@@ -16017,10 +16045,10 @@ function readers.mvar(f,fontdata,specification)
end
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-dsp”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-dsp”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-oup” 6f46aa00ae1c20c43f8ffaf329dc8695] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-oup” 4eb2f26e51835239e26a8df2ecf04366] ---
if not modules then modules={} end modules ['font-oup']={
version=1.001,
@@ -18264,6 +18292,28 @@ local function checkkerns(lookup)
end
return kerned
end
+local strip_pairs=true
+local compact_pairs=true
+local compact_singles=true
+local merge_pairs=true
+local merge_singles=true
+local merge_substitutions=true
+local merge_alternates=true
+local merge_multiples=true
+local merge_ligatures=true
+local merge_cursives=true
+local merge_marks=true
+directives.register("otf.strip.pairs",function(v) strip_pairs=v end)
+directives.register("otf.compact.pairs",function(v) compact_pairs=v end)
+directives.register("otf.compact.singles",function(v) compact_singles=v end)
+directives.register("otf.merge.pairs",function(v) merge_pairs=v end)
+directives.register("otf.merge.singles",function(v) merge_singles=v end)
+directives.register("otf.merge.substitutions",function(v) merge_substitutions=v end)
+directives.register("otf.merge.alternates",function(v) merge_alternates=v end)
+directives.register("otf.merge.multiples",function(v) merge_multiples=v end)
+directives.register("otf.merge.ligatures",function(v) merge_ligatures=v end)
+directives.register("otf.merge.cursives",function(v) merge_cursives=v end)
+directives.register("otf.merge.marks",function(v) merge_marks=v end)
local function checkpairs(lookup)
local steps=lookup.steps
local nofsteps=lookup.nofsteps
@@ -18311,26 +18361,27 @@ local function checkpairs(lookup)
end
return kerned
end
-local compact_pairs=true
-local compact_singles=true
-local merge_pairs=true
-local merge_singles=true
-local merge_substitutions=true
-local merge_alternates=true
-local merge_multiples=true
-local merge_ligatures=true
-local merge_cursives=true
-local merge_marks=true
-directives.register("otf.compact.pairs",function(v) compact_pairs=v end)
-directives.register("otf.compact.singles",function(v) compact_singles=v end)
-directives.register("otf.merge.pairs",function(v) merge_pairs=v end)
-directives.register("otf.merge.singles",function(v) merge_singles=v end)
-directives.register("otf.merge.substitutions",function(v) merge_substitutions=v end)
-directives.register("otf.merge.alternates",function(v) merge_alternates=v end)
-directives.register("otf.merge.multiples",function(v) merge_multiples=v end)
-directives.register("otf.merge.ligatures",function(v) merge_ligatures=v end)
-directives.register("otf.merge.cursives",function(v) merge_cursives=v end)
-directives.register("otf.merge.marks",function(v) merge_marks=v end)
+local function strippairs(lookup)
+ local steps=lookup.steps
+ local nofsteps=lookup.nofsteps
+ local stripped=0
+ for i=1,nofsteps do
+ local step=steps[i]
+ if step.format=="pair" then
+ local coverage=step.coverage
+ for g1,d1 in next,coverage do
+ for g2,d2 in next,d1 do
+ if d2[2] then
+ elseif d2[1]==true then
+ d1[g2]=nil
+ stripped=stripped+1
+ end
+ end
+ end
+ end
+ end
+ return stripped
+end
function readers.compact(data)
if not data or data.compacted then
return
@@ -18338,6 +18389,7 @@ function readers.compact(data)
data.compacted=true
end
local resources=data.resources
+ local stripped=0
local merged=0
local kerned=0
local allsteps=0
@@ -18375,6 +18427,9 @@ function readers.compact(data)
kerned=kerned+checkkerns(lookup)
end
elseif kind=="gpos_pair" then
+ if strip_pairs then
+ stripped=stripped+strippairs(lookup)
+ end
if merge_pairs then
merged=merged+mergesteps_2(lookup)
end
@@ -18415,6 +18470,9 @@ function readers.compact(data)
compact("sequences")
compact("sublookups")
if trace_optimizations then
+ if stripped>0 then
+ report_optimizations("%i zero positions stripped before merging",stripped)
+ end
if merged>0 then
report_optimizations("%i steps of %i removed due to merging",merged,allsteps)
end
@@ -18661,10 +18719,10 @@ function readers.expand(data)
expandlookups(sublookups)
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-oup”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-oup”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-otl” f4e6652a191003493389de230b14cfb3] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-otl” 6f701653de713e8aa80d82c7cdf32d75] ---
if not modules then modules={} end modules ['font-otl']={
version=1.001,
@@ -18692,7 +18750,7 @@ local trace_defining=false registertracker("fonts.defining",function(v) trace_d
local report_otf=logs.reporter("fonts","otf loading")
local fonts=fonts
local otf=fonts.handlers.otf
-otf.version=3.113
+otf.version=3.116
otf.cache=containers.define("fonts","otl",otf.version,true)
otf.svgcache=containers.define("fonts","svg",otf.version,true)
otf.pngcache=containers.define("fonts","png",otf.version,true)
@@ -19145,6 +19203,7 @@ local function read_from_otf(specification)
if tfmdata then
tfmdata.properties.name=specification.name
tfmdata.properties.sub=specification.sub
+ tfmdata.properties.id=specification.id
tfmdata=constructors.scale(tfmdata,specification)
local allfeatures=tfmdata.shared.features or specification.features.normal
constructors.applymanipulators("otf",tfmdata,allfeatures,trace_features,report_otf)
@@ -19370,10 +19429,10 @@ otf.coverup={
end
}
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-otl”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-otl”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-oto” 2b1d6bc63b2ebf8f2655a15e1cda6541] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-oto” 2b1d6bc63b2ebf8f2655a15e1cda6541] ---
if not modules then modules={} end modules ['font-oto']={
version=1.001,
@@ -19831,10 +19890,10 @@ registerotffeature {
}
otf.basemodeinitializer=featuresinitializer
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-oto”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-oto”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-otj” 8de59cb9b043e5f73c6b9f7cc8f6978e] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-otj” b2c165bd6771a57633f992d07384b739] ---
if not modules then modules={} end modules ['font-otj']={
version=1.001,
@@ -19884,6 +19943,8 @@ local getoffsets=nuts.getoffsets
local getboth=nuts.getboth
local getdisc=nuts.getdisc
local setdisc=nuts.setdisc
+local getreplace=nuts.getreplace
+local setreplace=nuts.setreplace
local setoffsets=nuts.setoffsets
local ischar=nuts.ischar
local getkern=nuts.getkern
@@ -19893,8 +19954,8 @@ local setwidth=nuts.setwidth
local getwidth=nuts.getwidth
local nextchar=nuts.traversers.char
local nextglue=nuts.traversers.glue
-local insert_node_before=nuts.insert_before
-local insert_node_after=nuts.insert_after
+local insertnodebefore=nuts.insertbefore
+local insertnodeafter=nuts.insertafter
local properties=nodes.properties.data
local fontkern=nuts.pool and nuts.pool.fontkern
local italickern=nuts.pool and nuts.pool.italickern
@@ -19908,7 +19969,7 @@ end)
if not fontkern then
local thekern=nuts.new("kern",0)
local setkern=nuts.setkern
- local copy_node=nuts.copy_node
+ local copy_node=nuts.copy
fontkern=function(k)
local n=copy_node(thekern)
setkern(n,k)
@@ -19918,7 +19979,7 @@ end
if not italickern then
local thekern=nuts.new("kern",3)
local setkern=nuts.setkern
- local copy_node=nuts.copy_node
+ local copy_node=nuts.copy
italickern=function(k)
local n=copy_node(thekern)
setkern(n,k)
@@ -20379,12 +20440,12 @@ local function inject_kerns_only(head,where)
if leftkern and leftkern~=0 then
if prev and getid(prev)==glue_code then
if useitalickerns then
- head=insert_node_before(head,current,italickern(leftkern))
+ head=insertnodebefore(head,current,italickern(leftkern))
else
setwidth(prev,getwidth(prev)+leftkern)
end
else
- head=insert_node_before(head,current,fontkern(leftkern))
+ head=insertnodebefore(head,current,fontkern(leftkern))
end
end
end
@@ -20438,7 +20499,7 @@ local function inject_kerns_only(head,where)
if i then
local leftkern=i.leftkern
if leftkern and leftkern~=0 then
- pre=insert_node_before(pre,n,fontkern(leftkern))
+ pre=insertnodebefore(pre,n,fontkern(leftkern))
done=true
end
end
@@ -20453,7 +20514,7 @@ local function inject_kerns_only(head,where)
if i then
local leftkern=i.leftkern
if leftkern and leftkern~=0 then
- post=insert_node_before(post,n,fontkern(leftkern))
+ post=insertnodebefore(post,n,fontkern(leftkern))
done=true
end
end
@@ -20468,7 +20529,7 @@ local function inject_kerns_only(head,where)
if i then
local leftkern=i.leftkern
if leftkern and leftkern~=0 then
- replace=insert_node_before(replace,n,fontkern(leftkern))
+ replace=insertnodebefore(replace,n,fontkern(leftkern))
done=true
end
end
@@ -20530,36 +20591,34 @@ local function inject_positions_only(head,where)
rightkern=0
elseif prev and getid(prev)==glue_code then
if useitalickerns then
- head=insert_node_before(head,current,italickern(leftkern))
+ head=insertnodebefore(head,current,italickern(leftkern))
else
setwidth(prev,getwidth(prev)+leftkern)
end
else
- head=insert_node_before(head,current,fontkern(leftkern))
+ head=insertnodebefore(head,current,fontkern(leftkern))
end
end
if rightkern and rightkern~=0 then
if next and getid(next)==glue_code then
if useitalickerns then
- insert_node_after(head,current,italickern(rightkern))
+ insertnodeafter(head,current,italickern(rightkern))
else
setwidth(next,getwidth(next)+rightkern)
end
else
- insert_node_after(head,current,fontkern(rightkern))
+ insertnodeafter(head,current,fontkern(rightkern))
end
end
- else
+ elseif next then
local i=p.emptyinjections
if i then
local rightkern=i.rightkern
- if rightkern and rightkern~=0 then
- if next and getid(next)==disc_code then
- if replace then
- else
- replace=fontkern(rightkern)
- done=true
- end
+ if rightkern and rightkern~=0 and getid(next)==disc_code then
+ local replace=getreplace(next)
+ if replace then
+ else
+ setreplace(next,fontkern(rightkern))
end
end
end
@@ -20620,12 +20679,12 @@ local function inject_positions_only(head,where)
end
local leftkern=i.leftkern
if leftkern and leftkern~=0 then
- pre=insert_node_before(pre,n,fontkern(leftkern))
+ pre=insertnodebefore(pre,n,fontkern(leftkern))
done=true
end
local rightkern=i.rightkern
if rightkern and rightkern~=0 then
- insert_node_after(pre,n,fontkern(rightkern))
+ insertnodeafter(pre,n,fontkern(rightkern))
done=true
end
end
@@ -20644,12 +20703,12 @@ local function inject_positions_only(head,where)
end
local leftkern=i.leftkern
if leftkern and leftkern~=0 then
- post=insert_node_before(post,n,fontkern(leftkern))
+ post=insertnodebefore(post,n,fontkern(leftkern))
done=true
end
local rightkern=i.rightkern
if rightkern and rightkern~=0 then
- insert_node_after(post,n,fontkern(rightkern))
+ insertnodeafter(post,n,fontkern(rightkern))
done=true
end
end
@@ -20668,12 +20727,12 @@ local function inject_positions_only(head,where)
end
local leftkern=i.leftkern
if leftkern and leftkern~=0 then
- replace=insert_node_before(replace,n,fontkern(leftkern))
+ replace=insertnodebefore(replace,n,fontkern(leftkern))
done=true
end
local rightkern=i.rightkern
if rightkern and rightkern~=0 then
- insert_node_after(replace,n,fontkern(rightkern))
+ insertnodeafter(replace,n,fontkern(rightkern))
done=true
end
end
@@ -20688,7 +20747,7 @@ local function inject_positions_only(head,where)
if i then
local rightkern=i.rightkern
if rightkern and rightkern~=0 then
- pre=insert_node_before(pre,pre,fontkern(rightkern))
+ pre=insertnodebefore(pre,pre,fontkern(rightkern))
done=true
end
end
@@ -20701,7 +20760,7 @@ local function inject_positions_only(head,where)
if i then
local rightkern=i.rightkern
if rightkern and rightkern~=0 then
- replace=insert_node_before(replace,replace,fontkern(rightkern))
+ replace=insertnodebefore(replace,replace,fontkern(rightkern))
done=true
end
end
@@ -20804,8 +20863,8 @@ local function inject_everything(head,where)
if trace_injections then
report_injections("correcting non zero width mark %C",getchar(n))
end
- insert_node_before(n,n,fontkern(-wn))
- insert_node_after(n,n,fontkern(-wn))
+ insertnodebefore(n,n,fontkern(-wn))
+ insertnodeafter(n,n,fontkern(-wn))
end
end
end
@@ -20897,37 +20956,35 @@ local function inject_everything(head,where)
rightkern=0
elseif prev and getid(prev)==glue_code then
if useitalickerns then
- head=insert_node_before(head,current,italickern(leftkern))
+ head=insertnodebefore(head,current,italickern(leftkern))
else
setwidth(prev,getwidth(prev)+leftkern)
end
else
- head=insert_node_before(head,current,fontkern(leftkern))
+ head=insertnodebefore(head,current,fontkern(leftkern))
end
end
if rightkern and rightkern~=0 then
if next and getid(next)==glue_code then
if useitalickerns then
- insert_node_after(head,current,italickern(rightkern))
+ insertnodeafter(head,current,italickern(rightkern))
else
setwidth(next,getwidth(next)+rightkern)
end
else
- insert_node_after(head,current,fontkern(rightkern))
+ insertnodeafter(head,current,fontkern(rightkern))
end
end
end
- else
+ elseif next then
local i=p.emptyinjections
if i then
local rightkern=i.rightkern
- if rightkern and rightkern~=0 then
- if next and getid(next)==disc_code then
- if replace then
- else
- replace=fontkern(rightkern)
- done=true
- end
+ if rightkern and rightkern~=0 and getid(next)==disc_code then
+ local replace=getreplace(next)
+ if replace then
+ else
+ setreplace(next,fontkern(rightkern))
end
end
end
@@ -21002,12 +21059,12 @@ local function inject_everything(head,where)
end
local leftkern=i.leftkern
if leftkern and leftkern~=0 then
- pre=insert_node_before(pre,n,fontkern(leftkern))
+ pre=insertnodebefore(pre,n,fontkern(leftkern))
done=true
end
local rightkern=i.rightkern
if rightkern and rightkern~=0 then
- insert_node_after(pre,n,fontkern(rightkern))
+ insertnodeafter(pre,n,fontkern(rightkern))
done=true
end
if hasmarks then
@@ -21032,12 +21089,12 @@ local function inject_everything(head,where)
end
local leftkern=i.leftkern
if leftkern and leftkern~=0 then
- post=insert_node_before(post,n,fontkern(leftkern))
+ post=insertnodebefore(post,n,fontkern(leftkern))
done=true
end
local rightkern=i.rightkern
if rightkern and rightkern~=0 then
- insert_node_after(post,n,fontkern(rightkern))
+ insertnodeafter(post,n,fontkern(rightkern))
done=true
end
if hasmarks then
@@ -21062,12 +21119,12 @@ local function inject_everything(head,where)
end
local leftkern=i.leftkern
if leftkern and leftkern~=0 then
- replace=insert_node_before(replace,n,fontkern(leftkern))
+ replace=insertnodebefore(replace,n,fontkern(leftkern))
done=true
end
local rightkern=i.rightkern
if rightkern and rightkern~=0 then
- insert_node_after(replace,n,fontkern(rightkern))
+ insertnodeafter(replace,n,fontkern(rightkern))
done=true
end
if hasmarks then
@@ -21088,7 +21145,7 @@ local function inject_everything(head,where)
if i then
local rightkern=i.rightkern
if rightkern and rightkern~=0 then
- pre=insert_node_before(pre,pre,fontkern(rightkern))
+ pre=insertnodebefore(pre,pre,fontkern(rightkern))
done=true
end
end
@@ -21101,7 +21158,7 @@ local function inject_everything(head,where)
if i then
local rightkern=i.rightkern
if rightkern and rightkern~=0 then
- replace=insert_node_before(replace,replace,fontkern(rightkern))
+ replace=insertnodebefore(replace,replace,fontkern(rightkern))
done=true
end
end
@@ -21254,8 +21311,8 @@ local function injectspaces(head)
if trace_spaces then
report_spaces("%C [%p + %p + %p] %C",prevchar,lnew,old,rnew,nextchar)
end
- head=insert_node_before(head,n,italickern(lnew))
- insert_node_after(head,n,italickern(rnew))
+ head=insertnodebefore(head,n,italickern(lnew))
+ insertnodeafter(head,n,italickern(rnew))
else
local new=old+(leftkern+rightkern)*factor
if trace_spaces then
@@ -21270,7 +21327,7 @@ local function injectspaces(head)
if trace_spaces then
report_spaces("%C [%p + %p]",prevchar,old,new)
end
- insert_node_after(head,n,italickern(new))
+ insertnodeafter(head,n,italickern(new))
else
local new=old+leftkern*factor
if trace_spaces then
@@ -21289,7 +21346,7 @@ local function injectspaces(head)
if trace_spaces then
report_spaces("[%p + %p] %C",old,new,nextchar)
end
- insert_node_after(head,n,italickern(new))
+ insertnodeafter(head,n,italickern(new))
else
local new=old+rightkern*factor
if trace_spaces then
@@ -21329,10 +21386,10 @@ function injections.handler(head,where)
end
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-otj”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-otj”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-ota” ad1d5de06400f88829509e1f3ff2b473] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-ota” 2bb12d708e35bc05443eba791e2554e7] ---
if not modules then modules={} end modules ['font-ota']={
version=1.001,
@@ -21362,7 +21419,7 @@ local setprop=nuts.setprop
local getsubtype=nuts.getsubtype
local getchar=nuts.getchar
local ischar=nuts.ischar
-local end_of_math=nuts.end_of_math
+local endofmath=nuts.endofmath
local nodecodes=nodes.nodecodes
local disc_code=nodecodes.disc
local math_code=nodecodes.math
@@ -21468,7 +21525,7 @@ function analyzers.setstate(head,font)
end
first,last,n=nil,nil,0
if id==math_code then
- current=end_of_math(current)
+ current=endofmath(current)
end
elseif id==disc_code then
setstate(current,s_medi)
@@ -21481,7 +21538,7 @@ function analyzers.setstate(head,font)
end
first,last,n=nil,nil,0
if id==math_code then
- current=end_of_math(current)
+ current=endofmath(current)
end
end
current=getnext(current)
@@ -21697,7 +21754,7 @@ function methods.arab(head,font,attr)
first=nil
end
if id==math_code then
- current=end_of_math(current)
+ current=endofmath(current)
end
end
current=getnext(current)
@@ -21811,7 +21868,7 @@ do
wrapup()
end
if id==math_code then
- current=end_of_math(current)
+ current=endofmath(current)
end
end
current=getnext(current)
@@ -21826,10 +21883,10 @@ directives.register("otf.analyze.useunicodemarks",function(v)
analyzers.useunicodemarks=v
end)
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-ota”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-ota”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-ots” c780a471147527f4ddc139e017927ffe] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-ots” cb106ae882e8548051f00aac8b7fa862] ---
if not modules then modules={} end modules ['font-ots']={
version=1.001,
@@ -21908,23 +21965,24 @@ local setlink=nuts.setlink
local getwidth=nuts.getwidth
local getattr=nuts.getattr
local getglyphdata=nuts.getglyphdata
-local copy_no_components=nuts.copy_no_components
-local copy_only_glyphs=nuts.copy_only_glyphs
-local count_components=nuts.count_components
-local set_components=nuts.set_components
-local get_components=nuts.get_components
-local flush_components=nuts.flush_components
+local components=nuts.components
+local copynocomponents=components.copynocomponents
+local copyonlyglyphs=components.copyonlyglyphs
+local countcomponents=components.count
+local setcomponents=components.set
+local getcomponents=components.get
+local flushcomponents=components.flush
local ischar=nuts.ischar
-local usesfont=nuts.uses_font
-local insert_node_after=nuts.insert_after
+local usesfont=nuts.usesfont
+local insertnodeafter=nuts.insertafter
local copy_node=nuts.copy
-local copy_node_list=nuts.copy_list
+local copy_node_list=nuts.copylist
local remove_node=nuts.remove
local find_node_tail=nuts.tail
-local flush_node_list=nuts.flush_list
-local flush_node=nuts.flush_node
-local end_of_math=nuts.end_of_math
-local start_of_par=nuts.start_of_par
+local flushnodelist=nuts.flushlist
+local flushnode=nuts.flushnode
+local endofmath=nuts.endofmath
+local startofpar=nuts.startofpar
local setmetatable=setmetatable
local setmetatableindex=table.setmetatableindex
local nextnode=nuts.traversers.node
@@ -22055,12 +22113,12 @@ local function flattendisk(head,disc)
local prev,next=getboth(disc)
local ishead=head==disc
setdisc(disc)
- flush_node(disc)
+ flushnode(disc)
if pre then
- flush_node_list(pre)
+ flushnodelist(pre)
end
if post then
- flush_node_list(post)
+ flushnodelist(post)
end
if ishead then
if replace then
@@ -22109,16 +22167,16 @@ local function markstoligature(head,start,stop,char)
local next=getnext(stop)
setprev(start)
setnext(stop)
- local base=copy_no_components(start,copyinjection)
+ local base=copynocomponents(start,copyinjection)
if head==start then
head=base
end
resetinjection(base)
setchar(base,char)
setsubtype(base,ligatureglyph_code)
- set_components(base,start)
+ setcomponents(base,start)
setlink(prev,base,next)
- flush_components(start)
+ flushcomponents(start)
return head,base
end
end
@@ -22126,7 +22184,7 @@ local no_left_ligature_code=1
local no_right_ligature_code=2
local no_left_kern_code=4
local no_right_kern_code=8
-local has_glyph_option=node.direct.has_glyph_option or function(n,c)
+local hasglyphoption=function(n,c)
if c==no_left_ligature_code or c==no_right_ligature_code then
return getattr(n,a_noligature)==1
else
@@ -22134,7 +22192,7 @@ local has_glyph_option=node.direct.has_glyph_option or function(n,c)
end
end
local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfound,hasmarks)
- if has_glyph_option(start,no_right_ligature_code) then
+ if hasglyphoption(start,no_right_ligature_code) then
return head,start
end
if start==stop and getchar(start)==char then
@@ -22147,14 +22205,14 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou
local comp=start
setprev(start)
setnext(stop)
- local base=copy_no_components(start,copyinjection)
+ local base=copynocomponents(start,copyinjection)
if start==head then
head=base
end
resetinjection(base)
setchar(base,char)
setsubtype(base,ligatureglyph_code)
- set_components(base,comp)
+ setcomponents(base,comp)
setlink(prev,base,next)
if not discfound then
local deletemarks=not skiphash or hasmarks
@@ -22167,7 +22225,7 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou
local char=getchar(start)
if not marks[char] then
baseindex=baseindex+componentindex
- componentindex=count_components(start,marks)
+ componentindex=countcomponents(start,marks)
elseif not deletemarks then
setligaindex(start,baseindex+getligaindex(start,componentindex))
if trace_marks then
@@ -22175,7 +22233,7 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou
end
local n=copy_node(start)
copyinjection(n,start)
- head,current=insert_node_after(head,current,n)
+ head,current=insertnodeafter(head,current,n)
elseif trace_marks then
logwarning("%s: delete ligature mark %s",pref(dataset,sequence),gref(char))
end
@@ -22198,14 +22256,14 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou
break
end
end
- flush_components(components)
+ flushcomponents(components)
else
local discprev,discnext=getboth(discfound)
if discprev and discnext then
local pre,post,replace,pretail,posttail,replacetail=getdisc(discfound,true)
if not replace then
local prev=getprev(base)
- local copied=copy_only_glyphs(comp)
+ local copied=copyonlyglyphs(comp)
if pre then
setlink(discprev,pre)
else
@@ -22221,7 +22279,7 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou
end
setlink(prev,discfound,next)
setboth(base)
- set_components(base,copied)
+ setcomponents(base,copied)
replace=base
if forcediscretionaries then
setdisc(discfound,pre,post,replace,discretionarydisc_code)
@@ -22245,7 +22303,7 @@ local function multiple_glyphs(head,start,multiple,skiphash,what,stop)
local n=copy_node(start)
resetinjection(n)
setchar(n,multiple[k])
- insert_node_after(head,start,n)
+ insertnodeafter(head,start,n)
start=n
end
if what==true then
@@ -22255,7 +22313,7 @@ local function multiple_glyphs(head,start,multiple,skiphash,what,stop)
local n=copy_node(start)
resetinjection(n)
setchar(n,m)
- insert_node_after(head,start,n)
+ insertnodeafter(head,start,n)
start=n
end
end
@@ -22485,7 +22543,7 @@ function handlers.gsub_ligature(head,start,dataset,sequence,ligature,rlmode,skip
return head,start,false,false
end
function handlers.gpos_single(head,start,dataset,sequence,kerns,rlmode,skiphash,step,injection)
- if has_glyph_option(start,no_right_kern_code) then
+ if hasglyphoption(start,no_right_kern_code) then
return head,start,false
else
local startchar=getchar(start)
@@ -22505,7 +22563,7 @@ function handlers.gpos_single(head,start,dataset,sequence,kerns,rlmode,skiphash,
end
end
function handlers.gpos_pair(head,start,dataset,sequence,kerns,rlmode,skiphash,step,injection)
- if has_glyph_option(start,no_right_kern_code) then
+ if hasglyphoption(start,no_right_kern_code) then
return head,start,false
else
local snext=getnext(start)
@@ -22994,7 +23052,7 @@ function chainprocs.gsub_ligature(head,start,stop,dataset,sequence,currentlookup
return head,start,false,0,false
end
function chainprocs.gpos_single(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex)
- if not has_glyph_option(start,no_right_kern_code) then
+ if not hasglyphoption(start,no_right_kern_code) then
local mapping=currentlookup.mapping
if mapping==nil then
mapping=getmapping(dataset,sequence,currentlookup)
@@ -23022,7 +23080,7 @@ function chainprocs.gpos_single(head,start,stop,dataset,sequence,currentlookup,r
return head,start,false
end
function chainprocs.gpos_pair(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex)
- if not has_glyph_option(start,no_right_kern_code) then
+ if not hasglyphoption(start,no_right_kern_code) then
local mapping=currentlookup.mapping
if mapping==nil then
mapping=getmapping(dataset,sequence,currentlookup)
@@ -23345,13 +23403,13 @@ local function checked(head)
if next then
setlink(kern,next)
end
- flush_node(current)
+ flushnode(current)
head=kern
current=next
else
local prev,next=getboth(current)
setlink(prev,kern,next)
- flush_node(current)
+ flushnode(current)
current=next
end
else
@@ -23801,105 +23859,225 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode,s
goto next
end
local s=seq.n
- local l=ck[5]
- local current=start
- local last=start
if s==1 then
- goto next
- end
- if l>f then
- local discfound
- local n=f+1
- last=startnext
- while n<=l do
- if postreplace and not last then
- last=getnext(sweepnode)
- sweeptype=nil
- end
- if last then
- local char,id=ischar(last,currentfont)
- if char then
- if skiphash and skiphash[char] then
- skipped=true
- if trace_skips then
- show_skip(dataset,sequence,char,ck,classes[char])
- end
- last=getnext(last)
- elseif seq[n][char] then
- if n<l then
+ else
+ local l=ck[5]
+ local current=start
+ local last=start
+ if l>f then
+ local discfound
+ local n=f+1
+ last=startnext
+ while n<=l do
+ if postreplace and not last then
+ last=getnext(sweepnode)
+ sweeptype=nil
+ end
+ if last then
+ local char,id=ischar(last,currentfont)
+ if char then
+ if skiphash and skiphash[char] then
+ skipped=true
+ if trace_skips then
+ show_skip(dataset,sequence,char,ck,classes[char])
+ end
last=getnext(last)
- end
- n=n+1
- elseif discfound then
- notmatchreplace[discfound]=true
- if notmatchpre[discfound] then
- goto next
+ elseif seq[n][char] then
+ if n<l then
+ last=getnext(last)
+ end
+ n=n+1
+ elseif discfound then
+ notmatchreplace[discfound]=true
+ if notmatchpre[discfound] then
+ goto next
+ else
+ break
+ end
else
- break
- end
- else
- goto next
- end
- elseif char==false then
- if discfound then
- notmatchreplace[discfound]=true
- if notmatchpre[discfound] then
goto next
+ end
+ elseif char==false then
+ if discfound then
+ notmatchreplace[discfound]=true
+ if notmatchpre[discfound] then
+ goto next
+ else
+ break
+ end
else
- break
+ goto next
end
- else
- goto next
- end
- elseif id==disc_code then
- discseen=true
- discfound=last
- notmatchpre[last]=nil
- notmatchpost[last]=true
- notmatchreplace[last]=nil
- local pre,post,replace=getdisc(last)
- if pre then
- local n=n
- while pre do
- if seq[n][getchar(pre)] then
- n=n+1
- if n>l then
+ elseif id==disc_code then
+ discseen=true
+ discfound=last
+ notmatchpre[last]=nil
+ notmatchpost[last]=true
+ notmatchreplace[last]=nil
+ local pre,post,replace=getdisc(last)
+ if pre then
+ local n=n
+ while pre do
+ if seq[n][getchar(pre)] then
+ n=n+1
+ if n>l then
+ break
+ end
+ pre=getnext(pre)
+ else
+ notmatchpre[last]=true
break
end
- pre=getnext(pre)
- else
+ end
+ if n<=l then
notmatchpre[last]=true
- break
end
- end
- if n<=l then
+ else
notmatchpre[last]=true
end
+ if replace then
+ while replace do
+ if seq[n][getchar(replace)] then
+ n=n+1
+ if n>l then
+ break
+ end
+ replace=getnext(replace)
+ else
+ notmatchreplace[last]=true
+ if notmatchpre[last] then
+ goto next
+ else
+ break
+ end
+ end
+ end
+ if notmatchpre[last] then
+ goto next
+ end
+ end
+ last=getnext(last)
else
- notmatchpre[last]=true
+ goto next
end
- if replace then
- while replace do
- if seq[n][getchar(replace)] then
- n=n+1
- if n>l then
- break
+ else
+ goto next
+ end
+ end
+ end
+ if f>1 then
+ if startprev then
+ local prev=startprev
+ if prereplace and prev==checkdisc then
+ prev=getprev(sweepnode)
+ end
+ if prev then
+ local discfound
+ local n=f-1
+ while n>=1 do
+ if prev then
+ local char,id=ischar(prev,currentfont)
+ if char then
+ if skiphash and skiphash[char] then
+ skipped=true
+ if trace_skips then
+ show_skip(dataset,sequence,char,ck,classes[char])
+ end
+ prev=getprev(prev)
+ elseif seq[n][char] then
+ if n>1 then
+ prev=getprev(prev)
+ end
+ n=n-1
+ elseif discfound then
+ notmatchreplace[discfound]=true
+ if notmatchpost[discfound] then
+ goto next
+ else
+ break
+ end
+ else
+ goto next
end
- replace=getnext(replace)
- else
- notmatchreplace[last]=true
- if notmatchpre[last] then
+ elseif char==false then
+ if discfound then
+ notmatchreplace[discfound]=true
+ if notmatchpost[discfound] then
+ goto next
+ end
+ else
goto next
+ end
+ break
+ elseif id==disc_code then
+ discseen=true
+ discfound=prev
+ notmatchpre[prev]=true
+ notmatchpost[prev]=nil
+ notmatchreplace[prev]=nil
+ local pre,post,replace,pretail,posttail,replacetail=getdisc(prev,true)
+ if pre~=start and post~=start and replace~=start then
+ if post then
+ local n=n
+ while posttail do
+ if seq[n][getchar(posttail)] then
+ n=n-1
+ if posttail==post or n<1 then
+ break
+ else
+ posttail=getprev(posttail)
+ end
+ else
+ notmatchpost[prev]=true
+ break
+ end
+ end
+ if n>=1 then
+ notmatchpost[prev]=true
+ end
+ else
+ notmatchpost[prev]=true
+ end
+ if replace then
+ while replacetail do
+ if seq[n][getchar(replacetail)] then
+ n=n-1
+ if replacetail==replace or n<1 then
+ break
+ else
+ replacetail=getprev(replacetail)
+ end
+ else
+ notmatchreplace[prev]=true
+ if notmatchpost[prev] then
+ goto next
+ else
+ break
+ end
+ end
+ end
+ else
+ end
+ end
+ prev=getprev(prev)
+ elseif id==glue_code then
+ local sn=seq[n]
+ if (sn[32] and spaces[prev]) or sn[0xFFFC] then
+ n=n-1
+ prev=getprev(prev)
else
- break
+ goto next
end
+ elseif seq[n][0xFFFC] then
+ n=n-1
+ prev=getprev(prev)
+ else
+ goto next
end
- end
- if notmatchpre[last] then
+ else
goto next
end
end
- last=getnext(last)
else
goto next
end
@@ -23907,34 +24085,32 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode,s
goto next
end
end
- end
- if f>1 then
- if startprev then
- local prev=startprev
- if prereplace and prev==checkdisc then
- prev=getprev(sweepnode)
+ if s>l then
+ local current=last and getnext(last)
+ if not current and postreplace then
+ current=getnext(sweepnode)
end
- if prev then
+ if current then
local discfound
- local n=f-1
- while n>=1 do
- if prev then
- local char,id=ischar(prev,currentfont)
+ local n=l+1
+ while n<=s do
+ if current then
+ local char,id=ischar(current,currentfont)
if char then
if skiphash and skiphash[char] then
skipped=true
if trace_skips then
show_skip(dataset,sequence,char,ck,classes[char])
end
- prev=getprev(prev)
+ current=getnext(current)
elseif seq[n][char] then
- if n>1 then
- prev=getprev(prev)
+ if n<s then
+ current=getnext(current)
end
- n=n-1
+ n=n+1
elseif discfound then
notmatchreplace[discfound]=true
- if notmatchpost[discfound] then
+ if notmatchpre[discfound] then
goto next
else
break
@@ -23945,202 +24121,84 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode,s
elseif char==false then
if discfound then
notmatchreplace[discfound]=true
- if notmatchpost[discfound] then
+ if notmatchpre[discfound] then
goto next
+ else
+ break
end
else
goto next
end
- break
elseif id==disc_code then
discseen=true
- discfound=prev
- notmatchpre[prev]=true
- notmatchpost[prev]=nil
- notmatchreplace[prev]=nil
- local pre,post,replace,pretail,posttail,replacetail=getdisc(prev,true)
- if pre~=start and post~=start and replace~=start then
- if post then
- local n=n
- while posttail do
- if seq[n][getchar(posttail)] then
- n=n-1
- if posttail==post or n<1 then
- break
- else
- posttail=getprev(posttail)
- end
- else
- notmatchpost[prev]=true
+ discfound=current
+ notmatchpre[current]=nil
+ notmatchpost[current]=true
+ notmatchreplace[current]=nil
+ local pre,post,replace=getdisc(current)
+ if pre then
+ local n=n
+ while pre do
+ if seq[n][getchar(pre)] then
+ n=n+1
+ if n>s then
break
+ else
+ pre=getnext(pre)
end
+ else
+ notmatchpre[current]=true
+ break
end
- if n>=1 then
- notmatchpost[prev]=true
- end
- else
- notmatchpost[prev]=true
end
- if replace then
- while replacetail do
- if seq[n][getchar(replacetail)] then
- n=n-1
- if replacetail==replace or n<1 then
- break
- else
- replacetail=getprev(replacetail)
- end
+ if n<=s then
+ notmatchpre[current]=true
+ end
+ else
+ notmatchpre[current]=true
+ end
+ if replace then
+ while replace do
+ if seq[n][getchar(replace)] then
+ n=n+1
+ if n>s then
+ break
else
- notmatchreplace[prev]=true
- if notmatchpost[prev] then
- goto next
- else
- break
- end
+ replace=getnext(replace)
+ end
+ else
+ notmatchreplace[current]=true
+ if notmatchpre[current] then
+ goto next
+ else
+ break
end
end
- else
end
+ else
end
- prev=getprev(prev)
+ current=getnext(current)
elseif id==glue_code then
local sn=seq[n]
- if (sn[32] and spaces[prev]) or sn[0xFFFC] then
- n=n-1
- prev=getprev(prev)
+ if (sn[32] and spaces[current]) or sn[0xFFFC] then
+ n=n+1
+ current=getnext(current)
else
goto next
end
elseif seq[n][0xFFFC] then
- n=n-1
- prev=getprev(prev)
- else
- goto next
- end
- else
- goto next
- end
- end
- else
- goto next
- end
- else
- goto next
- end
- end
- if s>l then
- local current=last and getnext(last)
- if not current and postreplace then
- current=getnext(sweepnode)
- end
- if current then
- local discfound
- local n=l+1
- while n<=s do
- if current then
- local char,id=ischar(current,currentfont)
- if char then
- if skiphash and skiphash[char] then
- skipped=true
- if trace_skips then
- show_skip(dataset,sequence,char,ck,classes[char])
- end
- current=getnext(current)
- elseif seq[n][char] then
- if n<s then
- current=getnext(current)
- end
- n=n+1
- elseif discfound then
- notmatchreplace[discfound]=true
- if notmatchpre[discfound] then
- goto next
- else
- break
- end
- else
- goto next
- end
- elseif char==false then
- if discfound then
- notmatchreplace[discfound]=true
- if notmatchpre[discfound] then
- goto next
- else
- break
- end
- else
- goto next
- end
- elseif id==disc_code then
- discseen=true
- discfound=current
- notmatchpre[current]=nil
- notmatchpost[current]=true
- notmatchreplace[current]=nil
- local pre,post,replace=getdisc(current)
- if pre then
- local n=n
- while pre do
- if seq[n][getchar(pre)] then
- n=n+1
- if n>s then
- break
- else
- pre=getnext(pre)
- end
- else
- notmatchpre[current]=true
- break
- end
- end
- if n<=s then
- notmatchpre[current]=true
- end
- else
- notmatchpre[current]=true
- end
- if replace then
- while replace do
- if seq[n][getchar(replace)] then
- n=n+1
- if n>s then
- break
- else
- replace=getnext(replace)
- end
- else
- notmatchreplace[current]=true
- if notmatchpre[current] then
- goto next
- else
- break
- end
- end
- end
- else
- end
- current=getnext(current)
- elseif id==glue_code then
- local sn=seq[n]
- if (sn[32] and spaces[current]) or sn[0xFFFC] then
n=n+1
current=getnext(current)
else
goto next
end
- elseif seq[n][0xFFFC] then
- n=n+1
- current=getnext(current)
else
goto next
end
- else
- goto next
end
+ else
+ goto next
end
- else
- goto next
end
end
if trace_contexts then
@@ -24902,7 +24960,7 @@ do
checkstep(head)
end
local initialrl=0
- if getid(head)==par_code and start_of_par(head) then
+ if getid(head)==par_code and startofpar(head) then
initialrl=pardirstate(head)
elseif direction==righttoleft_code then
initialrl=-1
@@ -25019,7 +25077,7 @@ do
start=getnext(start)
end
elseif id==math_code then
- start=getnext(end_of_math(start))
+ start=getnext(endofmath(start))
elseif id==dir_code then
topstack,rlmode=txtdirstate(start,dirstack,topstack,rlparmode)
start=getnext(start)
@@ -25089,7 +25147,7 @@ do
start=getnext(start)
end
elseif id==math_code then
- start=getnext(end_of_math(start))
+ start=getnext(endofmath(start))
elseif id==dir_code then
topstack,rlmode=txtdirstate(start,dirstack,topstack,rlparmode)
start=getnext(start)
@@ -25167,7 +25225,7 @@ do
elseif char==false or id==glue_code then
start=getnext(start)
elseif id==math_code then
- start=getnext(end_of_math(start))
+ start=getnext(endofmath(start))
elseif id==dir_code then
topstack,rlmode=txtdirstate(start,dirstack,topstack,rlparmode)
start=getnext(start)
@@ -25178,44 +25236,52 @@ do
return head
end
end
-local plugins={}
-otf.plugins=plugins
-local report=logs.reporter("fonts")
-function otf.registerplugin(name,f)
- if type(name)=="string" and type(f)=="function" then
- plugins[name]={ name,f }
- report()
- report("plugin %a has been loaded, please be aware of possible side effects",name)
- report()
- if logs.pushtarget then
- logs.pushtarget("log")
- end
- report("Plugins are not officially supported unless stated otherwise. This is because")
- report("they bypass the regular font handling and therefore some features in ConTeXt")
- report("(especially those related to fonts) might not work as expected or might not work")
- report("at all. Some plugins are for testing and development only and might change")
- report("whenever we feel the need for it.")
- report()
- if logs.poptarget then
- logs.poptarget()
+do
+ local plugins={}
+ otf.plugins=plugins
+ local report=logs.reporter("fonts")
+ local warned=false
+ local okay={ text=true }
+ function otf.registerplugin(name,f)
+ if type(name)=="string" and type(f)=="function" then
+ plugins[name]={ name,f }
+ if okay[name] then
+ else
+ report("plugin %a has been loaded, please be aware of possible side effects",name)
+ if not warned then
+ if logs.pushtarget then
+ logs.pushtarget("log")
+ end
+ report("Plugins are not officially supported unless stated otherwise. This is because")
+ report("they bypass the regular font handling and therefore some features in ConTeXt")
+ report("(especially those related to fonts) might not work as expected or might not work")
+ report("at all. Some plugins are for testing and development only and might change")
+ report("whenever we feel the need for it.")
+ report()
+ if logs.poptarget then
+ logs.poptarget()
+ end
+ warned=true
+ end
+ end
end
end
-end
-function otf.plugininitializer(tfmdata,value)
- if type(value)=="string" then
- tfmdata.shared.plugin=plugins[value]
+ function otf.plugininitializer(tfmdata,value)
+ if type(value)=="string" then
+ tfmdata.shared.plugin=plugins[value]
+ end
end
-end
-function otf.pluginprocessor(head,font,attr,direction)
- local s=fontdata[font].shared
- local p=s and s.plugin
- if p then
- if trace_plugins then
- report_process("applying plugin %a",p[1])
+ function otf.pluginprocessor(head,font,dynamic,direction)
+ local s=fontdata[font].shared
+ local p=s and s.plugin
+ if p then
+ if trace_plugins then
+ report_process("applying plugin %a",p[1])
+ end
+ return p[2](head,font,dynamic,direction)
+ else
+ return head,false
end
- return p[2](head,font,attr,direction)
- else
- return head,false
end
end
function otf.featuresinitializer(tfmdata,value)
@@ -25447,10 +25513,10 @@ registerotffeature {
},
}
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-ots”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-ots”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-osd” 73c9531c79df5ada320cb20777f7ed49] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-osd” 0e051ca0d3b1a8e0604ced27e753fde8] ---
if not modules then modules={} end modules ['font-osd']={
version=1.001,
@@ -25487,11 +25553,11 @@ local setprop=nuts.setprop
local getstate=nuts.getstate
local setstate=nuts.setstate
local ischar=nuts.ischar
-local insert_node_after=nuts.insert_after
+local insertnodeafter=nuts.insertafter
local copy_node=nuts.copy
local remove_node=nuts.remove
-local flush_list=nuts.flush_list
-local flush_node=nuts.flush_node
+local flushlist=nuts.flushlist
+local flushnode=nuts.flushnode
local copyinjection=nodes.injections.copy
local unsetvalue=attributes.unsetvalue
local fontdata=fonts.hashes.identifiers
@@ -26121,7 +26187,7 @@ local function inject_syntax_error(head,current,char)
else
setchar(current,dotted_circle)
end
- return insert_node_after(head,current,signal)
+ return insertnodeafter(head,current,signal)
end
local function initialize_one(font,attr)
local tfmdata=fontdata[font]
@@ -26239,7 +26305,7 @@ local function reorder_one(head,start,stop,font,attr,nbspaces)
if current==stop then
stop=getprev(stop)
head=remove_node(head,current)
- flush_node(current)
+ flushnode(current)
return head,stop,nbspaces
else
nbspaces=nbspaces+1
@@ -26269,7 +26335,7 @@ local function reorder_one(head,start,stop,font,attr,nbspaces)
tempcurrent=processcharacters(tempcurrent,font)
setstate(tempcurrent,unsetvalue)
if getchar(next)==getchar(tempcurrent) then
- flush_list(tempcurrent)
+ flushlist(tempcurrent)
if show_syntax_errors then
head,current=inject_syntax_error(head,current,char)
end
@@ -26277,8 +26343,8 @@ local function reorder_one(head,start,stop,font,attr,nbspaces)
setchar(current,getchar(tempcurrent))
local freenode=getnext(current)
setlink(current,tmp)
- flush_node(freenode)
- flush_list(tempcurrent)
+ flushnode(freenode)
+ flushlist(tempcurrent)
if changestop then
stop=current
end
@@ -26405,7 +26471,7 @@ local function reorder_one(head,start,stop,font,attr,nbspaces)
ch=tpm[1]
setchar(n,ch)
setchar(extra,tpm[2])
- head=insert_node_after(head,current,extra)
+ head=insertnodeafter(head,current,extra)
tpm=twopart_mark[ch]
end
while c~=stop and dependent_vowel[ch] do
@@ -26579,7 +26645,7 @@ local function reorder_one(head,start,stop,font,attr,nbspaces)
stop=getprev(stop)
end
head=remove_node(head,base)
- flush_node(base)
+ flushnode(base)
end
return head,stop,nbspaces
end
@@ -26839,7 +26905,7 @@ function handlers.devanagari_remove_joiners(head,start,kind,lookupname,replaceme
if head==start then
head=stop
end
- flush_list(start)
+ flushlist(start)
return head,stop,true
end
local function initialize_two(font,attr)
@@ -26984,7 +27050,7 @@ local function reorder_two(head,start,stop,font,attr,nbspaces)
if current==stop then
stop=getprev(stop)
head=remove_node(head,current)
- flush_node(current)
+ flushnode(current)
return head,stop,nbspaces
else
nbspaces=nbspaces+1
@@ -27081,7 +27147,7 @@ local function reorder_two(head,start,stop,font,attr,nbspaces)
char=tpm[1]
setchar(current,char)
setchar(extra,tpm[2])
- head=insert_node_after(head,current,extra)
+ head=insertnodeafter(head,current,extra)
tpm=twopart_mark[char]
end
if not moved[current] and dependent_vowel[char] then
@@ -27231,7 +27297,7 @@ local function reorder_two(head,start,stop,font,attr,nbspaces)
end
nbspaces=nbspaces-1
head=remove_node(head,base)
- flush_node(base)
+ flushnode(base)
end
return head,stop,nbspaces
end
@@ -27883,10 +27949,10 @@ for i=1,nofscripts do
methods[scripts_two[i]]=method_two
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-osd”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-osd”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-ocl” 797b5c71bf819c5f4fb314a4d646e9a7] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-ocl” 2a377351ae23c339764ec8ce2e8e9164] ---
if not modules then modules={} end modules ['font-ocl']={
version=1.001,
@@ -28172,7 +28238,11 @@ if context then
local xmlconvert=xml.convert
local xmlfirst=xml.first
function otfsvg.filterglyph(entry,index)
- local svg=xmlconvert(entry.data)
+ local d=entry.data
+ if gzip.compressed(d) then
+ d=gzip.decompress(d) or d
+ end
+ local svg=xmlconvert(d)
local root=svg and xmlfirst(svg,"/svg[@id='glyph"..index.."']")
local data=root and tostring(root)
return data
@@ -28208,9 +28278,10 @@ end
if inkscape then
local descriptions=tfmdata.descriptions
local nofshapes=#svgshapes
+ local s_format=inkscapeformat("pdf")
local f_svgfile=formatters["temp-otf-svg-shape-%i.svg"]
local f_pdffile=formatters["temp-otf-svg-shape-%i.pdf"]
- local f_convert=formatters["%s --export-%s=%s\n"]
+ local f_convert=formatters[new and "file-open:%s; export-%s:%s; export-do\n" or "%s --export-%s=%s\n"]
local filterglyph=otfsvg.filterglyph
local nofdone=0
local processed={}
@@ -28224,7 +28295,7 @@ end
local svgfile=f_svgfile(index)
local pdffile=f_pdffile(index)
savedata(svgfile,data)
- inkscape:write(f_convert(svgfile,inkscapeformat("pdf"),pdffile))
+ inkscape:write(f_convert(svgfile,s_format,pdffile))
processed[index]=true
nofdone=nofdone+1
if nofdone%25==0 then
@@ -28429,10 +28500,10 @@ if context then
}
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-ocl”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-ocl”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-otc” 0f12230ea07b5151f75d52726977e91f] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-otc” 0f12230ea07b5151f75d52726977e91f] ---
if not modules then modules={} end modules ['font-otc']={
version=1.001,
@@ -29189,10 +29260,10 @@ end
otf.enhancers.enhance=enhance
otf.enhancers.register("check extra features",enhance)
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-otc”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-otc”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-onr” 6d161533f3437435e12a0ad64866df44] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-onr” 6d161533f3437435e12a0ad64866df44] ---
if not modules then modules={} end modules ['font-onr']={
version=1.001,
@@ -29565,10 +29636,10 @@ function readers.getinfo(filename)
end
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-onr”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-onr”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-one” 53cd565030e919da984b50471cc3be37] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-one” bd39d42055a44ca2002f8ddbbbbf27c3] ---
if not modules then modules={} end modules ['font-one']={
version=1.001,
@@ -30179,6 +30250,7 @@ local function read_from_afm(specification)
local tfmdata=afmtotfm(specification)
if tfmdata then
tfmdata.properties.name=specification.name
+ tfmdata.properties.id=specification.id
tfmdata=constructors.scale(tfmdata,specification)
local allfeatures=tfmdata.shared.features or specification.features.normal
constructors.applymanipulators("afm",tfmdata,allfeatures,trace_features,report_afm)
@@ -30282,10 +30354,10 @@ registerafmenhancer("normalize features",enhance_normalize_features)
registerafmenhancer("check extra features",otfenhancers.enhance)
registerafmenhancer("fix names",enhance_fix_names)
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-one”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-one”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-afk” 9da14e0fb22129c053acc599d1312544] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-afk” 9da14e0fb22129c053acc599d1312544] ---
if not modules then modules={} end modules ['font-afk']={
version=1.001,
@@ -30452,10 +30524,10 @@ fonts.handlers.afm.helpdata={
}
}
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-afk”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-afk”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “fonts-tfm” f0eb5e2a8068b17ad401bb7efdba1630] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “fonts-tfm” f0eb5e2a8068b17ad401bb7efdba1630] ---
if not modules then modules={} end modules ['luatex-fonts-tfm']={
version=1.001,
@@ -30970,10 +31042,10 @@ registertfmfeature {
}
}
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “fonts-tfm”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “fonts-tfm”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-lua” 1fbfdf7b689b2bdfd0e3bb9bf74ce136] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-lua” 1fbfdf7b689b2bdfd0e3bb9bf74ce136] ---
if not modules then modules={} end modules ['font-lua']={
version=1.001,
@@ -31013,10 +31085,10 @@ function readers.lua(specification)
return check_lua(specification,fullname)
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-lua”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-lua”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-def” b9d908c2338b7dc443ce9d1e9fcb7139] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-def” b9d908c2338b7dc443ce9d1e9fcb7139] ---
if not modules then modules={} end modules ['font-def']={
version=1.001,
@@ -31416,10 +31488,10 @@ if not context then
callbacks.register('define_font',definers.read,"definition of fonts (tfmdata preparation)")
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-def”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-def”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-shp” 5ff497c993112d4fef4c148348d964eb] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-shp” 2bb36adb4b264a895a2c4d97e1ac1d1e] ---
if not modules then modules={} end modules ['font-shp']={
version=1.001,
@@ -31436,7 +31508,7 @@ local afm=fonts.handlers.afm
local pfb=fonts.handlers.pfb
local hashes=fonts.hashes
local identifiers=hashes.identifiers
-local version=0.009
+local version=0.010
local shapescache=containers.define("fonts","shapes",version,true)
local streamscache=containers.define("fonts","streams",version,true)
local compact_streams=false
@@ -31784,10 +31856,10 @@ callback.register("glyph_stream_provider",function(id,index,mode)
return ""
end)
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-shp”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-shp”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “fonts-def” f435e0875f203f343157baeff876ec9c] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “fonts-def” f435e0875f203f343157baeff876ec9c] ---
if not modules then modules={} end modules ['luatex-fonts-def']={
version=1.001,
@@ -31868,10 +31940,10 @@ function fonts.definers.applypostprocessors(tfmdata)
return tfmdata
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “fonts-def”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “fonts-def”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “fonts-ext” 32013cbc5d5d336be8b1d1e5879d86c4] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “fonts-ext” 32013cbc5d5d336be8b1d1e5879d86c4] ---
if not modules then modules={} end modules ['luatex-fonts-ext']={
version=1.001,
@@ -32057,10 +32129,10 @@ registerotffeature {
}
}
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “fonts-ext”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “fonts-ext”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-imp-tex” ceb087ef6fa2f89aed7179f60ddf8f35] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-imp-tex” ceb087ef6fa2f89aed7179f60ddf8f35] ---
if not modules then modules={} end modules ['font-imp-tex']={
version=1.001,
@@ -32159,10 +32231,10 @@ registerotffeature {
description="arabic digits",
}
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-imp-tex”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-imp-tex”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-imp-ligatures” 26ffcf089391445f7af59536c8814364] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-imp-ligatures” 26ffcf089391445f7af59536c8814364] ---
if not modules then modules={} end modules ['font-imp-ligatures']={
version=1.001,
@@ -32276,10 +32348,10 @@ if context then
}
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-imp-ligatures”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-imp-ligatures”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-imp-italics” defcb415bc1e0a0999b27773902adc18] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-imp-italics” defcb415bc1e0a0999b27773902adc18] ---
if not modules then modules={} end modules ['font-imp-italics']={
version=1.001,
@@ -32383,10 +32455,10 @@ if context then
registerafmfeature(dimensions_specification)
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-imp-italics”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-imp-italics”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “font-imp-effects” a2dde5e071fcb3fc7b90f2bcd5aa4f22] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “font-imp-effects” d05997c1826355548ec9aec1346f9f23] ---
if not modules then modules={} end modules ['font-imp-effects']={
version=1.001,
@@ -32570,74 +32642,55 @@ local rules={
"FractionRuleThickness",
"UnderbarRuleThickness",
}
-local setmathparameters
-local setmathcharacters
-if CONTEXTLMTXMODE and CONTEXTLMTXMODE>0 then
- setmathparameters=function(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier)
- if delta~=0 then
- for i=1,#rules do
- local name=rules[i]
- local value=mathparameters[name]
- if value then
- mathparameters[name]=(squeeze or 1)*(value+dy)
- end
+local function setmathparameters(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier)
+ if dy~=0 then
+ for i=1,#rules do
+ local name=rules[i]
+ local value=mathparameters[name]
+ if value then
+ mathparameters[name]=(squeeze or 1)*(value+dy)
end
end
end
- setmathcharacters=function()
- end
-else
- setmathparameters=function(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier)
- if delta~=0 then
- for i=1,#rules do
- local name=rules[i]
- local value=mathparameters[name]
- if value then
- mathparameters[name]=(squeeze or 1)*(value+dy)
- end
- end
+end
+local function setmathcharacters(tfmdata,characters,mathparameters,dx,dy,squeeze,wdelta,hdelta,ddelta)
+ local function wdpatch(char)
+ if wsnap~=0 then
+ char.width=char.width+wdelta/2
end
end
- setmathcharacters=function(tfmdata,characters,mathparameters,dx,dy,squeeze,wdelta,hdelta,ddelta)
- local function wdpatch(char)
- if wsnap~=0 then
- char.width=char.width+wdelta/2
+ local function htpatch(char)
+ if hsnap~=0 then
+ local height=char.height
+ if height then
+ char.height=char.height+2*dy
end
end
- local function htpatch(char)
- if hsnap~=0 then
- local height=char.height
- if height then
- char.height=char.height+2*dy
- end
- end
- end
- local character=characters[0x221A]
- if character and character.next then
- local char=character
- local next=character.next
+ end
+ local character=characters[0x221A]
+ if character and character.next then
+ local char=character
+ local next=character.next
+ wdpatch(char)
+ htpatch(char)
+ while next do
+ char=characters[next]
wdpatch(char)
htpatch(char)
- while next do
- char=characters[next]
- wdpatch(char)
- htpatch(char)
- next=char.next
- end
- if char then
- local v=char.vert_variants
- if v then
- local top=v[#v]
- if top then
- local char=characters[top.glyph]
- htpatch(char)
- end
+ next=char.next
+ end
+ if char then
+ local v=char.vert_variants
+ if v then
+ local top=v[#v]
+ if top then
+ local char=characters[top.glyph]
+ htpatch(char)
end
end
end
end
end
-local shiftmode=CONTEXTLMTXMODE and CONTEXTLMTXMODE>0
local function manipulateeffect(tfmdata)
local effect=tfmdata.properties.effect
if effect then
@@ -32659,45 +32712,38 @@ local function manipulateeffect(tfmdata)
local factor=(1+effect.factor)*factor
local hfactor=(1+effect.hfactor)*hfactor
local vfactor=(1+effect.vfactor)*vfactor
- if shiftmode then
- parameters.hshift=hshift
- parameters.vshift=vshift
- else
- vshift=vshift~=0 and upcommand[vshift] or false
- hshift=rightcommand[hshift]
- end
+ vshift=vshift~=0 and upcommand[vshift] or false
+ hshift=rightcommand[hshift]
for unicode,character in next,characters do
local oldwidth=character.width
local oldheight=character.height
local olddepth=character.depth
if oldwidth and oldwidth>0 then
character.width=oldwidth+wdelta
- if not shiftmode then
- local commands=character.commands
- if vshift then
- if commands then
+ local commands=character.commands
+ if vshift then
+ if commands then
+ prependcommands (commands,
+ hshift,
+ vshift
+ )
+ else
+ character.commands={
+ hshift,
+ vshift,
+ charcommand[unicode]
+ }
+ end
+ else
+ if commands then
prependcommands (commands,
- hshift,
- vshift
+ hshift
)
- else
- character.commands={
- hshift,
- vshift,
- charcommand[unicode]
- }
- end
else
- if commands then
- prependcommands (commands,
- hshift
- )
- else
- character.commands={
- hshift,
- charcommand[unicode]
- }
- end
+ character.commands={
+ hshift,
+ charcommand[unicode]
+ }
end
end
end
@@ -32769,10 +32815,10 @@ local specification={
registerotffeature(specification)
registerafmfeature(specification)
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “font-imp-effects”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “font-imp-effects”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “fonts-lig” fbd251eea3810a43a8d5542319361d68] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “fonts-lig” fbd251eea3810a43a8d5542319361d68] ---
fonts.handlers.otf.addfeature {
@@ -34841,10 +34887,10 @@ fonts.handlers.otf.addfeature {
["type"]="ligature",
}
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “fonts-lig”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “fonts-lig”] ---
-do --- [luaotfload, fontloader-2021-01-07.lua scope for “fonts-gbn” 10ecdf01e7c926e5128ad8a9dff4d677] ---
+do --- [luaotfload, fontloader-2021-05-20.lua scope for “fonts-gbn” 34e4543a02f6fbc8c2ade896cb6dc7df] ---
if not modules then modules={} end modules ['luatex-fonts-gbn']={
version=1.001,
@@ -34860,8 +34906,8 @@ local next=next
local fonts=fonts
local nodes=nodes
local nuts=nodes.nuts
-local traverse_id=nuts.traverse_id
-local flush_node=nuts.flush_node
+local traverseid=nuts.traverseid
+local flushnode=nuts.flushnode
local glyph_code=nodes.nodecodes.glyph
local disc_code=nodes.nodecodes.disc
local tonode=nuts.tonode
@@ -34920,7 +34966,7 @@ local function nodepass(head,groupcode,size,packtype,direction)
local variants=nil
local redundant=nil
local nofused=0
- for n in traverse_id(glyph_code,head) do
+ for n in traverseid(glyph_code,head) do
local font=getfont(n)
if font~=prevfont then
if basefont then
@@ -34998,13 +35044,13 @@ local function nodepass(head,groupcode,size,packtype,direction)
end
end
end
- flush_node(r)
+ flushnode(r)
end
end
- for d in traverse_id(disc_code,head) do
+ for d in traverseid(disc_code,head) do
local _,_,r=getdisc(d)
if r then
- for n in traverse_id(glyph_code,r) do
+ for n in traverseid(glyph_code,r) do
local font=getfont(n)
if font~=prevfont then
prevfont=font
@@ -35072,7 +35118,7 @@ local function basepass(head)
end
return head
end
-local protectpass=node.direct.protect_glyphs
+local protectpass=node.direct.protectglyphs or node.direct.protect_glyphs
local injectpass=nodes.injections.handler
function nodes.handlers.nodepass(head,...)
if head then
@@ -35109,7 +35155,7 @@ function nodes.simple_font_handler(head,groupcode,size,packtype,direction)
return head
end
-end --- [luaotfload, fontloader-2021-01-07.lua scope for “fonts-gbn”] ---
+end --- [luaotfload, fontloader-2021-05-20.lua scope for “fonts-gbn”] ---
--- vim:ft=lua:sw=2:ts=8:et:tw=79
diff --git a/macros/luatex/generic/luaotfload/fontloader-basics-nod.lua b/macros/luatex/generic/luaotfload/fontloader-basics-nod.lua
index 25f5473a5a..76e36f2aab 100644
--- a/macros/luatex/generic/luaotfload/fontloader-basics-nod.lua
+++ b/macros/luatex/generic/luaotfload/fontloader-basics-nod.lua
@@ -71,8 +71,8 @@ nodes.glyphcodes = glyphcodes
nodes.disccodes = disccodes
nodes.dirvalues = { lefttoright = 0, righttoleft = 1 }
-nodes.handlers.protectglyphs = node.protect_glyphs -- beware: nodes!
-nodes.handlers.unprotectglyphs = node.unprotect_glyphs -- beware: nodes!
+nodes.handlers.protectglyphs = node.protectglyphs or node.protect_glyphs -- beware: nodes!
+nodes.handlers.unprotectglyphs = node.unprotectglyphs or node.unprotect_glyphs -- beware: nodes!
-- in generic code, at least for some time, we stay nodes, while in context
-- we can go nuts (e.g. experimental); this split permits us us keep code
@@ -81,84 +81,85 @@ nodes.handlers.unprotectglyphs = node.unprotect_glyphs -- beware: nodes!
-- much of this will go away .. it's part of the context interface and not
-- officially in luatex-*.lua
-local direct = node.direct
-local nuts = { }
-nodes.nuts = nuts
-
-local tonode = direct.tonode
-local tonut = direct.todirect
-
-nodes.tonode = tonode
-nodes.tonut = tonut
-
-nuts.tonode = tonode
-nuts.tonut = tonut
-
-nuts.getattr = direct.get_attribute
-nuts.getboth = direct.getboth
-nuts.getchar = direct.getchar
-nuts.getdirection = direct.getdirection
-nuts.getdisc = direct.getdisc
-nuts.getreplace = direct.getreplace
-nuts.getfield = direct.getfield
-nuts.getfont = direct.getfont
-nuts.getid = direct.getid
-nuts.getkern = direct.getkern
-nuts.getlist = direct.getlist
-nuts.getnext = direct.getnext
-nuts.getoffsets = direct.getoffsets
-nuts.getoptions = direct.getoptions or function() return 0 end
-nuts.getprev = direct.getprev
-nuts.getsubtype = direct.getsubtype
-nuts.getwidth = direct.getwidth
-nuts.setattr = direct.setfield
-nuts.setboth = direct.setboth
-nuts.setchar = direct.setchar
-nuts.setcomponents = direct.setcomponents
-nuts.setdirection = direct.setdirection
-nuts.setdisc = direct.setdisc
-nuts.setreplace = direct.setreplace
-nuts.setfield = setfield
-nuts.setkern = direct.setkern
-nuts.setlink = direct.setlink
-nuts.setlist = direct.setlist
-nuts.setnext = direct.setnext
-nuts.setoffsets = direct.setoffsets
-nuts.setprev = direct.setprev
-nuts.setsplit = direct.setsplit
-nuts.setsubtype = direct.setsubtype
-nuts.setwidth = direct.setwidth
-
-nuts.getglyphdata = nuts.getattr
-nuts.setglyphdata = nuts.setattr
-
-nuts.ischar = direct.is_char
-nuts.isglyph = direct.is_glyph
-
-nuts.copy = direct.copy
-nuts.copy_list = direct.copy_list
-nuts.copy_node = direct.copy
-nuts.end_of_math = direct.end_of_math
-nuts.flush = direct.flush
-nuts.flush_list = direct.flush_list
-nuts.flush_node = direct.flush_node
-nuts.free = direct.free
-nuts.insert_after = direct.insert_after
-nuts.insert_before = direct.insert_before
-nuts.is_node = direct.is_node
-nuts.kerning = direct.kerning
-nuts.ligaturing = direct.ligaturing
-nuts.new = direct.new
-nuts.remove = direct.remove
-nuts.tail = direct.tail
-nuts.traverse = direct.traverse
-nuts.traverse_char = direct.traverse_char
-nuts.traverse_glyph = direct.traverse_glyph
-nuts.traverse_id = direct.traverse_id
+local direct = node.direct
+local nuts = { }
+nodes.nuts = nuts
+
+local tonode = direct.tonode
+local tonut = direct.todirect
+
+nodes.tonode = tonode
+nodes.tonut = tonut
+
+nuts.tonode = tonode
+nuts.tonut = tonut
+
+nuts.getattr = direct.get_attribute
+nuts.getboth = direct.getboth
+nuts.getchar = direct.getchar
+nuts.getdirection = direct.getdirection
+nuts.getdisc = direct.getdisc
+nuts.getreplace = direct.getreplace
+nuts.getfield = direct.getfield
+nuts.getfont = direct.getfont
+nuts.getid = direct.getid
+nuts.getkern = direct.getkern
+nuts.getlist = direct.getlist
+nuts.getnext = direct.getnext
+nuts.getoffsets = direct.getoffsets
+nuts.getoptions = direct.getoptions or function() return 0 end
+nuts.getprev = direct.getprev
+nuts.getsubtype = direct.getsubtype
+nuts.getwidth = direct.getwidth
+nuts.setattr = direct.setfield
+nuts.setboth = direct.setboth
+nuts.setchar = direct.setchar
+nuts.setcomponents = direct.setcomponents
+nuts.setdirection = direct.setdirection
+nuts.setdisc = direct.setdisc
+nuts.setreplace = direct.setreplace
+nuts.setfield = setfield
+nuts.setkern = direct.setkern
+nuts.setlink = direct.setlink
+nuts.setlist = direct.setlist
+nuts.setnext = direct.setnext
+nuts.setoffsets = direct.setoffsets
+nuts.setprev = direct.setprev
+nuts.setsplit = direct.setsplit
+nuts.setsubtype = direct.setsubtype
+nuts.setwidth = direct.setwidth
+
+nuts.getglyphdata = nuts.getattribute or nuts.getattr
+nuts.setglyphdata = nuts.setattribute or nuts.setattr
+
+nuts.ischar = direct.ischar or direct.is_char
+nuts.isglyph = direct.isglyph or direct.is_glyph
+nuts.copy = direct.copy
+nuts.copynode = direct.copy
+nuts.copylist = direct.copylist or direct.copy_list
+nuts.endofmath = direct.endofmath or direct.end_of_math
+nuts.flush = direct.flush
+nuts.flushlist = direct.flushlist or direct.flush_list
+nuts.flushnode = direct.flushnode or direct.flush_node
+nuts.free = direct.free
+nuts.insertafter = direct.insertafter or direct.insert_after
+nuts.insertbefore = direct.insertbefore or direct.insert_before
+nuts.isnode = direct.isnode or direct.is_node
+nuts.isdirect = direct.isdirect or direct.is_direct
+nuts.isnut = direct.isdirect or direct.is_direct
+nuts.kerning = direct.kerning
+nuts.ligaturing = direct.ligaturing
+nuts.new = direct.new
+nuts.remove = direct.remove
+nuts.tail = direct.tail
+nuts.traverse = direct.traverse
+nuts.traversechar = direct.traversechar or direct.traverse_char
+nuts.traverseglyph = direct.traverseglyph or direct.traverse_glyph
+nuts.traverseid = direct.traverseid or direct.traverse_id
-- properties as used in the (new) injector:
-local propertydata = direct.get_properties_table()
+local propertydata = (direct.getpropertiestable or direct.get_properties_table)()
nodes.properties = { data = propertydata }
if direct.set_properties_mode then
@@ -199,10 +200,10 @@ local setfield = nuts.setfield
local getsubtype = nuts.getsubtype
local isglyph = nuts.isglyph
local find_tail = nuts.tail
-local flush_list = nuts.flush_list
-local flush_node = nuts.flush_node
-local traverse_id = nuts.traverse_id
-local copy_node = nuts.copy_node
+local flushlist = nuts.flushlist
+local flushnode = nuts.flushnode
+local traverseid = nuts.traverseid
+local copynode = nuts.copynode
local glyph_code = nodes.nodecodes.glyph
local ligature_code = nodes.glyphcodes.ligature
@@ -222,22 +223,22 @@ end
do
- local get_components = node.direct.getcomponents
- local set_components = node.direct.setcomponents
+ local getcomponents = node.direct.getcomponents
+ local setcomponents = node.direct.setcomponents
- local function copy_no_components(g,copyinjection)
- local components = get_components(g)
+ local function copynocomponents(g,copyinjection)
+ local components = getcomponents(g)
if components then
- set_components(g)
- local n = copy_node(g)
+ setcomponents(g)
+ local n = copynode(g)
if copyinjection then
copyinjection(n,g)
end
- set_components(g,components)
+ setcomponents(g,components)
-- maybe also upgrade the subtype but we don't use it anyway
return n
else
- local n = copy_node(g)
+ local n = copynode(g)
if copyinjection then
copyinjection(n,g)
end
@@ -245,11 +246,11 @@ do
end
end
- local function copy_only_glyphs(current)
+ local function copyonlyglyphs(current)
local head = nil
local previous = nil
- for n in traverse_id(glyph_code,current) do
- n = copy_node(n)
+ for n in traverseid(glyph_code,current) do
+ n = copynode(n)
if head then
setlink(previous,n)
else
@@ -260,14 +261,14 @@ do
return head
end
- local function count_components(start,marks)
+ local function countcomponents(start,marks)
local char = isglyph(start)
if char then
if getsubtype(start) == ligature_code then
local n = 0
- local components = get_components(start)
+ local components = getcomponents(start)
while components do
- n = n + count_components(components,marks)
+ n = n + countcomponents(components,marks)
components = getnext(components)
end
return n
@@ -278,20 +279,22 @@ do
return 0
end
- local function flush_components()
+ local function flushcomponents()
-- this is a no-op in mkiv / generic
end
- nuts.set_components = set_components
- nuts.get_components = get_components
- nuts.copy_only_glyphs = copy_only_glyphs
- nuts.copy_no_components = copy_no_components
- nuts.count_components = count_components
- nuts.flush_components = flush_components
+ nuts.components = {
+ set = setcomponents,
+ get = getcomponents,
+ copyonlyglyphs = copyonlyglyphs,
+ copynocomponents = copynocomponents,
+ count = countcomponents,
+ flush = flushcomponents,
+ }
end
-nuts.uses_font = direct.uses_font
+nuts.usesfont = direct.usesfont or direct.uses_font
do
@@ -301,12 +304,12 @@ do
local dummy = tonut(node.new("glyph"))
nuts.traversers = {
- glyph = nuts.traverse_id(nodecodes.glyph,dummy),
- glue = nuts.traverse_id(nodecodes.glue,dummy),
- disc = nuts.traverse_id(nodecodes.disc,dummy),
- boundary = nuts.traverse_id(nodecodes.boundary,dummy),
+ glyph = nuts.traverseid(nodecodes.glyph,dummy),
+ glue = nuts.traverseid(nodecodes.glue,dummy),
+ disc = nuts.traverseid(nodecodes.disc,dummy),
+ boundary = nuts.traverseid(nodecodes.boundary,dummy),
- char = nuts.traverse_char(dummy),
+ char = nuts.traversechar(dummy),
node = nuts.traverse(dummy),
}
@@ -333,7 +336,7 @@ do
local getsubtype = nuts.getsubtype
- function nuts.start_of_par(n)
+ function nuts.startofpar(n)
local s = getsubtype(n)
return s == 0 or s == 2 -- sorry, hardcoded, won't change anyway
end
diff --git a/macros/luatex/generic/luaotfload/fontloader-font-cff.lua b/macros/luatex/generic/luaotfload/fontloader-font-cff.lua
index 4e2981011a..ff87292baf 100644
--- a/macros/luatex/generic/luaotfload/fontloader-font-cff.lua
+++ b/macros/luatex/generic/luaotfload/fontloader-font-cff.lua
@@ -29,7 +29,7 @@ if not modules then modules = { } end modules ['font-cff'] = {
local next, type, tonumber, rawget = next, type, tonumber, rawget
local byte, char, gmatch, sub = string.byte, string.char, string.gmatch, string.sub
-local concat, remove, unpack = table.concat, table.remove, table.unpack
+local concat, insert, remove, unpack = table.concat, table.insert, table.remove, table.unpack
local floor, abs, round, ceil, min, max = math.floor, math.abs, math.round, math.ceil, math.min, math.max
local P, C, R, S, C, Cs, Ct = lpeg.P, lpeg.C, lpeg.R, lpeg.S, lpeg.C, lpeg.Cs, lpeg.Ct
local lpegmatch = lpeg.match
@@ -745,6 +745,13 @@ do
-- some back. I inlined some of then and a bit speed can be gained by more
-- inlining but not that much.
+ -- Maybe have several action tables:
+ --
+ -- keep curve / checked
+ -- keep curve / not checked
+ -- checked
+ -- not checked
+
local function xymoveto()
if keepcurve then
r = r + 1
@@ -1968,8 +1975,38 @@ do
showstate(reverse[t] or "<action>")
end
if top > 0 then
- for i=1,top do
- r = r + 1 ; result[r] = encode[stack[i]]
+ -- if t == 8 and top > 42 then
+ if t == 8 and top > 48 then
+ -- let's assume this only happens for rrcurveto .. the other ones would need some more
+ -- complex handling (cff2 stuff)
+ local n = 0
+ for i=1,top do
+ -- if n == 42 then
+ if n == 48 then
+ local zero = encode[0]
+ local res3 = result[r-3]
+ local res2 = result[r-2]
+ local res1 = result[r-1]
+ local res0 = result[r]
+ result[r-3] = zero
+ result[r-2] = zero
+ r = r + 1 ; result[r] = chars[t]
+ r = r + 1 ; result[r] = zero
+ r = r + 1 ; result[r] = zero
+ r = r + 1 ; result[r] = res3
+ r = r + 1 ; result[r] = res2
+ r = r + 1 ; result[r] = res1
+ r = r + 1 ; result[r] = res0
+ n = 1
+ else
+ n = n + 1
+ end
+ r = r + 1 ; result[r] = encode[stack[i]]
+ end
+ else
+ for i=1,top do
+ r = r + 1 ; result[r] = encode[stack[i]]
+ end
end
top = 0
end
diff --git a/macros/luatex/generic/luaotfload/fontloader-font-imp-effects.lua b/macros/luatex/generic/luaotfload/fontloader-font-imp-effects.lua
index 43ce82b71a..27a16914b8 100644
--- a/macros/luatex/generic/luaotfload/fontloader-font-imp-effects.lua
+++ b/macros/luatex/generic/luaotfload/fontloader-font-imp-effects.lua
@@ -207,94 +207,63 @@ local rules = {
"UnderbarRuleThickness",
}
--- local commands = char.commands
--- if commands then
--- local command = commands[1]
--- if command and command[1] == "right" then
--- commands[1] = rightcommand[command[2]-snap]
--- end
--- end
-
-- radicals are not yet ok
-local setmathparameters
-local setmathcharacters
-
-if CONTEXTLMTXMODE and CONTEXTLMTXMODE > 0 then
-
- setmathparameters = function(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier)
- if delta ~= 0 then
- for i=1,#rules do
- local name = rules[i]
- local value = mathparameters[name]
- if value then
- mathparameters[name] = (squeeze or 1) * (value + dy)
- end
+local function setmathparameters(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier)
+ -- hm, this was "if delta ~= 0 then" but delta was gone
+ if dy ~= 0 then
+ for i=1,#rules do
+ local name = rules[i]
+ local value = mathparameters[name]
+ if value then
+ mathparameters[name] = (squeeze or 1) * (value + dy)
end
end
end
+end
- setmathcharacters = function()
- end
+local function setmathcharacters(tfmdata,characters,mathparameters,dx,dy,squeeze,wdelta,hdelta,ddelta)
-else
+ -- still not the perfect rule
- setmathparameters = function(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier)
- if delta ~= 0 then
- for i=1,#rules do
- local name = rules[i]
- local value = mathparameters[name]
- if value then
- mathparameters[name] = (squeeze or 1) * (value + dy)
- end
- end
+ local function wdpatch(char)
+ if wsnap ~= 0 then
+ char.width = char.width + wdelta/2
end
end
- setmathcharacters = function(tfmdata,characters,mathparameters,dx,dy,squeeze,wdelta,hdelta,ddelta)
-
- -- still not the perfect rule
-
- local function wdpatch(char)
- if wsnap ~= 0 then
- char.width = char.width + wdelta/2
- end
- end
-
- local function htpatch(char)
- if hsnap ~= 0 then
- local height = char.height
- if height then
- char.height = char.height + 2 * dy
- end
+ local function htpatch(char)
+ if hsnap ~= 0 then
+ local height = char.height
+ if height then
+ char.height = char.height + 2 * dy
end
end
+ end
- local character = characters[0x221A]
+ local character = characters[0x221A]
- if character and character.next then
- local char = character
- local next = character.next
+ if character and character.next then
+ local char = character
+ local next = character.next
+ wdpatch(char)
+ htpatch(char)
+ while next do
+ char = characters[next]
wdpatch(char)
htpatch(char)
- while next do
- char = characters[next]
- wdpatch(char)
- htpatch(char)
- next = char.next
- end
- if char then
- local v = char.vert_variants
- if v then
- local top = v[#v]
- if top then
- local char = characters[top.glyph]
- htpatch(char)
- end
+ next = char.next
+ end
+ if char then
+ local v = char.vert_variants
+ if v then
+ local top = v[#v]
+ if top then
+ local char = characters[top.glyph]
+ htpatch(char)
end
end
end
-
end
end
@@ -304,8 +273,6 @@ end
-- inspect(fonts.hashes.characters[f][c])
-- end }
-local shiftmode = CONTEXTLMTXMODE and CONTEXTLMTXMODE > 0
-
local function manipulateeffect(tfmdata)
local effect = tfmdata.properties.effect
if effect then
@@ -327,49 +294,42 @@ local function manipulateeffect(tfmdata)
local factor = (1 + effect.factor) * factor
local hfactor = (1 + effect.hfactor) * hfactor
local vfactor = (1 + effect.vfactor) * vfactor
- if shiftmode then
- parameters.hshift = hshift
- parameters.vshift = vshift
- else
- vshift = vshift ~= 0 and upcommand[vshift] or false
- hshift = rightcommand[hshift]
- end
+ vshift = vshift ~= 0 and upcommand[vshift] or false
+ hshift = rightcommand[hshift]
for unicode, character in next, characters do
local oldwidth = character.width
local oldheight = character.height
local olddepth = character.depth
if oldwidth and oldwidth > 0 then
character.width = oldwidth + wdelta
- if not shiftmode then
- local commands = character.commands
- if vshift then
- if commands then
- prependcommands ( commands,
- -- show_effect,
- hshift,
- vshift
- )
- else
- character.commands = {
- -- show_effect,
- hshift,
- vshift,
- charcommand[unicode]
- }
- end
+ local commands = character.commands
+ if vshift then
+ if commands then
+ prependcommands ( commands,
+ -- show_effect,
+ hshift,
+ vshift
+ )
+ else
+ character.commands = {
+ -- show_effect,
+ hshift,
+ vshift,
+ charcommand[unicode]
+ }
+ end
+ else
+ if commands then
+ prependcommands ( commands,
+ -- show_effect,
+ hshift
+ )
else
- if commands then
- prependcommands ( commands,
- -- show_effect,
- hshift
- )
- else
- character.commands = {
- -- show_effect,
- hshift,
- charcommand[unicode]
- }
- end
+ character.commands = {
+ -- show_effect,
+ hshift,
+ charcommand[unicode]
+ }
end
end
end
diff --git a/macros/luatex/generic/luaotfload/fontloader-font-ocl.lua b/macros/luatex/generic/luaotfload/fontloader-font-ocl.lua
index e6a38af5c3..7d960922f4 100644
--- a/macros/luatex/generic/luaotfload/fontloader-font-ocl.lua
+++ b/macros/luatex/generic/luaotfload/fontloader-font-ocl.lua
@@ -370,13 +370,24 @@ if context then
local xmlconvert = xml.convert
local xmlfirst = xml.first
+ -- function otfsvg.filterglyph(entry,index)
+ -- -- we only support decompression in lmtx, so one needs to wipe the
+ -- -- cache when invalid xml is reported
+ -- local svg = xmlconvert(entry.data)
+ -- local root = svg and xmlfirst(svg,"/svg[@id='glyph"..index.."']")
+ -- local data = root and tostring(root)
+ -- -- report_svg("data for glyph %04X: %s",index,data)
+ -- return data
+ -- end
+
function otfsvg.filterglyph(entry,index)
- -- we only support decompression in lmtx, so one needs to wipe the
- -- cache when invalid xml is reported
- local svg = xmlconvert(entry.data)
+ local d = entry.data
+ if gzip.compressed(d) then
+ d = gzip.decompress(d) or d
+ end
+ local svg = xmlconvert(d)
local root = svg and xmlfirst(svg,"/svg[@id='glyph"..index.."']")
local data = root and tostring(root)
- -- report_svg("data for glyph %04X: %s",index,data)
return data
end
@@ -412,6 +423,9 @@ end
--
-- Because a generic setup can be flawed we need to catch bad inkscape runs which add a bit of
-- ugly overhead. Bah.
+ --
+ -- In the long run this method is a dead end because we cannot rely on command line arguments
+ -- etc to be upward compatible (so no real batch tool).
local new = nil
@@ -430,9 +444,10 @@ end
-- local indices = fonts.getindices(tfmdata)
local descriptions = tfmdata.descriptions
local nofshapes = #svgshapes
+ local s_format = inkscapeformat("pdf") -- hack, this will go away when is >= 0 is everywhere
local f_svgfile = formatters["temp-otf-svg-shape-%i.svg"]
local f_pdffile = formatters["temp-otf-svg-shape-%i.pdf"]
- local f_convert = formatters["%s --export-%s=%s\n"]
+ local f_convert = formatters[new and "file-open:%s; export-%s:%s; export-do\n" or "%s --export-%s=%s\n"]
local filterglyph = otfsvg.filterglyph
local nofdone = 0
local processed = { }
@@ -446,7 +461,7 @@ end
local svgfile = f_svgfile(index)
local pdffile = f_pdffile(index)
savedata(svgfile,data)
- inkscape:write(f_convert(svgfile,inkscapeformat("pdf"),pdffile))
+ inkscape:write(f_convert(svgfile,s_format,pdffile))
processed[index] = true
nofdone = nofdone + 1
if nofdone % 25 == 0 then
diff --git a/macros/luatex/generic/luaotfload/fontloader-font-one.lua b/macros/luatex/generic/luaotfload/fontloader-font-one.lua
index 5ef6e47497..829f52ea04 100644
--- a/macros/luatex/generic/luaotfload/fontloader-font-one.lua
+++ b/macros/luatex/generic/luaotfload/fontloader-font-one.lua
@@ -727,6 +727,7 @@ local function read_from_afm(specification)
local tfmdata = afmtotfm(specification)
if tfmdata then
tfmdata.properties.name = specification.name
+ tfmdata.properties.id = specification.id
tfmdata = constructors.scale(tfmdata, specification)
local allfeatures = tfmdata.shared.features or specification.features.normal
constructors.applymanipulators("afm",tfmdata,allfeatures,trace_features,report_afm)
diff --git a/macros/luatex/generic/luaotfload/fontloader-font-osd.lua b/macros/luatex/generic/luaotfload/fontloader-font-osd.lua
index 87453d9e2d..2d0e685c19 100644
--- a/macros/luatex/generic/luaotfload/fontloader-font-osd.lua
+++ b/macros/luatex/generic/luaotfload/fontloader-font-osd.lua
@@ -118,11 +118,11 @@ local setstate = nuts.setstate
local ischar = nuts.ischar
-local insert_node_after = nuts.insert_after
+local insertnodeafter = nuts.insertafter
local copy_node = nuts.copy
local remove_node = nuts.remove
-local flush_list = nuts.flush_list
-local flush_node = nuts.flush_node
+local flushlist = nuts.flushlist
+local flushnode = nuts.flushnode
local copyinjection = nodes.injections.copy -- KE: is this necessary? HH: probably not as positioning comes later and we rawget/set
@@ -826,7 +826,7 @@ local function inject_syntax_error(head,current,char)
else
setchar(current,dotted_circle)
end
- return insert_node_after(head,current,signal)
+ return insertnodeafter(head,current,signal)
end
-- hm, this is applied to one character:
@@ -968,7 +968,7 @@ local function reorder_one(head,start,stop,font,attr,nbspaces)
if current == stop then
stop = getprev(stop)
head = remove_node(head,current)
- flush_node(current)
+ flushnode(current)
return head, stop, nbspaces
else
nbspaces = nbspaces + 1
@@ -998,7 +998,7 @@ local function reorder_one(head,start,stop,font,attr,nbspaces)
tempcurrent = processcharacters(tempcurrent,font)
setstate(tempcurrent,unsetvalue)
if getchar(next) == getchar(tempcurrent) then
- flush_list(tempcurrent)
+ flushlist(tempcurrent)
if show_syntax_errors then
head, current = inject_syntax_error(head,current,char)
end
@@ -1006,8 +1006,8 @@ local function reorder_one(head,start,stop,font,attr,nbspaces)
setchar(current,getchar(tempcurrent)) -- we assumes that the result of blwf consists of one node
local freenode = getnext(current)
setlink(current,tmp)
- flush_node(freenode)
- flush_list(tempcurrent)
+ flushnode(freenode)
+ flushlist(tempcurrent)
if changestop then
stop = current
end
@@ -1154,7 +1154,7 @@ local function reorder_one(head,start,stop,font,attr,nbspaces)
ch = tpm[1]
setchar(n,ch)
setchar(extra,tpm[2])
- head = insert_node_after(head,current,extra)
+ head = insertnodeafter(head,current,extra)
tpm = twopart_mark[ch]
end
while c ~= stop and dependent_vowel[ch] do
@@ -1335,7 +1335,7 @@ local function reorder_one(head,start,stop,font,attr,nbspaces)
stop = getprev(stop)
end
head = remove_node(head,base)
- flush_node(base)
+ flushnode(base)
end
return head, stop, nbspaces
@@ -1712,7 +1712,7 @@ function handlers.devanagari_remove_joiners(head,start,kind,lookupname,replaceme
if head == start then
head = stop
end
- flush_list(start)
+ flushlist(start)
return head, stop, true
end
@@ -1876,7 +1876,7 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas
if current == stop then
stop = getprev(stop)
head = remove_node(head,current)
- flush_node(current)
+ flushnode(current)
return head, stop, nbspaces
else
nbspaces = nbspaces + 1
@@ -1979,7 +1979,7 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas
char = tpm[1]
setchar(current,char)
setchar(extra,tpm[2])
- head = insert_node_after(head,current,extra)
+ head = insertnodeafter(head,current,extra)
tpm = twopart_mark[char]
end
--
@@ -2154,7 +2154,7 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas
end
nbspaces = nbspaces - 1
head = remove_node(head, base)
- flush_node(base)
+ flushnode(base)
end
return head, stop, nbspaces
diff --git a/macros/luatex/generic/luaotfload/fontloader-font-ota.lua b/macros/luatex/generic/luaotfload/fontloader-font-ota.lua
index ce1b22b50d..a8f9f0047c 100644
--- a/macros/luatex/generic/luaotfload/fontloader-font-ota.lua
+++ b/macros/luatex/generic/luaotfload/fontloader-font-ota.lua
@@ -40,7 +40,7 @@ local getsubtype = nuts.getsubtype
local getchar = nuts.getchar
local ischar = nuts.ischar
-local end_of_math = nuts.end_of_math
+local endofmath = nuts.endofmath
local nodecodes = nodes.nodecodes
----- glyph_code = nodecodes.glyph
@@ -173,7 +173,7 @@ function analyzers.setstate(head,font)
end
first, last, n = nil, nil, 0
if id == math_code then
- current = end_of_math(current)
+ current = endofmath(current)
end
elseif id == disc_code then
-- always in the middle .. it doesn't make much sense to assign a property
@@ -189,7 +189,7 @@ function analyzers.setstate(head,font)
end
first, last, n = nil, nil, 0
if id == math_code then
- current = end_of_math(current)
+ current = endofmath(current)
end
end
current = getnext(current)
@@ -435,7 +435,7 @@ function methods.arab(head,font,attr)
first = nil
end
if id == math_code then -- a bit duplicate as we test for glyphs twice
- current = end_of_math(current)
+ current = endofmath(current)
end
end
current = getnext(current)
@@ -562,7 +562,7 @@ do
wrapup()
end
if id == math_code then -- a bit duplicate as we test for glyphs twice
- current = end_of_math(current)
+ current = endofmath(current)
end
end
current = getnext(current)
diff --git a/macros/luatex/generic/luaotfload/fontloader-font-otj.lua b/macros/luatex/generic/luaotfload/fontloader-font-otj.lua
index bb02044dca..c4ec9972cd 100644
--- a/macros/luatex/generic/luaotfload/fontloader-font-otj.lua
+++ b/macros/luatex/generic/luaotfload/fontloader-font-otj.lua
@@ -90,6 +90,8 @@ local getoffsets = nuts.getoffsets
local getboth = nuts.getboth
local getdisc = nuts.getdisc
local setdisc = nuts.setdisc
+local getreplace = nuts.getreplace
+local setreplace = nuts.setreplace
local setoffsets = nuts.setoffsets
local ischar = nuts.ischar
local getkern = nuts.getkern
@@ -98,13 +100,11 @@ local setlink = nuts.setlink
local setwidth = nuts.setwidth
local getwidth = nuts.getwidth
------ traverse_id = nuts.traverse_id
------ traverse_char = nuts.traverse_char
local nextchar = nuts.traversers.char
local nextglue = nuts.traversers.glue
-local insert_node_before = nuts.insert_before
-local insert_node_after = nuts.insert_after
+local insertnodebefore = nuts.insertbefore
+local insertnodeafter = nuts.insertafter
local properties = nodes.properties.data
@@ -124,7 +124,7 @@ if not fontkern then -- generic
local thekern = nuts.new("kern",0) -- fontkern
local setkern = nuts.setkern
- local copy_node = nuts.copy_node
+ local copy_node = nuts.copy
fontkern = function(k)
local n = copy_node(thekern)
@@ -138,7 +138,7 @@ if not italickern then -- generic
local thekern = nuts.new("kern",3) -- italiccorrection
local setkern = nuts.setkern
- local copy_node = nuts.copy_node
+ local copy_node = nuts.copy
italickern = function(k)
local n = copy_node(thekern)
@@ -667,12 +667,12 @@ local function inject_kerns_only(head,where)
if leftkern and leftkern ~= 0 then
if prev and getid(prev) == glue_code then
if useitalickerns then
- head = insert_node_before(head,current,italickern(leftkern))
+ head = insertnodebefore(head,current,italickern(leftkern))
else
setwidth(prev, getwidth(prev) + leftkern)
end
else
- head = insert_node_before(head,current,fontkern(leftkern))
+ head = insertnodebefore(head,current,fontkern(leftkern))
end
end
end
@@ -731,7 +731,7 @@ local function inject_kerns_only(head,where)
if i then
local leftkern = i.leftkern
if leftkern and leftkern ~= 0 then
- pre = insert_node_before(pre,n,fontkern(leftkern))
+ pre = insertnodebefore(pre,n,fontkern(leftkern))
done = true
end
end
@@ -747,7 +747,7 @@ local function inject_kerns_only(head,where)
if i then
local leftkern = i.leftkern
if leftkern and leftkern ~= 0 then
- post = insert_node_before(post,n,fontkern(leftkern))
+ post = insertnodebefore(post,n,fontkern(leftkern))
done = true
end
end
@@ -763,7 +763,7 @@ local function inject_kerns_only(head,where)
if i then
local leftkern = i.leftkern
if leftkern and leftkern ~= 0 then
- replace = insert_node_before(replace,n,fontkern(leftkern))
+ replace = insertnodebefore(replace,n,fontkern(leftkern))
done = true
end
end
@@ -830,39 +830,36 @@ local function inject_positions_only(head,where)
rightkern = 0
elseif prev and getid(prev) == glue_code then
if useitalickerns then
- head = insert_node_before(head,current,italickern(leftkern))
+ head = insertnodebefore(head,current,italickern(leftkern))
else
setwidth(prev, getwidth(prev) + leftkern)
end
else
- head = insert_node_before(head,current,fontkern(leftkern))
+ head = insertnodebefore(head,current,fontkern(leftkern))
end
end
if rightkern and rightkern ~= 0 then
if next and getid(next) == glue_code then
if useitalickerns then
- insert_node_after(head,current,italickern(rightkern))
+ insertnodeafter(head,current,italickern(rightkern))
else
setwidth(next, getwidth(next) + rightkern)
end
else
- insert_node_after(head,current,fontkern(rightkern))
+ insertnodeafter(head,current,fontkern(rightkern))
end
end
- else
+ elseif next then
local i = p.emptyinjections
if i then
-- glyph|disc|glyph (special case)
local rightkern = i.rightkern
- if rightkern and rightkern ~= 0 then
- if next and getid(next) == disc_code then
- if replace then
- -- error, we expect an empty one
- else
- -- KE setfield(next,"replace",fontkern(rightkern)) -- maybe also leftkern
- replace = fontkern(rightkern) -- maybe also leftkern
- done = true --KE
- end
+ if rightkern and rightkern ~= 0 and getid(next) == disc_code then
+ local replace = getreplace(next)
+ if replace then
+ -- can't happen
+ else
+ setreplace(next,fontkern(rightkern))
end
end
end
@@ -925,12 +922,12 @@ local function inject_positions_only(head,where)
end
local leftkern = i.leftkern
if leftkern and leftkern ~= 0 then
- pre = insert_node_before(pre,n,fontkern(leftkern))
+ pre = insertnodebefore(pre,n,fontkern(leftkern))
done = true
end
local rightkern = i.rightkern
if rightkern and rightkern ~= 0 then
- insert_node_after(pre,n,fontkern(rightkern))
+ insertnodeafter(pre,n,fontkern(rightkern))
done = true
end
end
@@ -950,12 +947,12 @@ local function inject_positions_only(head,where)
end
local leftkern = i.leftkern
if leftkern and leftkern ~= 0 then
- post = insert_node_before(post,n,fontkern(leftkern))
+ post = insertnodebefore(post,n,fontkern(leftkern))
done = true
end
local rightkern = i.rightkern
if rightkern and rightkern ~= 0 then
- insert_node_after(post,n,fontkern(rightkern))
+ insertnodeafter(post,n,fontkern(rightkern))
done = true
end
end
@@ -975,12 +972,12 @@ local function inject_positions_only(head,where)
end
local leftkern = i.leftkern
if leftkern and leftkern ~= 0 then
- replace = insert_node_before(replace,n,fontkern(leftkern))
+ replace = insertnodebefore(replace,n,fontkern(leftkern))
done = true
end
local rightkern = i.rightkern
if rightkern and rightkern ~= 0 then
- insert_node_after(replace,n,fontkern(rightkern))
+ insertnodeafter(replace,n,fontkern(rightkern))
done = true
end
end
@@ -996,7 +993,7 @@ local function inject_positions_only(head,where)
-- glyph|pre glyphs
local rightkern = i.rightkern
if rightkern and rightkern ~= 0 then
- pre = insert_node_before(pre,pre,fontkern(rightkern))
+ pre = insertnodebefore(pre,pre,fontkern(rightkern))
done = true
end
end
@@ -1010,7 +1007,7 @@ local function inject_positions_only(head,where)
-- glyph|replace glyphs
local rightkern = i.rightkern
if rightkern and rightkern ~= 0 then
- replace = insert_node_before(replace,replace,fontkern(rightkern))
+ replace = insertnodebefore(replace,replace,fontkern(rightkern))
done = true
end
end
@@ -1144,8 +1141,8 @@ local function inject_everything(head,where)
--
-- todo: head and check for prev / next kern
--
- insert_node_before(n,n,fontkern(-wn))
- insert_node_after(n,n,fontkern(-wn))
+ insertnodebefore(n,n,fontkern(-wn))
+ insertnodeafter(n,n,fontkern(-wn))
end
end
end
@@ -1295,39 +1292,37 @@ local function inject_everything(head,where)
rightkern = 0
elseif prev and getid(prev) == glue_code then
if useitalickerns then
- head = insert_node_before(head,current,italickern(leftkern))
+ head = insertnodebefore(head,current,italickern(leftkern))
else
setwidth(prev, getwidth(prev) + leftkern)
end
else
- head = insert_node_before(head,current,fontkern(leftkern))
+ head = insertnodebefore(head,current,fontkern(leftkern))
end
end
if rightkern and rightkern ~= 0 then
if next and getid(next) == glue_code then
if useitalickerns then
- insert_node_after(head,current,italickern(rightkern))
+ insertnodeafter(head,current,italickern(rightkern))
else
setwidth(next, getwidth(next) + rightkern)
end
else
- insert_node_after(head,current,fontkern(rightkern))
+ insertnodeafter(head,current,fontkern(rightkern))
end
end
end
- else
+ elseif next then
local i = p.emptyinjections
if i then
-- glyph|disc|glyph (special case)
local rightkern = i.rightkern
- if rightkern and rightkern ~= 0 then
- if next and getid(next) == disc_code then
- if replace then
- -- error, we expect an empty one
- else
- replace = fontkern(rightkern)
- done = true
- end
+ if rightkern and rightkern ~= 0 and getid(next) == disc_code then
+ local replace = getreplace(next)
+ if replace then
+ -- can't happen
+ else
+ setreplace(next,fontkern(rightkern))
end
end
end
@@ -1406,12 +1401,12 @@ local function inject_everything(head,where)
end
local leftkern = i.leftkern
if leftkern and leftkern ~= 0 then
- pre = insert_node_before(pre,n,fontkern(leftkern))
+ pre = insertnodebefore(pre,n,fontkern(leftkern))
done = true
end
local rightkern = i.rightkern
if rightkern and rightkern ~= 0 then
- insert_node_after(pre,n,fontkern(rightkern))
+ insertnodeafter(pre,n,fontkern(rightkern))
done = true
end
if hasmarks then
@@ -1437,12 +1432,12 @@ local function inject_everything(head,where)
end
local leftkern = i.leftkern
if leftkern and leftkern ~= 0 then
- post = insert_node_before(post,n,fontkern(leftkern))
+ post = insertnodebefore(post,n,fontkern(leftkern))
done = true
end
local rightkern = i.rightkern
if rightkern and rightkern ~= 0 then
- insert_node_after(post,n,fontkern(rightkern))
+ insertnodeafter(post,n,fontkern(rightkern))
done = true
end
if hasmarks then
@@ -1468,12 +1463,12 @@ local function inject_everything(head,where)
end
local leftkern = i.leftkern
if leftkern and leftkern ~= 0 then
- replace = insert_node_before(replace,n,fontkern(leftkern))
+ replace = insertnodebefore(replace,n,fontkern(leftkern))
done = true
end
local rightkern = i.rightkern
if rightkern and rightkern ~= 0 then
- insert_node_after(replace,n,fontkern(rightkern))
+ insertnodeafter(replace,n,fontkern(rightkern))
done = true
end
if hasmarks then
@@ -1495,7 +1490,7 @@ local function inject_everything(head,where)
-- glyph|pre glyphs
local rightkern = i.rightkern
if rightkern and rightkern ~= 0 then
- pre = insert_node_before(pre,pre,fontkern(rightkern))
+ pre = insertnodebefore(pre,pre,fontkern(rightkern))
done = true
end
end
@@ -1509,7 +1504,7 @@ local function inject_everything(head,where)
-- glyph|replace glyphs
local rightkern = i.rightkern
if rightkern and rightkern ~= 0 then
- replace = insert_node_before(replace,replace,fontkern(rightkern))
+ replace = insertnodebefore(replace,replace,fontkern(rightkern))
done = true
end
end
@@ -1711,8 +1706,8 @@ local function injectspaces(head)
if trace_spaces then
report_spaces("%C [%p + %p + %p] %C",prevchar,lnew,old,rnew,nextchar)
end
- head = insert_node_before(head,n,italickern(lnew))
- insert_node_after(head,n,italickern(rnew))
+ head = insertnodebefore(head,n,italickern(lnew))
+ insertnodeafter(head,n,italickern(rnew))
else
local new = old + (leftkern + rightkern) * factor
if trace_spaces then
@@ -1727,7 +1722,7 @@ local function injectspaces(head)
if trace_spaces then
report_spaces("%C [%p + %p]",prevchar,old,new)
end
- insert_node_after(head,n,italickern(new)) -- tricky with traverse but ok
+ insertnodeafter(head,n,italickern(new)) -- tricky with traverse but ok
else
local new = old + leftkern * factor
if trace_spaces then
@@ -1746,7 +1741,7 @@ local function injectspaces(head)
if trace_spaces then
report_spaces("[%p + %p] %C",old,new,nextchar)
end
- insert_node_after(head,n,italickern(new))
+ insertnodeafter(head,n,italickern(new))
else
local new = old + rightkern * factor
if trace_spaces then
diff --git a/macros/luatex/generic/luaotfload/fontloader-font-otl.lua b/macros/luatex/generic/luaotfload/fontloader-font-otl.lua
index 19de2bb777..4619e13dcf 100644
--- a/macros/luatex/generic/luaotfload/fontloader-font-otl.lua
+++ b/macros/luatex/generic/luaotfload/fontloader-font-otl.lua
@@ -52,7 +52,7 @@ local report_otf = logs.reporter("fonts","otf loading")
local fonts = fonts
local otf = fonts.handlers.otf
-otf.version = 3.113 -- beware: also sync font-mis.lua and in mtx-fonts
+otf.version = 3.116 -- beware: also sync font-mis.lua and in mtx-fonts
otf.cache = containers.define("fonts", "otl", otf.version, true)
otf.svgcache = containers.define("fonts", "svg", otf.version, true)
otf.pngcache = containers.define("fonts", "png", otf.version, true)
@@ -608,6 +608,7 @@ local function read_from_otf(specification)
-- this late ? .. needs checking
tfmdata.properties.name = specification.name
tfmdata.properties.sub = specification.sub
+ tfmdata.properties.id = specification.id
--
tfmdata = constructors.scale(tfmdata,specification)
local allfeatures = tfmdata.shared.features or specification.features.normal
diff --git a/macros/luatex/generic/luaotfload/fontloader-font-otr.lua b/macros/luatex/generic/luaotfload/fontloader-font-otr.lua
index 531f665de7..4b154b2563 100644
--- a/macros/luatex/generic/luaotfload/fontloader-font-otr.lua
+++ b/macros/luatex/generic/luaotfload/fontloader-font-otr.lua
@@ -1292,8 +1292,8 @@ readers.post = function(f,fontdata,specification)
if length > 0 then
glyphs[mapping].name = readstring(f,length)
else
- report("quit post name fetching at %a of %a: %s",i,maxnames,"overflow")
- break
+ -- report("quit post name fetching at %a of %a: %s",i,maxnames,"overflow")
+ -- break
end
end
end
diff --git a/macros/luatex/generic/luaotfload/fontloader-font-ots.lua b/macros/luatex/generic/luaotfload/fontloader-font-ots.lua
index 880bcb6d50..30d79c4077 100644
--- a/macros/luatex/generic/luaotfload/fontloader-font-ots.lua
+++ b/macros/luatex/generic/luaotfload/fontloader-font-ots.lua
@@ -213,27 +213,29 @@ local getglyphdata = nuts.getglyphdata
-- their positions because some complex ligatures might need that. For the moment we
-- use an x_ prefix because for now generic follows the other approach.
-local copy_no_components = nuts.copy_no_components
-local copy_only_glyphs = nuts.copy_only_glyphs
-local count_components = nuts.count_components
-local set_components = nuts.set_components
-local get_components = nuts.get_components
-local flush_components = nuts.flush_components
+local components = nuts.components
+local copynocomponents = components.copynocomponents
+local copyonlyglyphs = components.copyonlyglyphs
+local countcomponents = components.count
+local setcomponents = components.set
+local getcomponents = components.get
+local flushcomponents = components.flush
---------------------------------------------------------------------------------------
local ischar = nuts.ischar
-local usesfont = nuts.uses_font
+local usesfont = nuts.usesfont
-local insert_node_after = nuts.insert_after
+local insertnodeafter = nuts.insertafter
local copy_node = nuts.copy
-local copy_node_list = nuts.copy_list
+local copy_node_list = nuts.copylist
local remove_node = nuts.remove
local find_node_tail = nuts.tail
-local flush_node_list = nuts.flush_list
-local flush_node = nuts.flush_node
-local end_of_math = nuts.end_of_math
-local start_of_par = nuts.start_of_par
+local flushnodelist = nuts.flushlist
+local flushnode = nuts.flushnode
+local endofmath = nuts.endofmath
+
+local startofpar = nuts.startofpar
local setmetatable = setmetatable
local setmetatableindex = table.setmetatableindex
@@ -317,13 +319,6 @@ local checkstep = (tracers and tracers.steppers.check) or function()
local registerstep = (tracers and tracers.steppers.register) or function() end
local registermessage = (tracers and tracers.steppers.message) or function() end
--- local function checkdisccontent(d)
--- local pre, post, replace = getdisc(d)
--- if pre then for n in traverse_id(glue_code,pre) do report("pre: %s",nodes.idstostring(pre)) break end end
--- if post then for n in traverse_id(glue_code,post) do report("pos: %s",nodes.idstostring(post)) break end end
--- if replace then for n in traverse_id(glue_code,replace) do report("rep: %s",nodes.idstostring(replace)) break end end
--- end
-
local function logprocess(...)
if trace_steps then
registermessage(...)
@@ -423,12 +418,12 @@ local function flattendisk(head,disc)
local prev, next = getboth(disc)
local ishead = head == disc
setdisc(disc)
- flush_node(disc)
+ flushnode(disc)
if pre then
- flush_node_list(pre)
+ flushnodelist(pre)
end
if post then
- flush_node_list(post)
+ flushnodelist(post)
end
if ishead then
if replace then
@@ -480,16 +475,16 @@ local function markstoligature(head,start,stop,char)
local next = getnext(stop)
setprev(start)
setnext(stop)
- local base = copy_no_components(start,copyinjection)
+ local base = copynocomponents(start,copyinjection)
if head == start then
head = base
end
resetinjection(base)
setchar(base,char)
setsubtype(base,ligatureglyph_code)
- set_components(base,start)
+ setcomponents(base,start)
setlink(prev,base,next)
- flush_components(start)
+ flushcomponents(start)
return head, base
end
end
@@ -509,7 +504,7 @@ local no_right_ligature_code = 2
local no_left_kern_code = 4
local no_right_kern_code = 8
-local has_glyph_option = node.direct.has_glyph_option or function(n,c)
+local hasglyphoption = function(n,c)
if c == no_left_ligature_code or c == no_right_ligature_code then
return getattr(n,a_noligature) == 1
else
@@ -520,7 +515,7 @@ end
-- in lmtx we need to check the components and can be slightly more clever
local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfound,hasmarks) -- brr head
- if has_glyph_option(start,no_right_ligature_code) then
+ if hasglyphoption(start,no_right_ligature_code) then
return head, start
end
if start == stop and getchar(start) == char then
@@ -533,14 +528,14 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou
local comp = start
setprev(start)
setnext(stop)
- local base = copy_no_components(start,copyinjection)
+ local base = copynocomponents(start,copyinjection)
if start == head then
head = base
end
resetinjection(base)
setchar(base,char)
setsubtype(base,ligatureglyph_code)
- set_components(base,comp)
+ setcomponents(base,comp)
setlink(prev,base,next)
if not discfound then
local deletemarks = not skiphash or hasmarks
@@ -554,7 +549,7 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou
local char = getchar(start)
if not marks[char] then
baseindex = baseindex + componentindex
- componentindex = count_components(start,marks)
+ componentindex = countcomponents(start,marks)
-- we can be more clever here: "not deletemarks or (skiphash and not skiphash[char])"
-- and such:
elseif not deletemarks then
@@ -565,7 +560,7 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou
end
local n = copy_node(start)
copyinjection(n,start) -- is this ok ? we position later anyway
- head, current = insert_node_after(head,current,n) -- unlikely that mark has components
+ head, current = insertnodeafter(head,current,n) -- unlikely that mark has components
elseif trace_marks then
logwarning("%s: delete ligature mark %s",pref(dataset,sequence),gref(char))
end
@@ -590,7 +585,7 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou
break
end
end
- flush_components(components)
+ flushcomponents(components)
else
-- discfound ... forget about marks .. probably no scripts that hyphenate and have marks
local discprev, discnext = getboth(discfound)
@@ -602,8 +597,8 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou
if not replace then
-- looks like we never come here as it's not okay
local prev = getprev(base)
- -- local comp = get_components(base) -- already set
- local copied = copy_only_glyphs(comp)
+ -- local comp = getcomponents(base) -- already set
+ local copied = copyonlyglyphs(comp)
if pre then
setlink(discprev,pre)
else
@@ -620,7 +615,7 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou
setlink(prev,discfound,next)
setboth(base)
-- here components have a pointer so we can't free it!
- set_components(base,copied)
+ setcomponents(base,copied)
replace = base
if forcediscretionaries then
setdisc(discfound,pre,post,replace,discretionarydisc_code)
@@ -650,7 +645,7 @@ local function multiple_glyphs(head,start,multiple,skiphash,what,stop) -- what t
local n = copy_node(start) -- ignore components
resetinjection(n)
setchar(n,multiple[k])
- insert_node_after(head,start,n)
+ insertnodeafter(head,start,n)
start = n
end
if what == true then
@@ -661,7 +656,7 @@ local function multiple_glyphs(head,start,multiple,skiphash,what,stop) -- what t
local n = copy_node(start) -- ignore components
resetinjection(n)
setchar(n,m)
- insert_node_after(head,start,n)
+ insertnodeafter(head,start,n)
start = n
end
end
@@ -924,7 +919,7 @@ function handlers.gsub_ligature(head,start,dataset,sequence,ligature,rlmode,skip
end
function handlers.gpos_single(head,start,dataset,sequence,kerns,rlmode,skiphash,step,injection)
- if has_glyph_option(start,no_right_kern_code) then
+ if hasglyphoption(start,no_right_kern_code) then
return head, start, false
else
local startchar = getchar(start)
@@ -945,7 +940,7 @@ function handlers.gpos_single(head,start,dataset,sequence,kerns,rlmode,skiphash,
end
function handlers.gpos_pair(head,start,dataset,sequence,kerns,rlmode,skiphash,step,injection)
- if has_glyph_option(start,no_right_kern_code) then
+ if hasglyphoption(start,no_right_kern_code) then
return head, start, false
else
local snext = getnext(start)
@@ -1536,7 +1531,7 @@ end
function chainprocs.gpos_single(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex)
-- we actually should check no_left_kern_code with next
- if not has_glyph_option(start,no_right_kern_code) then
+ if not hasglyphoption(start,no_right_kern_code) then
local mapping = currentlookup.mapping
if mapping == nil then
mapping = getmapping(dataset,sequence,currentlookup)
@@ -1566,7 +1561,7 @@ end
function chainprocs.gpos_pair(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex) -- todo: injections ?
-- we actually should check no_left_kern_code with next
- if not has_glyph_option(start,no_right_kern_code) then
+ if not hasglyphoption(start,no_right_kern_code) then
local mapping = currentlookup.mapping
if mapping == nil then
mapping = getmapping(dataset,sequence,currentlookup)
@@ -1934,13 +1929,13 @@ local function checked(head)
if next then
setlink(kern,next)
end
- flush_node(current)
+ flushnode(current)
head = kern
current = next
else
local prev, next = getboth(current)
setlink(prev,kern,next)
- flush_node(current)
+ flushnode(current)
current = next
end
else
@@ -2480,115 +2475,247 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode,s
-- report("no hit in %a at %i of %i contexts",sequence.type,k,nofcontexts)
goto next
end
- local s = seq.n -- or #seq
- local l = ck[5] -- last current
- local current = start
- local last = start
-
+ local s = seq.n -- or #seq
if s == 1 then
- goto next
- end
+ -- bit weird case: why use a chain, but it is a hit
+ else
+ local l = ck[5] -- last current
+ local current = start
+ local last = start
- -- current match
+ -- current match
- if l > f then
- -- before/current/after | before/current | current/after
- local discfound -- = nil
- local n = f + 1
- last = startnext -- the second in current (first already matched)
- while n <= l do
- if postreplace and not last then
- last = getnext(sweepnode)
- sweeptype = nil
- end
- if last then
- local char, id = ischar(last,currentfont)
- if char then
- if skiphash and skiphash[char] then
- skipped = true
- if trace_skips then
- show_skip(dataset,sequence,char,ck,classes[char])
- end
- last = getnext(last)
- elseif seq[n][char] then
- if n < l then
+ if l > f then
+ -- before/current/after | before/current | current/after
+ local discfound -- = nil
+ local n = f + 1
+ last = startnext -- the second in current (first already matched)
+ while n <= l do
+ if postreplace and not last then
+ last = getnext(sweepnode)
+ sweeptype = nil
+ end
+ if last then
+ local char, id = ischar(last,currentfont)
+ if char then
+ if skiphash and skiphash[char] then
+ skipped = true
+ if trace_skips then
+ show_skip(dataset,sequence,char,ck,classes[char])
+ end
last = getnext(last)
- end
- n = n + 1
- elseif discfound then
- notmatchreplace[discfound] = true
- if notmatchpre[discfound] then
- goto next
+ elseif seq[n][char] then
+ if n < l then
+ last = getnext(last)
+ end
+ n = n + 1
+ elseif discfound then
+ notmatchreplace[discfound] = true
+ if notmatchpre[discfound] then
+ goto next
+ else
+ break
+ end
else
- break
- end
- else
- goto next
- end
- elseif char == false then
- if discfound then
- notmatchreplace[discfound] = true
- if notmatchpre[discfound] then
goto next
+ end
+ elseif char == false then
+ if discfound then
+ notmatchreplace[discfound] = true
+ if notmatchpre[discfound] then
+ goto next
+ else
+ break
+ end
else
- break
+ goto next
end
- else
- goto next
- end
- elseif id == disc_code then
- -- elseif id == disc_code and (not discs or discs[last]) then
- discseen = true
- discfound = last
- notmatchpre[last] = nil
- notmatchpost[last] = true
- notmatchreplace[last] = nil
- local pre, post, replace = getdisc(last)
- if pre then
- local n = n
- while pre do
- if seq[n][getchar(pre)] then
- n = n + 1
- if n > l then
+ elseif id == disc_code then
+ -- elseif id == disc_code and (not discs or discs[last]) then
+ discseen = true
+ discfound = last
+ notmatchpre[last] = nil
+ notmatchpost[last] = true
+ notmatchreplace[last] = nil
+ local pre, post, replace = getdisc(last)
+ if pre then
+ local n = n
+ while pre do
+ if seq[n][getchar(pre)] then
+ n = n + 1
+ if n > l then
+ break
+ end
+ pre = getnext(pre)
+ else
+ notmatchpre[last] = true
break
end
- pre = getnext(pre)
- else
+ end
+ if n <= l then
notmatchpre[last] = true
- break
end
- end
- if n <= l then
+ else
notmatchpre[last] = true
end
+ if replace then
+ -- so far we never entered this branch
+ while replace do
+ if seq[n][getchar(replace)] then
+ n = n + 1
+ if n > l then
+ break
+ end
+ replace = getnext(replace)
+ else
+ notmatchreplace[last] = true
+ if notmatchpre[last] then
+ goto next
+ else
+ break
+ end
+ end
+ end
+ -- why here again
+ if notmatchpre[last] then
+ goto next
+ end
+ end
+ -- maybe only if match
+ last = getnext(last)
else
- notmatchpre[last] = true
+ goto next
end
- if replace then
- -- so far we never entered this branch
- while replace do
- if seq[n][getchar(replace)] then
- n = n + 1
- if n > l then
- break
+ else
+ goto next
+ end
+ end
+ end
+
+ -- before
+
+ if f > 1 then
+ if startprev then
+ local prev = startprev
+ if prereplace and prev == checkdisc then
+ prev = getprev(sweepnode)
+ end
+ if prev then
+ local discfound -- = nil
+ local n = f - 1
+ while n >= 1 do
+ if prev then
+ local char, id = ischar(prev,currentfont)
+ if char then
+ if skiphash and skiphash[char] then
+ skipped = true
+ if trace_skips then
+ show_skip(dataset,sequence,char,ck,classes[char])
+ end
+ prev = getprev(prev)
+ elseif seq[n][char] then
+ if n > 1 then
+ prev = getprev(prev)
+ end
+ n = n - 1
+ elseif discfound then
+ notmatchreplace[discfound] = true
+ if notmatchpost[discfound] then
+ goto next
+ else
+ break
+ end
+ else
+ goto next
end
- replace = getnext(replace)
- else
- notmatchreplace[last] = true
- if notmatchpre[last] then
+ elseif char == false then
+ if discfound then
+ notmatchreplace[discfound] = true
+ if notmatchpost[discfound] then
+ goto next
+ end
+ else
goto next
+ end
+ break
+ elseif id == disc_code then
+ -- elseif id == disc_code and (not discs or discs[prev]) then
+ -- the special case: f i where i becomes dottless i ..
+ discseen = true
+ discfound = prev
+ notmatchpre[prev] = true
+ notmatchpost[prev] = nil
+ notmatchreplace[prev] = nil
+ local pre, post, replace, pretail, posttail, replacetail = getdisc(prev,true)
+ -- weird test: needs checking
+ if pre ~= start and post ~= start and replace ~= start then
+ if post then
+ local n = n
+ while posttail do
+ if seq[n][getchar(posttail)] then
+ n = n - 1
+ if posttail == post or n < 1 then
+ break
+ else
+ posttail = getprev(posttail)
+ end
+ else
+ notmatchpost[prev] = true
+ break
+ end
+ end
+ if n >= 1 then
+ notmatchpost[prev] = true
+ end
+ else
+ notmatchpost[prev] = true
+ end
+ if replace then
+ -- we seldom enter this branch (e.g. on brill efficient)
+ while replacetail do
+ if seq[n][getchar(replacetail)] then
+ n = n - 1
+ if replacetail == replace or n < 1 then
+ break
+ else
+ replacetail = getprev(replacetail)
+ end
+ else
+ notmatchreplace[prev] = true
+ if notmatchpost[prev] then
+ goto next
+ else
+ break
+ end
+ end
+ end
+ else
+ -- notmatchreplace[prev] = true -- not according to Kai
+ end
+ end
+ prev = getprev(prev)
+ -- elseif id == glue_code and seq[n][32] and isspace(prev,threshold,id) then
+ -- elseif seq[n][32] and spaces[prev] then
+ -- n = n - 1
+ -- prev = getprev(prev)
+ elseif id == glue_code then
+ local sn = seq[n]
+ if (sn[32] and spaces[prev]) or sn[0xFFFC] then
+ n = n - 1
+ prev = getprev(prev)
else
- break
+ goto next
end
+ elseif seq[n][0xFFFC] then
+ n = n - 1
+ prev = getprev(prev)
+ else
+ goto next
end
- end
- -- why here again
- if notmatchpre[last] then
+ else
goto next
end
end
- -- maybe only if match
- last = getnext(last)
else
goto next
end
@@ -2596,37 +2723,35 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode,s
goto next
end
end
- end
- -- before
+ -- after
- if f > 1 then
- if startprev then
- local prev = startprev
- if prereplace and prev == checkdisc then
- prev = getprev(sweepnode)
+ if s > l then
+ local current = last and getnext(last)
+ if not current and postreplace then
+ current = getnext(sweepnode)
end
- if prev then
+ if current then
local discfound -- = nil
- local n = f - 1
- while n >= 1 do
- if prev then
- local char, id = ischar(prev,currentfont)
+ local n = l + 1
+ while n <= s do
+ if current then
+ local char, id = ischar(current,currentfont)
if char then
if skiphash and skiphash[char] then
skipped = true
if trace_skips then
show_skip(dataset,sequence,char,ck,classes[char])
end
- prev = getprev(prev)
+ current = getnext(current) -- was absent
elseif seq[n][char] then
- if n > 1 then
- prev = getprev(prev)
+ if n < s then -- new test
+ current = getnext(current) -- was absent
end
- n = n - 1
+ n = n + 1
elseif discfound then
notmatchreplace[discfound] = true
- if notmatchpost[discfound] then
+ if notmatchpre[discfound] then
goto next
else
break
@@ -2637,217 +2762,87 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode,s
elseif char == false then
if discfound then
notmatchreplace[discfound] = true
- if notmatchpost[discfound] then
+ if notmatchpre[discfound] then
goto next
+ else
+ break
end
else
goto next
end
- break
elseif id == disc_code then
- -- elseif id == disc_code and (not discs or discs[prev]) then
- -- the special case: f i where i becomes dottless i ..
- discseen = true
- discfound = prev
- notmatchpre[prev] = true
- notmatchpost[prev] = nil
- notmatchreplace[prev] = nil
- local pre, post, replace, pretail, posttail, replacetail = getdisc(prev,true)
- -- weird test: needs checking
- if pre ~= start and post ~= start and replace ~= start then
- if post then
- local n = n
- while posttail do
- if seq[n][getchar(posttail)] then
- n = n - 1
- if posttail == post or n < 1 then
- break
- else
- posttail = getprev(posttail)
- end
- else
- notmatchpost[prev] = true
+ -- elseif id == disc_code and (not discs or discs[current]) then
+ discseen = true
+ discfound = current
+ notmatchpre[current] = nil
+ notmatchpost[current] = true
+ notmatchreplace[current] = nil
+ local pre, post, replace = getdisc(current)
+ if pre then
+ local n = n
+ while pre do
+ if seq[n][getchar(pre)] then
+ n = n + 1
+ if n > s then
break
+ else
+ pre = getnext(pre)
end
+ else
+ notmatchpre[current] = true
+ break
end
- if n >= 1 then
- notmatchpost[prev] = true
- end
- else
- notmatchpost[prev] = true
end
- if replace then
- -- we seldom enter this branch (e.g. on brill efficient)
- while replacetail do
- if seq[n][getchar(replacetail)] then
- n = n - 1
- if replacetail == replace or n < 1 then
- break
- else
- replacetail = getprev(replacetail)
- end
+ if n <= s then
+ notmatchpre[current] = true
+ end
+ else
+ notmatchpre[current] = true
+ end
+ if replace then
+ -- so far we never entered this branch
+ while replace do
+ if seq[n][getchar(replace)] then
+ n = n + 1
+ if n > s then
+ break
else
- notmatchreplace[prev] = true
- if notmatchpost[prev] then
- goto next
- else
- break
- end
+ replace = getnext(replace)
+ end
+ else
+ notmatchreplace[current] = true
+ if notmatchpre[current] then
+ goto next
+ else
+ break
end
end
- else
- -- notmatchreplace[prev] = true -- not according to Kai
end
+ else
+ -- notmatchreplace[current] = true -- not according to Kai
end
- prev = getprev(prev)
- -- elseif id == glue_code and seq[n][32] and isspace(prev,threshold,id) then
- -- elseif seq[n][32] and spaces[prev] then
- -- n = n - 1
- -- prev = getprev(prev)
+ current = getnext(current)
elseif id == glue_code then
local sn = seq[n]
- if (sn[32] and spaces[prev]) or sn[0xFFFC] then
- n = n - 1
- prev = getprev(prev)
+ if (sn[32] and spaces[current]) or sn[0xFFFC] then
+ n = n + 1
+ current = getnext(current)
else
goto next
end
elseif seq[n][0xFFFC] then
- n = n - 1
- prev = getprev(prev)
- else
- goto next
- end
- else
- goto next
- end
- end
- else
- goto next
- end
- else
- goto next
- end
- end
-
- -- after
-
- if s > l then
- local current = last and getnext(last)
- if not current and postreplace then
- current = getnext(sweepnode)
- end
- if current then
- local discfound -- = nil
- local n = l + 1
- while n <= s do
- if current then
- local char, id = ischar(current,currentfont)
- if char then
- if skiphash and skiphash[char] then
- skipped = true
- if trace_skips then
- show_skip(dataset,sequence,char,ck,classes[char])
- end
- current = getnext(current) -- was absent
- elseif seq[n][char] then
- if n < s then -- new test
- current = getnext(current) -- was absent
- end
- n = n + 1
- elseif discfound then
- notmatchreplace[discfound] = true
- if notmatchpre[discfound] then
- goto next
- else
- break
- end
- else
- goto next
- end
- elseif char == false then
- if discfound then
- notmatchreplace[discfound] = true
- if notmatchpre[discfound] then
- goto next
- else
- break
- end
- else
- goto next
- end
- elseif id == disc_code then
- -- elseif id == disc_code and (not discs or discs[current]) then
- discseen = true
- discfound = current
- notmatchpre[current] = nil
- notmatchpost[current] = true
- notmatchreplace[current] = nil
- local pre, post, replace = getdisc(current)
- if pre then
- local n = n
- while pre do
- if seq[n][getchar(pre)] then
- n = n + 1
- if n > s then
- break
- else
- pre = getnext(pre)
- end
- else
- notmatchpre[current] = true
- break
- end
- end
- if n <= s then
- notmatchpre[current] = true
- end
- else
- notmatchpre[current] = true
- end
- if replace then
- -- so far we never entered this branch
- while replace do
- if seq[n][getchar(replace)] then
- n = n + 1
- if n > s then
- break
- else
- replace = getnext(replace)
- end
- else
- notmatchreplace[current] = true
- if notmatchpre[current] then
- goto next
- else
- break
- end
- end
- end
- else
- -- notmatchreplace[current] = true -- not according to Kai
- end
- current = getnext(current)
- elseif id == glue_code then
- local sn = seq[n]
- if (sn[32] and spaces[current]) or sn[0xFFFC] then
n = n + 1
current = getnext(current)
else
goto next
end
- elseif seq[n][0xFFFC] then
- n = n + 1
- current = getnext(current)
else
goto next
end
- else
- goto next
end
+ else
+ goto next
end
- else
- goto next
end
end
@@ -3795,7 +3790,7 @@ do
local initialrl = 0
- if getid(head) == par_code and start_of_par(head) then
+ if getid(head) == par_code and startofpar(head) then
initialrl = pardirstate(head)
elseif direction == righttoleft_code then
initialrl = -1
@@ -3945,11 +3940,11 @@ do
start = getnext(start)
end
elseif id == math_code then
- start = getnext(end_of_math(start))
+ start = getnext(endofmath(start))
elseif id == dir_code then
topstack, rlmode = txtdirstate(start,dirstack,topstack,rlparmode)
start = getnext(start)
- -- elseif id == par_code and start_of_par(start) then
+ -- elseif id == par_code and startofpar(start) then
-- rlparmode, rlmode = pardirstate(start)
-- start = getnext(start)
else
@@ -4029,11 +4024,11 @@ do
start = getnext(start)
end
elseif id == math_code then
- start = getnext(end_of_math(start))
+ start = getnext(endofmath(start))
elseif id == dir_code then
topstack, rlmode = txtdirstate(start,dirstack,topstack,rlparmode)
start = getnext(start)
- -- elseif id == par_code and start_of_par(start) then
+ -- elseif id == par_code and startofpar(start) then
-- rlparmode, rlmode = pardirstate(start)
-- start = getnext(start)
else
@@ -4140,11 +4135,11 @@ do
-- a different font|state or glue (happens often)
start = getnext(start)
elseif id == math_code then
- start = getnext(end_of_math(start))
+ start = getnext(endofmath(start))
elseif id == dir_code then
topstack, rlmode = txtdirstate(start,dirstack,topstack,rlparmode)
start = getnext(start)
- -- elseif id == par_code and start_of_par(start) then
+ -- elseif id == par_code and startofpar(start) then
-- rlparmode, rlmode = pardirstate(start)
-- start = getnext(start)
else
@@ -4161,49 +4156,60 @@ end
-- so far
-local plugins = { }
-otf.plugins = plugins
+do
-local report = logs.reporter("fonts")
+ local plugins = { }
+ otf.plugins = plugins
-function otf.registerplugin(name,f)
- if type(name) == "string" and type(f) == "function" then
- plugins[name] = { name, f }
- report()
- report("plugin %a has been loaded, please be aware of possible side effects",name)
- report()
- if logs.pushtarget then
- logs.pushtarget("log")
- end
- report("Plugins are not officially supported unless stated otherwise. This is because")
- report("they bypass the regular font handling and therefore some features in ConTeXt")
- report("(especially those related to fonts) might not work as expected or might not work")
- report("at all. Some plugins are for testing and development only and might change")
- report("whenever we feel the need for it.")
- report()
- if logs.poptarget then
- logs.poptarget()
+ local report = logs.reporter("fonts")
+ local warned = false
+ local okay = { text = true }
+
+ function otf.registerplugin(name,f)
+ if type(name) == "string" and type(f) == "function" then
+ plugins[name] = { name, f }
+ if okay[name] then
+ -- no warning (e.g. the diagnostic text plugin)
+ else
+ report("plugin %a has been loaded, please be aware of possible side effects",name)
+ if not warned then
+ if logs.pushtarget then
+ logs.pushtarget("log")
+ end
+ report("Plugins are not officially supported unless stated otherwise. This is because")
+ report("they bypass the regular font handling and therefore some features in ConTeXt")
+ report("(especially those related to fonts) might not work as expected or might not work")
+ report("at all. Some plugins are for testing and development only and might change")
+ report("whenever we feel the need for it.")
+ report()
+ if logs.poptarget then
+ logs.poptarget()
+ end
+ warned = true
+ end
+ end
end
end
-end
-function otf.plugininitializer(tfmdata,value)
- if type(value) == "string" then
- tfmdata.shared.plugin = plugins[value]
+ function otf.plugininitializer(tfmdata,value)
+ if type(value) == "string" then
+ tfmdata.shared.plugin = plugins[value]
+ end
end
-end
-function otf.pluginprocessor(head,font,attr,direction) -- n
- local s = fontdata[font].shared
- local p = s and s.plugin
- if p then
- if trace_plugins then
- report_process("applying plugin %a",p[1])
+ function otf.pluginprocessor(head,font,dynamic,direction) -- n
+ local s = fontdata[font].shared
+ local p = s and s.plugin
+ if p then
+ if trace_plugins then
+ report_process("applying plugin %a",p[1])
+ end
+ return p[2](head,font,dynamic,direction)
+ else
+ return head, false
end
- return p[2](head,font,attr,direction)
- else
- return head, false
end
+
end
function otf.featuresinitializer(tfmdata,value)
diff --git a/macros/luatex/generic/luaotfload/fontloader-font-ott.lua b/macros/luatex/generic/luaotfload/fontloader-font-ott.lua
index f4d7e05a13..aa1defd6a1 100644
--- a/macros/luatex/generic/luaotfload/fontloader-font-ott.lua
+++ b/macros/luatex/generic/luaotfload/fontloader-font-ott.lua
@@ -821,13 +821,13 @@ local features = allocate {
["dist"] = "distances",
["dlig"] = "discretionary ligatures",
["dnom"] = "denominators",
- ["dtls"] = "dotless forms", -- math
+ ["dtls"] = "dotless forms", -- math
["expt"] = "expert forms",
["falt"] = "final glyph alternates",
["fin2"] = "terminal forms #2",
["fin3"] = "terminal forms #3",
["fina"] = "terminal forms",
- ["flac"] = "flattened accents over capitals", -- math
+ ["flac"] = "flattened accents over capitals", -- math
["frac"] = "fractions",
["fwid"] = "full width",
["half"] = "half forms",
@@ -836,7 +836,7 @@ local features = allocate {
["hist"] = "historical forms",
["hkna"] = "horizontal kana alternates",
["hlig"] = "historical ligatures",
- ["hngl"] = "hangul",
+ ["hngl"] = "hangul", -- depricated
["hojo"] = "hojo kanji forms",
["hwid"] = "half width",
["init"] = "initial forms",
diff --git a/macros/luatex/generic/luaotfload/fontloader-font-oup.lua b/macros/luatex/generic/luaotfload/fontloader-font-oup.lua
index 2c49bc993f..c93ad47438 100644
--- a/macros/luatex/generic/luaotfload/fontloader-font-oup.lua
+++ b/macros/luatex/generic/luaotfload/fontloader-font-oup.lua
@@ -2564,6 +2564,34 @@ end
-- Because we pack we cannot mix tables and numbers so we can only turn a whole set in
-- format kern instead of pair.
+local strip_pairs = true
+
+local compact_pairs = true
+local compact_singles = true
+
+local merge_pairs = true
+local merge_singles = true
+local merge_substitutions = true
+local merge_alternates = true
+local merge_multiples = true
+local merge_ligatures = true
+local merge_cursives = true
+local merge_marks = true
+
+directives.register("otf.strip.pairs", function(v) strip_pairs = v end)
+
+directives.register("otf.compact.pairs", function(v) compact_pairs = v end)
+directives.register("otf.compact.singles", function(v) compact_singles = v end)
+
+directives.register("otf.merge.pairs", function(v) merge_pairs = v end)
+directives.register("otf.merge.singles", function(v) merge_singles = v end)
+directives.register("otf.merge.substitutions", function(v) merge_substitutions = v end)
+directives.register("otf.merge.alternates", function(v) merge_alternates = v end)
+directives.register("otf.merge.multiples", function(v) merge_multiples = v end)
+directives.register("otf.merge.ligatures", function(v) merge_ligatures = v end)
+directives.register("otf.merge.cursives", function(v) merge_cursives = v end)
+directives.register("otf.merge.marks", function(v) merge_marks = v end)
+
local function checkpairs(lookup)
local steps = lookup.steps
local nofsteps = lookup.nofsteps
@@ -2581,6 +2609,7 @@ local function checkpairs(lookup)
if v == true then
-- all zero
elseif v and (v[1] ~= 0 or v[2] ~= 0 or v[4] ~= 0) then
+ -- complex kerns
return false
end
end
@@ -2617,29 +2646,39 @@ local function checkpairs(lookup)
return kerned
end
-local compact_pairs = true
-local compact_singles = true
-
-local merge_pairs = true
-local merge_singles = true
-local merge_substitutions = true
-local merge_alternates = true
-local merge_multiples = true
-local merge_ligatures = true
-local merge_cursives = true
-local merge_marks = true
-
-directives.register("otf.compact.pairs", function(v) compact_pairs = v end)
-directives.register("otf.compact.singles", function(v) compact_singles = v end)
+local function strippairs(lookup)
+ local steps = lookup.steps
+ local nofsteps = lookup.nofsteps
+ local stripped = 0
-directives.register("otf.merge.pairs", function(v) merge_pairs = v end)
-directives.register("otf.merge.singles", function(v) merge_singles = v end)
-directives.register("otf.merge.substitutions", function(v) merge_substitutions = v end)
-directives.register("otf.merge.alternates", function(v) merge_alternates = v end)
-directives.register("otf.merge.multiples", function(v) merge_multiples = v end)
-directives.register("otf.merge.ligatures", function(v) merge_ligatures = v end)
-directives.register("otf.merge.cursives", function(v) merge_cursives = v end)
-directives.register("otf.merge.marks", function(v) merge_marks = v end)
+ for i=1,nofsteps do
+ local step = steps[i]
+ if step.format == "pair" then
+ local coverage = step.coverage
+ for g1, d1 in next, coverage do
+ for g2, d2 in next, d1 do
+ if d2[2] then
+ --- true or { a, b, c, d }
+ -- else
+ -- local v = d2[1]
+ -- if v == true then
+ -- d1[g2] = nil
+ -- stripped = stripped + 1
+ -- elseif v and (v[1] == 0 and v[2] == 0 and v[4] == 0) then -- vkrn can have v[3] ~= 0
+ -- d1[g2] = nil
+ -- stripped = stripped + 1
+ -- end
+ -- end
+ elseif d2[1] == true then
+ d1[g2] = nil
+ stripped = stripped + 1
+ end
+ end
+ end
+ end
+ end
+ return stripped
+end
function readers.compact(data)
if not data or data.compacted then
@@ -2648,6 +2687,7 @@ function readers.compact(data)
data.compacted = true
end
local resources = data.resources
+ local stripped = 0
local merged = 0
local kerned = 0
local allsteps = 0
@@ -2678,6 +2718,7 @@ function readers.compact(data)
merged = merged + mergesteps_4(lookup)
end
elseif kind == "gpos_single" then
+ -- maybe also strip zeros here
if merge_singles then
merged = merged + mergesteps_1(lookup,true)
end
@@ -2685,6 +2726,9 @@ function readers.compact(data)
kerned = kerned + checkkerns(lookup)
end
elseif kind == "gpos_pair" then
+ if strip_pairs then
+ stripped = stripped + strippairs(lookup) -- noto cjk from 24M -> 8 M
+ end
if merge_pairs then
merged = merged + mergesteps_2(lookup)
end
@@ -2726,6 +2770,9 @@ function readers.compact(data)
compact("sequences")
compact("sublookups")
if trace_optimizations then
+ if stripped > 0 then
+ report_optimizations("%i zero positions stripped before merging",stripped)
+ end
if merged > 0 then
report_optimizations("%i steps of %i removed due to merging",merged,allsteps)
end
diff --git a/macros/luatex/generic/luaotfload/fontloader-font-shp.lua b/macros/luatex/generic/luaotfload/fontloader-font-shp.lua
index 78e8597b93..ecf0c94180 100644
--- a/macros/luatex/generic/luaotfload/fontloader-font-shp.lua
+++ b/macros/luatex/generic/luaotfload/fontloader-font-shp.lua
@@ -17,7 +17,7 @@ local pfb = fonts.handlers.pfb
local hashes = fonts.hashes
local identifiers = hashes.identifiers
-local version = 0.009
+local version = 0.010
local shapescache = containers.define("fonts", "shapes", version, true)
local streamscache = containers.define("fonts", "streams", version, true)
diff --git a/macros/luatex/generic/luaotfload/fontloader-fonts-gbn.lua b/macros/luatex/generic/luaotfload/fontloader-fonts-gbn.lua
index 53be41c7ed..d690ee567d 100644
--- a/macros/luatex/generic/luaotfload/fontloader-fonts-gbn.lua
+++ b/macros/luatex/generic/luaotfload/fontloader-fonts-gbn.lua
@@ -17,27 +17,27 @@ local next = next
local fonts = fonts
local nodes = nodes
-local nuts = nodes.nuts -- context abstraction of direct nodes
+local nuts = nodes.nuts -- context abstraction of direct nodes
-local traverse_id = nuts.traverse_id
-local flush_node = nuts.flush_node
+local traverseid = nuts.traverseid
+local flushnode = nuts.flushnode
-local glyph_code = nodes.nodecodes.glyph
-local disc_code = nodes.nodecodes.disc
+local glyph_code = nodes.nodecodes.glyph
+local disc_code = nodes.nodecodes.disc
-local tonode = nuts.tonode
-local tonut = nuts.tonut
+local tonode = nuts.tonode
+local tonut = nuts.tonut
-local getfont = nuts.getfont
-local getchar = nuts.getchar
-local getid = nuts.getid
-local getboth = nuts.getboth
-local getprev = nuts.getprev
-local getnext = nuts.getnext
-local getdisc = nuts.getdisc
-local setchar = nuts.setchar
-local setlink = nuts.setlink
-local setprev = nuts.setprev
+local getfont = nuts.getfont
+local getchar = nuts.getchar
+local getid = nuts.getid
+local getboth = nuts.getboth
+local getprev = nuts.getprev
+local getnext = nuts.getnext
+local getdisc = nuts.getdisc
+local setchar = nuts.setchar
+local setlink = nuts.setlink
+local setprev = nuts.setprev
-- from now on we apply ligaturing and kerning here because it might interfere with complex
-- opentype discretionary handling where the base ligature pass expect some weird extra
@@ -99,7 +99,7 @@ local function nodepass(head,groupcode,size,packtype,direction)
local variants = nil
local redundant = nil
local nofused = 0
- for n in traverse_id(glyph_code,head) do
+ for n in traverseid(glyph_code,head) do
local font = getfont(n)
if font ~= prevfont then
if basefont then
@@ -178,13 +178,13 @@ local function nodepass(head,groupcode,size,packtype,direction)
end
end
end
- flush_node(r)
+ flushnode(r)
end
end
- for d in traverse_id(disc_code,head) do
+ for d in traverseid(disc_code,head) do
local _, _, r = getdisc(d)
if r then
- for n in traverse_id(glyph_code,r) do
+ for n in traverseid(glyph_code,r) do
local font = getfont(n)
if font ~= prevfont then
prevfont = font
@@ -254,7 +254,7 @@ local function basepass(head)
return head
end
-local protectpass = node.direct.protect_glyphs
+local protectpass = node.direct.protectglyphs or node.direct.protect_glyphs
local injectpass = nodes.injections.handler
-- This is the only official public interface and this one can be hooked into a callback (chain) and
diff --git a/macros/luatex/generic/luaotfload/fontloader-l-lpeg.lua b/macros/luatex/generic/luaotfload/fontloader-l-lpeg.lua
index b0868ba488..50306e4ab6 100644
--- a/macros/luatex/generic/luaotfload/fontloader-l-lpeg.lua
+++ b/macros/luatex/generic/luaotfload/fontloader-l-lpeg.lua
@@ -507,7 +507,7 @@ end
-- todo: cache when string
-function lpeg.replacer(one,two,makefunction,isutf) -- in principle we should sort the keys
+function lpeg.replacer(one,two,makefunction,isutf) -- in principle we should sort the keys but we have a better one anyway
local pattern
local u = isutf and utf8char or 1
if type(one) == "table" then
diff --git a/macros/luatex/generic/luaotfload/fontloader-reference.lua b/macros/luatex/generic/luaotfload/fontloader-reference.lua
index dde25ac75d..59cbd9ef8c 100644
--- a/macros/luatex/generic/luaotfload/fontloader-reference.lua
+++ b/macros/luatex/generic/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 : 2021-01-07 16:56
+-- merge date : 2021-05-20 15:57
do -- begin closure to overcome local limits and interference
@@ -3158,25 +3158,59 @@ local function points(n)
n=n*ptf
if n%1==0 then
return format("%ipt",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fpt",n))
+ end
+end
+local function nupoints(n)
+ if n==0 then
+ return "0"
+ end
+ n=tonumber(n)
+ if not n or n==0 then
+ return "0"
+ end
+ n=n*ptf
+ if n%1==0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n)
end
- return lpegmatch(stripzeros,format("%.5fpt",n))
end
local function basepoints(n)
if n==0 then
- return "0pt"
+ return "0bp"
end
n=tonumber(n)
if not n or n==0 then
- return "0pt"
+ return "0bp"
end
n=n*bpf
if n%1==0 then
return format("%ibp",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fbp",n))
+ end
+end
+local function nubasepoints(n)
+ if n==0 then
+ return "0"
+ end
+ n=tonumber(n)
+ if not n or n==0 then
+ return "0"
+ end
+ n=n*bpf
+ if n%1==0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n)
end
- return lpegmatch(stripzeros,format("%.5fbp",n))
end
number.points=points
+number.nupoints=nupoints
number.basepoints=basepoints
+number.nubasepoints=nubasepoints
local rubish=spaceortab^0*newline
local anyrubish=spaceortab+newline
local stripped=(spaceortab^1/"")*newline
@@ -3454,7 +3488,9 @@ local environment={
concat=table.concat,
signed=number.signed,
points=number.points,
+ nupoints=number.nupoints,
basepoints=number.basepoints,
+ nubasepoints=number.nubasepoints,
utfchar=utf.char,
utfbyte=utf.byte,
lpegmatch=lpeg.match,
@@ -3649,10 +3685,18 @@ local format_p=function()
n=n+1
return format("points(a%s)",n)
end
+local format_P=function()
+ n=n+1
+ return format("nupoints(a%s)",n)
+end
local format_b=function()
n=n+1
return format("basepoints(a%s)",n)
end
+local format_B=function()
+ n=n+1
+ return format("nubasepoints(a%s)",n)
+end
local format_t=function(f)
n=n+1
if f and f~="" then
@@ -3805,7 +3849,7 @@ local builder=Cs { "start",
+V("n")
+V("N")
+V("k")
-+V("r")+V("h")+V("H")+V("u")+V("U")+V("p")+V("b")+V("t")+V("T")+V("l")+V("L")+V("I")+V("w")
++V("r")+V("h")+V("H")+V("u")+V("U")+V("p")+V("P")+V("b")+V("B")+V("t")+V("T")+V("l")+V("L")+V("I")+V("w")
+V("W")
+V("a")
+V("A")
@@ -3843,7 +3887,9 @@ local builder=Cs { "start",
["u"]=(prefix_any*P("u"))/format_u,
["U"]=(prefix_any*P("U"))/format_U,
["p"]=(prefix_any*P("p"))/format_p,
+ ["P"]=(prefix_any*P("P"))/format_P,
["b"]=(prefix_any*P("b"))/format_b,
+ ["B"]=(prefix_any*P("B"))/format_B,
["t"]=(prefix_tab*P("t"))/format_t,
["T"]=(prefix_tab*P("T"))/format_T,
["l"]=(prefix_any*P("l"))/format_l,
@@ -4915,8 +4961,8 @@ nodes.nodecodes=nodecodes
nodes.glyphcodes=glyphcodes
nodes.disccodes=disccodes
nodes.dirvalues={ lefttoright=0,righttoleft=1 }
-nodes.handlers.protectglyphs=node.protect_glyphs
-nodes.handlers.unprotectglyphs=node.unprotect_glyphs
+nodes.handlers.protectglyphs=node.protectglyphs or node.protect_glyphs
+nodes.handlers.unprotectglyphs=node.unprotectglyphs or node.unprotect_glyphs
local direct=node.direct
local nuts={}
nodes.nuts=nuts
@@ -4960,31 +5006,33 @@ nuts.setprev=direct.setprev
nuts.setsplit=direct.setsplit
nuts.setsubtype=direct.setsubtype
nuts.setwidth=direct.setwidth
-nuts.getglyphdata=nuts.getattr
-nuts.setglyphdata=nuts.setattr
-nuts.ischar=direct.is_char
-nuts.isglyph=direct.is_glyph
+nuts.getglyphdata=nuts.getattribute or nuts.getattr
+nuts.setglyphdata=nuts.setattribute or nuts.setattr
+nuts.ischar=direct.ischar or direct.is_char
+nuts.isglyph=direct.isglyph or direct.is_glyph
nuts.copy=direct.copy
-nuts.copy_list=direct.copy_list
-nuts.copy_node=direct.copy
-nuts.end_of_math=direct.end_of_math
+nuts.copynode=direct.copy
+nuts.copylist=direct.copylist or direct.copy_list
+nuts.endofmath=direct.endofmath or direct.end_of_math
nuts.flush=direct.flush
-nuts.flush_list=direct.flush_list
-nuts.flush_node=direct.flush_node
+nuts.flushlist=direct.flushlist or direct.flush_list
+nuts.flushnode=direct.flushnode or direct.flush_node
nuts.free=direct.free
-nuts.insert_after=direct.insert_after
-nuts.insert_before=direct.insert_before
-nuts.is_node=direct.is_node
+nuts.insertafter=direct.insertafter or direct.insert_after
+nuts.insertbefore=direct.insertbefore or direct.insert_before
+nuts.isnode=direct.isnode or direct.is_node
+nuts.isdirect=direct.isdirect or direct.is_direct
+nuts.isnut=direct.isdirect or direct.is_direct
nuts.kerning=direct.kerning
nuts.ligaturing=direct.ligaturing
nuts.new=direct.new
nuts.remove=direct.remove
nuts.tail=direct.tail
nuts.traverse=direct.traverse
-nuts.traverse_char=direct.traverse_char
-nuts.traverse_glyph=direct.traverse_glyph
-nuts.traverse_id=direct.traverse_id
-local propertydata=direct.get_properties_table()
+nuts.traversechar=direct.traversechar or direct.traverse_char
+nuts.traverseglyph=direct.traverseglyph or direct.traverse_glyph
+nuts.traverseid=direct.traverseid or direct.traverse_id
+local propertydata=(direct.getpropertiestable or direct.get_properties_table)()
nodes.properties={ data=propertydata }
if direct.set_properties_mode then
direct.set_properties_mode(true,true)
@@ -5017,10 +5065,10 @@ local setfield=nuts.setfield
local getsubtype=nuts.getsubtype
local isglyph=nuts.isglyph
local find_tail=nuts.tail
-local flush_list=nuts.flush_list
-local flush_node=nuts.flush_node
-local traverse_id=nuts.traverse_id
-local copy_node=nuts.copy_node
+local flushlist=nuts.flushlist
+local flushnode=nuts.flushnode
+local traverseid=nuts.traverseid
+local copynode=nuts.copynode
local glyph_code=nodes.nodecodes.glyph
local ligature_code=nodes.glyphcodes.ligature
do
@@ -5033,31 +5081,31 @@ do
end
end
do
- local get_components=node.direct.getcomponents
- local set_components=node.direct.setcomponents
- local function copy_no_components(g,copyinjection)
- local components=get_components(g)
+ local getcomponents=node.direct.getcomponents
+ local setcomponents=node.direct.setcomponents
+ local function copynocomponents(g,copyinjection)
+ local components=getcomponents(g)
if components then
- set_components(g)
- local n=copy_node(g)
+ setcomponents(g)
+ local n=copynode(g)
if copyinjection then
copyinjection(n,g)
end
- set_components(g,components)
+ setcomponents(g,components)
return n
else
- local n=copy_node(g)
+ local n=copynode(g)
if copyinjection then
copyinjection(n,g)
end
return n
end
end
- local function copy_only_glyphs(current)
+ local function copyonlyglyphs(current)
local head=nil
local previous=nil
- for n in traverse_id(glyph_code,current) do
- n=copy_node(n)
+ for n in traverseid(glyph_code,current) do
+ n=copynode(n)
if head then
setlink(previous,n)
else
@@ -5067,14 +5115,14 @@ do
end
return head
end
- local function count_components(start,marks)
+ local function countcomponents(start,marks)
local char=isglyph(start)
if char then
if getsubtype(start)==ligature_code then
local n=0
- local components=get_components(start)
+ local components=getcomponents(start)
while components do
- n=n+count_components(components,marks)
+ n=n+countcomponents(components,marks)
components=getnext(components)
end
return n
@@ -5084,24 +5132,26 @@ do
end
return 0
end
- local function flush_components()
+ local function flushcomponents()
end
- nuts.set_components=set_components
- nuts.get_components=get_components
- nuts.copy_only_glyphs=copy_only_glyphs
- nuts.copy_no_components=copy_no_components
- nuts.count_components=count_components
- nuts.flush_components=flush_components
+ nuts.components={
+ set=setcomponents,
+ get=getcomponents,
+ copyonlyglyphs=copyonlyglyphs,
+ copynocomponents=copynocomponents,
+ count=countcomponents,
+ flush=flushcomponents,
+ }
end
-nuts.uses_font=direct.uses_font
+nuts.usesfont=direct.usesfont or direct.uses_font
do
local dummy=tonut(node.new("glyph"))
nuts.traversers={
- glyph=nuts.traverse_id(nodecodes.glyph,dummy),
- glue=nuts.traverse_id(nodecodes.glue,dummy),
- disc=nuts.traverse_id(nodecodes.disc,dummy),
- boundary=nuts.traverse_id(nodecodes.boundary,dummy),
- char=nuts.traverse_char(dummy),
+ glyph=nuts.traverseid(nodecodes.glyph,dummy),
+ glue=nuts.traverseid(nodecodes.glue,dummy),
+ disc=nuts.traverseid(nodecodes.disc,dummy),
+ boundary=nuts.traverseid(nodecodes.boundary,dummy),
+ char=nuts.traversechar(dummy),
node=nuts.traverse(dummy),
}
end
@@ -5118,7 +5168,7 @@ if not nuts.setreplace then
end
do
local getsubtype=nuts.getsubtype
- function nuts.start_of_par(n)
+ function nuts.startofpar(n)
local s=getsubtype(n)
return s==0 or s==2
end
@@ -11752,8 +11802,6 @@ readers.post=function(f,fontdata,specification)
if length>0 then
glyphs[mapping].name=readstring(f,length)
else
- report("quit post name fetching at %a of %a: %s",i,maxnames,"overflow")
- break
end
end
end
@@ -12853,7 +12901,7 @@ if not modules then modules={} end modules ['font-cff']={
}
local next,type,tonumber,rawget=next,type,tonumber,rawget
local byte,char,gmatch,sub=string.byte,string.char,string.gmatch,string.sub
-local concat,remove,unpack=table.concat,table.remove,table.unpack
+local concat,insert,remove,unpack=table.concat,table.insert,table.remove,table.unpack
local floor,abs,round,ceil,min,max=math.floor,math.abs,math.round,math.ceil,math.min,math.max
local P,C,R,S,C,Cs,Ct=lpeg.P,lpeg.C,lpeg.R,lpeg.S,lpeg.C,lpeg.Cs,lpeg.Ct
local lpegmatch=lpeg.match
@@ -14457,8 +14505,34 @@ do
showstate(reverse[t] or "<action>")
end
if top>0 then
- for i=1,top do
- r=r+1;result[r]=encode[stack[i]]
+ if t==8 and top>48 then
+ local n=0
+ for i=1,top do
+ if n==48 then
+ local zero=encode[0]
+ local res3=result[r-3]
+ local res2=result[r-2]
+ local res1=result[r-1]
+ local res0=result[r]
+ result[r-3]=zero
+ result[r-2]=zero
+ r=r+1;result[r]=chars[t]
+ r=r+1;result[r]=zero
+ r=r+1;result[r]=zero
+ r=r+1;result[r]=res3
+ r=r+1;result[r]=res2
+ r=r+1;result[r]=res1
+ r=r+1;result[r]=res0
+ n=1
+ else
+ n=n+1
+ end
+ r=r+1;result[r]=encode[stack[i]]
+ end
+ else
+ for i=1,top do
+ r=r+1;result[r]=encode[stack[i]]
+ end
end
top=0
end
@@ -20784,7 +20858,7 @@ local trace_defining=false registertracker("fonts.defining",function(v) trace_d
local report_otf=logs.reporter("fonts","otf loading")
local fonts=fonts
local otf=fonts.handlers.otf
-otf.version=3.113
+otf.version=3.116
otf.cache=containers.define("fonts","otl",otf.version,true)
otf.svgcache=containers.define("fonts","svg",otf.version,true)
otf.pngcache=containers.define("fonts","png",otf.version,true)
@@ -21237,6 +21311,7 @@ local function read_from_otf(specification)
if tfmdata then
tfmdata.properties.name=specification.name
tfmdata.properties.sub=specification.sub
+ tfmdata.properties.id=specification.id
tfmdata=constructors.scale(tfmdata,specification)
local allfeatures=tfmdata.shared.features or specification.features.normal
constructors.applymanipulators("otf",tfmdata,allfeatures,trace_features,report_otf)
@@ -21974,6 +22049,8 @@ local getoffsets=nuts.getoffsets
local getboth=nuts.getboth
local getdisc=nuts.getdisc
local setdisc=nuts.setdisc
+local getreplace=nuts.getreplace
+local setreplace=nuts.setreplace
local setoffsets=nuts.setoffsets
local ischar=nuts.ischar
local getkern=nuts.getkern
@@ -21983,8 +22060,8 @@ local setwidth=nuts.setwidth
local getwidth=nuts.getwidth
local nextchar=nuts.traversers.char
local nextglue=nuts.traversers.glue
-local insert_node_before=nuts.insert_before
-local insert_node_after=nuts.insert_after
+local insertnodebefore=nuts.insertbefore
+local insertnodeafter=nuts.insertafter
local properties=nodes.properties.data
local fontkern=nuts.pool and nuts.pool.fontkern
local italickern=nuts.pool and nuts.pool.italickern
@@ -21998,7 +22075,7 @@ end)
if not fontkern then
local thekern=nuts.new("kern",0)
local setkern=nuts.setkern
- local copy_node=nuts.copy_node
+ local copy_node=nuts.copy
fontkern=function(k)
local n=copy_node(thekern)
setkern(n,k)
@@ -22008,7 +22085,7 @@ end
if not italickern then
local thekern=nuts.new("kern",3)
local setkern=nuts.setkern
- local copy_node=nuts.copy_node
+ local copy_node=nuts.copy
italickern=function(k)
local n=copy_node(thekern)
setkern(n,k)
@@ -22469,12 +22546,12 @@ local function inject_kerns_only(head,where)
if leftkern and leftkern~=0 then
if prev and getid(prev)==glue_code then
if useitalickerns then
- head=insert_node_before(head,current,italickern(leftkern))
+ head=insertnodebefore(head,current,italickern(leftkern))
else
setwidth(prev,getwidth(prev)+leftkern)
end
else
- head=insert_node_before(head,current,fontkern(leftkern))
+ head=insertnodebefore(head,current,fontkern(leftkern))
end
end
end
@@ -22528,7 +22605,7 @@ local function inject_kerns_only(head,where)
if i then
local leftkern=i.leftkern
if leftkern and leftkern~=0 then
- pre=insert_node_before(pre,n,fontkern(leftkern))
+ pre=insertnodebefore(pre,n,fontkern(leftkern))
done=true
end
end
@@ -22543,7 +22620,7 @@ local function inject_kerns_only(head,where)
if i then
local leftkern=i.leftkern
if leftkern and leftkern~=0 then
- post=insert_node_before(post,n,fontkern(leftkern))
+ post=insertnodebefore(post,n,fontkern(leftkern))
done=true
end
end
@@ -22558,7 +22635,7 @@ local function inject_kerns_only(head,where)
if i then
local leftkern=i.leftkern
if leftkern and leftkern~=0 then
- replace=insert_node_before(replace,n,fontkern(leftkern))
+ replace=insertnodebefore(replace,n,fontkern(leftkern))
done=true
end
end
@@ -22620,36 +22697,34 @@ local function inject_positions_only(head,where)
rightkern=0
elseif prev and getid(prev)==glue_code then
if useitalickerns then
- head=insert_node_before(head,current,italickern(leftkern))
+ head=insertnodebefore(head,current,italickern(leftkern))
else
setwidth(prev,getwidth(prev)+leftkern)
end
else
- head=insert_node_before(head,current,fontkern(leftkern))
+ head=insertnodebefore(head,current,fontkern(leftkern))
end
end
if rightkern and rightkern~=0 then
if next and getid(next)==glue_code then
if useitalickerns then
- insert_node_after(head,current,italickern(rightkern))
+ insertnodeafter(head,current,italickern(rightkern))
else
setwidth(next,getwidth(next)+rightkern)
end
else
- insert_node_after(head,current,fontkern(rightkern))
+ insertnodeafter(head,current,fontkern(rightkern))
end
end
- else
+ elseif next then
local i=p.emptyinjections
if i then
local rightkern=i.rightkern
- if rightkern and rightkern~=0 then
- if next and getid(next)==disc_code then
- if replace then
- else
- replace=fontkern(rightkern)
- done=true
- end
+ if rightkern and rightkern~=0 and getid(next)==disc_code then
+ local replace=getreplace(next)
+ if replace then
+ else
+ setreplace(next,fontkern(rightkern))
end
end
end
@@ -22710,12 +22785,12 @@ local function inject_positions_only(head,where)
end
local leftkern=i.leftkern
if leftkern and leftkern~=0 then
- pre=insert_node_before(pre,n,fontkern(leftkern))
+ pre=insertnodebefore(pre,n,fontkern(leftkern))
done=true
end
local rightkern=i.rightkern
if rightkern and rightkern~=0 then
- insert_node_after(pre,n,fontkern(rightkern))
+ insertnodeafter(pre,n,fontkern(rightkern))
done=true
end
end
@@ -22734,12 +22809,12 @@ local function inject_positions_only(head,where)
end
local leftkern=i.leftkern
if leftkern and leftkern~=0 then
- post=insert_node_before(post,n,fontkern(leftkern))
+ post=insertnodebefore(post,n,fontkern(leftkern))
done=true
end
local rightkern=i.rightkern
if rightkern and rightkern~=0 then
- insert_node_after(post,n,fontkern(rightkern))
+ insertnodeafter(post,n,fontkern(rightkern))
done=true
end
end
@@ -22758,12 +22833,12 @@ local function inject_positions_only(head,where)
end
local leftkern=i.leftkern
if leftkern and leftkern~=0 then
- replace=insert_node_before(replace,n,fontkern(leftkern))
+ replace=insertnodebefore(replace,n,fontkern(leftkern))
done=true
end
local rightkern=i.rightkern
if rightkern and rightkern~=0 then
- insert_node_after(replace,n,fontkern(rightkern))
+ insertnodeafter(replace,n,fontkern(rightkern))
done=true
end
end
@@ -22778,7 +22853,7 @@ local function inject_positions_only(head,where)
if i then
local rightkern=i.rightkern
if rightkern and rightkern~=0 then
- pre=insert_node_before(pre,pre,fontkern(rightkern))
+ pre=insertnodebefore(pre,pre,fontkern(rightkern))
done=true
end
end
@@ -22791,7 +22866,7 @@ local function inject_positions_only(head,where)
if i then
local rightkern=i.rightkern
if rightkern and rightkern~=0 then
- replace=insert_node_before(replace,replace,fontkern(rightkern))
+ replace=insertnodebefore(replace,replace,fontkern(rightkern))
done=true
end
end
@@ -22894,8 +22969,8 @@ local function inject_everything(head,where)
if trace_injections then
report_injections("correcting non zero width mark %C",getchar(n))
end
- insert_node_before(n,n,fontkern(-wn))
- insert_node_after(n,n,fontkern(-wn))
+ insertnodebefore(n,n,fontkern(-wn))
+ insertnodeafter(n,n,fontkern(-wn))
end
end
end
@@ -22987,37 +23062,35 @@ local function inject_everything(head,where)
rightkern=0
elseif prev and getid(prev)==glue_code then
if useitalickerns then
- head=insert_node_before(head,current,italickern(leftkern))
+ head=insertnodebefore(head,current,italickern(leftkern))
else
setwidth(prev,getwidth(prev)+leftkern)
end
else
- head=insert_node_before(head,current,fontkern(leftkern))
+ head=insertnodebefore(head,current,fontkern(leftkern))
end
end
if rightkern and rightkern~=0 then
if next and getid(next)==glue_code then
if useitalickerns then
- insert_node_after(head,current,italickern(rightkern))
+ insertnodeafter(head,current,italickern(rightkern))
else
setwidth(next,getwidth(next)+rightkern)
end
else
- insert_node_after(head,current,fontkern(rightkern))
+ insertnodeafter(head,current,fontkern(rightkern))
end
end
end
- else
+ elseif next then
local i=p.emptyinjections
if i then
local rightkern=i.rightkern
- if rightkern and rightkern~=0 then
- if next and getid(next)==disc_code then
- if replace then
- else
- replace=fontkern(rightkern)
- done=true
- end
+ if rightkern and rightkern~=0 and getid(next)==disc_code then
+ local replace=getreplace(next)
+ if replace then
+ else
+ setreplace(next,fontkern(rightkern))
end
end
end
@@ -23092,12 +23165,12 @@ local function inject_everything(head,where)
end
local leftkern=i.leftkern
if leftkern and leftkern~=0 then
- pre=insert_node_before(pre,n,fontkern(leftkern))
+ pre=insertnodebefore(pre,n,fontkern(leftkern))
done=true
end
local rightkern=i.rightkern
if rightkern and rightkern~=0 then
- insert_node_after(pre,n,fontkern(rightkern))
+ insertnodeafter(pre,n,fontkern(rightkern))
done=true
end
if hasmarks then
@@ -23122,12 +23195,12 @@ local function inject_everything(head,where)
end
local leftkern=i.leftkern
if leftkern and leftkern~=0 then
- post=insert_node_before(post,n,fontkern(leftkern))
+ post=insertnodebefore(post,n,fontkern(leftkern))
done=true
end
local rightkern=i.rightkern
if rightkern and rightkern~=0 then
- insert_node_after(post,n,fontkern(rightkern))
+ insertnodeafter(post,n,fontkern(rightkern))
done=true
end
if hasmarks then
@@ -23152,12 +23225,12 @@ local function inject_everything(head,where)
end
local leftkern=i.leftkern
if leftkern and leftkern~=0 then
- replace=insert_node_before(replace,n,fontkern(leftkern))
+ replace=insertnodebefore(replace,n,fontkern(leftkern))
done=true
end
local rightkern=i.rightkern
if rightkern and rightkern~=0 then
- insert_node_after(replace,n,fontkern(rightkern))
+ insertnodeafter(replace,n,fontkern(rightkern))
done=true
end
if hasmarks then
@@ -23178,7 +23251,7 @@ local function inject_everything(head,where)
if i then
local rightkern=i.rightkern
if rightkern and rightkern~=0 then
- pre=insert_node_before(pre,pre,fontkern(rightkern))
+ pre=insertnodebefore(pre,pre,fontkern(rightkern))
done=true
end
end
@@ -23191,7 +23264,7 @@ local function inject_everything(head,where)
if i then
local rightkern=i.rightkern
if rightkern and rightkern~=0 then
- replace=insert_node_before(replace,replace,fontkern(rightkern))
+ replace=insertnodebefore(replace,replace,fontkern(rightkern))
done=true
end
end
@@ -23337,8 +23410,8 @@ local function injectspaces(head)
if trace_spaces then
report_spaces("%C [%p + %p + %p] %C",prevchar,lnew,old,rnew,nextchar)
end
- head=insert_node_before(head,n,italickern(lnew))
- insert_node_after(head,n,italickern(rnew))
+ head=insertnodebefore(head,n,italickern(lnew))
+ insertnodeafter(head,n,italickern(rnew))
else
local new=old+(leftkern+rightkern)*factor
if trace_spaces then
@@ -23353,7 +23426,7 @@ local function injectspaces(head)
if trace_spaces then
report_spaces("%C [%p + %p]",prevchar,old,new)
end
- insert_node_after(head,n,italickern(new))
+ insertnodeafter(head,n,italickern(new))
else
local new=old+leftkern*factor
if trace_spaces then
@@ -23372,7 +23445,7 @@ local function injectspaces(head)
if trace_spaces then
report_spaces("[%p + %p] %C",old,new,nextchar)
end
- insert_node_after(head,n,italickern(new))
+ insertnodeafter(head,n,italickern(new))
else
local new=old+rightkern*factor
if trace_spaces then
@@ -25658,6 +25731,28 @@ local function checkkerns(lookup)
end
return kerned
end
+local strip_pairs=true
+local compact_pairs=true
+local compact_singles=true
+local merge_pairs=true
+local merge_singles=true
+local merge_substitutions=true
+local merge_alternates=true
+local merge_multiples=true
+local merge_ligatures=true
+local merge_cursives=true
+local merge_marks=true
+directives.register("otf.strip.pairs",function(v) strip_pairs=v end)
+directives.register("otf.compact.pairs",function(v) compact_pairs=v end)
+directives.register("otf.compact.singles",function(v) compact_singles=v end)
+directives.register("otf.merge.pairs",function(v) merge_pairs=v end)
+directives.register("otf.merge.singles",function(v) merge_singles=v end)
+directives.register("otf.merge.substitutions",function(v) merge_substitutions=v end)
+directives.register("otf.merge.alternates",function(v) merge_alternates=v end)
+directives.register("otf.merge.multiples",function(v) merge_multiples=v end)
+directives.register("otf.merge.ligatures",function(v) merge_ligatures=v end)
+directives.register("otf.merge.cursives",function(v) merge_cursives=v end)
+directives.register("otf.merge.marks",function(v) merge_marks=v end)
local function checkpairs(lookup)
local steps=lookup.steps
local nofsteps=lookup.nofsteps
@@ -25705,26 +25800,27 @@ local function checkpairs(lookup)
end
return kerned
end
-local compact_pairs=true
-local compact_singles=true
-local merge_pairs=true
-local merge_singles=true
-local merge_substitutions=true
-local merge_alternates=true
-local merge_multiples=true
-local merge_ligatures=true
-local merge_cursives=true
-local merge_marks=true
-directives.register("otf.compact.pairs",function(v) compact_pairs=v end)
-directives.register("otf.compact.singles",function(v) compact_singles=v end)
-directives.register("otf.merge.pairs",function(v) merge_pairs=v end)
-directives.register("otf.merge.singles",function(v) merge_singles=v end)
-directives.register("otf.merge.substitutions",function(v) merge_substitutions=v end)
-directives.register("otf.merge.alternates",function(v) merge_alternates=v end)
-directives.register("otf.merge.multiples",function(v) merge_multiples=v end)
-directives.register("otf.merge.ligatures",function(v) merge_ligatures=v end)
-directives.register("otf.merge.cursives",function(v) merge_cursives=v end)
-directives.register("otf.merge.marks",function(v) merge_marks=v end)
+local function strippairs(lookup)
+ local steps=lookup.steps
+ local nofsteps=lookup.nofsteps
+ local stripped=0
+ for i=1,nofsteps do
+ local step=steps[i]
+ if step.format=="pair" then
+ local coverage=step.coverage
+ for g1,d1 in next,coverage do
+ for g2,d2 in next,d1 do
+ if d2[2] then
+ elseif d2[1]==true then
+ d1[g2]=nil
+ stripped=stripped+1
+ end
+ end
+ end
+ end
+ end
+ return stripped
+end
function readers.compact(data)
if not data or data.compacted then
return
@@ -25732,6 +25828,7 @@ function readers.compact(data)
data.compacted=true
end
local resources=data.resources
+ local stripped=0
local merged=0
local kerned=0
local allsteps=0
@@ -25769,6 +25866,9 @@ function readers.compact(data)
kerned=kerned+checkkerns(lookup)
end
elseif kind=="gpos_pair" then
+ if strip_pairs then
+ stripped=stripped+strippairs(lookup)
+ end
if merge_pairs then
merged=merged+mergesteps_2(lookup)
end
@@ -25809,6 +25909,9 @@ function readers.compact(data)
compact("sequences")
compact("sublookups")
if trace_optimizations then
+ if stripped>0 then
+ report_optimizations("%i zero positions stripped before merging",stripped)
+ end
if merged>0 then
report_optimizations("%i steps of %i removed due to merging",merged,allsteps)
end
@@ -26087,7 +26190,7 @@ local setprop=nuts.setprop
local getsubtype=nuts.getsubtype
local getchar=nuts.getchar
local ischar=nuts.ischar
-local end_of_math=nuts.end_of_math
+local endofmath=nuts.endofmath
local nodecodes=nodes.nodecodes
local disc_code=nodecodes.disc
local math_code=nodecodes.math
@@ -26193,7 +26296,7 @@ function analyzers.setstate(head,font)
end
first,last,n=nil,nil,0
if id==math_code then
- current=end_of_math(current)
+ current=endofmath(current)
end
elseif id==disc_code then
setstate(current,s_medi)
@@ -26206,7 +26309,7 @@ function analyzers.setstate(head,font)
end
first,last,n=nil,nil,0
if id==math_code then
- current=end_of_math(current)
+ current=endofmath(current)
end
end
current=getnext(current)
@@ -26422,7 +26525,7 @@ function methods.arab(head,font,attr)
first=nil
end
if id==math_code then
- current=end_of_math(current)
+ current=endofmath(current)
end
end
current=getnext(current)
@@ -26536,7 +26639,7 @@ do
wrapup()
end
if id==math_code then
- current=end_of_math(current)
+ current=endofmath(current)
end
end
current=getnext(current)
@@ -26632,23 +26735,24 @@ local setlink=nuts.setlink
local getwidth=nuts.getwidth
local getattr=nuts.getattr
local getglyphdata=nuts.getglyphdata
-local copy_no_components=nuts.copy_no_components
-local copy_only_glyphs=nuts.copy_only_glyphs
-local count_components=nuts.count_components
-local set_components=nuts.set_components
-local get_components=nuts.get_components
-local flush_components=nuts.flush_components
+local components=nuts.components
+local copynocomponents=components.copynocomponents
+local copyonlyglyphs=components.copyonlyglyphs
+local countcomponents=components.count
+local setcomponents=components.set
+local getcomponents=components.get
+local flushcomponents=components.flush
local ischar=nuts.ischar
-local usesfont=nuts.uses_font
-local insert_node_after=nuts.insert_after
+local usesfont=nuts.usesfont
+local insertnodeafter=nuts.insertafter
local copy_node=nuts.copy
-local copy_node_list=nuts.copy_list
+local copy_node_list=nuts.copylist
local remove_node=nuts.remove
local find_node_tail=nuts.tail
-local flush_node_list=nuts.flush_list
-local flush_node=nuts.flush_node
-local end_of_math=nuts.end_of_math
-local start_of_par=nuts.start_of_par
+local flushnodelist=nuts.flushlist
+local flushnode=nuts.flushnode
+local endofmath=nuts.endofmath
+local startofpar=nuts.startofpar
local setmetatable=setmetatable
local setmetatableindex=table.setmetatableindex
local nextnode=nuts.traversers.node
@@ -26779,12 +26883,12 @@ local function flattendisk(head,disc)
local prev,next=getboth(disc)
local ishead=head==disc
setdisc(disc)
- flush_node(disc)
+ flushnode(disc)
if pre then
- flush_node_list(pre)
+ flushnodelist(pre)
end
if post then
- flush_node_list(post)
+ flushnodelist(post)
end
if ishead then
if replace then
@@ -26833,16 +26937,16 @@ local function markstoligature(head,start,stop,char)
local next=getnext(stop)
setprev(start)
setnext(stop)
- local base=copy_no_components(start,copyinjection)
+ local base=copynocomponents(start,copyinjection)
if head==start then
head=base
end
resetinjection(base)
setchar(base,char)
setsubtype(base,ligatureglyph_code)
- set_components(base,start)
+ setcomponents(base,start)
setlink(prev,base,next)
- flush_components(start)
+ flushcomponents(start)
return head,base
end
end
@@ -26850,7 +26954,7 @@ local no_left_ligature_code=1
local no_right_ligature_code=2
local no_left_kern_code=4
local no_right_kern_code=8
-local has_glyph_option=node.direct.has_glyph_option or function(n,c)
+local hasglyphoption=function(n,c)
if c==no_left_ligature_code or c==no_right_ligature_code then
return getattr(n,a_noligature)==1
else
@@ -26858,7 +26962,7 @@ local has_glyph_option=node.direct.has_glyph_option or function(n,c)
end
end
local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfound,hasmarks)
- if has_glyph_option(start,no_right_ligature_code) then
+ if hasglyphoption(start,no_right_ligature_code) then
return head,start
end
if start==stop and getchar(start)==char then
@@ -26871,14 +26975,14 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou
local comp=start
setprev(start)
setnext(stop)
- local base=copy_no_components(start,copyinjection)
+ local base=copynocomponents(start,copyinjection)
if start==head then
head=base
end
resetinjection(base)
setchar(base,char)
setsubtype(base,ligatureglyph_code)
- set_components(base,comp)
+ setcomponents(base,comp)
setlink(prev,base,next)
if not discfound then
local deletemarks=not skiphash or hasmarks
@@ -26891,7 +26995,7 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou
local char=getchar(start)
if not marks[char] then
baseindex=baseindex+componentindex
- componentindex=count_components(start,marks)
+ componentindex=countcomponents(start,marks)
elseif not deletemarks then
setligaindex(start,baseindex+getligaindex(start,componentindex))
if trace_marks then
@@ -26899,7 +27003,7 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou
end
local n=copy_node(start)
copyinjection(n,start)
- head,current=insert_node_after(head,current,n)
+ head,current=insertnodeafter(head,current,n)
elseif trace_marks then
logwarning("%s: delete ligature mark %s",pref(dataset,sequence),gref(char))
end
@@ -26922,14 +27026,14 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou
break
end
end
- flush_components(components)
+ flushcomponents(components)
else
local discprev,discnext=getboth(discfound)
if discprev and discnext then
local pre,post,replace,pretail,posttail,replacetail=getdisc(discfound,true)
if not replace then
local prev=getprev(base)
- local copied=copy_only_glyphs(comp)
+ local copied=copyonlyglyphs(comp)
if pre then
setlink(discprev,pre)
else
@@ -26945,7 +27049,7 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou
end
setlink(prev,discfound,next)
setboth(base)
- set_components(base,copied)
+ setcomponents(base,copied)
replace=base
if forcediscretionaries then
setdisc(discfound,pre,post,replace,discretionarydisc_code)
@@ -26969,7 +27073,7 @@ local function multiple_glyphs(head,start,multiple,skiphash,what,stop)
local n=copy_node(start)
resetinjection(n)
setchar(n,multiple[k])
- insert_node_after(head,start,n)
+ insertnodeafter(head,start,n)
start=n
end
if what==true then
@@ -26979,7 +27083,7 @@ local function multiple_glyphs(head,start,multiple,skiphash,what,stop)
local n=copy_node(start)
resetinjection(n)
setchar(n,m)
- insert_node_after(head,start,n)
+ insertnodeafter(head,start,n)
start=n
end
end
@@ -27209,7 +27313,7 @@ function handlers.gsub_ligature(head,start,dataset,sequence,ligature,rlmode,skip
return head,start,false,false
end
function handlers.gpos_single(head,start,dataset,sequence,kerns,rlmode,skiphash,step,injection)
- if has_glyph_option(start,no_right_kern_code) then
+ if hasglyphoption(start,no_right_kern_code) then
return head,start,false
else
local startchar=getchar(start)
@@ -27229,7 +27333,7 @@ function handlers.gpos_single(head,start,dataset,sequence,kerns,rlmode,skiphash,
end
end
function handlers.gpos_pair(head,start,dataset,sequence,kerns,rlmode,skiphash,step,injection)
- if has_glyph_option(start,no_right_kern_code) then
+ if hasglyphoption(start,no_right_kern_code) then
return head,start,false
else
local snext=getnext(start)
@@ -27718,7 +27822,7 @@ function chainprocs.gsub_ligature(head,start,stop,dataset,sequence,currentlookup
return head,start,false,0,false
end
function chainprocs.gpos_single(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex)
- if not has_glyph_option(start,no_right_kern_code) then
+ if not hasglyphoption(start,no_right_kern_code) then
local mapping=currentlookup.mapping
if mapping==nil then
mapping=getmapping(dataset,sequence,currentlookup)
@@ -27746,7 +27850,7 @@ function chainprocs.gpos_single(head,start,stop,dataset,sequence,currentlookup,r
return head,start,false
end
function chainprocs.gpos_pair(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex)
- if not has_glyph_option(start,no_right_kern_code) then
+ if not hasglyphoption(start,no_right_kern_code) then
local mapping=currentlookup.mapping
if mapping==nil then
mapping=getmapping(dataset,sequence,currentlookup)
@@ -28069,13 +28173,13 @@ local function checked(head)
if next then
setlink(kern,next)
end
- flush_node(current)
+ flushnode(current)
head=kern
current=next
else
local prev,next=getboth(current)
setlink(prev,kern,next)
- flush_node(current)
+ flushnode(current)
current=next
end
else
@@ -28525,105 +28629,225 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode,s
goto next
end
local s=seq.n
- local l=ck[5]
- local current=start
- local last=start
if s==1 then
- goto next
- end
- if l>f then
- local discfound
- local n=f+1
- last=startnext
- while n<=l do
- if postreplace and not last then
- last=getnext(sweepnode)
- sweeptype=nil
- end
- if last then
- local char,id=ischar(last,currentfont)
- if char then
- if skiphash and skiphash[char] then
- skipped=true
- if trace_skips then
- show_skip(dataset,sequence,char,ck,classes[char])
- end
- last=getnext(last)
- elseif seq[n][char] then
- if n<l then
+ else
+ local l=ck[5]
+ local current=start
+ local last=start
+ if l>f then
+ local discfound
+ local n=f+1
+ last=startnext
+ while n<=l do
+ if postreplace and not last then
+ last=getnext(sweepnode)
+ sweeptype=nil
+ end
+ if last then
+ local char,id=ischar(last,currentfont)
+ if char then
+ if skiphash and skiphash[char] then
+ skipped=true
+ if trace_skips then
+ show_skip(dataset,sequence,char,ck,classes[char])
+ end
last=getnext(last)
- end
- n=n+1
- elseif discfound then
- notmatchreplace[discfound]=true
- if notmatchpre[discfound] then
- goto next
+ elseif seq[n][char] then
+ if n<l then
+ last=getnext(last)
+ end
+ n=n+1
+ elseif discfound then
+ notmatchreplace[discfound]=true
+ if notmatchpre[discfound] then
+ goto next
+ else
+ break
+ end
else
- break
- end
- else
- goto next
- end
- elseif char==false then
- if discfound then
- notmatchreplace[discfound]=true
- if notmatchpre[discfound] then
goto next
+ end
+ elseif char==false then
+ if discfound then
+ notmatchreplace[discfound]=true
+ if notmatchpre[discfound] then
+ goto next
+ else
+ break
+ end
else
- break
+ goto next
end
- else
- goto next
- end
- elseif id==disc_code then
- discseen=true
- discfound=last
- notmatchpre[last]=nil
- notmatchpost[last]=true
- notmatchreplace[last]=nil
- local pre,post,replace=getdisc(last)
- if pre then
- local n=n
- while pre do
- if seq[n][getchar(pre)] then
- n=n+1
- if n>l then
+ elseif id==disc_code then
+ discseen=true
+ discfound=last
+ notmatchpre[last]=nil
+ notmatchpost[last]=true
+ notmatchreplace[last]=nil
+ local pre,post,replace=getdisc(last)
+ if pre then
+ local n=n
+ while pre do
+ if seq[n][getchar(pre)] then
+ n=n+1
+ if n>l then
+ break
+ end
+ pre=getnext(pre)
+ else
+ notmatchpre[last]=true
break
end
- pre=getnext(pre)
- else
+ end
+ if n<=l then
notmatchpre[last]=true
- break
end
- end
- if n<=l then
+ else
notmatchpre[last]=true
end
+ if replace then
+ while replace do
+ if seq[n][getchar(replace)] then
+ n=n+1
+ if n>l then
+ break
+ end
+ replace=getnext(replace)
+ else
+ notmatchreplace[last]=true
+ if notmatchpre[last] then
+ goto next
+ else
+ break
+ end
+ end
+ end
+ if notmatchpre[last] then
+ goto next
+ end
+ end
+ last=getnext(last)
else
- notmatchpre[last]=true
+ goto next
end
- if replace then
- while replace do
- if seq[n][getchar(replace)] then
- n=n+1
- if n>l then
- break
+ else
+ goto next
+ end
+ end
+ end
+ if f>1 then
+ if startprev then
+ local prev=startprev
+ if prereplace and prev==checkdisc then
+ prev=getprev(sweepnode)
+ end
+ if prev then
+ local discfound
+ local n=f-1
+ while n>=1 do
+ if prev then
+ local char,id=ischar(prev,currentfont)
+ if char then
+ if skiphash and skiphash[char] then
+ skipped=true
+ if trace_skips then
+ show_skip(dataset,sequence,char,ck,classes[char])
+ end
+ prev=getprev(prev)
+ elseif seq[n][char] then
+ if n>1 then
+ prev=getprev(prev)
+ end
+ n=n-1
+ elseif discfound then
+ notmatchreplace[discfound]=true
+ if notmatchpost[discfound] then
+ goto next
+ else
+ break
+ end
+ else
+ goto next
end
- replace=getnext(replace)
- else
- notmatchreplace[last]=true
- if notmatchpre[last] then
+ elseif char==false then
+ if discfound then
+ notmatchreplace[discfound]=true
+ if notmatchpost[discfound] then
+ goto next
+ end
+ else
goto next
+ end
+ break
+ elseif id==disc_code then
+ discseen=true
+ discfound=prev
+ notmatchpre[prev]=true
+ notmatchpost[prev]=nil
+ notmatchreplace[prev]=nil
+ local pre,post,replace,pretail,posttail,replacetail=getdisc(prev,true)
+ if pre~=start and post~=start and replace~=start then
+ if post then
+ local n=n
+ while posttail do
+ if seq[n][getchar(posttail)] then
+ n=n-1
+ if posttail==post or n<1 then
+ break
+ else
+ posttail=getprev(posttail)
+ end
+ else
+ notmatchpost[prev]=true
+ break
+ end
+ end
+ if n>=1 then
+ notmatchpost[prev]=true
+ end
+ else
+ notmatchpost[prev]=true
+ end
+ if replace then
+ while replacetail do
+ if seq[n][getchar(replacetail)] then
+ n=n-1
+ if replacetail==replace or n<1 then
+ break
+ else
+ replacetail=getprev(replacetail)
+ end
+ else
+ notmatchreplace[prev]=true
+ if notmatchpost[prev] then
+ goto next
+ else
+ break
+ end
+ end
+ end
+ else
+ end
+ end
+ prev=getprev(prev)
+ elseif id==glue_code then
+ local sn=seq[n]
+ if (sn[32] and spaces[prev]) or sn[0xFFFC] then
+ n=n-1
+ prev=getprev(prev)
else
- break
+ goto next
end
+ elseif seq[n][0xFFFC] then
+ n=n-1
+ prev=getprev(prev)
+ else
+ goto next
end
- end
- if notmatchpre[last] then
+ else
goto next
end
end
- last=getnext(last)
else
goto next
end
@@ -28631,34 +28855,32 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode,s
goto next
end
end
- end
- if f>1 then
- if startprev then
- local prev=startprev
- if prereplace and prev==checkdisc then
- prev=getprev(sweepnode)
+ if s>l then
+ local current=last and getnext(last)
+ if not current and postreplace then
+ current=getnext(sweepnode)
end
- if prev then
+ if current then
local discfound
- local n=f-1
- while n>=1 do
- if prev then
- local char,id=ischar(prev,currentfont)
+ local n=l+1
+ while n<=s do
+ if current then
+ local char,id=ischar(current,currentfont)
if char then
if skiphash and skiphash[char] then
skipped=true
if trace_skips then
show_skip(dataset,sequence,char,ck,classes[char])
end
- prev=getprev(prev)
+ current=getnext(current)
elseif seq[n][char] then
- if n>1 then
- prev=getprev(prev)
+ if n<s then
+ current=getnext(current)
end
- n=n-1
+ n=n+1
elseif discfound then
notmatchreplace[discfound]=true
- if notmatchpost[discfound] then
+ if notmatchpre[discfound] then
goto next
else
break
@@ -28669,202 +28891,84 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode,s
elseif char==false then
if discfound then
notmatchreplace[discfound]=true
- if notmatchpost[discfound] then
+ if notmatchpre[discfound] then
goto next
+ else
+ break
end
else
goto next
end
- break
elseif id==disc_code then
discseen=true
- discfound=prev
- notmatchpre[prev]=true
- notmatchpost[prev]=nil
- notmatchreplace[prev]=nil
- local pre,post,replace,pretail,posttail,replacetail=getdisc(prev,true)
- if pre~=start and post~=start and replace~=start then
- if post then
- local n=n
- while posttail do
- if seq[n][getchar(posttail)] then
- n=n-1
- if posttail==post or n<1 then
- break
- else
- posttail=getprev(posttail)
- end
- else
- notmatchpost[prev]=true
+ discfound=current
+ notmatchpre[current]=nil
+ notmatchpost[current]=true
+ notmatchreplace[current]=nil
+ local pre,post,replace=getdisc(current)
+ if pre then
+ local n=n
+ while pre do
+ if seq[n][getchar(pre)] then
+ n=n+1
+ if n>s then
break
+ else
+ pre=getnext(pre)
end
+ else
+ notmatchpre[current]=true
+ break
end
- if n>=1 then
- notmatchpost[prev]=true
- end
- else
- notmatchpost[prev]=true
end
- if replace then
- while replacetail do
- if seq[n][getchar(replacetail)] then
- n=n-1
- if replacetail==replace or n<1 then
- break
- else
- replacetail=getprev(replacetail)
- end
+ if n<=s then
+ notmatchpre[current]=true
+ end
+ else
+ notmatchpre[current]=true
+ end
+ if replace then
+ while replace do
+ if seq[n][getchar(replace)] then
+ n=n+1
+ if n>s then
+ break
else
- notmatchreplace[prev]=true
- if notmatchpost[prev] then
- goto next
- else
- break
- end
+ replace=getnext(replace)
+ end
+ else
+ notmatchreplace[current]=true
+ if notmatchpre[current] then
+ goto next
+ else
+ break
end
end
- else
end
+ else
end
- prev=getprev(prev)
+ current=getnext(current)
elseif id==glue_code then
local sn=seq[n]
- if (sn[32] and spaces[prev]) or sn[0xFFFC] then
- n=n-1
- prev=getprev(prev)
+ if (sn[32] and spaces[current]) or sn[0xFFFC] then
+ n=n+1
+ current=getnext(current)
else
goto next
end
elseif seq[n][0xFFFC] then
- n=n-1
- prev=getprev(prev)
- else
- goto next
- end
- else
- goto next
- end
- end
- else
- goto next
- end
- else
- goto next
- end
- end
- if s>l then
- local current=last and getnext(last)
- if not current and postreplace then
- current=getnext(sweepnode)
- end
- if current then
- local discfound
- local n=l+1
- while n<=s do
- if current then
- local char,id=ischar(current,currentfont)
- if char then
- if skiphash and skiphash[char] then
- skipped=true
- if trace_skips then
- show_skip(dataset,sequence,char,ck,classes[char])
- end
- current=getnext(current)
- elseif seq[n][char] then
- if n<s then
- current=getnext(current)
- end
- n=n+1
- elseif discfound then
- notmatchreplace[discfound]=true
- if notmatchpre[discfound] then
- goto next
- else
- break
- end
- else
- goto next
- end
- elseif char==false then
- if discfound then
- notmatchreplace[discfound]=true
- if notmatchpre[discfound] then
- goto next
- else
- break
- end
- else
- goto next
- end
- elseif id==disc_code then
- discseen=true
- discfound=current
- notmatchpre[current]=nil
- notmatchpost[current]=true
- notmatchreplace[current]=nil
- local pre,post,replace=getdisc(current)
- if pre then
- local n=n
- while pre do
- if seq[n][getchar(pre)] then
- n=n+1
- if n>s then
- break
- else
- pre=getnext(pre)
- end
- else
- notmatchpre[current]=true
- break
- end
- end
- if n<=s then
- notmatchpre[current]=true
- end
- else
- notmatchpre[current]=true
- end
- if replace then
- while replace do
- if seq[n][getchar(replace)] then
- n=n+1
- if n>s then
- break
- else
- replace=getnext(replace)
- end
- else
- notmatchreplace[current]=true
- if notmatchpre[current] then
- goto next
- else
- break
- end
- end
- end
- else
- end
- current=getnext(current)
- elseif id==glue_code then
- local sn=seq[n]
- if (sn[32] and spaces[current]) or sn[0xFFFC] then
n=n+1
current=getnext(current)
else
goto next
end
- elseif seq[n][0xFFFC] then
- n=n+1
- current=getnext(current)
else
goto next
end
- else
- goto next
end
+ else
+ goto next
end
- else
- goto next
end
end
if trace_contexts then
@@ -29626,7 +29730,7 @@ do
checkstep(head)
end
local initialrl=0
- if getid(head)==par_code and start_of_par(head) then
+ if getid(head)==par_code and startofpar(head) then
initialrl=pardirstate(head)
elseif direction==righttoleft_code then
initialrl=-1
@@ -29743,7 +29847,7 @@ do
start=getnext(start)
end
elseif id==math_code then
- start=getnext(end_of_math(start))
+ start=getnext(endofmath(start))
elseif id==dir_code then
topstack,rlmode=txtdirstate(start,dirstack,topstack,rlparmode)
start=getnext(start)
@@ -29813,7 +29917,7 @@ do
start=getnext(start)
end
elseif id==math_code then
- start=getnext(end_of_math(start))
+ start=getnext(endofmath(start))
elseif id==dir_code then
topstack,rlmode=txtdirstate(start,dirstack,topstack,rlparmode)
start=getnext(start)
@@ -29891,7 +29995,7 @@ do
elseif char==false or id==glue_code then
start=getnext(start)
elseif id==math_code then
- start=getnext(end_of_math(start))
+ start=getnext(endofmath(start))
elseif id==dir_code then
topstack,rlmode=txtdirstate(start,dirstack,topstack,rlparmode)
start=getnext(start)
@@ -29902,44 +30006,52 @@ do
return head
end
end
-local plugins={}
-otf.plugins=plugins
-local report=logs.reporter("fonts")
-function otf.registerplugin(name,f)
- if type(name)=="string" and type(f)=="function" then
- plugins[name]={ name,f }
- report()
- report("plugin %a has been loaded, please be aware of possible side effects",name)
- report()
- if logs.pushtarget then
- logs.pushtarget("log")
- end
- report("Plugins are not officially supported unless stated otherwise. This is because")
- report("they bypass the regular font handling and therefore some features in ConTeXt")
- report("(especially those related to fonts) might not work as expected or might not work")
- report("at all. Some plugins are for testing and development only and might change")
- report("whenever we feel the need for it.")
- report()
- if logs.poptarget then
- logs.poptarget()
+do
+ local plugins={}
+ otf.plugins=plugins
+ local report=logs.reporter("fonts")
+ local warned=false
+ local okay={ text=true }
+ function otf.registerplugin(name,f)
+ if type(name)=="string" and type(f)=="function" then
+ plugins[name]={ name,f }
+ if okay[name] then
+ else
+ report("plugin %a has been loaded, please be aware of possible side effects",name)
+ if not warned then
+ if logs.pushtarget then
+ logs.pushtarget("log")
+ end
+ report("Plugins are not officially supported unless stated otherwise. This is because")
+ report("they bypass the regular font handling and therefore some features in ConTeXt")
+ report("(especially those related to fonts) might not work as expected or might not work")
+ report("at all. Some plugins are for testing and development only and might change")
+ report("whenever we feel the need for it.")
+ report()
+ if logs.poptarget then
+ logs.poptarget()
+ end
+ warned=true
+ end
+ end
end
end
-end
-function otf.plugininitializer(tfmdata,value)
- if type(value)=="string" then
- tfmdata.shared.plugin=plugins[value]
+ function otf.plugininitializer(tfmdata,value)
+ if type(value)=="string" then
+ tfmdata.shared.plugin=plugins[value]
+ end
end
-end
-function otf.pluginprocessor(head,font,attr,direction)
- local s=fontdata[font].shared
- local p=s and s.plugin
- if p then
- if trace_plugins then
- report_process("applying plugin %a",p[1])
+ function otf.pluginprocessor(head,font,dynamic,direction)
+ local s=fontdata[font].shared
+ local p=s and s.plugin
+ if p then
+ if trace_plugins then
+ report_process("applying plugin %a",p[1])
+ end
+ return p[2](head,font,dynamic,direction)
+ else
+ return head,false
end
- return p[2](head,font,attr,direction)
- else
- return head,false
end
end
function otf.featuresinitializer(tfmdata,value)
@@ -30971,11 +31083,11 @@ local setprop=nuts.setprop
local getstate=nuts.getstate
local setstate=nuts.setstate
local ischar=nuts.ischar
-local insert_node_after=nuts.insert_after
+local insertnodeafter=nuts.insertafter
local copy_node=nuts.copy
local remove_node=nuts.remove
-local flush_list=nuts.flush_list
-local flush_node=nuts.flush_node
+local flushlist=nuts.flushlist
+local flushnode=nuts.flushnode
local copyinjection=nodes.injections.copy
local unsetvalue=attributes.unsetvalue
local fontdata=fonts.hashes.identifiers
@@ -31600,7 +31712,7 @@ local function inject_syntax_error(head,current,char)
else
setchar(current,dotted_circle)
end
- return insert_node_after(head,current,signal)
+ return insertnodeafter(head,current,signal)
end
local function initialize_one(font,attr)
local tfmdata=fontdata[font]
@@ -31718,7 +31830,7 @@ local function reorder_one(head,start,stop,font,attr,nbspaces)
if current==stop then
stop=getprev(stop)
head=remove_node(head,current)
- flush_node(current)
+ flushnode(current)
return head,stop,nbspaces
else
nbspaces=nbspaces+1
@@ -31748,7 +31860,7 @@ local function reorder_one(head,start,stop,font,attr,nbspaces)
tempcurrent=processcharacters(tempcurrent,font)
setstate(tempcurrent,unsetvalue)
if getchar(next)==getchar(tempcurrent) then
- flush_list(tempcurrent)
+ flushlist(tempcurrent)
if show_syntax_errors then
head,current=inject_syntax_error(head,current,char)
end
@@ -31756,8 +31868,8 @@ local function reorder_one(head,start,stop,font,attr,nbspaces)
setchar(current,getchar(tempcurrent))
local freenode=getnext(current)
setlink(current,tmp)
- flush_node(freenode)
- flush_list(tempcurrent)
+ flushnode(freenode)
+ flushlist(tempcurrent)
if changestop then
stop=current
end
@@ -31884,7 +31996,7 @@ local function reorder_one(head,start,stop,font,attr,nbspaces)
ch=tpm[1]
setchar(n,ch)
setchar(extra,tpm[2])
- head=insert_node_after(head,current,extra)
+ head=insertnodeafter(head,current,extra)
tpm=twopart_mark[ch]
end
while c~=stop and dependent_vowel[ch] do
@@ -32058,7 +32170,7 @@ local function reorder_one(head,start,stop,font,attr,nbspaces)
stop=getprev(stop)
end
head=remove_node(head,base)
- flush_node(base)
+ flushnode(base)
end
return head,stop,nbspaces
end
@@ -32318,7 +32430,7 @@ function handlers.devanagari_remove_joiners(head,start,kind,lookupname,replaceme
if head==start then
head=stop
end
- flush_list(start)
+ flushlist(start)
return head,stop,true
end
local function initialize_two(font,attr)
@@ -32463,7 +32575,7 @@ local function reorder_two(head,start,stop,font,attr,nbspaces)
if current==stop then
stop=getprev(stop)
head=remove_node(head,current)
- flush_node(current)
+ flushnode(current)
return head,stop,nbspaces
else
nbspaces=nbspaces+1
@@ -32560,7 +32672,7 @@ local function reorder_two(head,start,stop,font,attr,nbspaces)
char=tpm[1]
setchar(current,char)
setchar(extra,tpm[2])
- head=insert_node_after(head,current,extra)
+ head=insertnodeafter(head,current,extra)
tpm=twopart_mark[char]
end
if not moved[current] and dependent_vowel[char] then
@@ -32710,7 +32822,7 @@ local function reorder_two(head,start,stop,font,attr,nbspaces)
end
nbspaces=nbspaces-1
head=remove_node(head,base)
- flush_node(base)
+ flushnode(base)
end
return head,stop,nbspaces
end
@@ -33644,9 +33756,10 @@ end
if inkscape then
local descriptions=tfmdata.descriptions
local nofshapes=#svgshapes
+ local s_format=inkscapeformat("pdf")
local f_svgfile=formatters["temp-otf-svg-shape-%i.svg"]
local f_pdffile=formatters["temp-otf-svg-shape-%i.pdf"]
- local f_convert=formatters["%s --export-%s=%s\n"]
+ local f_convert=formatters[new and "file-open:%s; export-%s:%s; export-do\n" or "%s --export-%s=%s\n"]
local filterglyph=otfsvg.filterglyph
local nofdone=0
local processed={}
@@ -33660,7 +33773,7 @@ end
local svgfile=f_svgfile(index)
local pdffile=f_pdffile(index)
savedata(svgfile,data)
- inkscape:write(f_convert(svgfile,inkscapeformat("pdf"),pdffile))
+ inkscape:write(f_convert(svgfile,s_format,pdffile))
processed[index]=true
nofdone=nofdone+1
if nofdone%25==0 then
@@ -34833,6 +34946,7 @@ local function read_from_afm(specification)
local tfmdata=afmtotfm(specification)
if tfmdata then
tfmdata.properties.name=specification.name
+ tfmdata.properties.id=specification.id
tfmdata=constructors.scale(tfmdata,specification)
local allfeatures=tfmdata.shared.features or specification.features.normal
constructors.applymanipulators("afm",tfmdata,allfeatures,trace_features,report_afm)
@@ -36047,7 +36161,7 @@ local afm=fonts.handlers.afm
local pfb=fonts.handlers.pfb
local hashes=fonts.hashes
local identifiers=hashes.identifiers
-local version=0.009
+local version=0.010
local shapescache=containers.define("fonts","shapes",version,true)
local streamscache=containers.define("fonts","streams",version,true)
local compact_streams=false
@@ -37132,74 +37246,55 @@ local rules={
"FractionRuleThickness",
"UnderbarRuleThickness",
}
-local setmathparameters
-local setmathcharacters
-if CONTEXTLMTXMODE and CONTEXTLMTXMODE>0 then
- setmathparameters=function(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier)
- if delta~=0 then
- for i=1,#rules do
- local name=rules[i]
- local value=mathparameters[name]
- if value then
- mathparameters[name]=(squeeze or 1)*(value+dy)
- end
+local function setmathparameters(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier)
+ if dy~=0 then
+ for i=1,#rules do
+ local name=rules[i]
+ local value=mathparameters[name]
+ if value then
+ mathparameters[name]=(squeeze or 1)*(value+dy)
end
end
end
- setmathcharacters=function()
- end
-else
- setmathparameters=function(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier)
- if delta~=0 then
- for i=1,#rules do
- local name=rules[i]
- local value=mathparameters[name]
- if value then
- mathparameters[name]=(squeeze or 1)*(value+dy)
- end
- end
+end
+local function setmathcharacters(tfmdata,characters,mathparameters,dx,dy,squeeze,wdelta,hdelta,ddelta)
+ local function wdpatch(char)
+ if wsnap~=0 then
+ char.width=char.width+wdelta/2
end
end
- setmathcharacters=function(tfmdata,characters,mathparameters,dx,dy,squeeze,wdelta,hdelta,ddelta)
- local function wdpatch(char)
- if wsnap~=0 then
- char.width=char.width+wdelta/2
- end
- end
- local function htpatch(char)
- if hsnap~=0 then
- local height=char.height
- if height then
- char.height=char.height+2*dy
- end
+ local function htpatch(char)
+ if hsnap~=0 then
+ local height=char.height
+ if height then
+ char.height=char.height+2*dy
end
end
- local character=characters[0x221A]
- if character and character.next then
- local char=character
- local next=character.next
+ end
+ local character=characters[0x221A]
+ if character and character.next then
+ local char=character
+ local next=character.next
+ wdpatch(char)
+ htpatch(char)
+ while next do
+ char=characters[next]
wdpatch(char)
htpatch(char)
- while next do
- char=characters[next]
- wdpatch(char)
- htpatch(char)
- next=char.next
- end
- if char then
- local v=char.vert_variants
- if v then
- local top=v[#v]
- if top then
- local char=characters[top.glyph]
- htpatch(char)
- end
+ next=char.next
+ end
+ if char then
+ local v=char.vert_variants
+ if v then
+ local top=v[#v]
+ if top then
+ local char=characters[top.glyph]
+ htpatch(char)
end
end
end
end
end
-local shiftmode=CONTEXTLMTXMODE and CONTEXTLMTXMODE>0
local function manipulateeffect(tfmdata)
local effect=tfmdata.properties.effect
if effect then
@@ -37221,45 +37316,38 @@ local function manipulateeffect(tfmdata)
local factor=(1+effect.factor)*factor
local hfactor=(1+effect.hfactor)*hfactor
local vfactor=(1+effect.vfactor)*vfactor
- if shiftmode then
- parameters.hshift=hshift
- parameters.vshift=vshift
- else
- vshift=vshift~=0 and upcommand[vshift] or false
- hshift=rightcommand[hshift]
- end
+ vshift=vshift~=0 and upcommand[vshift] or false
+ hshift=rightcommand[hshift]
for unicode,character in next,characters do
local oldwidth=character.width
local oldheight=character.height
local olddepth=character.depth
if oldwidth and oldwidth>0 then
character.width=oldwidth+wdelta
- if not shiftmode then
- local commands=character.commands
- if vshift then
- if commands then
+ local commands=character.commands
+ if vshift then
+ if commands then
+ prependcommands (commands,
+ hshift,
+ vshift
+ )
+ else
+ character.commands={
+ hshift,
+ vshift,
+ charcommand[unicode]
+ }
+ end
+ else
+ if commands then
prependcommands (commands,
- hshift,
- vshift
+ hshift
)
- else
- character.commands={
- hshift,
- vshift,
- charcommand[unicode]
- }
- end
else
- if commands then
- prependcommands (commands,
- hshift
- )
- else
- character.commands={
- hshift,
- charcommand[unicode]
- }
- end
+ character.commands={
+ hshift,
+ charcommand[unicode]
+ }
end
end
end
@@ -39421,8 +39509,8 @@ local next=next
local fonts=fonts
local nodes=nodes
local nuts=nodes.nuts
-local traverse_id=nuts.traverse_id
-local flush_node=nuts.flush_node
+local traverseid=nuts.traverseid
+local flushnode=nuts.flushnode
local glyph_code=nodes.nodecodes.glyph
local disc_code=nodes.nodecodes.disc
local tonode=nuts.tonode
@@ -39481,7 +39569,7 @@ local function nodepass(head,groupcode,size,packtype,direction)
local variants=nil
local redundant=nil
local nofused=0
- for n in traverse_id(glyph_code,head) do
+ for n in traverseid(glyph_code,head) do
local font=getfont(n)
if font~=prevfont then
if basefont then
@@ -39559,13 +39647,13 @@ local function nodepass(head,groupcode,size,packtype,direction)
end
end
end
- flush_node(r)
+ flushnode(r)
end
end
- for d in traverse_id(disc_code,head) do
+ for d in traverseid(disc_code,head) do
local _,_,r=getdisc(d)
if r then
- for n in traverse_id(glyph_code,r) do
+ for n in traverseid(glyph_code,r) do
local font=getfont(n)
if font~=prevfont then
prevfont=font
@@ -39633,7 +39721,7 @@ local function basepass(head)
end
return head
end
-local protectpass=node.direct.protect_glyphs
+local protectpass=node.direct.protectglyphs or node.direct.protect_glyphs
local injectpass=nodes.injections.handler
function nodes.handlers.nodepass(head,...)
if head then
diff --git a/macros/luatex/generic/luaotfload/fontloader-util-str.lua b/macros/luatex/generic/luaotfload/fontloader-util-str.lua
index 2d3f4d669f..0d1f39de9d 100644
--- a/macros/luatex/generic/luaotfload/fontloader-util-str.lua
+++ b/macros/luatex/generic/luaotfload/fontloader-util-str.lua
@@ -70,27 +70,63 @@ local function points(n)
n = n * ptf
if n % 1 == 0 then
return format("%ipt",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fpt",n)) -- plural as we need to keep the pt
+ end
+end
+
+local function nupoints(n)
+ if n == 0 then
+ return "0"
+ end
+ n = tonumber(n)
+ if not n or n == 0 then
+ return "0"
+ end
+ n = n * ptf
+ if n % 1 == 0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n) -- no strip
end
- return lpegmatch(stripzeros,format("%.5fpt",n)) -- plural as we need to keep the pt
end
local function basepoints(n)
if n == 0 then
- return "0pt"
+ return "0bp"
end
n = tonumber(n)
if not n or n == 0 then
- return "0pt"
+ return "0bp"
end
n = n * bpf
if n % 1 == 0 then
return format("%ibp",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fbp",n)) -- plural as we need to keep the pt
+ end
+end
+
+local function nubasepoints(n)
+ if n == 0 then
+ return "0"
+ end
+ n = tonumber(n)
+ if not n or n == 0 then
+ return "0"
+ end
+ n = n * bpf
+ if n % 1 == 0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n) -- no strip
end
- return lpegmatch(stripzeros,format("%.5fbp",n)) -- plural as we need to keep the pt
end
-number.points = points
-number.basepoints = basepoints
+number.points = points
+number.nupoints = nupoints
+number.basepoints = basepoints
+number.nubasepoints = nubasepoints
-- str = " \n \ntest \n test\ntest "
-- print("["..string.gsub(string.collapsecrlf(str),"\n","+").."]")
@@ -357,7 +393,9 @@ end
-- U+hexadecimal %...u character number
-- U+HEXADECIMAL %...U character number
-- points %p number (scaled points)
+-- nupoints %P number (scaled points) / without unit / always 5 decimals
-- basepoints %b number (scaled points)
+-- nubasepoints %B number (scaled points) / without unit / always 5 decimals
-- table concat %...t table
-- table concat %{.}t table
-- serialize %...T sequenced (no nested tables)
@@ -616,7 +654,9 @@ local environment = {
concat = table.concat,
signed = number.signed,
points = number.points,
+ nupoints = number.nupoints,
basepoints = number.basepoints,
+ nubasepoints = number.nubasepoints,
utfchar = utf.char,
utfbyte = utf.byte,
lpegmatch = lpeg.match,
@@ -879,11 +919,21 @@ local format_p = function()
return format("points(a%s)",n)
end
+local format_P = function()
+ n = n + 1
+ return format("nupoints(a%s)",n)
+end
+
local format_b = function()
n = n + 1
return format("basepoints(a%s)",n)
end
+local format_B = function()
+ n = n + 1
+ return format("nubasepoints(a%s)",n)
+end
+
local format_t = function(f)
n = n + 1
if f and f ~= "" then
@@ -1125,7 +1175,7 @@ local builder = Cs { "start",
--
+ V("r")
+ V("h") + V("H") + V("u") + V("U")
- + V("p") + V("b")
+ + V("p") + V("P") + V("b") + V("B")
+ V("t") + V("T")
+ V("l") + V("L")
+ V("I")
@@ -1174,8 +1224,10 @@ local builder = Cs { "start",
["H"] = (prefix_any * P("H")) / format_H, -- %H => 0x0A1B2 (when - no 0x) was V
["u"] = (prefix_any * P("u")) / format_u, -- %u => u+0a1b2 (when - no u+)
["U"] = (prefix_any * P("U")) / format_U, -- %U => U+0A1B2 (when - no U+)
- ["p"] = (prefix_any * P("p")) / format_p, -- %p => 12.345pt / maybe: P (and more units)
- ["b"] = (prefix_any * P("b")) / format_b, -- %b => 12.342bp / maybe: B (and more units)
+ ["p"] = (prefix_any * P("p")) / format_p, -- %p => 12.345pt
+ ["P"] = (prefix_any * P("P")) / format_P, -- %p => 12.345
+ ["b"] = (prefix_any * P("b")) / format_b, -- %b => 12.342bp
+ ["B"] = (prefix_any * P("B")) / format_B, -- %b => 12.342
["t"] = (prefix_tab * P("t")) / format_t, -- %t => concat
["T"] = (prefix_tab * P("T")) / format_T, -- %t => sequenced
["l"] = (prefix_any * P("l")) / format_l, -- %l => boolean
diff --git a/macros/luatex/generic/luaotfload/luaotfload-auxiliary.lua b/macros/luatex/generic/luaotfload/luaotfload-auxiliary.lua
index fcbd644158..9c2d204aaa 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-auxiliary.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-auxiliary.lua
@@ -6,8 +6,8 @@
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-auxiliary",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / auxiliary functions",
license = "GPL v2.0"
}
diff --git a/macros/luatex/generic/luaotfload/luaotfload-case-el.lua b/macros/luatex/generic/luaotfload/luaotfload-case-el.lua
deleted file mode 100644
index 1b329c4a65..0000000000
--- a/macros/luatex/generic/luaotfload/luaotfload-case-el.lua
+++ /dev/null
@@ -1,294 +0,0 @@
-local unicode_data = require'luaotfload-unicode'
-
-local has_accent = 1
-local has_combining_dialytika = 2
-local has_ypogegrammeni = 4
-local has_other_diacritic = 8
-local has_vowel = 16
-local vowels = {
- [0x03B1] = true,
- [0x0391] = true,
- [0x03B5] = true,
- [0x0395] = true,
- [0x03B7] = true,
- [0x0397] = true,
- [0x03B9] = true,
- [0x0399] = true,
- [0x03BF] = true,
- [0x039F] = true,
- [0x03C9] = true,
- [0x03A9] = true,
- [0x03C5] = true,
- [0x03A5] = true,
- [0x03F5] = true,
-}
-local diacritic_data = {
- [0x0300] = has_accent,
- [0x0301] = has_accent,
- [0x0302] = has_accent,
- [0x0303] = has_accent,
- [0x0311] = has_accent,
- [0x0342] = has_accent,
- [0x0308] = has_combining_dialytika,
- [0x0344] = has_accent | has_combining_dialytika,
- [0x0345] = has_ypogegrammeni,
- [0x0304] = has_other_diacritic,
- [0x0306] = has_other_diacritic,
- [0x0313] = has_other_diacritic,
- [0x0314] = has_other_diacritic,
- [0x0343] = has_other_diacritic,
-}
-
-local mapping_tables = unicode_data.casemapping
-local soft_dotted = unicode_data.soft_dotted
-local ccc = unicode_data.ccc
-
-local uppercase = mapping_tables.uppercase
-local lowercase = mapping_tables.lowercase
-local cased = mapping_tables.cased
-local case_ignorable = mapping_tables.case_ignorable
-
-local otfregister = fonts.constructors.features.otf.register
-
-local direct = node.direct
-local is_char = direct.is_char
-local has_glyph = direct.has_glyph
-local uses_font = direct.uses_font
-local getnext = direct.getnext
-local setchar = direct.setchar
-local setdisc = direct.setdisc
-local getdisc = direct.getdisc
-local getfield = direct.getfield
-local remove = direct.remove
-local copy = direct.copy
-local insert_after = direct.insert_after
-local traverse = direct.traverse
-
-local disc = node.id'disc'
-
-local nfd = {} -- FIXME: Data
-
-local data do
- for cp = 1, 0xFF, 1 do -- FIXME: Correct limits
- local decomposed = nfd[cp]
- local first = decomposed and decomposed[1] or cp
- local upper = uppercase[first]
- local data = vowels[first] and has_vowel or 0
- if decomposed then
- for i=1, #decomposed do
- data = data | (diacritic_data[decomposed[i]] or 0)
- end
- end
- end
-end
-
---[[ We make some implicit assumptions about contexts in SpecialCasing.txt here which happened to be true when I wrote the code:
---
--- * Before_Dot only appears as Not_Before_Dot
--- * No other context appears with Not_
--- * Final_Sigma is never language dependent
--- * Other contexts are always language dependent
--- * The only languages with special mappings are Lithuanian (lt/"LTH "/lit), Turkish (tr/"TRK "/tur), and Azeri/Azerbaijani (az/"AZE "/aze)
-]]
-
-local font_lang = setmetatable({}, {__index = function(t, fid)
- local f = font.getfont(fid)
- local lang = f.specification.features.normal.language
- lang = lang == 'lth' and 'lt' or lang == 'trk' and 'tr' or lang == 'aze' and 'az' or false
- t[fid] = lang
- return lang
-end})
-
-local function is_Final_Sigma(font, mapping, n, after)
- mapping = mapping.Final_Sigma
- if not mapping then return false end
- mapping = mapping._
- if not mapping then return false end
- n = getnext(n)
- repeat
- while n do
- local char, id = is_char(n, font)
- if id == disc then
- after = getnext(n)
- n = getfield(n, 'replace')
- char, id = is_char(n, font)
- elseif char then
- if not case_ignorable[char] then
- return not cased[char] and mapping
- end
- n = getnext(n)
- else
- return mapping
- end
- end
- n, after = after
- until not n
- return mapping
-end
-
-local function is_More_Above(font, mapping, n, after)
- mapping = mapping.More_Above
- if not mapping then return false end
- mapping = mapping._
- if not mapping then return false end
- n = getnext(n)
- repeat
- while n do
- local char, id = is_char(n, font)
- if id == disc then
- after = getnext(n)
- n = getfield(n, 'replace')
- char, id = is_char(n, font)
- elseif char then
- local char_ccc = ccc[char]
- if not char_ccc then
- return false
- elseif char_ccc == 230 then
- return mapping
- end
- n = getnext(n)
- else
- return false
- end
- end
- n, after = after
- until not n
- return false
-end
-
-local function is_Not_Before_Dot(font, mapping, n, after)
- mapping = mapping.Not_Before_Dot
- if not mapping then return false end
- mapping = mapping._
- if not mapping then return false end
- n = getnext(n)
- repeat
- while n do
- local char, id = is_char(n, font)
- if id == disc then
- after = getnext(n)
- n = getfield(n, 'replace')
- char, id = is_char(n, font)
- elseif char then
- local char_ccc = ccc[char]
- if not char_ccc then
- return mapping
- elseif char_ccc == 230 then
- return char ~= 0x0307 and mapping
- end
- n = getnext(n)
- else
- return mapping
- end
- end
- n, after = after
- until not n
- return mapping
-end
-
-local function is_Language_Mapping(font, mapping, n, after, seen_soft_dotted, seen_I)
- if not mapping then return false end
- if seen_soft_dotted then
- local mapping = mapping.After_Soft_Dotted
- mapping = mapping and mapping._
- if mapping then
- return mapping
- end
- end
- if seen_I then
- local mapping = mapping.After_I
- mapping = mapping and mapping._
- if mapping then
- return mapping
- end
- end
- return is_More_Above(font, mapping, n, after) or is_Not_Before_Dot(font, mapping, n, after) or mapping._ -- Might be nil
-end
-
-local function process(table)
- local function processor(head, font, after, seen_cased, seen_soft_dotted, seen_I)
- local lang = font_lang[font]
- local n = head
- while n do
- do
- local new = has_glyph(n)
- if n ~= new then
- seen_cased, seen_soft_dotted, seen_I = nil
- end
- n = new
- end
- if not n then break end
- local char, id = is_char(n, font)
- if char then
- local mapping = table[char]
- if mapping then
- if tonumber(mapping) then
- setchar(n, mapping)
- else
- mapping = seen_cased and is_Final_Sigma(font, mapping, n, after)
- or lang and is_Language_Mapping(font, mapping[lang], n, after, seen_soft_dotted, seen_I)
- or mapping._
- if #mapping == 0 then
- head, n = remove(head, n)
- goto continue
- else
- setchar(n, mapping[1])
- for i=2, #mapping do
- head, n = insert_after(head, n, copy(n))
- setchar(n, mapping[i])
- end
- end
- end
- end
- if not case_ignorable[char] then
- seen_cased = cased[char] or nil
- end
- local char_ccc = ccc[char]
- if not char_ccc or char_ccc == 230 then
- seen_I = char == 0x49 or nil
- seen_soft_dotted = soft_dotted[char]
- end
- elseif id == disc and uses_font(n, font) then
- local pre, post, rep = getdisc(n)
- local after = getnext(n)
- pre, post, rep, seen_cased, seen_soft_dotted, seen_I =
- processor(pre, font, nil, seen_cased, seen_soft_dotted, seen_I),
- processor(post, font, after),
- processor(rep, font, after, seen_cased, seen_soft_dotted, seen_I)
- setdisc(n, pre, post, rep)
- else
- seen_cased, seen_soft_dotted, seen_I = nil
- end
- n = getnext(n)
- ::continue::
- end
- return head, seen_cased, seen_soft_dotted, seen_I
- end
- return function(head, font) return (processor(head, font)) end
-end
-
-local upper_process = process(uppercase)
-otfregister {
- name = 'upper',
- description = 'Map to uppercase',
- default = false,
- processors = {
- position = 1,
- plug = upper_process,
- node = upper_process,
- base = upper_process,
- },
-}
-
-local lower_process = process(lowercase)
-otfregister {
- name = 'lower',
- description = 'Map to lowercase',
- default = false,
- processors = {
- position = 1,
- plug = lower_process,
- node = lower_process,
- base = lower_process,
- },
-}
diff --git a/macros/luatex/generic/luaotfload/luaotfload-colors.lua b/macros/luatex/generic/luaotfload/luaotfload-colors.lua
index fb1cbd3487..c6a437c92a 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-colors.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-colors.lua
@@ -5,8 +5,8 @@
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-colors",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / color",
license = "GPL v2.0",
author = "Khaled Hosny, Elie Roux, Philipp Gesang, Dohyun Kim, David Carlisle",
diff --git a/macros/luatex/generic/luaotfload/luaotfload-conf.pdf b/macros/luatex/generic/luaotfload/luaotfload-conf.pdf
index afb5a2a4f5..7baffef63e 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-conf.pdf
+++ b/macros/luatex/generic/luaotfload/luaotfload-conf.pdf
Binary files differ
diff --git a/macros/luatex/generic/luaotfload/luaotfload-configuration.lua b/macros/luatex/generic/luaotfload/luaotfload-configuration.lua
index 07ac92096d..76a8d68754 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-configuration.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-configuration.lua
@@ -7,8 +7,8 @@
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-configuration",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / config file reader",
license = "GPL v2.0"
}
@@ -994,7 +994,7 @@ local function dump ()
end
if next(confdata) then
iowrite (stringformat (conf_header,
- osdate ("%Y-%m-d %H:%M:%S", os.time ())))
+ osdate ("%Y-%m-%d %H:%M:%S", os.time ())))
iowrite (tableconcat (confdata, "\n"))
iowrite (conf_footer)
end
diff --git a/macros/luatex/generic/luaotfload/luaotfload-database.lua b/macros/luatex/generic/luaotfload/luaotfload-database.lua
index 288f4a21b2..b1d264f9b7 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-database.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-database.lua
@@ -5,8 +5,8 @@
do -- block to avoid to many local variables error
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-database",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / database",
license = "GPL v2.0",
author = "Khaled Hosny, Elie Roux, Philipp Gesang, Marcel Krüger",
diff --git a/macros/luatex/generic/luaotfload/luaotfload-diagnostics.lua b/macros/luatex/generic/luaotfload/luaotfload-diagnostics.lua
index 67970dc4c5..fe959a50de 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-diagnostics.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-diagnostics.lua
@@ -7,8 +7,8 @@
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-diagnostics",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload-tool submodule / diagnostics",
license = "GPL v2.0"
}
@@ -376,7 +376,7 @@ else
out ("Try again later at %s.", osdate ("%F %T", reset))
else --- windows doesn’t C99
out ("Try again later at %s.",
- osdate ("%Y-%m-d %H:%M:%S", reset))
+ osdate ("%Y-%m-%d %H:%M:%S", reset))
end
end
return true
diff --git a/macros/luatex/generic/luaotfload/luaotfload-dvi.lua b/macros/luatex/generic/luaotfload/luaotfload-dvi.lua
index 12ca5d7d56..f368c3ae5a 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-dvi.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-dvi.lua
@@ -6,8 +6,8 @@
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-dvi",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / DVI",
license = "GPL v2.0",
author = "Marcel Krüger",
diff --git a/macros/luatex/generic/luaotfload/luaotfload-embolden.lua b/macros/luatex/generic/luaotfload/luaotfload-embolden.lua
index d9f68f4d4d..ca035bc4cd 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-embolden.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-embolden.lua
@@ -5,8 +5,8 @@
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-embolden",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / embolden",
license = "GPL v2.0",
author = "Marcel Krüger"
diff --git a/macros/luatex/generic/luaotfload/luaotfload-fakesc.lua b/macros/luatex/generic/luaotfload/luaotfload-fakesc.lua
deleted file mode 100644
index 421f6fd24d..0000000000
--- a/macros/luatex/generic/luaotfload/luaotfload-fakesc.lua
+++ /dev/null
@@ -1,204 +0,0 @@
------------------------------------------------------------------------
--- FILE: luaotfload-fakesc.lua
--- DESCRIPTION: part of luaotfload / fakesc
------------------------------------------------------------------------
-
-assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
- name = "luaotfload-fakesc",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
- description = "luaotfload submodule / fakesc",
- license = "GPL v2.0",
- author = "Marcel Krüger"
-}
-
-local nodenew = node.direct.new
-local getfont = font.getfont
-local setfont = node.direct.setfont
-local getwhd = node.direct.getwhd
-local insert_after = node.direct.insert_after
-local traverse_char = node.direct.traverse_char
-local protect_glyph = node.direct.protect_glyph
-local otffeatures = fonts.constructors.newfeatures "otf"
-
-local sep = lpeg.P' '^0 * ';' * lpeg.P' '^0
-local codepoint = lpeg.S'0123456789ABCDEF'^4/function(c)return tonumber(c, 16)end
-local codepoint_range = codepoint * ('..' * codepoint + lpeg.Cc(false))
-local function multirawset(table, key1, key2, value)
- for key = key1,(key2 or key1) do
- rawset(table, key, value)
- end
- return table
-end
-local script_extensions do
- local entry = lpeg.Cg(codepoint_range * sep * lpeg.Ct((lpeg.C(lpeg.R'AZ' * lpeg.R'az'^1))^1 * ' ') * '#')^-1 * (1-lpeg.P'\n')^0 * '\n'
- local file = lpeg.Cf(
- lpeg.Ct''
- * entry^0
- , multirawset)
-
- local f = io.open(kpse.find_file"ScriptExtensions.txt")
- script_extensions = file:match(f:read'*a')
- f:close()
- for cp,t in next, script_extensions do
- for i=1,#t do
- t[t[i]] = true
- end
- end
-end
-local script_mapping do
- -- We could extract these from PropertyValueAliases.txt...
- local script_aliases = {
- Adlam = "Adlm", Caucasian_Albanian = "Aghb", Ahom = "Ahom", Arabic = "Arab",
- Imperial_Aramaic = "Armi", Armenian = "Armn", Avestan = "Avst",
- Balinese = "Bali", Bamum = "Bamu", Bassa_Vah = "Bass", Batak = "Batk",
- Bengali = "Beng", Bhaiksuki = "Bhks", Bopomofo = "Bopo", Brahmi = "Brah",
- Braille = "Brai", Buginese = "Bugi", Buhid = "Buhd", Chakma = "Cakm",
- Canadian_Aboriginal = "Cans", Carian = "Cari", Cham = "Cham",
- Cherokee = "Cher", Coptic = "Copt", Cypriot = "Cprt", Cyrillic = "Cyrl",
- Devanagari = "Deva", Dogra = "Dogr", Deseret = "Dsrt", Duployan = "Dupl",
- Egyptian_Hieroglyphs = "Egyp", Elbasan = "Elba", Elymaic = "Elym",
- Ethiopic = "Ethi", Georgian = "Geor", Glagolitic = "Glag",
- Gunjala_Gondi = "Gong", Masaram_Gondi = "Gonm", Gothic = "Goth",
- Grantha = "Gran", Greek = "Grek", Gujarati = "Gujr", Gurmukhi = "Guru",
- Hangul = "Hang", Han = "Hani", Hanunoo = "Hano", Hatran = "Hatr",
- Hebrew = "Hebr", Hiragana = "Hira", Anatolian_Hieroglyphs = "Hluw",
- Pahawh_Hmong = "Hmng", Nyiakeng_Puachue_Hmong = "Hmnp",
- Katakana_Or_Hiragana = "Hrkt", Old_Hungarian = "Hung", Old_Italic = "Ital",
- Javanese = "Java", Kayah_Li = "Kali", Katakana = "Kana",
- Kharoshthi = "Khar", Khmer = "Khmr", Khojki = "Khoj", Kannada = "Knda",
- Kaithi = "Kthi", Tai_Tham = "Lana", Lao = "Laoo", Latin = "Latn",
- Lepcha = "Lepc", Limbu = "Limb", Linear_A = "Lina", Linear_B = "Linb",
- Lisu = "Lisu", Lycian = "Lyci", Lydian = "Lydi", Mahajani = "Mahj",
- Makasar = "Maka", Mandaic = "Mand", Manichaean = "Mani", Marchen = "Marc",
- Medefaidrin = "Medf", Mende_Kikakui = "Mend", Meroitic_Cursive = "Merc",
- Meroitic_Hieroglyphs = "Mero", Malayalam = "Mlym", Modi = "Modi",
- Mongolian = "Mong", Mro = "Mroo", Meetei_Mayek = "Mtei", Multani = "Mult",
- Myanmar = "Mymr", Nandinagari = "Nand", Old_North_Arabian = "Narb",
- Nabataean = "Nbat", Newa = "Newa", Nko = "Nkoo", Nushu = "Nshu",
- Ogham = "Ogam", Ol_Chiki = "Olck", Old_Turkic = "Orkh", Oriya = "Orya",
- Osage = "Osge", Osmanya = "Osma", Palmyrene = "Palm", Pau_Cin_Hau = "Pauc",
- Old_Permic = "Perm", Phags_Pa = "Phag", Inscriptional_Pahlavi = "Phli",
- Psalter_Pahlavi = "Phlp", Phoenician = "Phnx", Miao = "Plrd",
- Inscriptional_Parthian = "Prti", Rejang = "Rjng", Hanifi_Rohingya = "Rohg",
- Runic = "Runr", Samaritan = "Samr", Old_South_Arabian = "Sarb",
- Saurashtra = "Saur", SignWriting = "Sgnw", Shavian = "Shaw",
- Sharada = "Shrd", Siddham = "Sidd", Khudawadi = "Sind", Sinhala = "Sinh",
- Sogdian = "Sogd", Old_Sogdian = "Sogo", Sora_Sompeng = "Sora",
- Soyombo = "Soyo", Sundanese = "Sund", Syloti_Nagri = "Sylo",
- Syriac = "Syrc", Tagbanwa = "Tagb", Takri = "Takr", Tai_Le = "Tale",
- New_Tai_Lue = "Talu", Tamil = "Taml", Tangut = "Tang", Tai_Viet = "Tavt",
- Telugu = "Telu", Tifinagh = "Tfng", Tagalog = "Tglg", Thaana = "Thaa",
- Thai = "Thai", Tibetan = "Tibt", Tirhuta = "Tirh", Ugaritic = "Ugar",
- Vai = "Vaii", Warang_Citi = "Wara", Wancho = "Wcho", Old_Persian = "Xpeo",
- Cuneiform = "Xsux", Yi = "Yiii", Zanabazar_Square = "Zanb",
- Inherited = "Zinh", Common = "Zyyy", Unknown = "Zzzz",
- }
- local entry = lpeg.Cg(codepoint_range * sep * ((lpeg.R'AZ' + lpeg.R'az' + '_')^1/script_aliases))^-1 * (1-lpeg.P'\n')^0 * '\n'
- -- local entry = lpeg.Cg(codepoint_range * sep * lpeg.Cc(true))^-1 * (1-lpeg.P'\n')^0 * '\n'
- local file = lpeg.Cf(
- lpeg.Ct''
- * entry^0
- , multirawset)
-
- local f = io.open(kpse.find_file"Scripts.txt")
- script_mapping = file:match(f:read'*a')
- f:close()
-end
-
-local additional_scripts_tables = { }
-
-local additional_scripts_fonts = setmetatable({}, {
- __index = function(t, fid)
- local f = font.getfont(fid)
- -- table.tofile('myfont2', f)
- local res = f and f.additional_scripts or false
- t[fid] = res
- return res
- end,
-})
-
-local function makecombifont(tfmdata, _, additional_scripts)
- local basescript = tfmdata.properties.script
- local scripts = {basescript = false}
- additional_scripts = additional_scripts_tables[additional_scripts]
- for script, fontname in pairs(additional_scripts) do
- if script ~= basescript then
- local f = fonts.definers.read(fontname, tfmdata.size)
- local fid
- if type(f) == 'table' then
- fid = font.define(f)
- else
- error[[FIXME???]]
- end
- scripts[script] = {
- fid = fid,
- font = f,
- characters = f.characters,
- }
- end
- end
- tfmdata.additional_scripts = scripts
-end
-
-local glyph_id = node.id'glyph'
--- TODO: unset last_script, matching parentheses etc
-function domultiscript(head, _, _, _, direction)
- head = node.direct.todirect(head)
- local last_fid, last_fonts, last_script
- for cur, cid, fid in traverse_char(head) do
- if fid ~= last_fid then
- last_fid, last_fonts, last_script = fid, additional_scripts_fonts[fid]
- end
- if last_fonts then
- local mapped_scr = script_mapping[cid]
- if mapped_scr == "Zinh" then
- mapped_scr = last_script
- else
- local additional_scr = script_extensions[cid]
- if additional_scripts then
- if additional_scripts[last_script] then
- mapped_scr = last_script
- elseif not last_fonts[mapped_scr] then
- for i = 1, #additional_scripts do
- if last_fonts[additional_scripts[i]] then
- mapped_scr = additional_scripts[i]
- break
- end
- end
- end
- elseif mapped_scr == "Zyyy" then
- mapped_scr = last_script
- end
- end
- last_script = mapped_scr
- local mapped_font = last_fonts[mapped_scr]
- if mapped_font then
- setfont(cur, mapped_font.fid)
- end
- end
- end
-end
-
-function luaotfload.add_multiscript(name, fonts)
- if fonts == nil then
- fonts = name
- name = #additional_scripts_fonts + 1
- end
- additional_scripts_tables[name] = fonts
- return name
-end
-
-otffeatures.register {
- name = "multiscript",
- description = "Combine fonts for multiple scripts",
- manipulators = {
- node = makecombifont,
- },
- -- processors = { -- processors would be nice, but they are applied
- -- -- too late for our purposes
- -- node = donotdef,
- -- }
-}
-
---- vim:sw=2:ts=2:expandtab:tw=71
diff --git a/macros/luatex/generic/luaotfload/luaotfload-fallback.lua b/macros/luatex/generic/luaotfload/luaotfload-fallback.lua
index 0caef93589..3e5d65eaca 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-fallback.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-fallback.lua
@@ -5,8 +5,8 @@
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-fallback",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / fallback",
license = "GPL v2.0",
author = "Marcel Krüger"
diff --git a/macros/luatex/generic/luaotfload/luaotfload-features.lua b/macros/luatex/generic/luaotfload/luaotfload-features.lua
index adce910c4e..bedcd59d76 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-features.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-features.lua
@@ -5,8 +5,8 @@
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-features",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / features",
license = "GPL v2.0",
author = "Hans Hagen, Khaled Hosny, Elie Roux, Philipp Gesang, Marcel Krüger",
@@ -509,6 +509,17 @@ do
end
return factors
end
+
+ -- Additionally we patch trytosharefont to ensure that variable fonts work
+ -- with default values whenever no explicit values are passed.
+ local original_trytosharefont = fonts.constructors.trytosharefont
+ function fonts.constructors.trytosharefont(target, tfmdata)
+ original_trytosharefont(target, tfmdata)
+ if not target.streamprovider and tfmdata.resources.variabledata then
+ local format = tfmdata.properties.format
+ target.streamprovider = format == 'opentype' and 1 or format == 'truetype' and 2 or 0
+ end
+ end
end
-- MK: Added
diff --git a/macros/luatex/generic/luaotfload/luaotfload-filelist.lua b/macros/luatex/generic/luaotfload/luaotfload-filelist.lua
index 10421ee372..e3fc38acd3 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-filelist.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-filelist.lua
@@ -6,8 +6,8 @@
if luaotfload_module then luaotfload_module {
name = "luaotfload-filelist",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / filelist",
license = "GPL v2.0"
} end
diff --git a/macros/luatex/generic/luaotfload/luaotfload-glyphlist.lua b/macros/luatex/generic/luaotfload/luaotfload-glyphlist.lua
index 7a34f29ca1..93a2eaeffd 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-glyphlist.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-glyphlist.lua
@@ -1,8 +1,8 @@
if luaotfload_module then
luaotfload_module {
name = "luaotfload-glyphlist",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --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/macros/luatex/generic/luaotfload/luaotfload-harf-define.lua b/macros/luatex/generic/luaotfload/luaotfload-harf-define.lua
index f470b13772..f128adbaae 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-harf-define.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-harf-define.lua
@@ -5,8 +5,8 @@
do -- block to avoid to many local variables error
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-harf-define",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / HarfBuzz font loading",
license = "GPL v2.0",
author = "Khaled Hosny, Marcel Krüger",
@@ -71,7 +71,7 @@ local get_designsize do
end
local containers = luaotfload.fontloader.containers
-local hbcacheversion = 1.1
+local hbcacheversion = 1.2
local facecache = containers.define("fonts", "hb", hbcacheversion, true)
local function loadfont(spec)
@@ -119,7 +119,8 @@ local function loadfont(spec)
local descender = fontextents and fontextents.descender or upem * .2
local gid = hbfont:get_nominal_glyph(0x0020)
- local space = gid and hbfont:get_glyph_h_advance(gid) or upem / 2
+ local real_space = hbfont:get_glyph_h_advance(gid or 0)
+ local tex_space = gid and real_space or upem / 2
local slant = 0
if haspost then
@@ -214,7 +215,8 @@ local function loadfont(spec)
gid_offset = 0x120000,
upem = upem,
fonttype = fonttype,
- space = space,
+ real_space = real_space,
+ tex_space = tex_space,
xheight = xheight,
capheight = capheight,
slant = slant,
@@ -260,7 +262,8 @@ local function scalefont(data, spec)
local hbface = data.face
local hbfont = data.font
local upem = data.upem
- local space = data.space
+ local tex_space = data.tex_space
+ local real_space = data.real_space
local gid_offset = data.gid_offset
if size < 0 then
@@ -321,15 +324,16 @@ local function scalefont(data, spec)
characters = characters,
parameters = {
slant = data.slant,
- space = space * scale,
- space_stretch = space * scale / 2,
- space_shrink = space * scale / 3,
+ space = tex_space * scale,
+ space_stretch = tex_space * scale / 2,
+ space_shrink = tex_space * scale / 3,
x_height = data.xheight * scale,
quad = size,
- extra_space = space * scale / 3,
+ extra_space = tex_space * scale / 3,
[8] = data.capheight * scale, -- for XeTeX compatibility.
},
hb = {
+ space = (real_space * scale + .5) // 1,
scale = scale,
palette = palette,
shared = data,
diff --git a/macros/luatex/generic/luaotfload/luaotfload-harf-plug.lua b/macros/luatex/generic/luaotfload/luaotfload-harf-plug.lua
index bf7028c54d..1577aa7004 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-harf-plug.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-harf-plug.lua
@@ -2,17 +2,15 @@
-- FILE: luaotfload-harf-plug.lua
-- DESCRIPTION: part of luaotfload / HarfBuzz / fontloader plugin
-----------------------------------------------------------------------
-do -- block to avoid to many local variables error
- assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
- name = "luaotfload-harf-plug",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
- description = "luaotfload submodule / HarfBuzz shaping",
- license = "GPL v2.0",
- author = "Khaled Hosny, Marcel Krüger",
- copyright = "Luaotfload Development Team",
- }
-end
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
+ name = "luaotfload-harf-plug",
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
+ description = "luaotfload submodule / HarfBuzz shaping",
+ license = "GPL v2.0",
+ author = "Khaled Hosny, Marcel Krüger",
+ copyright = "Luaotfload Development Team",
+}
local hb = luaotfload.harfbuzz
local logreport = luaotfload.log.report
@@ -181,7 +179,8 @@ local function itemize(head, fontid, direction)
local dirstack = {}
local currdir = direction or 0
local lastskip, lastdir = true
- local lastrun = {}
+ local dummyrun = { start = 0, len = 0 }
+ local lastrun = dummyrun
local lastdisc
local in_disc
@@ -226,9 +225,6 @@ local function itemize(head, fontid, direction)
setlink(prev, n)
code = nil
skip = false
- if not prev then
- head = n
- end
else
skip = true
end
@@ -272,6 +268,9 @@ local function itemize(head, fontid, direction)
lastrun.len = lastrun.len + 1
elseif disc then
if lastdisc then
+ if lastrun.len == 0 then
+ runs[#runs - 1].after = n
+ end
lastdisc.next = disc
lastdisc = disc
else
@@ -280,7 +279,7 @@ local function itemize(head, fontid, direction)
end
end
- return head, runs
+ return dummyrun.after, runs
end
@@ -439,6 +438,7 @@ function shape(head, firstnode, run)
while disc_cluster and after_cluster <= cluster
or not disc_cluster and anchor_cluster <= cluster do
if disc_cluster then
+ if false then -- The saved_... are for nested (aka first/second or init/select) discretionary nodes. The code is currently disabled because the linebreaking for these is broken on the engine level.
if not saved_after and saved_anchor < cluster then
saved_after = discs.next.after_cluster + offset
if saved_after > cluster then
@@ -448,11 +448,14 @@ function shape(head, firstnode, run)
elseif saved_after then
saved_after, after_cluster = after_cluster, saved_after
end
+ end
local rep_glyphs = table.move(glyphs, disc_glyph, i - 1, 1, {})
for j = 1, #rep_glyphs do
local glyph = rep_glyphs[j]
glyph.cluster = glyph.cluster - disc_cluster
- glyph.nextcluster = glyph.nextcluster - disc_cluster
+ if glyph.nextcluster then
+ glyph.nextcluster = glyph.nextcluster - disc_cluster
+ end
end
do
local cluster_offset = disc_cluster - cluster + (saved_after and 2 or 1) -- The offset the glyph indices will move
@@ -637,7 +640,6 @@ function shape(head, firstnode, run)
::NEXTCLUSTERFOUND:: -- end
glyph.nextcluster = nextcluster
- local disc, discindex
-- Calculate the Unicode code points of this glyph. If cluster did not
-- change then this is a glyph inside a complex cluster and will be
-- handled with the start of its cluster.
@@ -651,19 +653,12 @@ function shape(head, firstnode, run)
-- assert(char == codes[j])
hex = hex .. to_utf16_hex(char)
str = str .. utf8.char(char)
- elseif not discindex and id == disc_t then
- local props = properties[disc]
- if not (props and props.zwnj) then
- disc, discindex = node, j
- end
end
node = getnext(node)
end
glyph.tounicode = hex
glyph.string = str
end
- if not fordisc and discindex then
- end
end
return head, firstnode, glyphs, run.len - len
else
@@ -743,7 +738,6 @@ local function tonodes(head, node, run, glyphs)
local dir = run.dir
local fontid = run.font
local fontdata = font.getfont(fontid)
- local space = fontdata.parameters.space
local characters = fontdata.characters
local hbdata = fontdata.hb
local hfactor = (fontdata.extend or 1000) / 1000
@@ -758,6 +752,7 @@ local function tonodes(head, node, run, glyphs)
local lastprops
local scale = hbdata.scale
+ local space = hbdata.space
local haspng = hbshared.haspng
local fonttype = hbshared.fonttype
diff --git a/macros/luatex/generic/luaotfload/luaotfload-init.lua b/macros/luatex/generic/luaotfload/luaotfload-init.lua
index c0ec8cd84b..9ce1d2494d 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-init.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-init.lua
@@ -7,8 +7,8 @@
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-init",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / initialization",
license = "GPL v2.0"
}
@@ -394,7 +394,7 @@ local function init_main(early_hook)
---load_fontloader_module "font-odv.lua" --- <= Devanagari support from Context
logreport ("log", 0, "init",
- "Context OpenType loader version %q",
+ "Context OpenType loader version %.3f",
fonts.handlers.otf.version)
callback.register = trapped_register
nodes = context_environment.nodes
diff --git a/macros/luatex/generic/luaotfload/luaotfload-latex.pdf b/macros/luatex/generic/luaotfload/luaotfload-latex.pdf
index 84c541dc0c..7931d9d1d4 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-latex.pdf
+++ b/macros/luatex/generic/luaotfload/luaotfload-latex.pdf
Binary files differ
diff --git a/macros/luatex/generic/luaotfload/luaotfload-letterspace.lua b/macros/luatex/generic/luaotfload/luaotfload-letterspace.lua
index bbdaa729e2..7963a839b9 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-letterspace.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-letterspace.lua
@@ -5,8 +5,8 @@
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-letterspace",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / letterspacing",
license = "GPL v2.0",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -59,6 +59,12 @@ local setkern = nodedirect.setkern
local getglue = nodedirect.getglue
local setglue = nodedirect.setglue
+local hasattribute = nodedirect.has_attribute
+local setattribute = nodedirect.set_attribute
+
+local getattributelist = nodedirect.getattributelist
+local setattributelist = nodedirect.setattributelist
+
local find_node_tail = nodedirect.tail
local todirect = nodedirect.todirect
local tonode = nodedirect.tonode
@@ -80,6 +86,9 @@ local chardata = fonthashes.characters
local otffeatures = fonts.constructors.newfeatures "otf"
local markdata
+local attribute_table = {}
+local attr = luatexbase.new_attribute("luaotfload.letterspace_done")
+
local function getprevreal(n)
repeat
n = getprev(n)
@@ -243,6 +252,10 @@ kerncharacters = function (head)
local id = getid(start)
if id == glyph_code then
--- 1) look up kern factor (slow, but cached rudimentarily)
+ if hasattribute(start, attr, 1) then -- We already kerned this node
+ firstkern = false -- TODO: I'm not sure about this one yet
+ goto nextnode
+ end
local fontid = getfont(start)
local krn, fillup = unpack(kernamounts[fontid])
if not krn or krn == 0 then
@@ -426,6 +439,14 @@ kerncharacters = function (head)
setfield(disc, "replace", kern_injector(false, krn))
end --[[if replace and prv and nxt]]
end --[[if not pid]]
+ local attr_list = getattributelist(start)
+ local new_attr_list = attribute_table[attr_list]
+ if new_attr_list then
+ setattributelist(start, new_attr_list)
+ else
+ setattribute(start, attr, 1)
+ attribute_table[attr_list] = getattributelist(start)
+ end
end --[[if prev]]
end --[[if id == glyph_code]]
@@ -478,6 +499,9 @@ local function enablefontkerning ( )
logreport ("both", 0, "letterspace",
"kerncharacters() failed to return a valid new head")
end
+
+ for k in next, attribute_table do attribute_table[k] = nil end
+
return tonode (direct_hd)
end
diff --git a/macros/luatex/generic/luaotfload/luaotfload-loaders.lua b/macros/luatex/generic/luaotfload/luaotfload-loaders.lua
index e58f2429fe..1ed66aebea 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-loaders.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-loaders.lua
@@ -8,8 +8,8 @@
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-loaders",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / callback handling",
license = "GPL v2.0"
}
diff --git a/macros/luatex/generic/luaotfload/luaotfload-log.lua b/macros/luatex/generic/luaotfload/luaotfload-log.lua
index 38208241f7..74c5fd6929 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-log.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-log.lua
@@ -6,8 +6,8 @@
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-log",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / logging",
license = "GPL v2.0",
author = "Khaled Hosny, Elie Roux, Philipp Gesang",
diff --git a/macros/luatex/generic/luaotfload/luaotfload-main.tex b/macros/luatex/generic/luaotfload/luaotfload-main.tex
index acc136fd9d..ccc20ca578 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-main.tex
+++ b/macros/luatex/generic/luaotfload/luaotfload-main.tex
@@ -32,7 +32,7 @@
\beginfrontmatter
\setdocumenttitle {The \identifier{luaotfload} package}
- \setdocumentdate {2021-01-08 v3.17}
+ \setdocumentdate {2021-05-21 v3.18}
\setdocumentauthor {LaTeX3 Project\\
Elie Roux · Khaled Hosny · Philipp Gesang · Ulrike Fischer · Marcel Krüger\\
Home: \hyperlink {https://github.com/latex3/luaotfload}}
@@ -62,6 +62,14 @@ Supported is the \identifier{luatex} versions of a current TeXLive 2019 (and a c
\endsection
\beginsection{Changes}
+\beginsubsection {New in version 3.18 (by Ulrike Fischer/Marcel Krüger)}
+\begin{itemize}
+ \item Now variable fonts can be loaded with default values without specifying
+ any explicit axis values.
+ \item A number of small bugfixes.
+ \end{itemize}
+\endsubsection
+
\beginsubsection {New in version 3.17 (by Ulrike Fischer/Marcel Krüger)}
\begin{itemize}
\item The experimental support for OpenType variable fonts has been extended
diff --git a/macros/luatex/generic/luaotfload/luaotfload-multiscript.lua b/macros/luatex/generic/luaotfload/luaotfload-multiscript.lua
index 7caae3a222..e3cf9a0cbf 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-multiscript.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-multiscript.lua
@@ -5,8 +5,8 @@
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-multiscript",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / multiscript",
license = "GPL v2.0",
author = "Marcel Krüger"
diff --git a/macros/luatex/generic/luaotfload/luaotfload-notdef.lua b/macros/luatex/generic/luaotfload/luaotfload-notdef.lua
index aa4ce3076e..d8cc677723 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-notdef.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-notdef.lua
@@ -5,8 +5,8 @@
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-notdef",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / notdef",
license = "GPL v2.0",
author = "Marcel Krüger"
diff --git a/macros/luatex/generic/luaotfload/luaotfload-parsers.lua b/macros/luatex/generic/luaotfload/luaotfload-parsers.lua
index 40973db882..cd452b40c2 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-parsers.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-parsers.lua
@@ -7,8 +7,8 @@
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-parsers",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / parsers",
license = "GPL v2.0"
}
diff --git a/macros/luatex/generic/luaotfload/luaotfload-resolvers.lua b/macros/luatex/generic/luaotfload/luaotfload-resolvers.lua
index 4aa27a513b..a24757777e 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-resolvers.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-resolvers.lua
@@ -11,8 +11,8 @@
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-resolvers",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / resolvers",
license = "GPL v2.0"
}
diff --git a/macros/luatex/generic/luaotfload/luaotfload-scripts.lua b/macros/luatex/generic/luaotfload/luaotfload-scripts.lua
index 003dda6c07..8a4f51ea58 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-scripts.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-scripts.lua
@@ -5,8 +5,8 @@
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-script",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / Script helpers",
license = "CC0 1.0 Universal",
author = "Marcel Krüger"
diff --git a/macros/luatex/generic/luaotfload/luaotfload-status.lua b/macros/luatex/generic/luaotfload/luaotfload-status.lua
index ef89e65010..6743a025c3 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-status.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-status.lua
@@ -1,8 +1,8 @@
return {
["hashes"]={
- { "fontloader-2021-01-07.lua", "ef54bfa34416e2c85fa48d3195c67fd2" },
+ { "fontloader-2021-05-20.lua", "d3d971e3e79aefcb828157b97cc33378" },
{ "fontloader-util-fil.lua", "aae2a2add764144bb58dd8216fd59260" },
- { "fontloader-util-str.lua", "c975ff7bbd178163cf47d9e9296c8b4b" },
+ { "fontloader-util-str.lua", "f3480da8f9a6f34fe320900f7224719b" },
{ "fontloader-l-unicode.lua", "f368874f11f3c525de5864fd413e4b24" },
{ "fontloader-l-math.lua", "082add08e0bb79f39191ae9534a79849" },
{ "fontloader-l-boolean.lua", "abe28515dd33e8f6c416c09bca351cf8" },
@@ -11,9 +11,9 @@ return {
{ "fontloader-l-table.lua", "0330da8b3a08d39876def70df8d9c0e5" },
{ "fontloader-l-string.lua", "9457f2af85723e0e6c46d0b5122e9000" },
{ "fontloader-l-function.lua", "a7e68a9703c35238729da41a474e951b" },
- { "fontloader-l-lpeg.lua", "10bdaef44175902917691835010ae5f5" },
+ { "fontloader-l-lpeg.lua", "446dc07c8f6d2884122679fb4c8589e2" },
{ "fontloader-l-lua.lua", "420bc442e6d81f4624728a6c56fcd175" },
- { "fontloader-fonts-gbn.lua", "10ecdf01e7c926e5128ad8a9dff4d677" },
+ { "fontloader-fonts-gbn.lua", "34e4543a02f6fbc8c2ade896cb6dc7df" },
{ "fontloader-fonts-lig.lua", "fbd251eea3810a43a8d5542319361d68" },
{ "fontloader-fonts-ext.lua", "32013cbc5d5d336be8b1d1e5879d86c4" },
{ "fontloader-fonts-def.lua", "f435e0875f203f343157baeff876ec9c" },
@@ -21,79 +21,79 @@ return {
{ "fontloader-fonts-enc.lua", "5ff4ca50493d7c4ecea0e15c203099f0" },
{ "fontloader-fonts-mis.lua", "17e967c9ec4d001deefd43ddf25e98f7" },
{ "fontloader-basics-chr.lua", "64fafe4eaf55d64aead6513c1e74a024" },
- { "fontloader-basics-nod.lua", "4b5c3c63e19df1b3f37fae7f87c25bda" },
- { "fontloader-font-imp-effects.lua", "a2dde5e071fcb3fc7b90f2bcd5aa4f22" },
+ { "fontloader-basics-nod.lua", "b2e0a0e5e1e27349aed464fa738b8db1" },
+ { "fontloader-font-imp-effects.lua", "d05997c1826355548ec9aec1346f9f23" },
{ "fontloader-font-imp-italics.lua", "defcb415bc1e0a0999b27773902adc18" },
{ "fontloader-font-imp-ligatures.lua", "26ffcf089391445f7af59536c8814364" },
{ "fontloader-font-imp-tex.lua", "ceb087ef6fa2f89aed7179f60ddf8f35" },
- { "fontloader-font-shp.lua", "5ff497c993112d4fef4c148348d964eb" },
+ { "fontloader-font-shp.lua", "2bb36adb4b264a895a2c4d97e1ac1d1e" },
{ "fontloader-font-def.lua", "b9d908c2338b7dc443ce9d1e9fcb7139" },
{ "fontloader-font-lua.lua", "1fbfdf7b689b2bdfd0e3bb9bf74ce136" },
{ "fontloader-font-afk.lua", "9da14e0fb22129c053acc599d1312544" },
- { "fontloader-font-one.lua", "53cd565030e919da984b50471cc3be37" },
+ { "fontloader-font-one.lua", "bd39d42055a44ca2002f8ddbbbbf27c3" },
{ "fontloader-font-onr.lua", "6d161533f3437435e12a0ad64866df44" },
- { "fontloader-font-ocl.lua", "797b5c71bf819c5f4fb314a4d646e9a7" },
- { "fontloader-font-osd.lua", "73c9531c79df5ada320cb20777f7ed49" },
+ { "fontloader-font-ocl.lua", "2a377351ae23c339764ec8ce2e8e9164" },
+ { "fontloader-font-osd.lua", "0e051ca0d3b1a8e0604ced27e753fde8" },
{ "fontloader-font-otc.lua", "0f12230ea07b5151f75d52726977e91f" },
- { "fontloader-font-ots.lua", "c780a471147527f4ddc139e017927ffe" },
- { "fontloader-font-ota.lua", "ad1d5de06400f88829509e1f3ff2b473" },
- { "fontloader-font-oup.lua", "6f46aa00ae1c20c43f8ffaf329dc8695" },
- { "fontloader-font-otj.lua", "8de59cb9b043e5f73c6b9f7cc8f6978e" },
+ { "fontloader-font-ots.lua", "cb106ae882e8548051f00aac8b7fa862" },
+ { "fontloader-font-ota.lua", "2bb12d708e35bc05443eba791e2554e7" },
+ { "fontloader-font-oup.lua", "4eb2f26e51835239e26a8df2ecf04366" },
+ { "fontloader-font-otj.lua", "b2c165bd6771a57633f992d07384b739" },
{ "fontloader-font-oto.lua", "2b1d6bc63b2ebf8f2655a15e1cda6541" },
- { "fontloader-font-otl.lua", "f4e6652a191003493389de230b14cfb3" },
- { "fontloader-font-ott.lua", "673ed11e1d159997f535bfec5fa73808" },
+ { "fontloader-font-otl.lua", "6f701653de713e8aa80d82c7cdf32d75" },
+ { "fontloader-font-ott.lua", "3f67b1b1d40bbc222681d8db4aff0f42" },
{ "fontloader-font-oti.lua", "309a75f9c14b77d87e94eba827dc4e71" },
{ "fontloader-font-dsp.lua", "174ce11f3ba0bddf270f48d8d2addd56" },
{ "fontloader-font-ttf.lua", "ffffc827e1bcddc33a2b615340ecff7f" },
- { "fontloader-font-cff.lua", "2b677fad52d9999d0685e8525271a8cc" },
- { "fontloader-font-otr.lua", "64dcbbc7107538723990e1119a80a9f8" },
+ { "fontloader-font-cff.lua", "01e7c6fbc8961a566f4e4f8cbedb7004" },
+ { "fontloader-font-otr.lua", "ad238624c9ebd488d4bbe9af3b620189" },
{ "fontloader-font-vfc.lua", "a81c29eda98cd62cbebdb6c93544b50d" },
{ "fontloader-font-map.lua", "c4a39db5ad822b348aa61bca5f4a599a" },
{ "fontloader-font-cid.lua", "22b0367742fb253deef84ef7ccf5e8de" },
{ "fontloader-font-con.lua", "724e5dd14aec2d4d189f8619898004cf" },
{ "fontloader-font-ini.lua", "5343de60613adb24cdd7a8d2ee1d153c" },
{ "fontloader-data-con.lua", "23a0f5386d46a1c157ae82a373e35fa0" },
- { "fontloader-reference.lua", "4807209e6a35420dd7528e9ec02f11da" },
+ { "fontloader-reference.lua", "29911e74397766ee36205736166dd763" },
{ "fontloader-basics-gen.lua", "4bc43036e9796fccb0b8869f4b05bf2e" },
{ "mktests", "918cb50be9ee8bd645ac1a27dc501e8c" },
- { "mkstatus", "d3bc6e7d0f6deb80db4edc6975e2ac5c" },
+ { "mkstatus", "7f2fd945c1247f6af6b96c4ed49ddeab" },
{ "mkcharacters", "bfca0e96e1e351afe7077502f9595af9" },
{ "mkglyphlist", "7a8a8fdc0eac7fac2f13ec8f4e8e7aa9" },
{ "mkimport", "7d62f1042e548f8b9368f26b9ba4be5c" },
- { "luaotfload-glyphlist.lua", "6097b4fd28b303a3ae7577e94f86610d" },
+ { "luaotfload-glyphlist.lua", "54908a38bf531914f350614afff2ccf6" },
{ "luaotfload-characters.lua", "76415ca3ede312cad6e09038323489ae" },
- { "luaotfload-dvi.lua", "a0d33e699c250c0e4abd4cfa1b974b6e" },
- { "luaotfload-tounicode.lua", "e07e112222777070250fbc980b2e6b85" },
- { "luaotfload-unicode.lua", "1d7fd6ab63640cb6c8e2091ac5a57915" },
- { "luaotfload-resolvers.lua", "b387d9435738f7ce8cf1e6af86b565a6" },
- { "luaotfload-parsers.lua", "dba42cb2f6bbfa13b9a56d0e4a2b2f44" },
- { "luaotfload-fallback.lua", "a3c8c048b14a304d3352871014ef1343" },
- { "luaotfload-szss.lua", "2413a2be98181fe77f7e110369194769" },
- { "luaotfload-scripts.lua", "2b924be852e17191e651faf5a2097e12" },
- { "luaotfload-multiscript.lua", "db7b6c7791b4b909d12234620ff7973d" },
- { "luaotfload-loaders.lua", "d169564522ac7194e7410d8263cd1b31" },
- { "luaotfload-harf-plug.lua", "8fdc1ba513a6026546b883259e559c7e" },
- { "luaotfload-harf-define.lua", "1c9a663bb7bfa650b93dcf01d5450675" },
- { "luaotfload-notdef.lua", "26fed1a76150718e05c8c56b1983ebdd" },
- { "luaotfload-embolden.lua", "5506419bc583d450f252542b1105d6ce" },
- { "luaotfload-letterspace.lua", "1a518a55f6663ce13866416a5b94d6a4" },
- { "luaotfload-features.lua", "33fdd06674606d043599dc4ea9b2a56b" },
- { "luaotfload-database.lua", "4a0f9f3b500df0d8a8234a0954065e46" },
- { "luaotfload-configuration.lua", "589ca99522479a0929d6824bafa36f63" },
- { "luaotfload-colors.lua", "7c201914c79310d9e79e75dfc7ee982b" },
- { "luaotfload-auxiliary.lua", "8e427ec79ced91d9fc6fbcece159d042" },
- { "luaotfload-filelist.lua", "3cd6b9d12ba2fb48783e393593cd9afd" },
- { "luaotfload-tool.lua", "f4534033397387433601040694b70c6b" },
- { "luaotfload-diagnostics.lua", "473e1a3cd00e4b277b1f7e17b13254da" },
- { "luaotfload-log.lua", "809e4afac4e070b619512461a6fedd90" },
- { "luaotfload-init.lua", "e3b832a9efc91c977044383640835069" },
+ { "luaotfload-dvi.lua", "403603ff9e267d2b9ac631e63b869718" },
+ { "luaotfload-tounicode.lua", "8f7850323417188eef5197d4e420bd34" },
+ { "luaotfload-unicode.lua", "5bc464447c3f5b154d8368904044d654" },
+ { "luaotfload-resolvers.lua", "3655371360dd87b4a7c83e355357e6eb" },
+ { "luaotfload-parsers.lua", "c715cb6ea43d644ec26d6e87d25b5d27" },
+ { "luaotfload-fallback.lua", "78a566243c0ad99e74f93fface672fb5" },
+ { "luaotfload-szss.lua", "4c431d8f76e06200b2df3269615097cc" },
+ { "luaotfload-scripts.lua", "12bf373853ead3eab3c83ec62e37bbd6" },
+ { "luaotfload-multiscript.lua", "a46096b20f5442acea29c75b77f763a7" },
+ { "luaotfload-loaders.lua", "ba59f0161e985f4c97c54245a74a8d29" },
+ { "luaotfload-harf-plug.lua", "bded3b2beccab4943f616b3069cbb372" },
+ { "luaotfload-harf-define.lua", "a5e760f71e08a8ff40a40defc9d59e4e" },
+ { "luaotfload-notdef.lua", "dbb4718b4c1b46adc5870af3f5cc6cac" },
+ { "luaotfload-embolden.lua", "7cc1563093c005c40c11b8c327e617f1" },
+ { "luaotfload-letterspace.lua", "e7ee541a56954ebfa1a227aa59614bb9" },
+ { "luaotfload-features.lua", "bf81e7630c3786ce12c1f9b61ef73037" },
+ { "luaotfload-database.lua", "9b911605805ca1fab7d4088c0c50a5d2" },
+ { "luaotfload-configuration.lua", "ddedd9c27f810b254547c6a799aba892" },
+ { "luaotfload-colors.lua", "f4e86b8cbbcc790a64dae59b6b05b3d1" },
+ { "luaotfload-auxiliary.lua", "e814d7c408817ae01a96f279c278ed08" },
+ { "luaotfload-filelist.lua", "1108447545fbcb08aa0f6d586988c2e1" },
+ { "luaotfload-tool.lua", "4ca593bc9413e4de889f1c0df6e48219" },
+ { "luaotfload-diagnostics.lua", "4fa11f02259f2f9e7cd60d4b668b6a33" },
+ { "luaotfload-log.lua", "e1af43403d8bf68d95276c0dc00e64f0" },
+ { "luaotfload-init.lua", "f80c78b2296664ba42514674d104d093" },
{ "luaotfload-main.lua", "b19c9cc34cf1d676c39f872cfb41aef6" },
},
["notes"]={
["committer"]="Marcel Fabian Krüger <tex@2krueger.de>",
- ["description"]="v3.17/2021-01-08",
- ["loader"]="fontloader-2021-01-07.lua",
- ["revision"]="359a8a50a0d1f778e358cc1507b6f08ec17b6898",
- ["timestamp"]="2021-01-08 14:15:42 +0100",
+ ["description"]="v3.18/2021-05-21",
+ ["loader"]="fontloader-2021-05-20.lua",
+ ["revision"]="3f2cacb9d2136142cffb183774c0edaeb4ea3314",
+ ["timestamp"]="2021-05-21 02:12:47 +0200",
},
} \ No newline at end of file
diff --git a/macros/luatex/generic/luaotfload/luaotfload-suppress.lua b/macros/luatex/generic/luaotfload/luaotfload-suppress.lua
index d78428ca96..8ea049ba91 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-suppress.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-suppress.lua
@@ -5,8 +5,8 @@
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-suppress",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / suppress",
license = "GPL v2.0",
author = "Marcel Krüger"
diff --git a/macros/luatex/generic/luaotfload/luaotfload-szss.lua b/macros/luatex/generic/luaotfload/luaotfload-szss.lua
index 88b02350f0..26c89eafa2 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-szss.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-szss.lua
@@ -5,8 +5,8 @@
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-szss",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / Special feature handling",
license = "GPL v2.0",
author = "Marcel Krüger"
@@ -90,6 +90,7 @@ otfregister {
end
tfmdata.extend = value * 1000
tfmdata.hb.hscale = tfmdata.units_per_em * value
+ tfmdata.hb.space = tfmdata.hb.space * value
local parameters = tfmdata.parameters
parameters.slant = parameters.slant * value
parameters.space = parameters.space * value
diff --git a/macros/luatex/generic/luaotfload/luaotfload-tool.1 b/macros/luatex/generic/luaotfload/luaotfload-tool.1
index 86f70ac706..9e2b12aed0 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-tool.1
+++ b/macros/luatex/generic/luaotfload/luaotfload-tool.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH LUAOTFLOAD-TOOL 1 "2021-01-08" "3.17" "text processing"
+.TH LUAOTFLOAD-TOOL 1 "2021-05-21" "3.18" "text processing"
.SH NAME
luaotfload-tool \- generate and query the Luaotfload font names database
.
@@ -391,6 +391,11 @@ concerning the format and available options.
Print the currently active configuration; the
output can be saved to a file and used for
bootstrapping a custom configuration files.
+.TP
+.B \-\-aliases
+Dump the font name database as a kpathsea
+aliases file. This option is experimental and
+might go away.
.UNINDENT
.SH FILES
.sp
diff --git a/macros/luatex/generic/luaotfload/luaotfload-tool.lua b/macros/luatex/generic/luaotfload/luaotfload-tool.lua
index 0c58363903..df80d4da78 100644..100755
--- a/macros/luatex/generic/luaotfload/luaotfload-tool.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-tool.lua
@@ -9,8 +9,8 @@
local ProvidesLuaModule = {
name = "luaotfload-tool",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload-tool / database functionality",
license = "GPL v2.0"
}
@@ -584,7 +584,7 @@ local function display_general (fullinfo)
--- the MS compiler doesn’t support C99, so
--- strftime is missing some functionality;
--- see loslib.c for details.
- val = osdate("%Y-%m-d %H:%M:%S", fullinfo[key])
+ val = osdate("%Y-%m-%d %H:%M:%S", fullinfo[key])
end
end
if not val then
@@ -736,7 +736,7 @@ local action_sequence = {
"config" , "loglevel" , "help" , "version" ,
"dumpconf" , "diagnose" , "blacklist" , "cache" ,
"flush" , "bisect" , "generate" , "list" ,
- "query" ,
+ "query" , "aliases" ,
}
local action_pending = tabletohash(action_sequence, false)
@@ -834,7 +834,7 @@ local bisect_status_fmt = [[
local function write_bisect_status (data)
local payload = tableserialize (data, true)
local status = stringformat (bisect_status_fmt,
- osdate ("%Y-%m-d %H:%M:%S", os.time ()),
+ osdate ("%Y-%m-%d %H:%M:%S", os.time ()),
payload)
if status and iosavedata (bisect_status_file, status) then
logreport ("info", 4, "bisect",
@@ -1396,6 +1396,51 @@ function actions.diagnose (job)
return diagnose (job)
end
+function actions.aliases (job)
+ --- Help XeTeX find fonts
+ local name_index = fonts.names.data() or fonts.names.load()
+ local mappings = name_index.mappings
+ local fontnames = name_index.fontnames.texmf
+ local families = name_index.families.texmf
+ local formats = { 'ttf', 'otf', }
+ for _, format in ipairs(formats) do
+ for name, mapping in pairs(fontnames[format]) do
+ mapping = mappings[mapping]
+ print(string.format('%s %s', mapping.basename, name))
+ end
+ end
+ local function best_match(options, target)
+ if not options then return end
+ if options.default then return mappings[options.default] end
+ local best, best_diff = nil, math.huge
+ for _, option in ipairs(options) do
+ local diff = math.abs(option[1]-target)
+ if diff < best_diff then
+ best, best_diff = option[4], diff
+ end
+ end
+ return mappings[best]
+ end
+ for _, format in ipairs(formats) do
+ for name, family in pairs(families[format]) do
+ local r = best_match(family.r, 655360, mappings)
+ local b = best_match(family.b, 655360, mappings)
+ local i = best_match(family.i, 655360, mappings)
+ local bi = best_match(family.bi, 655360, mappings)
+ r = r or b or i or bi -- Not sure if this is still needed
+ if r then
+ b, i, bi = b or r, i or r, bi or r
+ print(string.format('%s %s\n%s %s-b\n%s %s-i\n%s %s-bi',
+ r.basename, name,
+ b.basename, name,
+ i.basename, name,
+ bi.basename, name))
+ end
+ end
+ end
+ return true
+end
+
--- stuff to be carried out prior to exit
local finalizers = { }
@@ -1434,6 +1479,7 @@ local function process_cmdline ( ) -- unit -> jobspec
}
local long_options = {
+ aliases = 0,
["bisect"] = 1,
cache = 1,
conf = 1,
@@ -1587,6 +1633,8 @@ local function process_cmdline ( ) -- unit -> jobspec
action_pending["dumpconf"] = true
elseif v == "print-conf" then
result.print_config = true
+ elseif v == "aliases" then
+ action_pending["aliases"] = true
end
end
diff --git a/macros/luatex/generic/luaotfload/luaotfload-tool.pdf b/macros/luatex/generic/luaotfload/luaotfload-tool.pdf
index 3836a25b15..fb44487640 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-tool.pdf
+++ b/macros/luatex/generic/luaotfload/luaotfload-tool.pdf
Binary files differ
diff --git a/macros/luatex/generic/luaotfload/luaotfload-tool.rst b/macros/luatex/generic/luaotfload/luaotfload-tool.rst
index 9ebc3127a1..085a371386 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-tool.rst
+++ b/macros/luatex/generic/luaotfload/luaotfload-tool.rst
@@ -6,9 +6,9 @@
generate and query the Luaotfload font names database
-----------------------------------------------------------------------
-:Date: 2021-01-08
+:Date: 2021-05-21
:Copyright: GPL v2.0
-:Version: 3.17
+:Version: 3.18
:Manual section: 1
:Manual group: text processing
@@ -281,6 +281,10 @@ miscellaneous
output can be saved to a file and used for
bootstrapping a custom configuration files.
+--aliases Dump the font name database as a kpathsea
+ aliases file. This option is experimental and
+ might go away.
+
FILES
=======================================================================
diff --git a/macros/luatex/generic/luaotfload/luaotfload-tounicode.lua b/macros/luatex/generic/luaotfload/luaotfload-tounicode.lua
index 5c92785066..928dfd30fc 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-tounicode.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-tounicode.lua
@@ -5,8 +5,8 @@
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-tounicode",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / tounicode",
license = "GPL v2.0",
author = "Hans Hagen, Khaled Hosny, Elie Roux, Philipp Gesang, Marcel Krüger",
diff --git a/macros/luatex/generic/luaotfload/luaotfload-unicode.lua b/macros/luatex/generic/luaotfload/luaotfload-unicode.lua
index 5320c48ab2..ccc3988ba1 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-unicode.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-unicode.lua
@@ -5,8 +5,8 @@
assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-unicode",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "luaotfload submodule / Unicode helpers",
license = "CC0 1.0 Universal",
author = "Marcel Krüger"
diff --git a/macros/luatex/generic/luaotfload/luaotfload.conf.5 b/macros/luatex/generic/luaotfload/luaotfload.conf.5
index efb8b5fff3..8285e71d7d 100644
--- a/macros/luatex/generic/luaotfload/luaotfload.conf.5
+++ b/macros/luatex/generic/luaotfload/luaotfload.conf.5
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH LUAOTFLOAD.CONF 5 "2021-01-08" "3.17" "text processing"
+.TH LUAOTFLOAD.CONF 5 "2021-05-21" "3.18" "text processing"
.SH NAME
luaotfload.conf \- Luaotfload configuration file
.
diff --git a/macros/luatex/generic/luaotfload/luaotfload.conf.rst b/macros/luatex/generic/luaotfload/luaotfload.conf.rst
index 645a659d2b..84db4dca17 100644
--- a/macros/luatex/generic/luaotfload/luaotfload.conf.rst
+++ b/macros/luatex/generic/luaotfload/luaotfload.conf.rst
@@ -6,9 +6,9 @@
Luaotfload configuration file
-----------------------------------------------------------------------
-:Date: 2021-01-08
+:Date: 2021-05-21
:Copyright: GPL v2.0
-:Version: 3.17
+:Version: 3.18
:Manual section: 5
:Manual group: text processing
diff --git a/macros/luatex/generic/luaotfload/luaotfload.lua b/macros/luatex/generic/luaotfload/luaotfload.lua
index 4a3cdb78ae..8d769d7dc8 100644
--- a/macros/luatex/generic/luaotfload/luaotfload.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload.lua
@@ -20,8 +20,8 @@ local authors = "\z
-- version number is used below!
local ProvidesLuaModule = {
name = "luaotfload",
- version = "3.17", --TAGVERSION
- date = "2021-01-08", --TAGDATE
+ version = "3.18", --TAGVERSION
+ date = "2021-05-21", --TAGDATE
description = "Lua based OpenType font support",
author = authors,
copyright = authors,
diff --git a/macros/luatex/generic/luaotfload/luaotfload.sty b/macros/luatex/generic/luaotfload/luaotfload.sty
index 915b418693..20dc5ffb4f 100644
--- a/macros/luatex/generic/luaotfload/luaotfload.sty
+++ b/macros/luatex/generic/luaotfload/luaotfload.sty
@@ -39,7 +39,7 @@
\fi
\ifdefined\ProvidesPackage
\ProvidesPackage{luaotfload}%
- [2021/01/08 v3.17 OpenType layout system]
+ [2021/05/21 v3.18 OpenType layout system]
\fi
\directlua{
if xpcall(function ()%
diff --git a/macros/luatex/generic/luaotfload/scripts-demo.pdf b/macros/luatex/generic/luaotfload/scripts-demo.pdf
index 29d47c2695..d6513d6869 100644
--- a/macros/luatex/generic/luaotfload/scripts-demo.pdf
+++ b/macros/luatex/generic/luaotfload/scripts-demo.pdf
Binary files differ
diff --git a/macros/luatex/generic/luaotfload/shaper-demo-graphite.pdf b/macros/luatex/generic/luaotfload/shaper-demo-graphite.pdf
index bfb4258474..29b7c229f7 100644
--- a/macros/luatex/generic/luaotfload/shaper-demo-graphite.pdf
+++ b/macros/luatex/generic/luaotfload/shaper-demo-graphite.pdf
Binary files differ
diff --git a/macros/luatex/generic/luaotfload/shaper-demo.pdf b/macros/luatex/generic/luaotfload/shaper-demo.pdf
index 056db0fac3..a604a8c557 100644
--- a/macros/luatex/generic/luaotfload/shaper-demo.pdf
+++ b/macros/luatex/generic/luaotfload/shaper-demo.pdf
Binary files differ
diff --git a/macros/luatex/generic/luatexja/README b/macros/luatex/generic/luatexja/README
index e0f26c370c..3a433c20d4 100644
--- a/macros/luatex/generic/luatexja/README
+++ b/macros/luatex/generic/luatexja/README
@@ -1,4 +1,4 @@
-The LuaTeX-ja Package 20210517.0
+The LuaTeX-ja Package 20210521.0
--------------------------------
Copyright (c) 2011--2021 The LuaTeX-ja project
License: modified BSD (see COPYING)
@@ -42,9 +42,9 @@ Installation
2. If you must/want to install manually:
a. Download the source archive from CTAN,
- or tagged as 20210517.0 in the Git repository by
+ or tagged as 20210521.0 in the Git repository by
<http://git.osdn.jp/view?p=luatex-ja/luatexja.git
- ;a=snapshot;h=refs/tags/20210517.0;sf=tgz>
+ ;a=snapshot;h=refs/tags/20210521.0;sf=tgz>
b. Extract the archive and process following three files by LuaLaTeX
to generate classes for Japanese typesetting:
@@ -93,4 +93,4 @@ Notes
This file and ltj-kinsoku.lua are not used anymore.
(Do not remove ltj-kinsoku.tex.)
-Last commit date: Mon May 17 11:57:27 2021 +0900
+Last commit date: Fri May 21 21:07:11 2021 +0900
diff --git a/macros/luatex/generic/luatexja/doc/luatexja-en.pdf b/macros/luatex/generic/luatexja/doc/luatexja-en.pdf
index 12aada4965..4a31080cc1 100644
--- a/macros/luatex/generic/luatexja/doc/luatexja-en.pdf
+++ b/macros/luatex/generic/luatexja/doc/luatexja-en.pdf
Binary files differ
diff --git a/macros/luatex/generic/luatexja/doc/luatexja-ja.pdf b/macros/luatex/generic/luatexja/doc/luatexja-ja.pdf
index 8799ab20c8..ba8dad3586 100644
--- a/macros/luatex/generic/luatexja/doc/luatexja-ja.pdf
+++ b/macros/luatex/generic/luatexja/doc/luatexja-ja.pdf
Binary files differ
diff --git a/macros/luatex/generic/luatexja/src/ltj-inputbuf.lua b/macros/luatex/generic/luatexja/src/ltj-inputbuf.lua
index 6423f8817a..e1623199e4 100644
--- a/macros/luatex/generic/luatexja/src/ltj-inputbuf.lua
+++ b/macros/luatex/generic/luatexja/src/ltj-inputbuf.lua
@@ -5,7 +5,6 @@
luatexja.load_module 'base'; local ltjb = luatexja.base
luatexja.load_module 'charrange'; local ltjc = luatexja.charrange
-require "unicode"
local utflen = utf.len
local utfbyte = utf.byte
local utfchar = utf.char
@@ -24,12 +23,11 @@ local start_time_measure, stop_time_measure
local function add_comment(buffer)
start_time_measure 'inputbuf'
local i = utflen(buffer)
- while (i>0) and (getcatcode(utfbyte(buffer, i))==1
- or getcatcode(utfbyte(buffer, i))==2) do
- i=i-1
+ local c = utfbyte(buffer, i)
+ while (i>0) and (getcatcode(c)==1 or getcatcode(c)==2) do
+ i=i-1; if (i>0) then c = utfbyte(buffer, i) end;
end
if i>0 then
- local c = utfbyte(buffer, i)
if c>=0x80 then
local te = tex.endlinechar
-- Is the catcode of endline character is 5 (end-of-line)?
diff --git a/macros/luatex/generic/luatexja/src/luatexja-core.sty b/macros/luatex/generic/luatexja/src/luatexja-core.sty
index 5f596574e2..fb58eaf31d 100644
--- a/macros/luatex/generic/luatexja/src/luatexja-core.sty
+++ b/macros/luatex/generic/luatexja/src/luatexja-core.sty
@@ -65,7 +65,7 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja-core}[2021-05-11 Core of LuaTeX-ja]
+ \ProvidesPackage{luatexja-core}[2021-05-21 Core of LuaTeX-ja]
\fi %</LaTeX>
%% Load prerequisite packages.
@@ -630,7 +630,7 @@
t[\the\ltj@@vadjust@dirhook@inner]
= function () luatexja.direction.set_list_direction_hook('adj') end
t[\the\ltj@@vadjust@check@dir@inner]
- = luatexja.direction.check_adjust_direction()
+ = luatexja.direction.check_adjust_direction
}
\luadef\ltj@@vadjust@dirhook\ltj@@vadjust@dirhook@inner
\protected\luadef\ltj@@vadjust@check@dir\ltj@@vadjust@check@dir@inner
diff --git a/macros/luatex/generic/luatexja/src/luatexja.sty b/macros/luatex/generic/luatexja/src/luatexja.sty
index 28b139d95e..0eec4c94c0 100644
--- a/macros/luatex/generic/luatexja/src/luatexja.sty
+++ b/macros/luatex/generic/luatexja/src/luatexja.sty
@@ -35,13 +35,13 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja}[2021-05-17 Japanese Typesetting with Lua(La)TeX]
+ \ProvidesPackage{luatexja}[2021-05-21 Japanese Typesetting with Lua(La)TeX]
\DeclareOption{disablejfam}{\ltj@disablejfamtrue}
\DeclareOption*{}
\ProcessOptions\relax
\fi %</LaTeX>
%%%% VERSION
-\def\LuaTeXjaversion{20210517.0}
+\def\LuaTeXjaversion{20210521.0}
\directlua{require('ltj-unicode-ccfix.lua')}% catcode of ideographs
diff --git a/macros/unicodetex/latex/aalok/README.txt b/macros/unicodetex/latex/aalok/README.txt
index 292d653a85..34715ffbff 100644
--- a/macros/unicodetex/latex/aalok/README.txt
+++ b/macros/unicodetex/latex/aalok/README.txt
@@ -8,7 +8,7 @@ Note: This README file contains information about LaTeX
--------------------------------------------------------------------------
लाटेक्-वर्ग: आलोक
लेखक: निरंजन
-आवृत्ती: ०.२ (१३ फेब्रुवारी, २०२१)
+आवृत्ती: ०.४ (२० मे, २०२१)
वर्णन: आलोक मराठी नियतकालिकाच्या अक्षरजुळणीकरिता लाटेक्-वर्ग.
संग्राहिका: https://gitlab.com/aalok/aalok-latex
अडचणी: https://gitlab.com/aalok/aalok-latex/-/issues
@@ -20,7 +20,7 @@ Note: This README file contains information about LaTeX
--------------------------------------------------------------------------
Class: aalok
Author: Niranjan
-Version: 0.2 (13 February, 2021)
+Version: 0.4 (20 May, 2021)
Description: LaTeX class for typesetting Aalok Marathi
Journal.
Repository: https://gitlab.com/aalok/aalok-latex
diff --git a/macros/unicodetex/latex/aalok/aalok.dtx b/macros/unicodetex/latex/aalok/aalok.dtx
index 81ae1b01e8..6d53b8f421 100644
--- a/macros/unicodetex/latex/aalok/aalok.dtx
+++ b/macros/unicodetex/latex/aalok/aalok.dtx
@@ -4,12 +4,17 @@
% ---------------------------------------------------------------------------
% लाटेक्-वर्ग: आलोक
% लेखक: निरंजन
-% आवृत्ती: ०.२
+% आवृत्ती: ०.४
% वर्णन: आलोक मराठी नियतकालिकाच्या अक्षरजुळणीकरिता लाटेक्-वर्ग.
% संग्राहिका: https://gitlab.com/aalok/aalok-latex
% अडचणी: https://gitlab.com/aalok/aalok-latex/-/issues
-% परवाना: आलोक नित्यमुक्त परवाना. आवृत्ती १.० किंवा त्यापुढील तसेच
-% ग्नू पब्लिक परवाना आवृत्ती ३.०+
+% परवाना: आलोक नित्यमुक्त परवाना. आवृत्ती १.०+
+% ग्नू पब्लिक परवाना. आवृत्ती ३.०+
+% ग्नू फ्री डॉक्युमेन्टेशन परवाना. आवृत्ती १.३+
+% दुवे:
+% https://gitlab.com/aalok/nityamukta-parwana
+% https://www.gnu.org/licenses/gpl
+% https://www.gnu.org/licenses/fdl-1.3
% ---------------------------------------------------------------------------
% हे काम आलोक नित्यमुक्त परवाना तसेच ग्नू पब्लिक परवान्याच्या अटींचे पालन करून वितरित केले जाऊ
% शकते तसेच सुधारले जाऊ शकते.
@@ -41,28 +46,33 @@ Note: This README file contains information about LaTeX
--------------------------------------------------------------------------
लाटेक्-वर्ग: आलोक
लेखक: निरंजन
-आवृत्ती: ०.२ (१३ फेब्रुवारी, २०२१)
+आवृत्ती: ०.४ (२० मे, २०२१)
वर्णन: आलोक मराठी नियतकालिकाच्या अक्षरजुळणीकरिता लाटेक्-वर्ग.
संग्राहिका: https://gitlab.com/aalok/aalok-latex
अडचणी: https://gitlab.com/aalok/aalok-latex/-/issues
परवाना: आलोक नित्यमुक्त परवाना. आवृत्ती १.० किंवा त्यापुढील.
-दुवा - https://gitlab.com/aalok/nityamukta-parwana
- आणि
- ग्नू पब्लिक परवाना. आवृत्ती ३.० किंवा त्यापुढील
- दुवा - https://www.gnu.org/licenses/gpl-3.0.txt
+परवाना: आलोक नित्यमुक्त परवाना. आवृत्ती १.०+
+ ग्नू पब्लिक परवाना. आवृत्ती ३.०+
+ ग्नू फ्री डॉक्युमेन्टेशन परवाना. आवृत्ती १.३+
+ दुवे:
+ https://gitlab.com/aalok/nityamukta-parwana
+ https://www.gnu.org/licenses/gpl
+ https://www.gnu.org/licenses/fdl-1.3
--------------------------------------------------------------------------
Class: aalok
Author: Niranjan
-Version: 0.2 (13 February, 2021)
+Version: 0.4 (20 May, 2021)
Description: LaTeX class for typesetting Aalok Marathi
Journal.
Repository: https://gitlab.com/aalok/aalok-latex
Bug tracker: https://gitlab.com/aalok/aalok-latex/-/issues
License: `आलोक' copyleft license v1.0 or later.
- https://gitlab.com/aalok/nityamukta-parwana
- and
GPL v3.0+
- https://www.gnu.org/licenses/gpl-3.0.txt
+ GFDL v1.3+
+ Links:
+ https://gitlab.com/aalok/nityamukta-parwana
+ https://www.gnu.org/licenses/gpl-3.0.txt
+ https://www.gnu.org/licenses/fdl-1.3
--------------------------------------------------------------------------
%</readme>
%<*internal>
@@ -70,8 +80,8 @@ License: `आलोक' copyleft license v1.0 or later.
%</internal>
%<*driver|class>
\def\aalokName{aalok}
-\def\aalokVersion{०.२}
-\def\aalokDate{२०२१/०२/१३}
+\def\aalokVersion{०.४}
+\def\aalokDate{२०२१/०५/२०}
\def\aalokDescription{आलोक लाटेक् आ. \aalokVersion}
%</driver|class>
%<*driver>
@@ -132,7 +142,7 @@ Language=Marathi,%
\usepackage{hyperref}
\hypersetup{%
unicode,
- pdftitle={।। आलोक ।। (लाटेक्-वर्ग - आवृत्ती ०.२)},
+ pdftitle={।। आलोक ।। (लाटेक्-वर्ग - आवृत्ती ०.३)},
pdfauthor={निरंजन},
pdfsubject={आलोक मराठी नियतकालिकाच्या अक्षरजुळणीकरिता लाटेक्-वर्ग.},
pdfkeywords={आलोक मराठी नियतकालिक},
@@ -142,7 +152,7 @@ Language=Marathi,%
urlcolor=आलोकनिळा%
}%
\usepackage{expl3}
-\usepackage{l3pdf}
+\IfFileExists{l3pdf.sty}{\usepackage{l3pdf}}{}
\ExplSyntaxOn
\pdf_version_gset:n{2.0}
\ExplSyntaxOff
@@ -337,8 +347,8 @@ Color=आलोकनिळा
%<*class>
% \end{macrocode}
% \begin{macrocode}
-\ProvidesClass{aalok}[2021/02/13 v0.2
-\aalokDescription]
+\ProvidesClass{aalok}[2021/05/20 v0.4
+आलोक लाटेक् आ. ०.४]
% \end{macrocode}
% वरील आज्ञेसह पायाभूत माहिती पुरवण्यात आली.
% \begin{macrocode}
@@ -439,14 +449,22 @@ Color=आलोकनिळा
% असणारी प्राचले वापरणे व ते न वापरल्यास डिजिटल आवृत्तीसाठीची प्राचले वापरणे वरील आज्ञांनी साधले.
% \begin{macrocode}
\RequirePackage{expl3}
-\RequirePackage{l3pdf}
+\IfFileExists{l3pdf.sty}{\RequirePackage{l3pdf}}{}
\ExplSyntaxOn
\pdf_version_gset:n{2.0}
\ExplSyntaxOff
% \end{macrocode}
% आलोक नित्यमुक्त परवान्यातील अटीनुसार पीडीएफ् ह्या दस्तऐवजातील प्रकाराची १.७+ आवृत्ती
% वापरणे बंधनकारक आहे. त्यामुळे वरील आज्ञांसह लाटेक्-च्या मूलभूत १.५ ह्या आवृत्तीऐवजी २.० ही
-% नवीनतम आवृत्ती वापरण्यात आली आहे.
+% नवीनतम आवृत्ती वापरण्यात आली आहे. उलरिके फिशर ह्यांनी नोंदवलेल्या
+% \href{https://gitlab.com/aalok/nityamukta-parwana/-/issues/8}{तक्रारीनुसार}\footnote{नजरचुकीने
+% आलोक लाटेक्-वर्गाऐवजी आलोक नित्यमुक्त परवान्याच्या गिटपृष्ठावर ही तक्रार नोंदवली गेली, परंतु
+% आम्ही ह्या तक्रारीची नोंद नंतर आलोक लाटेक्-वर्गाच्या पृष्ठावरदेखील घेतली आहे. पाहा:
+% \url{https://gitlab.com/aalok/aalok-latex/-/issues/2}}
+% l3pdf हा आज्ञासंच टेक्-वितरणाचा भाग नाही व त्याच्या सर्व आज्ञा मूळ टेक्-आज्ञावलीतच समाविष्ट
+% केल्या आहेत, त्यामुळे त्या आज्ञासंचाचा वापर आवृत्ती ०.३पासून सोपाधिकासह करण्यात आला आहे. जर
+% आज्ञासंचाची धारिका टेक्-वितरणात असेल, तरच हा आज्ञासंच वापरला जाईल, अन्यथा टेक्-चालकासह
+% धारिका आपसूक चालवली जाईल.
% \begin{macrocode}
\RequirePackage{expex}
\RequirePackage{xcolor}
@@ -578,27 +596,9 @@ backend=biber,%
% आलोक नियतकालिकातील लेखकांना ORCID वर नोंदणी करणे बंधनकारक आहे. आलोकच्या अंकात ORCID
% क्रमांकांचा समावेश करण्यासाठी वरील आज्ञा समाविष्ट केल्या.
% \begin{macrocode}
-\newfontfamily{\गोटू}[%
-Script=Devanagari,%
-Renderer=Harfbuzz,%
-Language=Marathi%
-]%
-{Gotu}
-\newfontfamily{\यशोमुद्रा}[%
-Path=सामग्री/टंक/यशोमुद्रा/,%
-Language=Marathi,%
-Script=Devanagari,%
-Renderer=Harfbuzz%
-]%
-{Yashomudra-Italic.ttf}
-\newfontfamily{\मुक्त}[%
-Path=सामग्री/टंक/मुक्त/,%
-Language=Marathi,%
-Script=Devanagari,%
-Renderer=Harfbuzz,%
-Color=लाल%
-]%
-{Mukta-Regular.ttf}
+\दुसराटंक{\गोटू}{Gotu}
+\दुसराटंक{\यशोमुद्रा}{Yashomudra-Italic.ttf}[Path=सामग्री/टंक/यशोमुद्रा]
+\दुसराटंक{\मुक्त}{Mukta-Regular.ttf}[Path=सामग्री/टंक/मुक्त]
% \end{macrocode}
% आलोकच्या मुखपृष्ठावर वापरला गेलेला गोटू हा टंक, अनुक्रमणिकेतील तिरक्या अक्षरांसाठी लागणारा
% यशोमुद्रा हा टंक व नित्यमुक्त परवान्याच्या संहितेत लागणारा मुक्त हा टंक वरील आज्ञांसह पुरवण्यात
@@ -678,12 +678,6 @@ Color=लाल%
% \end{macrocode}
% संदर्भसूची चालू पानावरच येण्याकरिता ही आज्ञा घडवण्यात आली आहे.
% \begin{macrocode}
-\sloppy
-\hyphenpenalty=10000
-\exhyphenpenalty=1000
-% \end{macrocode}
-% शब्द अयोग्यरित्या तुटू नयेत, म्हणून वरील आज्ञा वापरण्यात आल्या आहेत.
-% \begin{macrocode}
\def\parsecomma#1,#2\endparsecomma{\def\page@x{#1}\def\page@y{#2}}
\tikzdeclarecoordinatesystem{पृष्ठ}{%
\parsecomma#1\endparsecomma
diff --git a/macros/unicodetex/latex/aalok/aalok.ins b/macros/unicodetex/latex/aalok/aalok.ins
index 2bde4e1411..e580550308 100644
--- a/macros/unicodetex/latex/aalok/aalok.ins
+++ b/macros/unicodetex/latex/aalok/aalok.ins
@@ -7,7 +7,7 @@
\preamble
--------------------------------------------------------------------------
-लाटेक्-वर्ग आलोक आवृत्ती ०.१
+लाटेक्-वर्ग आलोक आवृत्ती ०.४
© २०२१ निरंजन, आलोक मराठी नियतकालिक
ह्या सामग्रीच्या वितरणाचे व प्रतिमुद्रणाचे अधिकार आलोक नित्यमुक्त परवान्यासह मुक्त करण्यात येत
@@ -20,7 +20,7 @@
https://gitlab.com/aalok/nityamukta-parwana
--------------------------------------------------------------------------
-LaTeX Class aalok v0.1
+LaTeX Class aalok v0.4
© 2021 Niranjan, Aalok Marathi Niyatkalik
This program is free software: you can redistribute it and/or modify
@@ -38,15 +38,17 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
लाटेक्-वर्ग: आलोक
लेखक: निरंजन
-आवृत्ती: ०.१
+आवृत्ती: ०.४
वर्णन: आलोक मराठी नियतकालिकाच्या अक्षरजुळणीकरिता लाटेक्-वर्ग.
दुवा: https://gitlab.com/aalok/aalok-latex
अडचणी: https://gitlab.com/aalok/aalok-latex/-/issues
परवाना: आलोक नित्यमुक्त परवाना. आवृत्ती १.०+
- दुवा : https://gitlab.com/aalok/nityamukta-parwana
- आणि
ग्नू पब्लिक परवाना. आवृत्ती ३.०+
- दुवा : https://www.gnu.org/licenses/gpl
+ ग्नू फ्री डॉक्युमेन्टेशन परवाना. आवृत्ती १.३+
+ दुवे:
+ https://gitlab.com/aalok/nityamukta-parwana
+ https://www.gnu.org/licenses/gpl
+ https://www.gnu.org/licenses/fdl-1.3
---------------------------------------------------------------------------
हे काम आलोक नित्यमुक्त परवान्याच्या (आवृत्ती १.० अथवा त्यापुढील) अटींचे पालन करून वितरित केले
जाऊ शकते तसेच सुधारले जाऊ शकते.
diff --git a/macros/unicodetex/latex/aalok/aalok.pdf b/macros/unicodetex/latex/aalok/aalok.pdf
index faeb61deca..c3b390a5da 100644
--- a/macros/unicodetex/latex/aalok/aalok.pdf
+++ b/macros/unicodetex/latex/aalok/aalok.pdf
Binary files differ