[latex3-commits] [git/LaTeX3-latex3-luaotfload] dev: more documentation changes (a89f73c)

Ulrike Fischer fischer at troubleshooting-tex.de
Wed Jan 29 20:08:51 CET 2020


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

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

commit a89f73c22a7e5d1b5f2546d406358a47fdad1ba5
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Wed Jan 29 20:08:51 2020 +0100

    more documentation changes


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

a89f73c22a7e5d1b5f2546d406358a47fdad1ba5
 doc/luaotfload-main.tex         |  14 +++++++-------
 trials/multiscript-fallback.pdf | Bin 89214 -> 89214 bytes
 trials/multiscript-fallback.tex |  18 ++++++++----------
 3 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/doc/luaotfload-main.tex b/doc/luaotfload-main.tex
index 0bd39d9..f6193f4 100644
--- a/doc/luaotfload-main.tex
+++ b/doc/luaotfload-main.tex
@@ -1073,7 +1073,7 @@ obviously, \inlinecode{random}.
   \endaltitem
 
   \beginaltitem {multiscript}\phantomsection\label{multiscript}
-   In\marginpar{New in 3.12 -- experimental} open type 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.
+   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.
    \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):
@@ -1083,15 +1083,15 @@ obviously, \inlinecode{random}.
      luaotfload.add_multiscript
        ("cyrlgrekbeng",
         {
-          cyrl = "DejaVuSans:mode=node;script=cyrl;color=FF0000;",
-          grek = "texgyreheros:mode=harf;script=grek;color=0000FF;",
-          beng = "NotoSansBengali:mode=harf;script=bng2;color=00FF00;"
+          Cyrl = "DejaVuSans:mode=node;script=cyrl;color=FF0000;",
+          Grek = "texgyreheros:mode=harf;script=grek;color=0000FF;",
+          Beng = "NotoSansBengali:mode=harf;script=bng2;color=00FF00;"
         }
        )
       }
    \endlisting
 
-  \identifier{cyrlgrekbeng} is the name of the multiscript (use lower case chars). The keys are ISO language tags (not open type tags!), the values are font declarations.
+  \identifier{cyrlgrekbeng} is the name of the multiscript (the name is case insensitive). The keys are ISO language tags (not open type tags!).  They are case insensitive too: the example uses an uppercase letter for ISO tags to differentiate them from script tags.  The values are font declarations.
 
   The multiscript can then be used in a font like this:
 
@@ -1110,11 +1110,11 @@ obviously, \inlinecode{random}.
   Be aware of the following drawbacks:
 
   \begin{itemize}
-  \item Quite a lot chars can and should be used with more than one script, they belong to the Common or Inherited class. Examples are punctuation chars, digits, accents but also emoji. Currently these chars follow the active script. That's why the digit are all typeset with a different font, the accent over the pi is different to the one over the a, and why the opening quote is sometimes different to the closing quote. It is clear that some tools to force a script (and so a font) locally and globally for such chars are needed.
+  \item Quite a lot chars can and should be used with more than one script, they belong to the Common or Inherited class. Examples are punctuation chars, digits, accents but also emoji. Currently these chars follow the active script. That's why the digits are all typeset with a different font, the accent over the pi is different to the one over the a, and why the opening quote is sometimes different to the closing quote. It is clear that some tools to force a script (and so a font) locally and globally for such chars are needed.
 
   \item \identifier{multiscript} doesn't change hyphenation patterns or other language or script related features.
 
-  \item Language packages like babel or polyglossia have code to change the script too which could interfere or clash. This hasn't been tested yet.
+  \item Language packages like \identifier{babel} or \identifier{polyglossia} have code to change the script too which could interfere or clash. This hasn't been tested yet.
   \end{itemize}
 
   It is possible to use the value \identifier{auto} with \identifier{multiscript}. luaotfload will then switch the script if it detects a char belonging to another script (and if the font support this script). This can be useful for fonts supporting more than one script or when using the \identifier{fallback} key described below.
diff --git a/trials/multiscript-fallback.pdf b/trials/multiscript-fallback.pdf
index 2aa0954..9150042 100644
Binary files a/trials/multiscript-fallback.pdf and b/trials/multiscript-fallback.pdf differ
diff --git a/trials/multiscript-fallback.tex b/trials/multiscript-fallback.tex
index 1ceda84..70b90d8 100644
--- a/trials/multiscript-fallback.tex
+++ b/trials/multiscript-fallback.tex
@@ -1,7 +1,7 @@
 % !Mode:: "TeX:DE:UTF-8:Main"
 
 \documentclass{article}
-
+\primitive\tracingfonts=3
 \usepackage{fontspec}
 \setmainfont{Times New Roman}
 \directlua
@@ -31,7 +31,7 @@
  luaotfload.add_multiscript
  ("cyrl",
   {
-    cyrl = "Cambria:mode=node;script=cyrl;color=00FFFF",
+    Cyrl = "Cambria:mode=node;script=cyrl;color=00FFFF",
   }
  )
 
@@ -40,9 +40,9 @@
  luaotfload.add_multiscript
  ("cyrl_grek_beng",
   {
-    cyrl = "Cambria:mode=node;script=cyrl;color=0000FF",
-    grek = "DejaVuSans:mode=harf;script=grek;color=0000FF;",
-    beng = "NotoSansBengali:mode=harf;script=beng;color=0000FF"
+    Cyrl = "Cambria:mode=node;script=cyrl;color=0000FF",
+    Grek = "DejaVuSans:mode=harf;script=grek;color=0000FF;",
+    Beng = "NotoSansBengali:mode=harf;script=beng;color=0000FF"
   }
  )
 
@@ -50,11 +50,9 @@
  luaotfload.add_multiscript
  ("cyrl_grek_bng2",
   {
-    cyrl = "Cambria:mode=node;script=cyrl;color=00FF00;",
-    grek = "DejaVuSans:mode=harf;script=grek;color=00FF00;",
-    beng = "NotoSansBengali:mode=harf;script=bng2;color=00FF00;",
-    zyyy = "Arial:mode=node;color=101000;",
-    zinh = "Arial:mode=node;color=101000;"
+    Cyrl = "Cambria:mode=node;script=cyrl;color=00FF00;",
+    Grek = "DejaVuSans:mode=harf;script=grek;color=00FF00;",
+    Beng = "NotoSansBengali:mode=harf;script=bng2;color=00FF00;",
   }
  )
 }





More information about the latex3-commits mailing list.