[latex3-commits] [git/LaTeX3-latex3-luaotfload] dev: update docu (490d8f8)

Ulrike Fischer fischer at troubleshooting-tex.de
Sun Dec 27 22:20:07 CET 2020


Repository : https://github.com/latex3/luaotfload
On branch  : dev
Link       : https://github.com/latex3/luaotfload/commit/490d8f8273af6bf3772671b49dffc0340d127383

>---------------------------------------------------------------

commit 490d8f8273af6bf3772671b49dffc0340d127383
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Sun Dec 27 22:20:07 2020 +0100

    update docu


>---------------------------------------------------------------

490d8f8273af6bf3772671b49dffc0340d127383
 doc/luaotfload-main.tex                            | 91 ++++++++++++++++++++--
 .../tex/luatex/lualibs/lualibs-basic-merged.lua    | 29 +++++--
 supporttexmf/tex/luatex/lualibs/lualibs-basic.lua  |  4 +-
 .../tex/luatex/lualibs/lualibs-extended-merged.lua |  6 +-
 .../tex/luatex/lualibs/lualibs-extended.lua        |  4 +-
 supporttexmf/tex/luatex/lualibs/lualibs-os.lua     |  2 +
 .../tex/luatex/lualibs/lualibs-package.lua         | 24 ++++--
 .../tex/luatex/lualibs/lualibs-util-dim.lua        | 18 ++---
 supporttexmf/tex/luatex/lualibs/lualibs.lua        |  4 +-
 9 files changed, 141 insertions(+), 41 deletions(-)

