aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoni Bettan <ybettan@redhat.com>2019-08-20 15:01:43 +0300
committerMichael S. Tsirkin <mst@redhat.com>2019-09-25 06:42:17 -0400
commit1e155e48b34de307c0a932ff71186df166af5ece (patch)
tree425a23eff947fdb4054e652eb559874fbe302019
parentef5a7f405b95f85ced0d49c10f89521fe23fd6d9 (diff)
downloadvirtio-text-1e155e48b34de307c0a932ff71186df166af5ece.tar.gz
Changed fonts to freely-available fonts when built locally.
'Arial' and 'Courier New' fonts are not installed in TeX Live by default therefore when building the spec document using 'makeall.sh' on a Linux machine, that usually have Tex Live installed, we get fonts error for those fonts. This patch is checking if those fonts exist on the machine inside the tex document and if not change them to freely-available fonts: Arial -> Liberation Sans Courier New -> Liberation Mono Signed-off-by: Yoni Bettan <ybettan@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r--commands-pdf.tex12
-rw-r--r--virtio.tex4
2 files changed, 8 insertions, 8 deletions
diff --git a/commands-pdf.tex b/commands-pdf.tex
index ae7a186..23289d8 100644
--- a/commands-pdf.tex
+++ b/commands-pdf.tex
@@ -20,7 +20,7 @@
\newcommand{\oasistitle}[1]
{
\begin{spacing}{1.5}
-\fontspec[Color=446CAA]{Arial}
+\IfFontExistsTF{Arial}{\fontspec[Color=446CAA]{Arial}}{\fontspec[Color=446CAA]{Liberation Sans}}
\fontsize{24}{24}
\textbf{\noindent#1}
\end{spacing}
@@ -29,7 +29,7 @@
\newcommand{\oasisstagelabel}[1]
{
\begin{spacing}{1.1}
-\fontspec[Color=446CAA]{Arial}
+\IfFontExistsTF{Arial}{\fontspec[Color=446CAA]{Arial}}{\fontspec[Color=446CAA]{Liberation Sans}}
\fontsize{18}{18}
\textbf{\noindent#1}
\end{spacing}
@@ -38,7 +38,7 @@
\newcommand{\oasisdate}[1]
{
\begin{spacing}{1.1}
-\fontspec[Color=446CAA]{Arial}
+\IfFontExistsTF{Arial}{\fontspec[Color=446CAA]{Arial}}{\fontspec[Color=446CAA]{Liberation Sans}}
\fontsize{18}{18}
\textbf{\noindent#1}
\end{spacing}
@@ -47,7 +47,7 @@
\newcommand{\oasisnoticelabel}[1]
{
\begin{spacing}{1.5}
-\fontspec[Color=446CAA]{Arial}
+\IfFontExistsTF{Arial}{\fontspec[Color=446CAA]{Arial}}{\fontspec[Color=446CAA]{Liberation Sans}}
\fontsize{18}{18}
\textbf{\noindent#1}
\end{spacing}
@@ -56,7 +56,7 @@
\newcommand{\oasisspecificationuris}[1]
{
{
-\fontspec[Color=446CAA]{Arial}
+\IfFontExistsTF{Arial}{\fontspec[Color=446CAA]{Arial}}{\fontspec[Color=446CAA]{Liberation Sans}}
\fontsize{12}{12}
\textbf{\noindent#1}
}
@@ -65,7 +65,7 @@
\newenvironment{oasistitlesection}[1]
{
\setlength{\tabcolsep}{0in}\begin{tabular}{p{0in}p{5.8in}}
-\multicolumn{2}{l}{\fontspec[Color=446CAA]{Arial}\fontsize{10}{10}\textbf{#1:}}\\[-0.05in]
+\multicolumn{2}{l}{\IfFontExistsTF{Arial}{\fontspec[Color=446CAA]{Arial}}{\fontspec[Color=446CAA]{Liberation Sans}}\fontsize{10}{10}\textbf{#1:}}\\[-0.05in]
&\setlength{\topsep}{0in}\setlength{\parsep}{0in}\setlength{\partopsep}{0in} }
{
\end{tabular}
diff --git a/virtio.tex b/virtio.tex
index ef2d3fe..a99bb3f 100644
--- a/virtio.tex
+++ b/virtio.tex
@@ -52,9 +52,9 @@
%\def_{\_}
% Don't hyphenate acronyms
%\uchyph=0
-\setmainfont[Mapping=tex-text]{Arial}
+\IfFontExistsTF{Arial}{\setmainfont[Mapping=tex-text]{Arial}}{\setmainfont[Mapping=tex-text]{Liberation Sans}}
%\setromanfont{Arial}
-\setmonofont{Courier New}
+\IfFontExistsTF{Courier New}{\setmonofont{Courier New}}{\setmonofont{Liberation Mono}}
\urlstyle{rm}