]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - tools/makebuttons
Load cups into easysw/current.
[thirdparty/cups.git] / tools / makebuttons
index a6f5b41afafc94f2f491d0081fdbbfd496e94f51..0eced24bdb190078d3bfa5a8ef38e72233631224 100755 (executable)
@@ -6,23 +6,14 @@
 #
 #   Originally created and donated by Philippe Combes (see STR #2231).
 #
+#   Copyright 2007 by Apple Inc.
 #   Copyright 2007 by Easy Software Products, all rights reserved.
 #
 #   These coded instructions, statements, and computer programs are the
-#   property of Easy Software Products and are protected by Federal
-#   copyright law.  Distribution and use rights are outlined in the file
-#   "LICENSE.txt" which should have been included with this file.  If this
-#   file is missing or damaged please contact Easy Software Products
-#   at:
-#
-#       Attn: CUPS Licensing Information
-#       Easy Software Products
-#       44141 Airport View Drive, Suite 204
-#       Hollywood, Maryland 20636-3142 USA
-#
-#       Voice: (301) 373-9600
-#       EMail: cups-info@cups.org
-#         WWW: http://www.cups.org
+#   property of Apple Inc. and are protected by Federal copyright
+#   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+#   which should have been included with this file.  If this file is
+#   file is missing or damaged, see the license at "http://www.cups.org/".
 #
 
 #
@@ -34,7 +25,7 @@
 #
 # Usage:
 #
-#     tools/makebuttons locale buttons.txt
+#     tools/makebuttons [--font filename] locale buttons.txt
 #
 # "Locale" is the locale name, either "ll" or "ll_CC" where "ll" is the
 # 2-letter language abbreviation and "CC" is the 2-letter ISO country
 # "tools/buttons.txt" for inspiration...
 #
 
+# Bitstream Vera font...
+font="fonts/Vera.ttf"
+
+# Colors
+background="#d4d4a4"
+black="#000000"
+green="#009900"
+red="#cc0000"
+standard="#666633"
+
+
+if test "x$1" == x--font; then
+       shift
+       font="$1"
+       shift
+fi
+
 if test $# -lt 2; then
-       echo Usage: tools/makebuttons locale buttons.txt
+       echo Usage: tools/makebuttons "[--font filename]" locale buttons.txt
        exit 1
 elif test ! -d tools; then
        echo ERROR: You MUST run the makebuttons script from the main CUPS source directory!
@@ -82,17 +90,6 @@ elif test ! -r $list; then
 fi
 
 
-# Bitstream Vera font...
-font="fonts/Vera.ttf"
-
-# Colors
-background="#d4d4a4"
-black="#000000"
-green="#009900"
-red="#cc0000"
-standard="#666633"
-
-
 # 'generate_button()' - Create a button image.
 #
 # Arg 1: button filename (WITH .gif extension!)
@@ -168,7 +165,7 @@ function generate_button()
        txt_h=`identify -format "%h" $tmp_btn`
        txt_w=`identify -format "%w" $tmp_btn`
 
-       if test $txt_h -gt 32; then
+       if test $txt_h -gt 40; then
                echo "ERROR: 2 lines maximum for the button text"
                exit 1
        fi