Metadata-Version: 2.1
Name: gensty
Version: 0.2.9
Summary: LaTex style generator for ttf/otf fonts. Supports Smufl.
Home-page: UNKNOWN
Author: Georgios Tsotsos
Author-email: tsotsos@gmail.com
License: GPL-2.0 License
Project-URL: Documentation, https://gensty.readthedocs.io/
Project-URL: Source, https://github.com/tsotsos/gensty
Keywords: latex generator package fonts
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Information Technology
Classifier: Topic :: Text Processing :: Markup :: LaTeX
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.8
Requires-Python: >=3
Description-Content-Type: text/markdown
Requires-Dist: fontTools


# genSty

![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/tsotsos/gensty?include_prereleases) ![PyPI - Status](https://img.shields.io/pypi/status/gensty) [![PyPI version](https://badge.fury.io/py/gensty.svg)](https://badge.fury.io/py/gensty) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/gensty) [![License](https://img.shields.io/github/license/tsotsos/gensty.svg)](https://github.com/tsotsos/gensty)

GenSty is a LaTex style package generator for OpenType fonts (otf/ttf) which
supports W3C SMuFL notation. With gensty you can generate your LaTeX package
based on any OpenType font; the generator parses ttf/otf files and creates LaTeX
commands for all Unicode Symbols. In the case of SMuFL fonts, you can also include
the glyphnames.json file, so it will create friendlier names and include
"Private Use" symbols.

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install foobar.

```console
pip install gensty
```

## Installation (manual)

Clone the repository

```console
git clone git@github.com:tsotsos/genSty.git
```

and then use from the top folder. Eg.

```console
python3 -m gensty -h
```

## Usage

As referred above, the package can be used directly, installed from pip, and as
a module. In case of command line the script can be used :

```console
gensty -h

usage: genSty [-h] [--version] [--all] [--smufl SMUFL]
              [--one-package ONE_PACKAGE] [--author AUTHOR] [--ver VER]
              path

LaTeX Style file generator for fonts

positional arguments:
  path                  Font(s) path. It can be either a directory in case of
                        multiple fonts or file path.

optional arguments:
  -h, --help            show this help message and exit
  --version, -v         show program's version number and exit
  --all, -a             If choosed genSty will generate LaTeX Styles for all
                        fonts in directory
  --smufl SMUFL, -s SMUFL
                        If choosed genSty will generate LaTeX Styles for all
                        fonts in directory based on glyphnames provided.
  --one-package ONE_PACKAGE
                        Creates one package with name provided by this
                        argument.
  --author AUTHOR       Author's name.
  --ver VER             LaTeX package version.
```

### Use as a module

```python
import gensty

# To create all style packages from a folder or fontfile (path). use
# makePackage().
# Optional arguments: version, author and smufl.
# smufl is path to glyphnames.json which is defined according to Specifications
# https://www.w3.org/2019/03/smufl13/specification/glyphnames.html

fontpaths, files = gensty.makePackage(path, version, author, smufl)

# if you want to save style packages in a folder use:
gensty.savePackage(fontpaths,files)

```

## Contributing

Pull requests are welcome. For major changes, please open an issue first to
discuss what you would like to change.



