home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Complet / emovix / eMovix-0.9.0pre1_Setup.exe / {app} / scripts / lf-mkmovixiso next >
Encoding:
Text File  |  2003-03-21  |  1.5 KB  |  52 lines

  1. #! /bin/sh
  2.  
  3. # Largefont-mkmovixiso
  4.  
  5. # Determines the size of the movie file and selects normal or large fonts to
  6. # be included on the CD.
  7.  
  8. # Usage: just like mkmovixiso, with the same parameters, but the movie file
  9. # must be the last command line parameter. If there are more movie files, the
  10. # last one will be used for determining the width.
  11.  
  12. # The LARGE and the FONT constants can be edited for your preferences.
  13. # The font you are using must exist in the normal directory (e.g.
  14. # /usr/local/share/emovix/mplayer-fonts/polish/ ), the matching large 
  15. # version in e.g. /usr/local/share/emovix/mplayer-fonts/polish-large/ . 
  16.  
  17. # If midentify is not on the path, you can also edit the midentify variable.
  18.  
  19. # If the movie is so many pixels wide, the large font will be used, e.g. "500"
  20. LARGE=500
  21.  
  22. # default font, e.g. "polish" or "cyrillic"
  23. FONT=polish
  24.  
  25. # midentify script with full path if necessary
  26. midentify=midentify
  27.  
  28. # Determine the last parameter - that will be the movie file
  29. eval lastparam=\$$#
  30. movie=`echo $lastparam`
  31.  
  32. lf="
  33. "
  34.  
  35. if [ -e "$movie" ]; then
  36. # The file is there
  37.     width=`"$midentify" "$movie" | grep ^ID_VIDEO_WIDTH | sed 's/^.*=//'`
  38.     echo -n "Movie width = $width pixels, using "
  39.  
  40.     if [ $width -ge $LARGE ]; then
  41.     # At least $LARGE pixels wide => call mkmovixiso with large font
  42.         echo "large font."
  43.         mkmovixiso --subtitleFont=$FONT-large "$@"
  44.     else
  45.     # call mkmovixiso with normal font
  46.         echo "normal font."
  47.         mkmovixiso --subtitleFont=$FONT "$@"
  48.     fi
  49. else
  50.     echo "Couldn't find '$movie'.$lf   The movie file must be the last parameter passed to the script."
  51. fi
  52.