Cli

Gensty main file for CLI manipulation. Latex package generator ttf/otf and SMuFL.

gensty.cli.cli()[source]
  1. Handles console arguments.

gensty.cli.makePackage(fonts, packageName=None, forcedCommand=None)[source]

makePackage.

Parameters
  • fonts (str) – Font(s) path, either a file path or directory.

  • packageName (str, optional) – Forced package name which overrides the

  • name in folders and paths. (font) –

  • forcedCommand (str, optional) – Overrides the name of generated

  • command. (LaTeX) –

Returns

Three lists (triplet) of string containing Fontnames, Filenames and actual LaTeX style files.

Return type

Tuple[List[str], List[str], List[str]]

gensty.cli.prepareFonts(path, ver=None, author=None, smufl=None)[source]

prepareFonts. Creates font.latexStyle instances in a list.

Parameters
  • path (str) – Either font(s) path directory or path to font file.

  • ver (str, optional) – LaTeX package version.

  • author (str, optional) – Latex package author.

  • smufl (str, optional) – SMuFL glyphnames.json definition.

Returns

A list of LaTeXstyle() instances containing all data needed final package generation.

Return type

List[LaTeXstyle]

gensty.cli.savePackage(names, fontfiles, files, packageName=None)[source]

savePackage. Saves packages to disk, creating the appropriate folder structure. There are four cases:

  • Single font. Simplest form creates one package.

  • Multiple font. Creates one package per font (incl. font file)

  • Single font, named package. Overrides the default font name on folders.

  • Multiple font, named package. Saves all fonts in same dir.

Parameters
  • names (list) – A list of str

  • fontfiles (list) – fontfiles

  • files (list) – files

  • packageName (str) – packageName