summaryrefslogtreecommitdiff
path: root/macros/luatex/latex/addliga
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/luatex/latex/addliga
Initial commit
Diffstat (limited to 'macros/luatex/latex/addliga')
-rw-r--r--macros/luatex/latex/addliga/README6
-rw-r--r--macros/luatex/latex/addliga/addliga.pdfbin0 -> 18477 bytes
-rw-r--r--macros/luatex/latex/addliga/addliga.sty22
-rw-r--r--macros/luatex/latex/addliga/addliga.tex33
4 files changed, 61 insertions, 0 deletions
diff --git a/macros/luatex/latex/addliga/README b/macros/luatex/latex/addliga/README
new file mode 100644
index 0000000000..cab7bd12a6
--- /dev/null
+++ b/macros/luatex/latex/addliga/README
@@ -0,0 +1,6 @@
+The addliga package allows LuaLaTeX users to access basic ligatures (ff, fi, ffi, fl, ffl) in legacy TrueType fonts accessed via fontspec.
+
+This package was written by Daniel Benjamin Miller, 2019, and is contributed to the public domain.
+
+Version History:
+April 30, 2019: 1.0
diff --git a/macros/luatex/latex/addliga/addliga.pdf b/macros/luatex/latex/addliga/addliga.pdf
new file mode 100644
index 0000000000..31b2d9e1d8
--- /dev/null
+++ b/macros/luatex/latex/addliga/addliga.pdf
Binary files differ
diff --git a/macros/luatex/latex/addliga/addliga.sty b/macros/luatex/latex/addliga/addliga.sty
new file mode 100644
index 0000000000..e9a3d0892d
--- /dev/null
+++ b/macros/luatex/latex/addliga/addliga.sty
@@ -0,0 +1,22 @@
+% !TEX TS-program = lualatex
+% addliga.sty
+% Version 1.0
+% Adds ligatures to TrueType fonts in LuaLaTeX
+% Written 2019 by Daniel Benjamin Miller <dbmiller@dbmiller.org>
+% Contributed to the Public Domain
+% No Rights Reserved
+\ProvidesPackage{addliga}[2019/04/30 addliga 1.0]
+\directlua{
+ fonts.handlers.otf.addfeature{
+ name = "liga",
+ type = "ligature",
+ data = {
+ ['ff']={"f","f"},
+ ['fi']={"f","i"},
+ ['ffi']={"f","f","i"},
+ ['fl']={"f","l"},
+ ['ffl']={"f","f","l"},
+ },
+ }
+}
+\endinput \ No newline at end of file
diff --git a/macros/luatex/latex/addliga/addliga.tex b/macros/luatex/latex/addliga/addliga.tex
new file mode 100644
index 0000000000..0468127223
--- /dev/null
+++ b/macros/luatex/latex/addliga/addliga.tex
@@ -0,0 +1,33 @@
+% !TEX TS-program = lualatex
+\documentclass{scrartcl}
+\setkomafont{disposition}{\bfseries}
+\KOMAoptions{fontsize=12pt}
+\usepackage[letterpaper]{geometry}
+\usepackage{addliga}
+\usepackage{fontspec}
+\setmainfont[Numbers={OldStyle}]{Domitian}
+\setmonofont[Scale=1.05]{CMU Typewriter Text Variable Width}
+\usepackage[protrusion=true,expansion=true]{microtype}
+\usepackage{realscripts}
+\usepackage[main=english,,latin.classical,nil]{babel}
+\newcommand{\laterm}[1]{\foreignlanguage{latin}{\textit{#1}}}
+\deffootnote[1.5em]{1.5em}{1em}{\makebox[1.5em][l]{\thefootnotemark.}}
+\usepackage[pdfusetitle,pdfa,hidelinks]{hyperref}\hypersetup{pdfencoding=unicode}
+\usepackage{hologo}
+\title{\normalfont\texttt{addliga}\\\large (version 1.0)}
+%\date{}
+\author{Daniel~Benjamin Miller\\\large(\texttt{dbmiller@dbmiller.org})}
+\begin{document}
+\maketitle
+The \texttt{fontspec}\footnote{\url{https://ctan.org/pkg/fontspec}} package enables use of OpenType and TrueType fonts in \hologo{LuaLaTeX} and \hologo{XeLaTeX}. Though legacy TrueType fonts often include at least a partial set of ligatures, these, unlike those of OpenType fonts, are not accessible through \texttt{fontspec}'s usual mechanisms. The \texttt{addliga} package is designed to allow easy use of basic TrueType font ligatures in \hologo{LuaLaTeX} by adding an OpenType \texttt{liga} lookup table to the loaded font. (\laterm{Nota bene}: not all fonts will contain ligature support; \texttt{addliga} only adds support for existing ligatures.) The ligatures supported are ff, fi, ffi, fl and ffl. This package has been contributed to the public domain.
+\section*{Basic Usage}
+\begin{verbatim}
+\documentclass{…}
+\usepackage{addliga}
+\usepackage{fontspec}
+\setmainfont{…}
+\begin{document}
+…
+\end{document}
+\end{verbatim}
+\end{document} \ No newline at end of file