diff --git a/doc/luaotfload-main.tex b/doc/luaotfload-main.tex
index 3eb5c93..bbded62 100644
--- a/doc/luaotfload-main.tex
+++ b/doc/luaotfload-main.tex
@@ -69,9 +69,19 @@ Supported is the \identifier{luatex} versions of a current TeXLive 2019 (and a c
   \item  \inlinecode{pre/post_shaping_filter} callbacks has been added.
   \item  The number of \abbrev{lua}-files and submodules shown in the \abbrev{log}-file has been reduced. But it
    is extended again by setting the environment variable \inlinecode{LUAOTFLOAD_TRACE_SUBMODULES=1}.
-  \item first/second discretionaries ??
-  \item Variable fonts ??
-  \item Upper/Lower ??  
+  \item The HarfBuzz based shaper will in some situations drop hyphenation
+   points. This happens less frequently now since the new version uses
+   first/second discretionaries (the mechanism described in the LuaTeX manual,
+   section 5.6 for the of-f-ice example) to support a limited amount of
+   nesting.
+  \item When the \texttt{node} shaper is used, experimental support for OpenType variable
+   fonts has been added. To use them, set the font feature \texttt{axis} to
+   a comma separated list of axis names and values. (E.g.  \texttt{axis={weight=600}})
+   The supported axis names and value range depend on the font (see~page~\pageref{variablefonts}).
+ \item The font features \texttt{upper} and \texttt{lower} can be used to map
+   the text of a font to upper or lowercase before displaying it. Currently
+   this implements the untailored Unicode case mapping algorithm, but it is
+   planned to add tailoring later (see~page~\pageref{upperlower}).
   \item A number of small bugfixes.
  \end{itemize}
 \endsubsection
@@ -1180,8 +1190,8 @@ obviously, \inlinecode{random}.
 
   \endaltitem
 
-  \beginaltitem {multiscript}\phantomsection\label{multiscript}
-   In\marginpar{New in 3.12 -- experimental} fonts many shaping rules are implemented only for specific scripts and so you get correct typesetting only if the \identifier{script} feature is correctly set. This means that to write a text which uses more than one script you have to declare a font for each script and switch fonts even if the font contains glyphs for all scripts.
+  \beginaltitem {multiscript}
+   In\phantomsection\label{multiscript}\marginpar{New in 3.12 -- experimental} fonts many shaping rules are implemented only for specific scripts and so you get correct typesetting only if the \identifier{script} feature is correctly set. This means that to write a text which uses more than one script you have to declare a font for each script and switch fonts even if the font contains glyphs for all scripts.
    \identifier{multiscript} tries to help here. The feature is experimental and bound to change. Feedback is welcome but you use it at your risk.
 
    \identifier{multiscript} allows you to declare fonts for various script. The value is either \identifier{auto} described below, or a name which has been previously declared or a combination of both. An example for such a named multiscript could look like this (the colors are only for demonstration):
@@ -1235,8 +1245,10 @@ obviously, \inlinecode{random}.
 
   \endaltitem
 
-   \beginaltitem {fallback}\label{fallback}
-   This\marginpar{New in 3.12 -- experimental} allows you to define a chain of fonts which are used if glyphs are missing in the main font. It works only for text fonts, not for math fonts set with the  \identifier{unicode-math} package.
+   \beginaltitem {fallback}
+   This\label{fallback}\marginpar{New in 3.12 -- experimental} 
+   allows you to define a chain of fonts which are used if glyphs are missing in the main font. 
+   It works only for text fonts, not for math fonts set with the  \identifier{unicode-math} package.
    The feature is experimental and bound to change. Feedback is welcome but you use it at your risk.
    For example
 
@@ -1290,7 +1302,69 @@ obviously, \inlinecode{random}.
 
    As with the \identifier{multiscript} key more control over the used glyph and script in edge cases will be needed.
    \endaltitem
-\enddescriptions
+   
+  \beginaltitem {upper/lower}
+   The\phantomsection\label{upperlower}\marginpar{New in 3.16} 
+   font features \texttt{upper} and \texttt{lower} can be used to map
+   the text of a font to upper or lowercase before displaying it. Currently
+   this implements the untailored Unicode case mapping algorithm, but it is
+   planned to add tailoring later. For example
+   
+   \beginlisting
+   \font\test={name:LatinModernRoman:mode=node;+upper;}
+   \test Grüße 
+   \endlisting
+   
+   {\Large\font\test={name:LatinModernRoman:mode=node;+upper;}\test Grüße}    
+   
+  \endaltitem  
+  
+  \beginaltitem {Variable fonts}
+   When\phantomsection\label{variablefonts}\marginpar{New in 3.16} 
+   the \texttt{node} shaper is used, 
+   experimental support for OpenType variable
+   fonts has been added. To use them, set the font feature \texttt{axis} to
+   a comma separated list of axis names and values. (E.g.  \texttt{axis={weight=600}})
+   The supported axis names and value range depend on the font (see~page~\pageref{variablefonts}). 
+   The following listing shows an example with the Source Code Variable font:
+   
+  \begin{lstlisting}[columns=fullflexible]
+\documentclass{article}
+ \DeclareFontFamily{TU}{sourcecode-variable}{}
+ \newcommand\DeclareSourceVariable[2]{%
+   \DeclareFontShape{TU}{sourcecode-variable}{#1}{n}{%
+     <-> \UnicodeFontFile{SourceCodeVariable-Roman.otf}
+         {\UnicodeFontTeXLigatures axis={weight=#2};}%
+   }{}%
+   \DeclareFontShape{TU}{sourcecode-variable}{#1}{it}{%
+     <-> \UnicodeFontFile{SourceCodeVariable-Italic.otf}
+        {\UnicodeFontTeXLigatures axis={weight=#2};}%
+   }{}%
+ }
+ \DeclareSourceVariable{ul}{200}
+ \DeclareSourceVariable{el}{250}
+ \DeclareSourceVariable{l}{300}
+ \DeclareSourceVariable{sl}{350}
+ \DeclareSourceVariable{m}{400}
+ \DeclareSourceVariable{sb}{500}
+ \DeclareSourceVariable{b}{600}
+ \DeclareSourceVariable{eb}{700}
+ \DeclareSourceVariable{ub}{900}
+ \begin{document}
+ \fontfamily{sourcecode-variable}\selectfont
+ \fontseries{ul}\selectfont a\textit{b}
+ \fontseries{el}\selectfont c\textit{d}
+ \fontseries{l}\selectfont e\textit{f}
+ \fontseries{sl}\selectfont g\textit{h}
+ \fontseries{m}\selectfont i\textit{j}
+ \fontseries{sb}\selectfont k\textit{l}
+ \fontseries{b}\selectfont m\textit{n}
+ \fontseries{eb}\selectfont o\textit{p}
+ \fontseries{ub}\selectfont q\textit{r}
+ \end{document}
+\end{lstlisting}
+
+  \enddescriptions
 
 \endsubsection
 
@@ -1353,6 +1427,7 @@ Currently (2014) there are three of them:
 \enddescriptions
 
 \endsubsection
+
 \endsection
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/supporttexmf/tex/luatex/lualibs/lualibs-basic-merged.lua b/supporttexmf/tex/luatex/lualibs/lualibs-basic-merged.lua
index 147cc33..bca3c80 100644
--- a/supporttexmf/tex/luatex/lualibs/lualibs-basic-merged.lua
+++ b/supporttexmf/tex/luatex/lualibs/lualibs-basic-merged.lua
@@ -1,6 +1,6 @@
 -- merged file : lualibs-basic-merged.lua
 -- parent file : lualibs-basic.lua
--- merge date  : Mon Aug 31 23:16:26 2020
+-- merge date  : Mon Dec 21 23:44:02 2020
 
 do -- begin closure to overcome local limits and interference
 
@@ -358,7 +358,10 @@ methods["already loaded"]=function(name)
  return package.loaded[name]
 end
 methods["preload table"]=function(name)
- return builtin["preload table"](name)
+ local f=builtin["preload table"]
+ if f then
+  return f(name)
+ end
 end
 methods["qualified path"]=function(name)
   return loadedbyname(addsuffix(lualibfile(name),"lua"),name)
@@ -370,15 +373,24 @@ methods["lib extra list"]=function(name)
  return loadedbypath(addsuffix(lualibfile(name),os.libsuffix),name,getextralibpaths(),true,"lib")
 end
 methods["path specification"]=function(name)
- getluapaths() 
- return builtin["path specification"](name)
+ local f=builtin["path specification"]
+ if f then
+  getluapaths() 
+  return f(name)
+ end
 end
 methods["cpath specification"]=function(name)
- getlibpaths() 
- return builtin["cpath specification"](name)
+ local f=builtin["cpath specification"]
+ if f then
+  getlibpaths() 
+  return f(name)
+ end
 end
 methods["all in one fallback"]=function(name)
- return builtin["all in one fallback"](name)
+ local f=builtin["all in one fallback"]
+ if f then
+  return f(name)
+ end
 end
 methods["not loaded"]=function(name)
  if helpers.trace then
@@ -3358,6 +3370,8 @@ elseif name=="macosx" then
    platform="osx-intel"
   elseif find(architecture,"x86_64",1,true) then
    platform="osx-64"
+  elseif find(architecture,"arm64",1,true) then
+   platform="osx-64"
   else
    platform="osx-ppc"
   end
@@ -4684,6 +4698,7 @@ 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/supporttexmf/tex/luatex/lualibs/lualibs-basic.lua b/supporttexmf/tex/luatex/lualibs/lualibs-basic.lua
index 922c102..d110fc7 100644
--- a/supporttexmf/tex/luatex/lualibs/lualibs-basic.lua
+++ b/supporttexmf/tex/luatex/lualibs/lualibs-basic.lua
@@ -29,8 +29,8 @@ local loadmodule        = lualibs.loadmodule
 
 local lualibs_basic_module = {
   name          = "lualibs-basic",
-  version       = "2.72",       --TAGVERSION
-  date          = "2020-08-31", --TAGDATE
+  version       = "2.73",       --TAGVERSION
+  date          = "2020-12-21", --TAGDATE
   description   = "ConTeXt Lua libraries -- basic collection.",
   author        = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
   copyright     = "PRAGMA ADE / ConTeXt Development Team",
diff --git a/supporttexmf/tex/luatex/lualibs/lualibs-extended-merged.lua b/supporttexmf/tex/luatex/lualibs/lualibs-extended-merged.lua
index 89d384a..8d016ca 100644
--- a/supporttexmf/tex/luatex/lualibs/lualibs-extended-merged.lua
+++ b/supporttexmf/tex/luatex/lualibs/lualibs-extended-merged.lua
@@ -1,6 +1,6 @@
 -- merged file : lualibs-extended-merged.lua
 -- parent file : lualibs-extended.lua
--- merge date  : Mon Aug 31 23:16:16 2020
+-- merge date  : Mon Dec 21 23:43:49 2020
 
 do -- begin closure to overcome local limits and interference
 
@@ -2700,8 +2700,6 @@ local dimenfactors=allocate {
  ["pc"]=(1/12)/65536,
  ["dd"]=(1157/1238)/65536,
  ["cc"]=(1157/14856)/65536,
- ["nd"]=(20320/21681)/65536,
- ["nc"]=(5080/65043)/65536
 }
 local f_none=formatters["%s%s"]
 local f_true=formatters["%0.5F%s"]
@@ -2733,8 +2731,6 @@ function number.tobasepoints  (n,fmt) return numbertodimen(n,"bp",fmt) end
 function number.topicas    (n,fmt) return numbertodimen(n "pc",fmt) end
 function number.todidots   (n,fmt) return numbertodimen(n,"dd",fmt) end
 function number.tociceros  (n,fmt) return numbertodimen(n,"cc",fmt) end
-function number.tonewdidots   (n,fmt) return numbertodimen(n,"nd",fmt) end
-function number.tonewciceros  (n,fmt) return numbertodimen(n,"nc",fmt) end
 local amount=(S("+-")^0*R("09")^0*P(".")^0*R("09")^0)+Cc("0")
 local unit=R("az")^1+P("%")
 local dimenpair=amount/tonumber*(unit^1/dimenfactors+Cc(1)) 
diff --git a/supporttexmf/tex/luatex/lualibs/lualibs-extended.lua b/supporttexmf/tex/luatex/lualibs/lualibs-extended.lua
index 9e36850..9017771 100644
--- a/supporttexmf/tex/luatex/lualibs/lualibs-extended.lua
+++ b/supporttexmf/tex/luatex/lualibs/lualibs-extended.lua
@@ -30,8 +30,8 @@ lualibs = lualibs or { }
 
 local lualibs_extended_module = {
   name          = "lualibs-extended",
-  version       = "2.72",       --TAGVERSION
-  date          = "2020-08-31", --TAGDATE
+  version       = "2.73",       --TAGVERSION
+  date          = "2020-12-21", --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/supporttexmf/tex/luatex/lualibs/lualibs-os.lua b/supporttexmf/tex/luatex/lualibs/lualibs-os.lua
index 1e01350..7384107 100644
--- a/supporttexmf/tex/luatex/lualibs/lualibs-os.lua
+++ b/supporttexmf/tex/luatex/lualibs/lualibs-os.lua
@@ -358,6 +358,8 @@ elseif name == "macosx" then
             platform = "osx-intel"
         elseif find(architecture,"x86_64",1,true) then
             platform = "osx-64"
+        elseif find(architecture,"arm64",1,true) then
+            platform = "osx-64"
         else
             platform = "osx-ppc"
         end
diff --git a/supporttexmf/tex/luatex/lualibs/lualibs-package.lua b/supporttexmf/tex/luatex/lualibs/lualibs-package.lua
index 94607d4..a35ec3e 100644
--- a/supporttexmf/tex/luatex/lualibs/lualibs-package.lua
+++ b/supporttexmf/tex/luatex/lualibs/lualibs-package.lua
@@ -300,7 +300,10 @@ methods["already loaded"] = function(name)
 end
 
 methods["preload table"] = function(name)
-    return builtin["preload table"](name)
+    local f = builtin["preload table"]
+    if f then
+        return f(name)
+    end
 end
 
 methods["qualified path"]=function(name)
@@ -316,17 +319,26 @@ methods["lib extra list"] = function(name)
 end
 
 methods["path specification"] = function(name)
-    getluapaths() -- triggers list building and tracing
-    return builtin["path specification"](name)
+    local f = builtin["path specification"]
+    if f then
+        getluapaths() -- triggers list building and tracing
+        return f(name)
+    end
 end
 
 methods["cpath specification"] = function(name)
-    getlibpaths() -- triggers list building and tracing
-    return builtin["cpath specification"](name)
+    local f = builtin["cpath specification"]
+    if f then
+        getlibpaths() -- triggers list building and tracing
+        return f(name)
+    end
 end
 
 methods["all in one fallback"] = function(name)
-    return builtin["all in one fallback"](name)
+    local f = builtin["all in one fallback"]
+    if f then
+        return f(name)
+    end
 end
 
 methods["not loaded"] = function(name)
diff --git a/supporttexmf/tex/luatex/lualibs/lualibs-util-dim.lua b/supporttexmf/tex/luatex/lualibs/lualibs-util-dim.lua
index 76b5fd2..bb9eca9 100644
--- a/supporttexmf/tex/luatex/lualibs/lualibs-util-dim.lua
+++ b/supporttexmf/tex/luatex/lualibs/lualibs-util-dim.lua
@@ -44,8 +44,8 @@ local dimenfactors = allocate {
     ["pc"] = (    1/   12)/65536,
     ["dd"] = ( 1157/ 1238)/65536,
     ["cc"] = ( 1157/14856)/65536,
-    ["nd"] = (20320/21681)/65536,
-    ["nc"] = ( 5080/65043)/65536
+ -- ["nd"] = (20320/21681)/65536,
+ -- ["nc"] = ( 5080/65043)/65536
 }
 
 -- print(table.serialize(dimenfactors))
@@ -61,9 +61,9 @@ local dimenfactors = allocate {
 --   ["ex"]=6.103515625e-005,
 --   ["in"]=2.1113586636917117e-007,
 --   ["mm"]=5.3628510057769473e-008,
---   ["nc"]=1.1917446679504327e-006,
---   ["nd"]=1.4300936015405194e-005,
---   ["pc"]=1.2715657552083333e-006,
+-- --["nc"]=1.1917446679504327e-006,
+-- --["nd"]=1.4300936015405194e-005,
+-- --["pc"]=1.2715657552083333e-006,
 --   ["pt"]=1.52587890625e-005,
 --   ["sp"]=1,
 --  }
@@ -79,8 +79,8 @@ local dimenfactors = allocate {
 --   ["ex"]=0.00006103515625,
 --   ["in"]=0.00000021113587,
 --   ["mm"]=0.00000005362851,
---   ["nc"]=0.00000119174467,
---   ["nd"]=0.00001430093602,
+-- --["nc"]=0.00000119174467,
+-- --["nd"]=0.00001430093602,
 --   ["pc"]=0.00000127156576,
 --   ["pt"]=0.00001525878906,
 --   ["sp"]=1,
@@ -128,8 +128,8 @@ function number.tobasepoints  (n,fmt) return numbertodimen(n,"bp",fmt) end
 function number.topicas       (n,fmt) return numbertodimen(n "pc",fmt) end
 function number.todidots      (n,fmt) return numbertodimen(n,"dd",fmt) end
 function number.tociceros     (n,fmt) return numbertodimen(n,"cc",fmt) end
-function number.tonewdidots   (n,fmt) return numbertodimen(n,"nd",fmt) end
-function number.tonewciceros  (n,fmt) return numbertodimen(n,"nc",fmt) end
+-------- number.tonewdidots   (n,fmt) return numbertodimen(n,"nd",fmt) end
+-------- number.tonewciceros  (n,fmt) return numbertodimen(n,"nc",fmt) end
 
 --[[ldx--
 <p>More interesting it to implement a (sort of) dimen datatype, one
diff --git a/supporttexmf/tex/luatex/lualibs/lualibs.lua b/supporttexmf/tex/luatex/lualibs/lualibs.lua
index 488206a..34bd524 100644
--- a/supporttexmf/tex/luatex/lualibs/lualibs.lua
+++ b/supporttexmf/tex/luatex/lualibs/lualibs.lua
@@ -25,8 +25,8 @@ lualibs = lualibs or { }
 
 lualibs.module_info = {
   name          = "lualibs",
-  version       = "2.72",       --TAGVERSION
-    date        = "2020-08-31", --TAGDATE
+  version       = "2.73",       --TAGVERSION
+    date        = "2020-12-21", --TAGDATE
   description   = "ConTeXt Lua standard libraries.",
   author        = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
   copyright     = "PRAGMA ADE / ConTeXt Development Team",





More information about the latex3-commits mailing list.