OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [PATCH V4 1/2] 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>
---
 commands-pdf.tex | 12 ++++++------
 virtio.tex       |  4 ++--
 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}
 
-- 
2.21.0



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]