diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/free-math-font-survey/source/fixepsbbox')
-rw-r--r-- | Master/texmf-dist/doc/generic/free-math-font-survey/source/fixepsbbox | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/free-math-font-survey/source/fixepsbbox b/Master/texmf-dist/doc/generic/free-math-font-survey/source/fixepsbbox new file mode 100644 index 00000000000..08e977932b3 --- /dev/null +++ b/Master/texmf-dist/doc/generic/free-math-font-survey/source/fixepsbbox @@ -0,0 +1,21 @@ +#!/bin/bash + +# fixepsbbox (filename) (left x target) (tolerance) + +EPSFile=$1 +TargetX=$2 +Tolerance=$3 + +LeftX=`grep BoundingBox $EPSFile | cut -d' ' -f 2` + +TestVal=$(( ( $LeftX < ( $TargetX - $Tolerance ) ) || ( $LeftX > ( $TargetX + $Tolerance ) ) )) + +if [ $TestVal -ne 0 ] +then + echo "Changing left edge of $EPSFile from $LeftX to $TargetX." + TmpFile="tmp_`date +%Y-%m-%d-%H-%M-%S`.eps" + sed -e 's/BoundingBox: [-]*[[:digit:]]* /BoundingBox: '$TargetX' /g' $EPSFile > $TmpFile + mv $TmpFile $EPSFile +fi + + |