[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[project]
name = "gftools"
description = "Google Fonts Tools is a set of command-line tools for testing font projects"
readme = "README.md"
dynamic = ["version"]
authors = [
  { name = "Marc Foley", email = "m.foley.88@gmail.com" },
  { name = "Dave Crossland", email = "dave@lab6.com" },
  { name = "Felipe Sanches" },
  { name = "Lasse Fister" },
  { name = "Eli Heuer" },
  { name = "Roderick Sheeter" },
  { name = "Simon Cozens", email = "simon@simon-cozens.org" }
]
classifiers = [
  'Environment :: Console',
  'Intended Audience :: Developers',
  'Topic :: Text Processing :: Fonts',
  'License :: OSI Approved :: Apache Software License',
  'Operating System :: OS Independent',
  'Programming Language :: Python :: 2',
  'Programming Language :: Python :: 3'
]
dependencies = [
  'setuptools',
  'FontTools[ufo]',
  'axisregistry>=0.4.9', # Needed for "aggressive" param to build_name_table
  'absl-py',
  'glyphsLib',
  'gflanguages>=0.6.0',
  'gfsubsets>=2024.02.05',
  'glyphsets>=0.6.13',
  'PyGithub',
  'pillow',
  # 3.7.0 fixed a bug on parsing some METADATA.pb files.
  # We cannot use v4 because our protobuf files have been compiled with v3.
  'protobuf>=3.7.0, <4',
  'requests',
  'tabulate',
  'unidecode',
  'opentype-sanitizer',
  'vttlib',
  'pygit2<1.15.0',
  'strictyaml',
  'fontmake[json]>=3.3.0',
  'skia-pathops',
  'statmake',
  'PyYAML',
  'babelfont',
  'ttfautohint-py',
  'brotli',
  'jinja2',
  'fontFeatures',
  'vharfbuzz',
  'bumpfontversion',
  'nanoemoji>=0.15.0',
  'font-v',
  'afdko',
  'beautifulsoup4',
  'rich',
  'packaging',
  'ninja',
  'networkx',
  'ruamel.yaml',
]

[project.optional-dependencies]
qa = [
  "fontbakery[googlefonts]",
  "diffenator2>=0.2.0",
  "pycairo", # needed for fontTools varLib.interpolatable --pdf
]
test = [
  "black == 24.4.2",
  "pytest",  
]

[project.scripts]
gftools = "gftools.scripts:main"
gftools-add-axis = "gftools.scripts.add_axis:main"
gftools-add-designer = "gftools.scripts.add_designer:main"
gftools-add-ds-subsets = "gftools.scripts.add_ds_subsets:main"
gftools-add-font = "gftools.scripts.add_font:main"
gftools-autohint = "gftools.scripts.autohint:main"
gftools-build-ofl = "gftools.scripts.build_ofl:main"
gftools-build-vtt = "gftools.scripts.build_vtt:main"
gftools-builder = "gftools.builder:main"
gftools-check-bbox = "gftools.scripts.check_bbox:main"
gftools-check-category = "gftools.scripts.check_category:main"
gftools-check-copyright-notices = "gftools.scripts.check_copyright_notices:main"
gftools-check-font-version = "gftools.scripts.check_font_version:main"
gftools-check-name = "gftools.scripts.check_name:main"
gftools-check-sandbox-family = "gftools.scripts.check_sandbox_family:main"
gftools-check-vertical-extents = "gftools.scripts.check_vertical_extents:main"
gftools-check-vtt-compatibility = "gftools.scripts.check_vtt_compatibility:main"
gftools-check-vtt-compile = "gftools.scripts.check_vtt_compile:main"
gftools-compare-font = "gftools.scripts.compare_font:main"
gftools-drop-hints = "gftools.scripts.drop_hints:main"
gftools-family-html-snippet = "gftools.scripts.family_html_snippet:main"
gftools-find-features = "gftools.scripts.find_features:main"
gftools-fix-ascii-fontmetadata = "gftools.scripts.fix_ascii_fontmetadata:main"
gftools-fix-cmap = "gftools.scripts.fix_cmap:main"
gftools-fix-family = "gftools.scripts.fix_family:main"
gftools-fix-familymetadata = "gftools.scripts.fix_familymetadata:main"
gftools-fix-font = "gftools.scripts.fix_font:main"
gftools-fix-fsselection = "gftools.scripts.fix_fsselection:main"
gftools-fix-fstype = "gftools.scripts.fix_fstype:main"
gftools-fix-gasp = "gftools.scripts.fix_gasp:main"
gftools-fix-glyph-private-encoding = "gftools.scripts.fix_glyph_private_encoding:main"
gftools-fix-glyphs = "gftools.scripts.fix_glyphs:main"
gftools-fix-hinting = "gftools.scripts.fix_hinting:main"
gftools-fix-isfixedpitch = "gftools.scripts.fix_isfixedpitch:main"
gftools-fix-nameids = "gftools.scripts.fix_nameids:main"
gftools-fix-nonhinting = "gftools.scripts.fix_nonhinting:main"
gftools-fix-ttfautohint = "gftools.scripts.fix_ttfautohint:main"
gftools-fix-unwanted-tables = "gftools.scripts.fix_unwanted_tables:main"
gftools-fix-vendorid = "gftools.scripts.fix_vendorid:main"
gftools-fix-vertical-metrics = "gftools.scripts.fix_vertical_metrics:main"
gftools-fix-weightclass = "gftools.scripts.fix_weightclass:main"
gftools-font-diff = "gftools.scripts.font_diff:main"
gftools-fontsetter = "gftools.scripts.fontsetter:main"
gftools-font-weights-coverage = "gftools.scripts.font_weights_coverage:main"
gftools-gen-html = "gftools.scripts.gen_html:main"
gftools-gen-push-lists = "gftools.scripts.gen_push_lists:main"
gftools-gen-stat = "gftools.scripts.gen_stat:main"
gftools-lang = "gftools.scripts.lang:main"
gftools-lang-sample-text = "gftools.scripts.lang_sample_text:main"
gftools-lang-support = "gftools.scripts.lang_support:main"
gftools-list-italicangle = "gftools.scripts.list_italicangle:main"
gftools-list-panose = "gftools.scripts.list_panose:main"
gftools-list-weightclass = "gftools.scripts.list_weightclass:main"
gftools-list-widthclass = "gftools.scripts.list_widthclass:main"
gftools-manage-traffic-jam = "gftools.scripts.manage_traffic_jam:main"
gftools-metadata-vs-api = "gftools.scripts.metadata_vs_api:main"
gftools-nametable-from-filename = "gftools.scripts.nametable_from_filename:main"
gftools-ots = "gftools.scripts.ots:main"
gftools-packager = "gftools.scripts.packager:main"
gftools-push-stats = "gftools.scripts.push_stats:main"
gftools-push-status = "gftools.scripts.push_status:main"
gftools-qa = "gftools.scripts.qa:main"
gftools-rangify = "gftools.scripts.rangify:main"
gftools-rename-font = "gftools.scripts.rename_font:main"
gftools-rename-glyphs = "gftools.scripts.rename_glyphs:main"
gftools-remap-font = "gftools.scripts.remap_font:main"
gftools-remap-layout = "gftools.scripts.remap_layout:main"
gftools-sanity-check = "gftools.scripts.sanity_check:main"
gftools-set-primary-script = "gftools.scripts.set_primary_script:main"
gftools-space-check = "gftools.scripts.space_check:main"
gftools-tag-noto = "gftools.scripts.tag_noto:main"
gftools-ttf2cp = "gftools.scripts.ttf2cp:main"
gftools-ufo-fix-instances = "gftools.scripts.ufo_fix_instances:main"
gftools-ufo-merge = "gftools.scripts.ufo_merge:main"
gftools-ufo-set-order = "gftools.scripts.ufo_set_order:main"
gftools-ufo-setter = "gftools.scripts.ufo_setter:main"
gftools-ufo-transfer-data = "gftools.scripts.ufo_transfer_data:main"
gftools-unicode-names = "gftools.scripts.unicode_names:main"
gftools-update-families = "gftools.scripts.update_families:main"
gftools-update-nameids = "gftools.scripts.update_nameids:main"
gftools-update-version = "gftools.scripts.update_version:main"
gftools-varfont-info = "gftools.scripts.varfont_info:main"
gftools-what-subsets = "gftools.scripts.what_subsets:main"

[tool.setuptools.packages.find]
where = ["Lib"]

[tool.setuptools_scm]
write_to = "Lib/gftools/_version.py"

[tool.black]
target-version = ["py310"]
# 'extend-exclude' excludes files or directories in addition to the defaults
extend-exclude = '''
# A regex preceded with ^/ will apply only to files and directories
# in the root of the project. Separate regexes with | .
(
  .*_pb2.py  # exclude autogenerated Protocol Buffer files anywhere in the project
)
'''