summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/fontspec
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-06-24 17:35:10 +0000
committerKarl Berry <karl@freefriends.org>2014-06-24 17:35:10 +0000
commit0515cdb0111b84daef0c66f7427af0d153551436 (patch)
treeb1d8dc29cb94b05fb5c893b687dbb187d29a2f92 /Master/texmf-dist/source/latex/fontspec
parent823ddafd5474caf26bc0eac99dc198dbb83e6cbd (diff)
fontspec (21jun14)
git-svn-id: svn://tug.org/texlive/trunk@34375 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/fontspec')
-rw-r--r--Master/texmf-dist/source/latex/fontspec/Makefile428
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec.dtx143
2 files changed, 80 insertions, 491 deletions
diff --git a/Master/texmf-dist/source/latex/fontspec/Makefile b/Master/texmf-dist/source/latex/fontspec/Makefile
deleted file mode 100644
index 9d6445ec6d4..00000000000
--- a/Master/texmf-dist/source/latex/fontspec/Makefile
+++ /dev/null
@@ -1,428 +0,0 @@
-# Makefile for fontspec.
-
-#### MAKEFILE CONFIG ####
-
-SHELL = /bin/sh
-.SUFFIXES:
-.SILENT:
-
-#### BEGIN ####
-
-help:
- @echo 'FONTSPEC makefile targets:'
- @echo ' '
- @echo ' help - (this message)'
- @echo ' unpack - extracts all files'
- @echo ' doc - compile documentation'
- @echo ' gendoc - compile documentation including external examples'
- @echo ' ctan - generate archive for CTAN'
- @echo ' all - unpack & doc'
- @echo ' world - all & ctan'
- @echo ' clean - remove all generated and built files'
- @echo ' '
- @echo ' install - install the complete package into your home texmf tree'
- @echo ' sty-install - install the package code only'
- @echo ' install TEXMFROOT=<texmf> - install the package into the path <texmf>'
- @echo ' '
- @echo ' check - run the test suite'
- @echo ' initest - initialise any new tests'
- @echo ' <testname> - run only this test'
- @echo ' '
- @echo 'I recommend `make -j4 check` or thereabouts to parallelise'
- @echo 'the testing.'
-
-
-NAME = fontspec
-DOC = $(NAME).pdf
-DTX = $(NAME).dtx
-
-# Redefine this to print output if you need:
-REDIRECT = > /dev/null
-
-# Files grouped by generation mode
-COMPILED = $(DOC)
-EXAMPLES = fontspec-example.tex
-UNPACKED = fontspec.sty fontspec-xetex.sty fontspec-luatex.sty fontspec-patches.sty fontspec.lua fontspec.cfg $(EXAMPLES)
-SOURCE = $(DTX) Makefile README
-GENERATED = $(COMPILED) $(UNPACKED)
-
-TESTS = $(wildcard testsuite/*.cls testsuite/*.tex testsuite/*.ltx)
-
-DOC_DIR = doc-files
-DOC_EXAMPLES = $(shell ls $(DOC_DIR)/*.pdf)
-
-CTAN_FILES = $(SOURCE) $(COMPILED) $(EXAMPLES) $(DOC_EXAMPLES)
-
-# Files grouped by installation location
-UNPACKED_DOC = fontspec-example.tex
-
-RUNFILES = $(filter-out $(UNPACKED_DOC), $(UNPACKED))
-DOCFILES = $(COMPILED) README $(UNPACKED_DOC)
-SRCFILES = $(DTX) Makefile
-
-ALL_FILES = $(RUNFILES) $(DOCFILES) $(SRCFILES)
-
-# Installation locations
-FORMAT = latex
-RUNDIR = $(TEXMFROOT)/tex/$(FORMAT)/$(NAME)
-DOCDIR = $(TEXMFROOT)/doc/$(FORMAT)/$(NAME)
-SRCDIR = $(TEXMFROOT)/source/$(FORMAT)/$(NAME)
-TEXMFROOT = $(shell kpsewhich --var-value TEXMFHOME)
-
-CTAN_ZIP = $(NAME).zip
-TDS_ZIP = $(NAME).tds.zip
-ZIPS = $(CTAN_ZIP) $(TDS_ZIP)
-
-DO_PDFLATEX = pdflatex --interaction=nonstopmode $< $(REDIRECT)
-DO_PDFLATEX_WRITE18 = pdflatex --shell-escape --interaction=nonstopmode $< $(REDIRECT)
-DO_TEX = tex --interaction=nonstopmode $< $(REDIRECT)
-DO_MAKEINDEX = makeindex -s gind.ist $(subst .dtx,,$<) $(REDIRECT) 2>&1
-
-all: $(GENERATED)
-doc: $(COMPILED)
-unpack: $(UNPACKED)
-ctan: $(CTAN_ZIP)
-tds: $(TDS_ZIP)
-world: all ctan
-
-gendoc: $(DTX)
- @mkdir -p $(DOC_DIR)
- $(DO_PDFLATEX_WRITE18)
-
-$(DOC): $(DTX)
- @echo "Compiling documentation"
- $(DO_PDFLATEX)
- $(DO_MAKEINDEX)
- @echo "Re-compiling documentation"
- $(DO_PDFLATEX)
- @echo "Re-re-compiling documentation"
- $(DO_PDFLATEX)
-
-$(UNPACKED): $(DTX)
- @$(DO_TEX)
-
-$(CTAN_ZIP): $(CTAN_FILES) $(TDS_ZIP)
- @echo "Making $@ for CTAN upload."
- @$(RM) -- $@
- @zip -9 $@ $^ >/dev/null
-
-define run-install
-@mkdir -p $(RUNDIR) && cp $(RUNFILES) $(RUNDIR)
-@mkdir -p $(DOCDIR) && cp $(DOCFILES) $(DOCDIR)
-@mkdir -p $(SRCDIR) && cp $(SRCFILES) $(SRCDIR)
-endef
-
-define run-sty-install
-@mkdir -p $(RUNDIR) && cp $(RUNFILES) $(RUNDIR)
-endef
-
-$(TDS_ZIP): TEXMFROOT=./tmp-texmf
-$(TDS_ZIP): $(ALL_FILES)
- @echo "Making TDS-ready archive $@."
- @$(RM) -- $@
- $(run-install)
- @cd $(TEXMFROOT) && zip -9 ../$@ -r . >/dev/null
- @$(RM) -r -- $(TEXMFROOT)
-
-# Rename the README for CTAN
-README: README.markdown
- cp $< $@
-
-.PHONY: install manifest clean mrproper
-
-install: $(ALL_FILES)
- @if test ! -n "$(TEXMFROOT)" ; then \
- echo "Cannot locate your home texmf tree. Specify manually with\n\n make install TEXMFROOT=/path/to/texmf\n" ; \
- false ; \
- fi ;
- @echo "Installing in '$(TEXMFROOT)'."
- $(run-install)
-
-sty-install: $(RUNFILES)
- @if test ! -n "$(TEXMFROOT)" ; then \
- echo "Cannot locate your home texmf tree. Specify manually with\n\n make install TEXMFROOT=/path/to/texmf\n" ; \
- false ; \
- fi ;
- @echo "Installing in '$(TEXMFROOT)'."
- $(run-install)
-
-manifest:
- @echo "Source files:"
- @for f in $(SOURCE); do echo $$f; done
- @echo ""
- @echo "Derived files:"
- @for f in $(GENERATED); do echo $$f; done
-
-clean:
- @$(RM) -- *.log *.aux *.toc *.idx *.ind *.ilg *.glo *.gls *.example *.out *.synctex* *.tmp fontspec-style.sty *.ins fontspec*.pdf
- @$(RM) -- $(GENERATED) $(ZIPS)
- @$(RM) -- $(builddir)/*
-
-
-#############
-# TESTSUITE #
-#############
-
-#### Needed to compile and make stuff ####
-
-builddir=build
-testdir=testsuite
-lprefix=L
-xprefix=X
-both=F
-
-COPY = cp -a
-MOVE = mv -f
-COMPARE_OPTS = -density 300x300 -metric ae -fuzz 35%
-
-LTXSOURCE = $(NAME).sty $(NAME)-xetex.sty $(NAME)-luatex.sty $(NAME).cfg $(NAME)-patches.sty
-
-TESTLIST = testsuite-listing.tex
-
-SUITESOURCE = \
- $(testdir)/testsuite.cls \
- $(testdir)/$(TESTLIST)
-
-TESTOUT = $(wildcard $(testdir)/*.*safe.pdf)
-BUILDTESTSRC = $(subst $(testdir)/,$(builddir)/,$(subst .safe.pdf,.ltx,$(TESTOUT)))
-BUILDTESTTARGET1 = $(TESTOUT)
-BUILDTESTTARGET2 = $(subst $(testdir)/,$(builddir)/,$(BUILDTESTTARGET1))
-BUILDTESTTARGET3 = $(subst .Xsafe.pdf,-X.diff.pdf,$(BUILDTESTTARGET2))
-BUILDTESTTARGET4 = $(subst .Lsafe.pdf,-L.diff.pdf,$(BUILDTESTTARGET3))
-BUILDTESTTARGET = $(BUILDTESTTARGET4)
-
-BUILDSOURCE = $(addprefix $(builddir)/,$(LTXSOURCE))
-BUILDSUITE = $(subst $(testdir)/,$(builddir)/,$(SUITESOURCE))
-BUILDFILES = $(BUILDSOURCE) $(BUILDSUITE) $(BUILDTESTSRC)
-
-#### All tests ####
-
-check: $(TESTLIST)
-
-$(TESTLIST): $(BUILDFILES) $(BUILDTESTTARGET)
- @cd $(testdir); \
- ls *.ltx | sed -e 's/\(.*\).ltx/\\TEST{\1}/g' > $(TESTLIST)
-
-$(builddir)/%: $(testdir)/%
- @mkdir -p $(builddir); \
- $(COPY) $< $@
-
-$(builddir)/%: %
- @mkdir -p $(builddir); \
- $(COPY) -f $< $@
-
-
-#### Generating new tests ####
-
-lonelystub = $(shell cd $(testdir); ls | egrep '(X|L)(.*\.ltx)|(X|L)(.*\.safe.pdf)' | cut -d . -f 1 | uniq -u)
-lonelyfile = $(addsuffix .safe.pdf,$(lonelystub))
-lonelypath = $(addprefix $(testdir)/,$(lonelyfile))
-lonelytest = $(addprefix $(builddir)/,$(addsuffix .pdf,$(lonelystub)))
-
-Xlonelystub = $(shell cd $(testdir); ls | egrep '(F.*\.ltx)|(F.*.Xsafe.pdf)' | cut -d . -f 1 | uniq -u)
-Xlonelyfile = $(addsuffix .Xsafe.pdf,$(Xlonelystub))
-Xlonelypath = $(addprefix $(testdir)/,$(Xlonelyfile))
-Xlonelytest = $(addprefix $(builddir)/,$(addsuffix -X.pdf,$(Xlonelystub)))
-
-Llonelystub = $(shell cd $(testdir); ls | egrep '(F.*\.ltx)|(F.*.Lsafe.pdf)' | cut -d . -f 1 | uniq -u)
-Llonelyfile = $(addsuffix .Lsafe.pdf,$(Llonelystub))
-Llonelypath = $(addprefix $(testdir)/,$(Llonelyfile))
-Llonelytest = $(addprefix $(builddir)/,$(addsuffix -L.pdf,$(Llonelystub)))
-
-initest: $(lonelypath) $(Xlonelypath) $(Llonelypath)
-
-$(lonelypath): $(lonelytest)
- $(COPY) `echo $@ | sed -e s/$(testdir)/$(builddir)/ -e s/.safe.pdf/.pdf/` $@
-
-$(Xlonelypath): $(Xlonelytest)
- $(COPY) `echo $@ | sed -e s/$(testdir)/$(builddir)/ -e s/.Xsafe.pdf/-X.pdf/` $@
-
-$(Llonelypath): $(Llonelytest)
- $(COPY) `echo $@ | sed -e s/$(testdir)/$(builddir)/ -e s/.Lsafe.pdf/-L.pdf/` $@
-
-
-#### TESTS FOR BOTH ENGINES ####
-
-$(builddir)/F%-L.diff.pdf: $(builddir)/F%-L.pdf
- @echo 'F$*: Comparing PDF from LuaLaTeX against reference output.'
- if test $(shell compare \
- $(COMPARE_OPTS) \
- $(builddir)/F$*-L.pdf \
- $(testdir)/F$*.Lsafe.pdf \
- $(builddir)/F$*-L.diff.pdf 2>&1) -le 1 ; then \
- echo 'F$*: Test passed.' ; \
- else \
- echo 'F$*: Test failed.' ; \
- false ; \
- fi
-
-$(builddir)/F%-X.diff.pdf: $(builddir)/F%-X.pdf
- @echo 'F$*: Comparing PDF from XeLaTeX against reference output.'
- if test $(shell compare \
- $(COMPARE_OPTS) \
- $(builddir)/F$*-X.pdf \
- $(testdir)/F$*.Xsafe.pdf \
- $(builddir)/F$*-X.diff.pdf 2>&1) -le 1 ; then \
- echo 'F$*: Test passed.' ; \
- else \
- echo 'F$*: Test failed.' ; \
- false ; \
- fi
-
-$(builddir)/F%-L.pdf: $(BUILDSOURCE) $(BUILDSUITE) $(builddir)/F%-L.ltx
- @echo 'F$*: Generating PDF output with LuaLaTeX.'
- @cd $(builddir); lualatex -interaction=nonstopmode F$*-L.ltx $(REDIRECT)
-
-$(builddir)/F%-X.pdf: $(BUILDSOURCE) $(BUILDSUITE) $(builddir)/F%-X.ltx
- @echo 'F$*: Generating PDF output with XeLaTeX.'
- @cd $(builddir); xelatex -interaction=nonstopmode F$*-X.ltx $(REDIRECT)
-
-$(builddir)/F%-L.ltx: $(builddir)/F%.ltx
- $(COPY) $< $@
-
-$(builddir)/F%-X.ltx: $(builddir)/F%.ltx
- $(COPY) $< $@
-
-
-#### TEST FOR EACH ENGINE INDIVIDUALLY ####
-
-$(builddir)/L%.diff.pdf: $(builddir)/L%.pdf
- @echo 'L$*: Comparing PDF against reference output.'
- if test $(shell compare $(COMPARE_OPTS) \
- $(builddir)/L$*.pdf $(testdir)/L$*.safe.pdf \
- $(builddir)/L$*.diff.pdf 2>&1) -le 1 ; then \
- echo 'L$*: Test passed.' ; \
- else \
- echo 'L$*: Test failed.' ; \
- false ; \
- fi
-
-$(builddir)/X%.diff.pdf: $(builddir)/X%.pdf
- @echo 'X$*: Comparing PDF against reference output.'
- if test $(shell compare \
- $(COMPARE_OPTS) \
- $(builddir)/X$*.pdf \
- $(testdir)/X$*.safe.pdf \
- $(builddir)/X$*.diff.pdf 2>&1) -le 1 ; then \
- echo 'X$*: Test passed.' ; \
- else \
- echo 'X$*: Test failed.' ; \
- false ; \
- fi
-
-$(builddir)/X%.pdf: $(BUILDSOURCE) $(BUILDSUITE) $(builddir)/X%.ltx
- @echo 'X$*: Generating PDF output with XeLaTeX.'
- @cd $(builddir); xelatex -interaction=nonstopmode X$*.ltx $(REDIRECT)
-
-$(builddir)/L%.pdf: $(BUILDSOURCE) $(BUILDSUITE) $(builddir)/L%.ltx
- @echo 'L$*: Generating PDF output with LuaLaTeX.'
- @cd $(builddir); lualatex -interaction=nonstopmode L$*.ltx $(REDIRECT)
-
-#### HACK: allow `make <foobar>` run that test.
-
-L%: build/L%.ltx
- make build/L$*.diff.pdf
-
-X%: build/X%.ltx
- make build/X$*.diff.pdf
-
-F%: build/F%.ltx
- make build/F$*-L.diff.pdf
- make build/F$*-X.diff.pdf
-
-
-###### NIGHTLY BUILDS ######
-
-UNAME_S := $(shell uname -s)
-
-# Mac OS X:
-ifeq ($(UNAME_S),Darwin)
- MD5 = md5
-endif
-
-# Linux:
-ifeq ($(UNAME_S),Linux)
- MD5 = md5sum
-endif
-
-BRANCH = tds-build
-
-TDS = $(TDS_ZIP)
-TMP = /tmp
-LOG = $(TMP)/gitlog.tmp
-
-
-checkbranch:
- @if git branch | grep $(BRANCH) > /dev/null ; \
- then echo "TDS branch exists"; \
- else \
- echo "TDS branch does not exist; doing so will remove all untracked files from your working directory. Create the TDS branch with\n make createbranch"; \
- false; \
- fi;
-
-createbranch: $(TDS)
- cp -f $(TDS) $(TMP)/
- git symbolic-ref HEAD refs/heads/$(BRANCH)
- rm .git/index
- git clean -fdx
- unzip -o $(TMP)/$(TDS) -d .
- rm $(TMP)/$(TDS)
- git add --all
- git commit -m "Initial TDS commit"
- git checkout master
- git push origin $(BRANCH) master
- @echo "\nTDS branch creation was successful.\n"
- @echo "Now create a new package at TLContrib: http://tlcontrib.metatex.org/"
- @echo "Use the following metadata:"
- @echo " Package ID: $(NAME)"
- @echo " BRANCH: $(BRANCH)"
- @echo "\nAfter this process, use \`make tdsbuild\` to"
- @echo " (a) push your recent work on the master branch,"
- @echo " (b) automatically create a TDS snapshot,"
- @echo " (c) send the TDS snapshot to TLContrib."
-
-
-ifeq ($(UNAME_S),Darwin)
- nightly: USERNAME = $(shell security find-internet-password -s tlcontrib.metatex.org | grep "acct" | cut -f 4 -d \")
- nightly: PASSWORD = $(shell security 2>&1 >/dev/null find-internet-password -gs tlcontrib.metatex.org | cut -f 2 -d ' ')
-endif
-
-ifeq ($(UNAME_S),Linux)
- nightly: USERNAME = ""
- nightly: PASSWORD = ""
-endif
-
-nightly: VERSION = $(shell date "+%Y-%m-%d@%H:%M")
-
-nightly: CHECKSUM = $(shell echo $(USERNAME)/$(PASSWORD)/$(VERSION) | $(MD5) )
-
-nightly: tdsbuild checkbranch checkpw
- @echo "Pushing TDS and master branch"
- git push origin $(BRANCH) master
- @echo "Pinging TLContrib for automatic update"
- curl http://tlcontrib.metatex.org/cgi-bin/package.cgi/action=notify/key=$(NAME)/check=$(CHECKSUM)?version=$(VERSION) > /dev/null 2>&1
-
-tdsbuild: $(TDS)
- cp -f $(TDS) $(TMP)/
- @echo "Constructing commit history for snapshot build"
- date "+TDS snapshot %Y-%m-%d %H:%M" > $(LOG)
- echo '\n\nApproximate commit history since last snapshot:\n' >> $(LOG)
- git log --after="`git log -b $(BRANCH) -n 1 --pretty=format:"%aD"`" --pretty=format:"%+H%+s%+b" >> $(LOG)
- @echo "Committing TDS snapshot to separate branch"
- git checkout $(BRANCH)
- unzip -o $(TMP)/$(TDS) -d .
- rm $(TMP)/$(TDS)
- git commit --all --file=$(LOG)
- git checkout master
- @echo "Branches 'master' and '$(BRANCH)' should now be pushed."
-
-checkpw:
- @if test ! -n "$(PASSWORD)" ; then \
- echo "Error: Password cannot be found for TLContrib." ; \
- false ; \
- fi ;
- @echo "Username: $(USERNAME)"
- @echo "Password: [omitted]"
- @echo "Version: $(VERSION)"
- @echo "Checksum: $(CHECKSUM)"
-
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
index da3219ae1ac..11582be7e05 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
@@ -38,14 +38,16 @@ Distributable under the LaTeX Project Public License,
version 1.3c or higher (your choice). The latest version of
this license is at: http://www.latex-project.org/lppl.txt
-This work is "author-maintained" by Will Robertson.
+This work is "maintained" by Will Robertson.
This work consists of this file fontspec.dtx
and the derived files fontspec.sty,
fontspec.lua,
fontspec.cfg,
- fontspec-xetex.tex,
- fontspec-luatex.tex,
+ fontspec-xetex.sty,
+ fontspec-luatex.sty,
+ fontspec-patches.sty,
+ fontspec-example.tex,
and fontspec.pdf.
\endpostamble
@@ -91,7 +93,7 @@ This work consists of this file fontspec.dtx
%<fontspec&luatex>\ProvidesPackage{fontspec-luatex}
%<patches>\ProvidesPackage{fontspec-patches}
%<*fontspec|patches>
- [2014/06/01 v2.4 Font selection for XeLaTeX and LuaLaTeX]
+ [2014/06/21 v2.4a Font selection for XeLaTeX and LuaLaTeX]
%</fontspec|patches>
%
%<*driver>
@@ -1082,14 +1084,14 @@ This work consists of this file fontspec.dtx
% the text. The colour is defined as a triplet of two-digit Hex RGB
% values, with optionally another value for the transparency (where
% |00| is completely transparent and |FF| is opaque.)
-% \begin{Xexample}{color}{Selecting colour with transparency.}
+% \begin{Lexample}{color}{Selecting colour with transparency. N.B. due to a conflict betweeen \pkg{fontspec} and the \pkg{preview} package, this example currently does not show any transparency!}
% \fontsize{48}{48}
% \fontspec{TeX Gyre Bonum Bold}
-% {\addfontfeature{Color=FF000099}W}\kern-1ex
-% {\addfontfeature{Color=0000FF99}S}\kern-0.8ex
-% {\addfontfeature{Color=DDBB2299}P}\kern-0.8ex
+% {\addfontfeature{Color=FF000099}W}\kern-0.5ex
+% {\addfontfeature{Color=0000FF99}S}\kern-0.4ex
+% {\addfontfeature{Color=DDBB2299}P}\kern-0.4ex
% {\addfontfeature{Color=00BB3399}R}
-% \end{Xexample}
+% \end{Lexample}
% Transparency is supported by \LuaLaTeX; \XeLaTeX\ with the \texttt{xdvipdfmx} driver
% does not support this feature.
%
@@ -1236,7 +1238,7 @@ This work consists of this file fontspec.dtx
% EXAMPLE HYPHENATION%
% }}\qquad\qquad\null\par\bigskip}
%
-% \fontspec{Linux Libertine}
+% \fontspec{Linux Libertine O}
% \addfontfeature{HyphenChar=None}
% \text
% \addfontfeature{HyphenChar={+}}
@@ -1417,7 +1419,7 @@ This work consists of this file fontspec.dtx
% to better match the surrounding letters.
%
% \begin{Lexample}{letters-uppercase}{An example of the \opt{Uppercase} option of the \feat{Letters} feature.}
-% \fontspec{Linux Libertine}
+% \fontspec{Linux Libertine O}
% UPPER-CASE example \\
% \addfontfeature{Letters=Uppercase}
% UPPER-CASE example
@@ -1479,7 +1481,6 @@ This work consists of this file fontspec.dtx
% \subsection{Contextuals}
% This feature refers to substitutions of glyphs that vary `contextually' by their relative position in a word or string of characters;
% features such as contextual swashes are accessed via the options shown in \ref{feat:Contextuals}.
-% See \exref{swash} for an, er, example.
%
% \begin{features}{Contextuals}
% \otf{Swash}{cswh}
@@ -1490,16 +1491,9 @@ This work consists of this file fontspec.dtx
% \otf{Inner}{medi}
% \end{features}
%
-% \begin{Lexample}{swash}{An example of the \opt{Swashes} option of the \opt{Contextuals} feature.}
-% \fontspec{Warnock Pro} \itshape
-% Without Contextual Swashes \\
-% \fontspec{Warnock Pro}[Contextuals=Swash]
-% With Contextual Swashes; cf. W C S
-% \end{Lexample}
-%
% Historic forms are accessed in OpenType
% fonts via the feature \feat{Style=Historic}; this is generally \emph{not}
-% contextual in OpenType, which is why it is not included here.
+% contextual in OpenType, which is why it is not included in this feature.
%
% \subsection{Vertical Position}
%
@@ -1524,17 +1518,15 @@ This work consists of this file fontspec.dtx
% \opt{Numerator} and \opt{Denominator} should only be used for creating
% arbitrary fractions (see next section).
%
-% \begin{Lexample}{vertpos}{The \feat{VerticalPosition} feature. Note that the \opt{Ordinal} option can be quite unreliable, as the results here demonstrate.}
-% \fontspec{Warnock Pro}[VerticalPosition=Superior]
-% Sup: abdehilmnorst (-\$12,345.67) \\
-% \fontspec{Warnock Pro}[VerticalPosition=Numerator]
+% \begin{Lexample}{vertpos}{The \feat{VerticalPosition} feature.}
+% \fontspec{LibreCaslonText-Regular.otf}[VerticalPosition=Superior]
+% Superior: 1234567890 \\
+% \fontspec{LibreCaslonText-Regular.otf}[VerticalPosition=Numerator]
% Numerator: 12345 \\
-% \fontspec{Warnock Pro}[VerticalPosition=Denominator]
+% \fontspec{LibreCaslonText-Regular.otf}[VerticalPosition=Denominator]
% Denominator: 12345 \\
-% \fontspec{Warnock Pro}[VerticalPosition=ScientificInferior]
-% Scientific Inferior: 12345 \\
-% \fontspec{Warnock Pro}[VerticalPosition=Ordinal]
-% `Ordinals': 1st 2nd 3rd 4th 0th
+% \fontspec{LibreCaslonText-Regular.otf}[VerticalPosition=ScientificInferior]
+% Scientific Inferior: 12345
% \end{Lexample}
%
% The \pkg{realscripts} package
@@ -1622,20 +1614,20 @@ This work consists of this file fontspec.dtx
%
% \begin{Lexample}[firstline=2]{cv}{The \feat{CharacterVariant} feature showing off Georg Duffner's open source Garamond revival font.}
% \huge
-% \fontspec{EB Garamond Italic} very \\
-% \fontspec{EB Garamond Italic}[CharacterVariant=5] very \\
-% \fontspec{EB Garamond Italic}[CharacterVariant=5:0] very \\
-% \fontspec{EB Garamond Italic}[CharacterVariant=5:1] very \\
-% \fontspec{EB Garamond Italic}[CharacterVariant=5:2] very \\
-% \fontspec{EB Garamond Italic}[CharacterVariant=5:3] very
+% \fontspec{EB Garamond 12 Italic} very \\
+% \fontspec{EB Garamond 12 Italic}[CharacterVariant=5] very \\
+% \fontspec{EB Garamond 12 Italic}[CharacterVariant=5:0] very \\
+% \fontspec{EB Garamond 12 Italic}[CharacterVariant=5:1] very \\
+% \fontspec{EB Garamond 12 Italic}[CharacterVariant=5:2] very \\
+% \fontspec{EB Garamond 12 Italic}[CharacterVariant=5:3] very
% \end{Lexample}
%
% \begin{Lexample}[firstline=2]{cv2}{The \feat{CharacterVariant} feature selecting multiple variants simultaneously.}
% \huge
-% \fontspec{EB Garamond Italic} \& violet \\
-% \fontspec{EB Garamond Italic}[CharacterVariant={4}] \& violet \\
-% \fontspec{EB Garamond Italic}[CharacterVariant={5:2}] \& violet \\
-% \fontspec{EB Garamond Italic}[CharacterVariant={4,5:2}] \& violet
+% \fontspec{EB Garamond 12 Italic} \& violet \\
+% \fontspec{EB Garamond 12 Italic}[CharacterVariant={4}] \& violet \\
+% \fontspec{EB Garamond 12 Italic}[CharacterVariant={5:2}] \& violet \\
+% \fontspec{EB Garamond 12 Italic}[CharacterVariant={4,5:2}] \& violet
% \end{Lexample}
%
% \subsection{Alternates}
@@ -1647,7 +1639,7 @@ This work consists of this file fontspec.dtx
%
% \begin{Xexample}[firstline=2]{salt}{The \feat{Alternate} feature.}
% \huge
-% \fontspec{Linux Libertine}
+% \fontspec{Linux Libertine O}
% \textsc{a} \& h \\
% \addfontfeature{Alternate=0}
% \textsc{a} \& h
@@ -1684,10 +1676,10 @@ This work consists of this file fontspec.dtx
%
% \begin{Xexample}[firstline=2]{style-alt}{Example of the \opt{Alternate} option of the \feat{Style} feature.}
% \Large
-% \fontspec{Warnock Pro}
-% K Q R k v w y \\
+% \fontspec{Quattrocento Roman}
+% M Q W \\
% \addfontfeature{Style=Alternate}
-% K Q R k v w y
+% M Q W
% \end{Xexample}
%
% \begin{Xexample}[firstline=2]{style-hist}{Example of the \opt{Historic} option of the \feat{Style} feature.}
@@ -2338,12 +2330,11 @@ This work consists of this file fontspec.dtx
%
% \begin{Xexample}[firstline=2,lastline=9]{aat-var}{Nine variants of Zapfino.}
% \Huge \rule{0pt}{2cm}
-% \newcounter{var}\newcounter{trans}
+% \newcounter{var}
% \whiledo{\value{var}<9}{%
-% \stepcounter{trans}%
% \edef\1{%
% \noexpand\fontspec[Variant=\thevar,
-% Color=005599\thetrans\thetrans]{Zapfino}}\1%
+% Color=0099\thevar\thevar]{Zapfino}}\1%
% \makebox[0.75\width]{d}%
% \stepcounter{var}}
% \hspace*{2cm}
@@ -2714,7 +2705,7 @@ This work consists of this file fontspec.dtx
% By default \LaTeX\ defines symbolic footnote characters in terms of commands
% that don't resolve well; better results can be achieved by using specific Unicode characters or proper LICRs with the \pkg{xunicode} package.
%
-% This problem has been solved by loading the \pkg{fixltx2e} package.
+% This problem is solved by defining \cs{@fnsymbol} in a similar manner to the \pkg{fixltx2e} package.
%
% \section{Verbatim}
% \label{sec:verb}
@@ -2773,6 +2764,12 @@ This work consists of this file fontspec.dtx
\ExplSyntaxOn
% \end{macrocode}
%
+% Quick fix for lualatex-math:
+% \begin{macrocode}
+\cs_if_exist:NF \lua_now_x:n
+ { \cs_set_eq:NN \lua_now_x:n \directlua }
+% \end{macrocode}
+%
% Check engine and load specific modules. For Lua\TeX, load only
% \pkg{luaotfload} which loads \pkg{luatexbase} and \pkg{lualibs} too.
%
@@ -4025,12 +4022,13 @@ This work consists of this file fontspec.dtx
\@@_set_faces:
\@@_info:nxx {defining-font} {#1} {#2}
%<*debug>
+ \typeout{"\l_@@_fontid_tl"~ defined.}
\@@_warning:nxx {defining-font} {#1} {#2}
%</debug>
}
{
%<*debug>
- \typeout{"#2"~ already~ defined~ apparently.}
+ \typeout{"\l_@@_fontid_tl"~ already~ defined~ apparently.}
%</debug>
}
\group_end:
@@ -4217,24 +4215,27 @@ This work consists of this file fontspec.dtx
% with a counter to create a simple NFSS family name for the font we're
% selecting.
%
-% The font name is fully expanded, in case it's defined in terms of macros, before having its spaces zapped.
% \begin{macrocode}
\prg_new_conditional:Nnn \@@_save_family:n {TF}
{
+%<debug>\typeout{save~ family:~ #1}
\cs_if_exist:NT \l_@@_nfss_fam_tl
{
\cs_set_eq:cN {g_@@_UID_\l_@@_fontid_tl} \l_@@_nfss_fam_tl
}
\cs_if_exist:cF {g_@@_UID_\l_@@_fontid_tl}
{
- \cs_if_exist:cTF {g_@@_family_#1_int}
- { \int_gincr:c {g_@@_family_#1_int} }
- { \int_new:c {g_@@_family_#1_int} }
+ % The font name is fully expanded, in case it's defined in terms of macros, before having its spaces zapped:
\tl_set:Nx \l_@@_tmp_tl {#1}
\tl_remove_all:Nn \l_@@_tmp_tl {~}
+
+ \cs_if_exist:cTF {g_@@_family_ \l_@@_tmp_tl _int}
+ { \int_gincr:c {g_@@_family_ \l_@@_tmp_tl _int} }
+ { \int_new:c {g_@@_family_ \l_@@_tmp_tl _int} }
+
\tl_gset:cx {g_@@_UID_\l_@@_fontid_tl}
{
- \l_@@_tmp_tl ( \int_use:c {g_@@_family_#1_int} )
+ \l_@@_tmp_tl ( \int_use:c {g_@@_family_ \l_@@_tmp_tl _int} )
}
}
\tl_gset:Nv \l_fontspec_family_tl {g_@@_UID_\l_@@_fontid_tl}
@@ -5382,11 +5383,10 @@ This work consists of this file fontspec.dtx
}
\@@_keys_define_code:nnn {fontspec-preparse} {BoldFeatures}
{
- \
\clist_set:Nn \l_@@_fontfeat_bf_clist {#1}
- \prop_put:NxV \l_@@_nfss_prop
- {BoldFont-\g_@@_curr_series_tl} \l_@@_curr_bfname_tl
+% \prop_put:NxV \l_@@_nfss_prop
+% {BoldFont-\g_@@_curr_series_tl} \l_@@_curr_bfname_tl
}
\@@_keys_define_code:nnn {fontspec-preparse} {ItalicFeatures}
{
@@ -5562,10 +5562,11 @@ This work consists of this file fontspec.dtx
\rmfamily
\@@_set_font_dimen:NnN \l_@@_tmpa_dim {#1} \font
\@@_set_font_dimen:NnN \l_@@_tmpb_dim {#1} \l_fontspec_font
- \fp_set_from_dim:Nn \l_@@_tmpa_fp { \l_@@_tmpa_dim }
- \fp_set_from_dim:Nn \l_@@_tmpb_fp { \l_@@_tmpb_dim }
- \fp_div:Nn \l_@@_tmpa_fp { \l_@@_tmpb_fp }
- \tl_gset:Nx \l_@@_scale_tl { \fp_use:N \l_@@_tmpa_fp }
+ \tl_gset:Nx \l_@@_scale_tl
+ {
+ \fp_eval:n { \dim_to_fp:n {\l_@@_tmpa_dim} /
+ \dim_to_fp:n {\l_@@_tmpb_dim} }
+ }
\@@_info:n {set-scale}
\group_end:
}
@@ -6768,7 +6769,7 @@ This work consists of this file fontspec.dtx
% \begin{macrocode}
\DeclareSymbolFont{operators}\g_fontspec_encoding_tl\g_@@_mathrm_tl\mddefault\updefault
\SetSymbolFont{operators}{normal}\g_fontspec_encoding_tl\g_@@_mathrm_tl\mddefault\updefault
- \SetMathAlphabet\mathrm{normal}\g_fontspec_encoding_tl\g_@@_mathrm_tl\mddefault\updefault
+ \DeclareSymbolFontAlphabet\mathrm{operators}
\SetMathAlphabet\mathit{normal}\g_fontspec_encoding_tl\g_@@_mathrm_tl\mddefault\itdefault
\SetMathAlphabet\mathbf{normal}\g_fontspec_encoding_tl\g_@@_mathrm_tl\bfdefault\updefault
\SetMathAlphabet\mathsf{normal}\g_fontspec_encoding_tl\g_@@_mathsf_tl\mddefault\updefault
@@ -6776,7 +6777,6 @@ This work consists of this file fontspec.dtx
\SetSymbolFont{operators}{bold}\g_fontspec_encoding_tl\g_@@_mathrm_tl\bfdefault\updefault
\tl_if_empty:NTF \g_@@_bfmathrm_tl
{
- \SetMathAlphabet\mathrm{bold}\g_fontspec_encoding_tl\g_@@_mathrm_tl\bfdefault\updefault
\SetMathAlphabet\mathit{bold}\g_fontspec_encoding_tl\g_@@_mathrm_tl\bfdefault\itdefault
}
{
@@ -6989,9 +6989,26 @@ end
% \end{macrocode}
%
% \subsection{Unicode footnote symbols}
+% We used to load \pkg{fixltx2e} but this is not recommended; it should ideally be loaded before \cs{begindocument}, especially from TL2014 onwards.
% \begin{macrocode}
-\RequirePackage{fixltx2e}[2006/03/24]
\ExplSyntaxOn
+\cs_set_protected:Npn \@fnsymbol #1
+ {
+ \int_case:nnF {#1}
+ {
+ {0} {}
+ {1} { \mode_if_math:TF *\textasteriskcentered }
+ {2} { \mode_if_math:TF \dagger\textdagger }
+ {3} { \mode_if_math:TF \ddagger\textdaggerdbl }
+ {4} { \mode_if_math:TF \mathsection\textsection }
+ {5} { \mode_if_math:TF \mathparagraph\textparagraph }
+ {6} { \mode_if_math:TF \|\textbardbl }
+ {7} { \mode_if_math:TF {**}{\textasteriskcentered\textasteriskcentered} }
+ {8} { \mode_if_math:TF {\dagger\dagger}{\textdagger\textdagger} }
+ {9} { \mode_if_math:TF {\ddagger\ddagger}{\textdaggerdbl\textdaggerdbl} }
+ }
+ { \@ctrerr }
+ }
% \end{macrocode}
%
% \subsection{Emph}