Load CMU by filename, not font name, for XeLaTeX

This commit is contained in:
jfbu 2018-11-17 01:38:01 +01:00
parent f56431b687
commit 6283324b1a
3 changed files with 19 additions and 6 deletions

View File

@ -39,6 +39,9 @@ Dependencies
then, the last four are font packages arising in the default value for
:confval:`latex_elements`.\ ``'fontpkg'``, and may be replaced by other font
packages providing ``LGR`` and/or ``T2A`` support.
* LaTeX builder with :confval:`latex_engine` set to ``'xelatex'`` or to
``'lualatex'`` requires (by default) the ``Computer Modern Unicode`` fonts,
which in Ubuntu xenial are in ``texlive-fonts-extra``.
Incompatible changes
--------------------

View File

@ -167,7 +167,8 @@ The builder's "name" must be given to the **-b** command-line option of
* ``texlive-fonts-extra``, ``texlive-lang-greek`` (if needed to
support Greek or Cyrillic letters in non-cyrillic document)
* ``latexmk`` (for ``make latexpdf`` on GNU/Linux and MacOS X)
* ``texlive-luatex``, ``texlive-xetex`` (see :confval:`latex_engine`)
* ``texlive-luatex``, ``texlive-xetex``, ``texlive-fonts-extra``
(if :confval:`latex_engine` is set to ``'xelatex'`` or ``'lualatex'``)
The testing of Sphinx LaTeX is done on Ubuntu xenial with the above mentioned
packages, which are from a TeXLive 2015 snapshot dated March 2016.

View File

@ -158,9 +158,18 @@ ADDITIONAL_SETTINGS = {
'polyglossia': '\\usepackage{polyglossia}',
'babel': '',
'fontenc': '\\usepackage{fontspec}',
'fontpkg': ('\\setmainfont{CMU Serif}\n'
'\\setsansfont{CMU Sans Serif}\n'
'\\setmonofont{CMU Typewriter Text}'),
'fontpkg': ('\\setmainfont{cmunrm.otf}[\n'
' BoldFont = cmunbx.otf,\n'
' ItalicFont = cmunti.otf,\n'
' BoldItalicFont = cmunbi.otf]\n'
'\\setsansfont{cmunss.otf}[\n'
' BoldFont = cmunsx.otf,\n'
' ItalicFont = cmunsi.otf,\n'
' BoldItalicFont = cmunso.otf]\n'
'\\setmonofont{cmuntt.otf}[\n'
' BoldFont = cmuntb.otf,\n'
' ItalicFont = cmunit.otf,\n'
' BoldItalicFont = cmuntx.otf]'),
'textgreek': '',
'utf8extra': ('\\catcode`^^^^00a0\\active\\protected\\def^^^^00a0'
'{\\leavevmode\\nobreak\\ }'),