[PDF] Liberation font support using xelatex
- To support fonts to PDFs, using xelatex is the preferred way in Sphinx: http://www.sphinx-doc.org/en/stable/latex.html - Applies Liberation as default English font : http://lists.openstack.org/pipermail/openstack-docs/2017-February/009606.html : http://lists.openstack.org/pipermail/openstack-docs/2017-February/009616.html : http://lists.openstack.org/pipermail/openstack-docs/2017-February/009623.html Change-Id: I91cb6260e14ae5a22e264cc0bf26731df54a8945 Implements: blueprint build-pdf-from-rst-guides
This commit is contained in:
parent
c2510973c6
commit
66511ef449
@ -1,6 +1,8 @@
|
||||
# This is a cross-platform list tracking distribution packages needed by tests;
|
||||
# see https://docs.openstack.org/infra/bindep/ for additional information.
|
||||
|
||||
fonts-lmodern [platform:dpkg]
|
||||
fonts-liberation [platform:dpkg]
|
||||
fonts-nanum [platform:dpkg]
|
||||
fonts-takao [platform:dpkg]
|
||||
freetype-devel [platform:rpm]
|
||||
@ -22,4 +24,5 @@ zlib1g-dev [platform:dpkg]
|
||||
inkscape
|
||||
texlive-latex-base [platform:dpkg]
|
||||
texlive-latex-extra [platform:dpkg]
|
||||
texlive-xetex [platform:dpkg]
|
||||
texlive-fonts-recommended [platform:dpkg]
|
||||
|
@ -214,10 +214,21 @@ linkcheck_ignore = [r'https://127.0.0.1',
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_engine = 'xelatex'
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
# 'papersize': 'letterpaper',
|
||||
|
||||
# set font (TODO: different fonts for translated PDF document builds)
|
||||
'fontenc': '\\usepackage{fontspec}',
|
||||
'fontpkg': '''\
|
||||
\defaultfontfeatures{Scale=MatchLowercase}
|
||||
\setmainfont{Liberation Serif}
|
||||
\setsansfont{Liberation Sans}
|
||||
\setmonofont[SmallCapsFont={Liberation Mono}]{Liberation Mono}
|
||||
''',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
# 'pointsize': '10pt',
|
||||
|
||||
|
@ -208,10 +208,21 @@ html_copy_source = False
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_engine = 'xelatex'
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
# 'papersize': 'letterpaper',
|
||||
|
||||
# set font (TODO: different fonts for translated PDF document builds)
|
||||
'fontenc': '\\usepackage{fontspec}',
|
||||
'fontpkg': '''\
|
||||
\defaultfontfeatures{Scale=MatchLowercase}
|
||||
\setmainfont{Liberation Serif}
|
||||
\setsansfont{Liberation Sans}
|
||||
\setmonofont[SmallCapsFont={Liberation Mono}]{Liberation Mono}
|
||||
''',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
# 'pointsize': '10pt',
|
||||
|
||||
|
@ -208,10 +208,21 @@ html_copy_source = False
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_engine = 'xelatex'
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
# 'papersize': 'letterpaper',
|
||||
|
||||
# set font (TODO: different fonts for translated PDF document builds)
|
||||
'fontenc': '\\usepackage{fontspec}',
|
||||
'fontpkg': '''\
|
||||
\defaultfontfeatures{Scale=MatchLowercase}
|
||||
\setmainfont{Liberation Serif}
|
||||
\setsansfont{Liberation Sans}
|
||||
\setmonofont[SmallCapsFont={Liberation Mono}]{Liberation Mono}
|
||||
''',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
# 'pointsize': '10pt',
|
||||
|
||||
|
@ -218,10 +218,21 @@ html_use_smartypants = False
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_engine = 'xelatex'
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
# 'papersize': 'letterpaper',
|
||||
|
||||
# set font (TODO: different fonts for translated PDF document builds)
|
||||
'fontenc': '\\usepackage{fontspec}',
|
||||
'fontpkg': '''\
|
||||
\defaultfontfeatures{Scale=MatchLowercase}
|
||||
\setmainfont{Liberation Serif}
|
||||
\setsansfont{Liberation Sans}
|
||||
\setmonofont[SmallCapsFont={Liberation Mono}]{Liberation Mono}
|
||||
''',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
# 'pointsize': '10pt',
|
||||
|
||||
|
@ -214,10 +214,21 @@ html_copy_source = False
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_engine = 'xelatex'
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
# 'papersize': 'letterpaper',
|
||||
|
||||
# set font (TODO: different fonts for translated PDF document builds)
|
||||
'fontenc': '\\usepackage{fontspec}',
|
||||
'fontpkg': '''\
|
||||
\defaultfontfeatures{Scale=MatchLowercase}
|
||||
\setmainfont{Liberation Serif}
|
||||
\setsansfont{Liberation Sans}
|
||||
\setmonofont[SmallCapsFont={Liberation Mono}]{Liberation Mono}
|
||||
''',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
# 'pointsize': '10pt',
|
||||
|
||||
|
@ -217,10 +217,21 @@ html_copy_source = False
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_engine = 'xelatex'
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
# 'papersize': 'letterpaper',
|
||||
|
||||
# set font (TODO: different fonts for translated PDF document builds)
|
||||
'fontenc': '\\usepackage{fontspec}',
|
||||
'fontpkg': '''\
|
||||
\defaultfontfeatures{Scale=MatchLowercase}
|
||||
\setmainfont{Liberation Serif}
|
||||
\setsansfont{Liberation Sans}
|
||||
\setmonofont[SmallCapsFont={Liberation Mono}]{Liberation Mono}
|
||||
''',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
# 'pointsize': '10pt',
|
||||
|
||||
|
@ -209,10 +209,21 @@ html_copy_source = False
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_engine = 'xelatex'
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
# 'papersize': 'letterpaper',
|
||||
|
||||
# set font (TODO: different fonts for translated PDF document builds)
|
||||
'fontenc': '\\usepackage{fontspec}',
|
||||
'fontpkg': '''\
|
||||
\defaultfontfeatures{Scale=MatchLowercase}
|
||||
\setmainfont{Liberation Serif}
|
||||
\setsansfont{Liberation Sans}
|
||||
\setmonofont[SmallCapsFont={Liberation Mono}]{Liberation Mono}
|
||||
''',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
# 'pointsize': '10pt',
|
||||
|
||||
|
@ -209,10 +209,21 @@ html_copy_source = False
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_engine = 'xelatex'
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
# 'papersize': 'letterpaper',
|
||||
|
||||
# set font (TODO: different fonts for translated PDF document builds)
|
||||
'fontenc': '\\usepackage{fontspec}',
|
||||
'fontpkg': '''\
|
||||
\defaultfontfeatures{Scale=MatchLowercase}
|
||||
\setmainfont{Liberation Serif}
|
||||
\setsansfont{Liberation Sans}
|
||||
\setmonofont[SmallCapsFont={Liberation Mono}]{Liberation Mono}
|
||||
''',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
# 'pointsize': '10pt',
|
||||
|
||||
|
@ -223,10 +223,21 @@ html_copy_source = False
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_engine = 'xelatex'
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
# 'papersize': 'letterpaper',
|
||||
|
||||
# set font (TODO: different fonts for translated PDF document builds)
|
||||
'fontenc': '\\usepackage{fontspec}',
|
||||
'fontpkg': '''\
|
||||
\defaultfontfeatures{Scale=MatchLowercase}
|
||||
\setmainfont{Liberation Serif}
|
||||
\setsansfont{Liberation Sans}
|
||||
\setmonofont[SmallCapsFont={Liberation Mono}]{Liberation Mono}
|
||||
''',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
# 'pointsize': '10pt',
|
||||
|
||||
|
@ -223,10 +223,21 @@ html_copy_source = False
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_engine = 'xelatex'
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
# 'papersize': 'letterpaper',
|
||||
|
||||
# set font (TODO: different fonts for translated PDF document builds)
|
||||
'fontenc': '\\usepackage{fontspec}',
|
||||
'fontpkg': '''\
|
||||
\defaultfontfeatures{Scale=MatchLowercase}
|
||||
\setmainfont{Liberation Serif}
|
||||
\setsansfont{Liberation Sans}
|
||||
\setmonofont[SmallCapsFont={Liberation Mono}]{Liberation Mono}
|
||||
''',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
# 'pointsize': '10pt',
|
||||
|
||||
|
@ -208,10 +208,21 @@ html_copy_source = False
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_engine = 'xelatex'
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
# 'papersize': 'letterpaper',
|
||||
|
||||
# set font (TODO: different fonts for translated PDF document builds)
|
||||
'fontenc': '\\usepackage{fontspec}',
|
||||
'fontpkg': '''\
|
||||
\defaultfontfeatures{Scale=MatchLowercase}
|
||||
\setmainfont{Liberation Serif}
|
||||
\setsansfont{Liberation Sans}
|
||||
\setmonofont[SmallCapsFont={Liberation Mono}]{Liberation Mono}
|
||||
''',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
# 'pointsize': '10pt',
|
||||
|
||||
|
@ -209,10 +209,21 @@ html_copy_source = False
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_engine = 'xelatex'
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
# 'papersize': 'letterpaper',
|
||||
|
||||
# set font (TODO: different fonts for translated PDF document builds)
|
||||
'fontenc': '\\usepackage{fontspec}',
|
||||
'fontpkg': '''\
|
||||
\defaultfontfeatures{Scale=MatchLowercase}
|
||||
\setmainfont{Liberation Serif}
|
||||
\setsansfont{Liberation Sans}
|
||||
\setmonofont[SmallCapsFont={Liberation Mono}]{Liberation Mono}
|
||||
''',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
# 'pointsize': '10pt',
|
||||
|
||||
|
@ -214,10 +214,21 @@ linkcheck_ignore = [r'https://build.opensuse.org']
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_engine = 'xelatex'
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
# 'papersize': 'letterpaper',
|
||||
|
||||
# set font (TODO: different fonts for translated PDF document builds)
|
||||
'fontenc': '\\usepackage{fontspec}',
|
||||
'fontpkg': '''\
|
||||
\defaultfontfeatures{Scale=MatchLowercase}
|
||||
\setmainfont{Liberation Serif}
|
||||
\setsansfont{Liberation Sans}
|
||||
\setmonofont[SmallCapsFont={Liberation Mono}]{Liberation Mono}
|
||||
''',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
# 'pointsize': '10pt',
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user