Advertisement
Guest User

fonts debian

a guest
Jan 29th, 2015
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. If anyone's interested, I stumbled on this from MasterProg:
  2.  
  3. Here's a shell script I made to do this automatically. It installs msttcorefonts package and downloads and installs Tahoma font. After that font cache is rebuilt.
  4.  
  5.  
  6. Code:
  7.  
  8. #!/bin/bash
  9. # Install Microsoft Fonts (Including Tahoma)
  10.  
  11. if [ "$(id -u)" == "0" ]
  12. then
  13. if apt-get install msttcorefonts; then
  14. mkdir temp-tahomafont
  15. cd temp-tahomafont
  16. if wget http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/EN-US/IELPKTH.CAB; then
  17. cabextract IELPKTH.CAB
  18. if cp *.ttf /usr/share/fonts/truetype/msttcorefonts/; then
  19. if fc-cache -fv; then
  20. cd ..
  21. rm -r temp-tahomafont
  22. echo "Microsoft fonts are now installed"
  23. else
  24. echo "Could not rebuild font cache"
  25. exit -1
  26. fi
  27. else
  28. echo "Could not copy the font to /usr/share/fonts/truetype/msttcorefonts/"
  29. exit -1
  30. fi
  31. else
  32. echo "Could not download Tahoma font"
  33. exit -1
  34. fi
  35. else
  36. echo "Could not install msttcorefonts package"
  37. exit -1
  38. fi
  39. else
  40. echo "Run 'sudo ./addfonts.sh'"
  41. exit 0
  42. fi
  43.  
  44.  
  45. Save it as 'addfonts.sh', allow it to execute: chmod +x addfonts.sh and then run it as root: sudo ./addfonts.sh
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement