[PATCH -perfbook 4/7] Silence font warning in sf (sans serif) builds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There are a couple of warnings in sf (sans serif) builds:

    LaTeX Font Warning: Font shape `T1/qhv/m/sl' in size <7.3> not available
    (Font)              Font shape `T1/qhv/m/it' tried instead on input line 367.

This is because the qhv (Helvetica clone) font family doesn't
provide slanted shape to be used in the header area of the page
(chapter and section title) and LaTeX uses its italic shape as a
fallback.

This is OK as italic and slanted shapes would look mostly the same
for sans-serif font families.

Suppress the warning by using the silence package.

Giving "save" option to silence makes it save filtered-out warnings
in $basename.sil.  This is better than discarding silenced warnings.

Add $basename.sil to .gitignore and Makefile's "clean" target.

Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>
---
 .gitignore      | 1 +
 Makefile        | 1 +
 perfbook-lt.tex | 4 ++++
 3 files changed, 6 insertions(+)

diff --git a/.gitignore b/.gitignore
index 1604a4d8c5b1..fa20ccb5de94 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,6 +45,7 @@ autodate.tex
 /perfbook*.gls
 /perfbook*.glsdefs
 /perfbook*.ist
+/perfbook*.sil
 extraction
 embedfonts
 CodeSamples/snippets.d
diff --git a/Makefile b/Makefile
index 6a389089e38c..bffdd2da1f4d 100644
--- a/Makefile
+++ b/Makefile
@@ -597,6 +597,7 @@ clean:
 	rm -f perfbook*.idx perfbook*.ind perfbook*.ilg perfbook*.ist
 	rm -f perfbook*.acn perfbook*.acr perfbook*.alg
 	rm -f perfbook*.glg perfbook*.glo perfbook*.gls perfbook*.glsdefs
+	rm -f perfbook*.sil
 	rm -f CodeSamples/snippets.d
 	rm -f *.synctex*
 	@rm -f $(OBSOLETE_FILES) $(EPSSOURCES_TMP)
diff --git a/perfbook-lt.tex b/perfbook-lt.tex
index 842e0fc6b924..fdfde1953225 100644
--- a/perfbook-lt.tex
+++ b/perfbook-lt.tex
@@ -330,6 +330,10 @@
 \renewcommand{\familydefault}{\sfdefault}
 \normalfont
 \usepackage[slantedGreek,scaled=.96]{newtxsf}
+% Silence inevitable warnings on missing slanted shape
+\RequirePackage[save]{silence}
+\WarningFilter[sansslant]{latexfont}{Font shape `T1/qhv/m/sl'}
+\ActivateWarningFilters[sansslant]
 }{
 \usepackage[slantedGreek]{newtxmath} % math package to be used with newtxtext
 % Poor person's slanted shape for roman --- newtxtext lacks slanted shape
-- 
2.25.1





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux