From 2af4cde33e5df5a04549ac1069147d702baee6de Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Mon, 25 Jun 2018 20:38:21 +0100 Subject: [PATCH] Add font weight script --- bin/fontWeight | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 bin/fontWeight diff --git a/bin/fontWeight b/bin/fontWeight new file mode 100755 index 00000000..9f38b59b --- /dev/null +++ b/bin/fontWeight @@ -0,0 +1,12 @@ +#!/usr/bin/env python +import fontforge as ff +import sys + +args = sys.argv[1:] + +if args[0] == '--help': + print("fontWeight ") +else: + font = args[0] + f = ff.open( args[0] ) + print( f.os2_weight )