[latex3-commits] [git/LaTeX3-latex3-luaotfload] dev: documentated new color scheme (c1a8af3)

Ulrike Fischer fischer at troubleshooting-tex.de
Tue Jan 21 22:48:08 CET 2020


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

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

commit c1a8af3eead1b9821f9fc7fafa771182a0d33b21
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Tue Jan 21 22:48:08 2020 +0100

    documentated new color scheme


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

c1a8af3eead1b9821f9fc7fafa771182a0d33b21
 doc/luaotfload-latex.tex | 10 +++++++++-
 doc/luaotfload-main.tex  | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 1 deletion(-)

diff --git a/doc/luaotfload-latex.tex b/doc/luaotfload-latex.tex
index 8a68efd..0c7e21f 100644
--- a/doc/luaotfload-latex.tex
+++ b/doc/luaotfload-latex.tex
@@ -280,7 +280,15 @@
     end
   end
 }
-
+\directlua{
+           luaotfload.add_colorscheme("myscheme",
+           {
+             ["00FFFF30"] = {"default"},
+             ["FF0000"] = {"kabeng"},
+             ["00FF00"] = {"ivowelsignbeng"},
+             ["0000FF"] = {369} %% 369 is the GID of "nadarabeng"
+           })
+           }
 \def \listingpar {\endgraf}
 
 \let \endlistingline \relax
diff --git a/doc/luaotfload-main.tex b/doc/luaotfload-main.tex
index 8ed838c..dea1923 100644
--- a/doc/luaotfload-main.tex
+++ b/doc/luaotfload-main.tex
@@ -62,6 +62,16 @@ Supported is the \identifier{luatex} versions of a current TeXLive 2019 (and a c
 \endsection
 
 \beginsection{Changes}
+\beginsubsection {New in version 3.12 (by Ulrike Fischer/Marcel Krüger)}
+\begin{itemize}
+\item Corrected a number of small bugs in harf mode.
+\item  Extension\marginpar{Experimental!} of the \identifier{color} key to allow 
+coloring of specific output glyphs
+\item  A\marginpar{Experimental!} new \identifier{fallback} key to allow to define fallback fonts.
+\item  A\marginpar{Experimental!} new \identifier{multiscript} key to allow to use a font
+for more than one script. 
+\end{itemize}
+
 \beginsubsection {New in version 3.11 (by Ulrike Fischer/Marcel Krüger)}
 \begin{itemize}
 \item Changed the handling of the \identifier{script} key in harf mode to be more compatible with behaviour of the node mode. It now expects the name of a script that is actually in the font instead of a ISO 15924 script tag. See issue 117.
@@ -839,6 +849,42 @@ obviously, \inlinecode{random}.
          \beginlisting
       \font \test = "Latin Modern Roman:color=FF0000BB"
          \endlisting
+         
+         Experimental!\marginpar{\mbox{}\hfill NEW in v3.12!} The \identifier{color} key has been
+         extended to accept a table with color declarations of (output) glyphs. For example
+         
+         \beginlisting   
+         \directlua{
+           luaotfload.add_colorscheme("myscheme",
+           {
+             ["00FFFF30"] = {"default"},
+             ["FF0000"] = {"kabeng","ebeng"},
+             ["00FF00"] = {"ivowelsignbeng"},
+             ["0000FF"] = {369} %% 369 is the GID of "nadarabeng"
+           })
+           }
+          \endlisting 
+          
+          The keys in such a table are like above RGB colors with an optional transparency setting.
+          The values are either lists of glyph names or GID numbers. 
+          Both types are font dependant! Not every font use the same
+          glyph names (or even glyph names at all). GID number are font specific anyway. The GID can be found 
+          by looking up the \verb+["index"]+ entry in the lua file of a font.
+          
+          Such a colorscheme can then be used like this:
+          \beginlisting   
+          \font\test={name:Noto Sans Bengali:mode=harf;script=bng2;color=myscheme}
+          \endlisting
+          
+          and then would give this output:
+          
+          
+          {\font\test={name:Noto Sans Bengali:mode=harf;script=bng2;color=myscheme}\test
+           কণ্যা এখন কি করিবে
+           \char"0995 \char"09BF
+           \char"09A8 \char"09CD \char"09A6
+           \char"09CD \char"09B0}
+           
   \endaltitem
 
 





More information about the latex3-commits mailing list