Welcome to Typophile
Please Sign in.


Point v Point


I think this is technical enough for Build...

I tossed this little conversion script together today to brush up on my (rather feeble) awk skills. All it does is convert points to mm and spew out some CSS classes. Might be useful for someone...

#! /bin/sh

# Only tested on ash and bash and with GNU awk.

unset Pts
while getopts pt: f
case $f in
t) Pts="pt=$OPTARG" ;;
shift `expr $OPTIND - 1`

LC_ALL=C awk '
BEGIN { pts=0.352778 }
pt=="DTP" { pts=0.352778 }
pt=="Postscript" { pts=0.352778 }
pt=="TeX" { pts=0.351460 }
pt=="Pica" { pts=0.351460 }
pt=="Didot" { pts=0.375972 }
pt=="Cicero" { pts=0.376065 }
pt=="Berthold" { pts=0.376000 }
pt=="Imprimerie" { pts=0.400000 }

NF==0 { print }