Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Commit

Permalink
Added --version command-line switch.
Browse files Browse the repository at this point in the history
Added version tracking. Version can be displayed using
--version command-line switch. Changed wording in a message
that shows missing mapping of unicode characters to glyphs.
  • Loading branch information
iverg committed Aug 15, 2016
1 parent 681be9b commit aeda192
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion fontreport/fontreport.py
Expand Up @@ -32,6 +32,7 @@
import unicodedata
from fontTools.misc.py23 import *
from fontTools.ttLib import TTFont
import version


class Glyph(object):
Expand Down Expand Up @@ -272,7 +273,7 @@ def XetexBody(self):
if unicodedata.category(unichr(x))[0] != 'C'])
if gaps:
data += ('\\rowcolor{missing}\\multicolumn{3}{|c|}'
'{\\small %d codepoints not mapped} \\\\\n') % (gaps)
'{\\small %d visible characters not mapped to glyphs} \\\\\n') % (gaps)
prevcode = code
data += ('\\texttt{%04X} & {\\customfont\\symbol{%d}} &'
'{\\small %s}\\\\\n') % (code, code, uniname)
Expand Down Expand Up @@ -589,6 +590,9 @@ def main():
outfile = argv[2]
elif len(argv) == 2:
infile = argv[1]
if infile in ('--version', '-v'):
print('FontReport version %s' % version.__version__)
sys.exit(0)
outfile = None
else:
print('Usage: %s infile [outfile]' % argv[0])
Expand Down
1 change: 1 addition & 0 deletions fontreport/version.py
@@ -0,0 +1 @@
__version__ = '1.1'
5 changes: 4 additions & 1 deletion setup.py
Expand Up @@ -15,10 +15,13 @@

from setuptools import setup

ns={}
with open('fontreport/version.py') as f:
exec(f.read(), ns)

setup(
name='fontreport',
version='1.0',
version=ns['__version__'],
packages=['fontreport'],
package_data = {'fontreport': ['*.json']},
entry_points = {
Expand Down

0 comments on commit aeda192

Please sign in to comment.