summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/fonts/arev/afmtokernaccent
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/fonts/arev/afmtokernaccent')
-rw-r--r--Master/texmf-dist/source/fonts/arev/afmtokernaccent37
1 files changed, 37 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/fonts/arev/afmtokernaccent b/Master/texmf-dist/source/fonts/arev/afmtokernaccent
new file mode 100644
index 00000000000..80b32a0eaa0
--- /dev/null
+++ b/Master/texmf-dist/source/fonts/arev/afmtokernaccent
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+# Bash script to make list of glyphs from afm file than need kerning for accents.
+
+# SYNTAX:
+# afmtokernaccent AfmFile GlyphListFile
+
+AfmFile=$1
+GlyphList=$2
+
+echo "Creating glyph list $GlyphList from $AfmFile for accent kerning"
+
+MaxLines=`wc -l $AfmFile | cut -d" " -f 1`
+
+echo " $MaxLines lines in afm file."
+
+LineNum=1
+UnknownGlyph=1
+ProccessingChars=FALSE
+echo "% glyph list $GlyphList " > $GlyphList
+echo "% Created by afmtokernaccent from $AfmFile for accent kerning" >> $GlyphList
+echo "% on `date`." >> $GlyphList
+
+echo "\relax" >> $GlyphList
+echo "\metrics" >> $GlyphList
+
+for skewchar in circum circumup
+do
+ # Pull out bounding box information for skewchar
+ sed -n 's_C -*[0-9]* ; WX \(-*[0-9]*\) ; N '$skewchar' ; B \(-*[0-9]*\) -*[0-9]* \(-*[0-9]*\) -*[0-9]* ;_\\def\\'$skewchar'bbleft\{\2\} \\def\\'$skewchar'bbright\{\3\}_p' <$AfmFile >> $GlyphList
+ # Pull out kerning information
+ sed -n 's_KPX \([A-Za-z0-9]*\) '$skewchar' \(-*[0-9]*\)_\\fixaccentkern\{\1\}\{\2\}\{\\'$skewchar'bbleft\}\{\\'$skewchar'bbright\}_p' <$AfmFile >> $GlyphList
+done
+
+echo "\endmetrics" >> $GlyphList
+
+echo "Done."