Browse Source

Support otf fonts from command-line, fix #6

James Bowman 6 years ago
parent
commit
e943b6d899
2 changed files with 4 additions and 2 deletions
  1. 2 1
      scripts/gd2asset
  2. 2 1
      scripts/gd3asset

+ 2 - 1
scripts/gd2asset

@@ -36,6 +36,7 @@ class GD2Assets(gd2.prep.AssetBin):
             'bmp' : (self.image, "BMP image file (options: format)"),
             'gif' : (self.image, "GIF image file (options: format)"),
             'ttf' : (self.ttf, "TrueType font file (options: format, size, topchar)"),
+            'otf' : (self.ttf, "OpenType font file (options: format, size, topchar)"),
             'wav' : (self.sample, "Audio sample, mono 16-bit (no options)"),
         }
 
@@ -130,7 +131,7 @@ if __name__ == '__main__':
         print 'jpg,png,bmp,gif:'
         print ' format   ' + ' '.join(formats) + '. Default ARGB4'
         print
-        print 'ttf'
+        print 'ttf,otf'
         print ' size     height in pixels. Default 12'
         print ' format   ' + ' '.join(formats) + '. Default ARGB4'
         print ' topchar  maximum ASCII code encoded. Default 127'

+ 2 - 1
scripts/gd3asset

@@ -36,6 +36,7 @@ class GD2Assets(gd2.prep.AssetBin):
             'bmp' : (self.image, "BMP image file (options: format)"),
             'gif' : (self.image, "GIF image file (options: format)"),
             'ttf' : (self.ttf, "TrueType font file (options: format, size, topchar)"),
+            'otf' : (self.ttf, "OpenType font file (options: format, size, topchar)"),
             'wav' : (self.sample, "Audio sample, mono 16-bit (no options)"),
         }
 
@@ -130,7 +131,7 @@ if __name__ == '__main__':
         print 'jpg,png,bmp,gif:'
         print ' format   ' + ' '.join(formats) + '. Default ARGB4'
         print
-        print 'ttf'
+        print 'ttf,otf'
         print ' size     height in pixels. Default 12'
         print ' format   ' + ' '.join(formats) + '. Default ARGB4'
         print ' topchar  maximum ASCII code encoded. Default 127'