[latex3-commits] [git/LaTeX3-latex3-luaotfload] dev: Add variable fonts to documentation (13a026a)

Marcel Fabian Krüger tex at 2krueger.de
Sat Aug 29 14:11:41 CEST 2020


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

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

commit 13a026a6febda263d9218a109ec7ec1563aefe3c
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Sat Aug 29 14:06:30 2020 +0200

    Add variable fonts to documentation


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

13a026a6febda263d9218a109ec7ec1563aefe3c
 doc/luaotfload-main.tex                            |  46 +++++++++++++++++++++
 .../Fraunces-Italic[SOFT,WONK,opsz,wght].ttf       | Bin 0 -> 442444 bytes
 .../truetype/Fraunces[SOFT,WONK,opsz,wght].ttf     | Bin 0 -> 371120 bytes
 3 files changed, 46 insertions(+)

diff --git a/doc/luaotfload-main.tex b/doc/luaotfload-main.tex
index 8c3e4d0..3a286cf 100644
--- a/doc/luaotfload-main.tex
+++ b/doc/luaotfload-main.tex
@@ -935,6 +935,52 @@ obviously, \inlinecode{random}.
   \endaltitem
 
 
+  \beginaltitem {axis\&instance}
+    Experimental!\marginpar{\mbox{}\hfill NEW in v3.15!} Support for OpenType variable fonts. \emph{Varible fonts are only
+    supported in \texttt{base} and \texttt{node} mode, not in \texttt{harf}
+    mode.}
+
+    To specify the parameters of a variable font, you can either specify a
+    predefined instance of the font by passing the associated
+    \enquote{subfamily} name to \texttt{instance} or parameters for individual
+    axis can be provided using the \texttt{axis} feature. You can \emph{not}
+    use \texttt{instance} and \texttt{axis} together.
+
+    For example (needs the variable Fraunces font installed)
+
+         \beginlisting
+           \def\fraunces#1#2{%
+             \font\varfont = "Fraunces/B:mode=node;#1;" at #2pt\varfont
+           }
+           \fraunces{axis={wght=Regular}}{10}Regular font\par
+           \fraunces{axis={wght=Black}}{10}Black variant (aka. very bold)\par
+           \fraunces{axis={wght=Black,opsz=10}}{10}Black again, but with
+           correct optical size\par
+           \fraunces{axis={weight=100,opsz=10}}{10}Let's try giving axis values
+           numerically\par
+           \fraunces{instance=semibold}{10}A semi-bold one given as
+           a instance
+           (Corresponding to
+           \verb|axis={opsz=144,wght=600,SOFT=100,WONG=1}|)\par
+         \endlisting
+
+      {\def\fraunces#1#2{%
+         \font\varfont = "Fraunces/B:mode=node;#1;" at #2pt\varfont
+       }
+       \fraunces{axis={wght=Regular}}{10}Regular font\par
+       \fraunces{axis={wght=Black}}{10}Black variant (aka. very bold)\par
+       \fraunces{axis={wght=Black,opsz=10}}{10}Black again, but with
+       correct optical size\par
+       \fraunces{axis={weight=100,opsz=10}}{10}Let's try giving axis values
+       numerically\par
+       \fraunces{instance=semibold}{10}A semi-bold one given as a
+       instance\\
+       (Corresponding to
+       \verb|axis={opsz=144,wght=600,SOFT=100,WONG=1}|)\par
+      }
+
+  \endaltitem
+
    \beginaltitem {embolden}
          A factor, defined as a decimal number.
 
diff --git a/supporttexmf/fonts/truetype/Fraunces-Italic[SOFT,WONK,opsz,wght].ttf b/supporttexmf/fonts/truetype/Fraunces-Italic[SOFT,WONK,opsz,wght].ttf
new file mode 100644
index 0000000..f205d75
Binary files /dev/null and b/supporttexmf/fonts/truetype/Fraunces-Italic[SOFT,WONK,opsz,wght].ttf differ
diff --git a/supporttexmf/fonts/truetype/Fraunces[SOFT,WONK,opsz,wght].ttf b/supporttexmf/fonts/truetype/Fraunces[SOFT,WONK,opsz,wght].ttf
new file mode 100644
index 0000000..4a495e7
Binary files /dev/null and b/supporttexmf/fonts/truetype/Fraunces[SOFT,WONK,opsz,wght].ttf differ





More information about the latex3-commits mailing list.