Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.01 KB | None | 0 0
  1. echo 'Never give up. Never surrender.'
  2. if [ ! -e /tmp/fonttools-ttx ]
  3. then
  4.     mkdir /tmp/fonttools-ttx
  5. fi
  6. for i in `find / -name '*[oOtT][tT][fF]'`
  7. do
  8.     ttx -d /tmp/fonttools-ttx -t OS/2 $i > /dev/null
  9. done
  10. cd /tmp/fonttools-ttx
  11. echo 'Number of TTF and OTF font files found: '`ls *.ttx|wc -l`
  12. echo 'Listing pictorial fonts with contrast of 10 Horizontal Low, 11 Horizontal Medium or 12 Horizontal High:'
  13. for i in *.ttx
  14. do
  15.     if [ `grep -c 'bFamilyType value="4"' $i` -eq 1 ]
  16.     then
  17.         if [ `grep -c 'bContrast value="10"' $i` -eq 1 ]
  18.         then
  19.             echo '10 Horizontal Low in: '`basename $i .ttx`
  20.         fi
  21.         if [ `grep -c 'bContrast value="11"' $i` -eq 1 ]
  22.         then
  23.             echo '11 Horizontal Medium in: '`basename $i .ttx`
  24.         fi
  25.         if [ `grep -c 'bContrast value="12"' $i` -eq 1 ]
  26.         then
  27.             echo '12 Horizontal High in: '`basename $i .ttx`
  28.         fi
  29.     fi
  30. done
  31. echo 'Remember to empty /tmp/fonttools-ttx before rerunning this script.'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement