summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-03-11 11:35:45 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-03-11 11:35:45 +0000
commit9a60d845b989b7ea64817858e61f2011cd7d0be2 (patch)
treeea23a517df680cda5bcc4f658fd3d0d6359e7fe3
parentdb15bf75f4fe767109ca2f85bded38eb58499ff9 (diff)
avoid 'make check' failure due to floating point rounding
git-svn-id: svn://tug.org/texlive/trunk@17421 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/afm2pl/ChangeLog5
-rw-r--r--Build/source/texk/afm2pl/afm2pl.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/Build/source/texk/afm2pl/ChangeLog b/Build/source/texk/afm2pl/ChangeLog
index dc2ab862dc8..ba3bd8eade9 100644
--- a/Build/source/texk/afm2pl/ChangeLog
+++ b/Build/source/texk/afm2pl/ChangeLog
@@ -1,3 +1,8 @@
+2010-03-11 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * afm2pl.c (changeadobe): Avoid output of '(SLANT R -0.000000)'
+ due to floating point rounding.
+
2009-11-07 Peter Breitenlohner <peb@mppmu.mpg.de>
* configure.ac, afm2pl.c: Require recent kpathsea version.
diff --git a/Build/source/texk/afm2pl/afm2pl.c b/Build/source/texk/afm2pl/afm2pl.c
index c3533244bf0..33e8bfa35b2 100644
--- a/Build/source/texk/afm2pl/afm2pl.c
+++ b/Build/source/texk/afm2pl/afm2pl.c
@@ -862,6 +862,11 @@ changeadobe(void)
newslant = (double) slant -
efactor * tan (italicangle * (3.1415926535 / 180.0));
+ /* Avoid output of '(SLANT R -0.000000)' due to floating point
+ * rounding; neither round() nor fabs() need be defined. */
+ if ((newslant < 0.0) && (newslant*2000000.0 > 0.0))
+ newslant = 0.0;
+
/* if !keepligs, remove native ligatures */
if (!keepligs && lspace>0) {
for (i = 0; i < nglyphs; i++)