summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/fonts/arev/sfdtokernaccent
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/fonts/arev/sfdtokernaccent')
-rw-r--r--Master/texmf-dist/source/fonts/arev/sfdtokernaccent63
1 files changed, 63 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/fonts/arev/sfdtokernaccent b/Master/texmf-dist/source/fonts/arev/sfdtokernaccent
new file mode 100644
index 00000000000..1e787b867d6
--- /dev/null
+++ b/Master/texmf-dist/source/fonts/arev/sfdtokernaccent
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+# Bash script to extract kerning info for accents from sfd file that is passed in on standard input
+
+# SYNTAX:
+# cat sfdFile | sfdtokernaccent sfdFile KernAccentMTXfile
+
+sfdFile=$1
+KernFile=$2
+
+echo "Creating accent kerns $KernFile from $sfdFile"
+
+echo "% accent kerns $KernFile " > $KernFile
+echo "% Created by sfdtokernaccent from $sfdFile for accent kerning" >> $KernFile
+echo "% on `date`." >> $KernFile
+
+echo "\relax" >> $KernFile
+echo "\metrics" >> $KernFile
+
+read LineIn1 LineIn2 LineIn3 LineIn4 LineInRest
+ErrorVal=$?
+
+Char=""
+Width=0
+AccentPos=0
+
+while [ $ErrorVal -eq 0 ]
+do
+ if [ "$LineIn1" = "StartChar:" ]
+ then
+ Char=$LineIn2
+ fi
+ if [ "$LineIn1" = "Width:" ]
+ then
+ Width=$LineIn2
+ fi
+ if [ "$LineIn1" = "AnchorPoint:" ]
+ then
+ if [ "$LineIn2" = '"TopCap"' ]
+ then
+ AccentPos=$LineIn3
+ #echo "found: $Char, $Width, $AccentPos"
+ echo "\\fixaccentkern{$Char}{$AccentPos} % Width=$Width" >> $KernFile
+ fi
+ fi
+ if [ "$LineIn1" = "AnchorPoint:" ]
+ then
+ if [ "$LineIn2" = '"Top"' ]
+ then
+ AccentPos=$LineIn3
+ #echo "found: $Char, $Width, $AccentPos"
+ echo "\\fixaccentkern{$Char}{$AccentPos} % Width=$Width" >> $KernFile
+ fi
+ fi
+
+
+ read LineIn1 LineIn2 LineIn3 LineIn4 LineInRest
+ ErrorVal=$?
+done
+
+echo "\endmetrics" >> $KernFile
+
+echo "Done."