summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/lualatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-06-08 21:43:09 +0000
committerKarl Berry <karl@freefriends.org>2019-06-08 21:43:09 +0000
commit7a10f8644fac291290ed3faddd3bbc9d1b206bd6 (patch)
treef9dbe2799c3c1ddef3846322b2dfc74db307602c /Master/texmf-dist/doc/lualatex
parent0d8e0664ea5e52344dd599037c18c11c9a9adc6d (diff)
combofont (8jun19)
git-svn-id: svn://tug.org/texlive/trunk@51348 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/lualatex')
-rw-r--r--Master/texmf-dist/doc/lualatex/combofont/README.md3
-rw-r--r--Master/texmf-dist/doc/lualatex/combofont/combofont-test-fira-math.pdfbin14675 -> 15301 bytes
-rw-r--r--Master/texmf-dist/doc/lualatex/combofont/combofont-test-fira-math.tex35
-rw-r--r--Master/texmf-dist/doc/lualatex/combofont/combofont.pdfbin78359 -> 78828 bytes
-rw-r--r--Master/texmf-dist/doc/lualatex/combofont/combofont.tex41
5 files changed, 38 insertions, 41 deletions
diff --git a/Master/texmf-dist/doc/lualatex/combofont/README.md b/Master/texmf-dist/doc/lualatex/combofont/README.md
index 725d81a1525..10a189f3da5 100644
--- a/Master/texmf-dist/doc/lualatex/combofont/README.md
+++ b/Master/texmf-dist/doc/lualatex/combofont/README.md
@@ -2,7 +2,8 @@
An EXPERIMENTAL package to add nfss-declaration of combo fonts to a luaLaTeX document
-Version 0.2 copyright Ulrike Fischer 2017-
+Version 0.3 2019/06/08
+copyright Ulrike Fischer
## License
diff --git a/Master/texmf-dist/doc/lualatex/combofont/combofont-test-fira-math.pdf b/Master/texmf-dist/doc/lualatex/combofont/combofont-test-fira-math.pdf
index 3e54fe2ea11..c5a83a5c1fd 100644
--- a/Master/texmf-dist/doc/lualatex/combofont/combofont-test-fira-math.pdf
+++ b/Master/texmf-dist/doc/lualatex/combofont/combofont-test-fira-math.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/lualatex/combofont/combofont-test-fira-math.tex b/Master/texmf-dist/doc/lualatex/combofont/combofont-test-fira-math.tex
index 0cc437d5ae4..75d2f39c162 100644
--- a/Master/texmf-dist/doc/lualatex/combofont/combofont-test-fira-math.tex
+++ b/Master/texmf-dist/doc/lualatex/combofont/combofont-test-fira-math.tex
@@ -1,5 +1,5 @@
% !Mode:: "TeX:DE:UTF-8:Main"
-
+%% Date 2017/07/03 Version 0.2 combofont example
\documentclass[parskip=full]{scrartcl}
\usepackage{luacode}
@@ -26,7 +26,7 @@ luatexbase.add_to_callback
)
\end{luacode}
-\usepackage{unicode-math}
+\usepackage[math-style=upright]{unicode-math}
\usepackage{combofont}
\setmainfont{Fira Sans}
@@ -41,19 +41,19 @@ luatexbase.add_to_callback
{%
{},
0x30-0x39,
- 0x61-0x7A
+ 0x61-0x7A*0x03B1-0x03C9
}
\setupcombofont{FiraMathScript}
{%
file:texgyrepagella-math.otf:mode=base;script=math;language=DFLT;+ssty=0 at #1pt,
file:firasans-regular.otf at #1pt,
- file:firasans-regularitalic.otf at #1pt
+ file:firasans-italic.otf at #1pt
}
{%
{},
0x30-0x39,
- 0x61-0x7A
+ 0x61-0x7A*0x03B1-0x03C9
}
\setupcombofont{FiraMathScriptScript}
@@ -65,20 +65,20 @@ luatexbase.add_to_callback
{%
{},
0x30-0x39,
- 0x61-0x7A
+ 0x61-0x7A*0x03B1-0x03C9
}
-
-% Mathversion bold need Script and ScriptScript declarations too!
+
+% Mathversion bold need Script and ScriptScript declarations too!
\setupcombofont{FiraMathBold}
{%
file:texgyrepagella-math.otf:mode=base;script=math;language=DFLT; at #1pt,
file:firasans-regular.otf at #1pt,
- file:firasans-regularitalic.otf at #1pt
+ file:firasans-italic.otf at #1pt
}
{%
{},
0x30-0x39,
- 0x61-0x7A
+ 0x61-0x7A*0x03B1-0x03C9
}
@@ -101,17 +101,10 @@ luatexbase.add_to_callback
\SetSymbolFont{operators}{bold}{TU}{FiraMath}{bx}{n}
-% Map a etc to the ascii range. Original values can be found with
-% [\Umathcharclass `\a] [\Umathcharfam `\a] [\Umathcharslot `\a]
-
-\Umathcode `\a = "7 "0 "61
-\Umathcode `\b = "7 "0 "62
-\Umathcode `\c = "7 "0 "63
-\Umathcode `\d = "7 "0 "64
-\Umathcode `\e = "7 "0 "65
-\Umathcode `\f = "7 "0 "66
-\Umathcode `\g = "7 "0 "67
-\Umathcode `\h = "7 "0 "68
+% Map "a" etc to the ascii range. Original values can be found with
+%[\Umathcharclass `\a] [\Umathcharfam `\a] [\Umathcharslot `\a]
+% not needed because of math-style=upright
+%\Umathcode `\a = "7 "0 "61
\begin{document}
diff --git a/Master/texmf-dist/doc/lualatex/combofont/combofont.pdf b/Master/texmf-dist/doc/lualatex/combofont/combofont.pdf
index 0a1d94e01e9..54b9763a34c 100644
--- a/Master/texmf-dist/doc/lualatex/combofont/combofont.pdf
+++ b/Master/texmf-dist/doc/lualatex/combofont/combofont.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/lualatex/combofont/combofont.tex b/Master/texmf-dist/doc/lualatex/combofont/combofont.tex
index 6c098b87e10..88ceecdf78b 100644
--- a/Master/texmf-dist/doc/lualatex/combofont/combofont.tex
+++ b/Master/texmf-dist/doc/lualatex/combofont/combofont.tex
@@ -1,8 +1,9 @@
% !Mode:: "TeX:DE:UTF-8:Main"
-\RequirePackage{luatex85}
\documentclass[parskip=half-,egregdoesnotlikesansseriftitles]{scrartcl}
\usepackage{combofont}
\usepackage{ydoc-code,ydoc-desc}
+\usepackage[english]{babel}
+\usepackage[autostyle]{csquotes}
\usepackage{fontspec}
\usepackage{xcolor}
@@ -38,7 +39,9 @@
\DeclareFontShape{TU} {combotest}{m}{n}{<->combo*combotest-regular}{}
\DeclareFontShape{TU} {combotest}{bx}{n}{<->combo*combotest-bold}{}
-\title{The \texttt{combofont} package}
+\title{The \texttt{combofont} package \\
+{\normalsize Version \csname UlrikeFischer@package@ufcombofont@version\endcsname\
+from \csname UlrikeFischer@package@ufcombofont@date\endcsname}}
\author{Ulrike Fischer\thanks{fischer@troubleshooting-tex.de}}
\newcommand\package[1]{\texttt{#1}}
\begin{document}
@@ -46,29 +49,29 @@
\section{Status: EXPERIMENTAL}
-This is a EXPERIMENTAL package.
+This is an EXPERIMENTAL package.
-It can disappear without notice e.\,g. if the \package{luaotfload} changes so that it no longer work, or if luatex changes, or if \package{fontspec} includes the code.
+It can disappear without notice e.\,g. if the \package{luaotfload} changes so that it no longer works, or if luatex changes, or if \package{fontspec} includes the code.
-It is also possible that syntax and commands change in a incompatible way. So if you use it in a production environment: \textbf{You have been warned}.
+It is also possible that syntax and commands change in an incompatible way. So if you use it in a production environment: \textbf{You have been warned}.
\section{Introduction}
-In version 2.7. \package{luaotfload} supports combining characters from multiple fonts into a single virtualized one.
+In version 2.7 \package{luaotfload} supports combining characters from multiple fonts into a single virtualized one.
That means that one can build a font that takes e.g. the capital letters from a sans serif font and the lowercase letters from a serif font. Or a font that pulls in missing greek or cyrillic glyphs from another font.
-The methods pulls in \emph{only} glyphs. It is not suitable for every imaginable font combination -- some drawbacks are described below -- and one should use it with care. Nevertheless it is a quite neat extension of the tools to manipulate fonts.
+The method pulls in \emph{only} glyphs. It is not suitable for every imaginable font combination -- some drawbacks are described below -- and one should use it with care. Nevertheless it is a quite neat extension of the tools to manipulate fonts.
-The main problem with the examples in the \package{luaotfload} manual is that it creates fonts of a fix size. This means that they don't respond to command like \verb+\large+ or \verb+\footnotesize+.
+The main problem with the examples in the \package{luaotfload} manual is that they create fonts of a fix size. This means that they don't respond to command like \verb+\large+ or \verb+\footnotesize+.
-After trying around a bit and then asking a question (https://tex.stackexchange.com/questions/371647/call-a-luatex-combo-font-through-nfss) I got from David Carlisle the idea to use a \texttt{size}-Funktion which one define with \verb+\DeclareSizeFunction+ to inject the needed code to size the combo-font in a nfss-\verb+\DeclareFontShape+-command.
+After trying around a bit and then asking a question (https://tex.stackexchange.com/questions/371647/call-a-luatex-combo-font-through-nfss) I got from David Carlisle the idea to use a \texttt{size}-Funktion which one defines with \verb+\DeclareSizeFunction+ to inject the needed code to size the combo-font in a nfss-\verb+\DeclareFontShape+-command.
\package{combofont.sty} is the result.
It is not meant as a production package but as package that helps to exploit the use of combo fonts.
\section{Requirements}
-You need at least an up-to-date TeXLive 2016. TeXLive 2017 with luatex 1.0.4. or a current miktex is better.
+You need at least an up-to-date TeXLive 2016. TeXLive 2017 with luatex 1.0.4 or a current miktex is better.
\textbf{Change Version 0.2, 3.7.2017}: The style no longer loads the now obsolete \texttt{l3regex}, it assumes that it is loaded by \texttt{expl3}. In older \TeX-systems you will have to load the package.
@@ -88,7 +91,7 @@ To be able to use a combo font with standard \LaTeX\ font commands you have to d
\DescribeMacro\setupcombofont{<name>}{<comma list of basefonts>}{<comma list of ranges and code-points>}
\begin{description}
- \item[\marg{name}] is the name of the font. It should be some unique ascii-string without spaces. If you intent to define lots of fonts it would be a good idea to think about a sensible naming sheme. In the example here I simply used \texttt{combotest-regular} and \texttt{combotest-bold}.
+ \item[\marg{name}] is the name of the font. It should be some unique ascii-string without spaces. If you intend to define lots of fonts it would be a good idea to think about a sensible naming sheme. In the example here I simply used \texttt{combotest-regular} and \texttt{combotest-bold}.
\item[\marg{comma list of basefonts}] This should be a list of font declarations you want to use to build your combo font. The syntax used is described in the \package{luaotfload} manual. Example:
@@ -105,8 +108,8 @@ To be able to use a combo font with standard \LaTeX\ font commands you have to d
\item[Order of the fonts] The first font is the main font which will receive the glyphs. So think carefully which font is should be and setup its font features correctly. \package{combofont} defines as a helper command \verb+\combodefaultfeat+ which sets \texttt{mode=node;script=latn;language=DFLT;+tlig;}.
\item[Size declaration] The font description should end with a size declaration line \verb+at #1pt+. When processing the font \verb+#1+ will be replaced by the current font size. As you can see in the second font you can do calculations. \emph{Don't forget the size declaration!}
-
-\item Be careful with the commas: there shouldn't be one after the last font.
+
+\item Be careful with the commas: there shouldn't be one after the last font.
\end{description}
\item[\marg{comma list of ranges and code-points}] This is a comma list of settings which describe which glyphs are taken from the respective font. Example:
@@ -124,13 +127,13 @@ To be able to use a combo font with standard \LaTeX\ font commands you have to d
\item There should be as many settings as there are fonts.
\item Empty entries should be marked with a pair of braces (normally the first entry is empty).
\item You can add ranges of code points and single code points. Blocks are separated by an asterix \verb+*+. The example set the uppercase letters and the exclamation and the question mark.
-\item The keyword \texttt{fallback} means that this font is used for „missing glyphs“ (in the example for the cyrillic glyphs).
+\item The keyword \texttt{fallback} means that this font is used for \enquote{missing glyphs} (in the example for the cyrillic glyphs).
\end{enumerate}
\end{description}
\subsection{Write \texttt{nfss}-declarations}
-After all the fonts you need have been setup, you can write suitable \texttt{nfss}-declaration which make it possible to call the font by family and other font commands. Example:
+After all the fonts you need have been setup, you can write suitable \texttt{nfss}-declarations which make it possible to call the font by family and other font commands. Example:
\begin{verbatim}
\DeclareFontFamily{TU}{combotest}{}
@@ -183,17 +186,17 @@ Combofonts can also be used in math. There is a test file called \texttt{combofo
\minisec{Important points:}
\begin{enumerate}
\item This a first try to get something working in math. It is in no way finished or complete, I'm rather certain that something will be missing or even faulty.
-\item Start with a real math font with a math constants table.
-\item Don't expect to get a perfect sans serif math font this way without work. It can take quite some time to adjust everything. Also a text font is not really meant to be used as math font.
+\item Start with a real math font with a math constants table.
+\item Don't expect to get a perfect sans serif math font this way without work. It can take quite some time to adjust everything. Also a text font is not really meant to be used as math font.
\item The lua-code for the font patch compares \texttt{fontdata.psname} with the string \\\texttt{TeXGyrePagellaMath-Regular} to restrict the patch to the specific font.
The font name database of luaotfload-names.lua contains for \textsf{TeX Gyre Pagella Math} these entries:
-
+
\begin{verbatim}
["plainname"]="TeXGyrePagellaMath-Regular",
["psname"]="texgyrepagellamathregular",
\end{verbatim}
-
+
As you can see the correct string for the comparision with \texttt{fontdata.psname} is in \verb+["plainname"]+ and not in \verb+["psname"]+. Don't ask me why. \texttt{luaotfload} seems to copy the infos around quite a lot. So when adapting the code to other fonts, test with various font names if it seems not to work.
\end{enumerate}