Package: panosifier
panosifierpanose data editor for fontsAboutpanosifier is a Python 3.6+ command line application that editspanose datain fonts.  The tool edits theOpenType specification OS/2 table panose fields.Why do I need this tool?In many cases, you can define these values in your type design source files and rely on the font compiler to write these values into your font instances. However, there are situations where this behavior is not well-defined and differs across font compilers.An example is the approach to panose data writes in variable font format files.  In this case, the OpenType specification is vague, environments where these data are essential are not well-defined, and compilers handle the source file defined panose data differently.This tool allows you to modify build-time decisions in these situations.Quick StartInstall in a Python 3.6+ virtual environment withpip install panosifierDefine your panose values with a comma-delimited panose value list using the--panosecommand line option or individually with the ten available OpenType panose field options (seepanosifier --helpfor a list of available options)See the documentation below for additional details.InstallationThis project requires a Python 3.6+ interpreter.We recommend installation in a Python3 virtual environment.Use any of the following installation approaches:pip install from PyPI$ pip3 install panosifierpip install from source$ git clone https://github.com/source-foundry/panosifier.git
$ cd panosifier
$ pip3 install -r requirements.txt .Developer install from sourceThe following approach installs the project and associated optional developer dependencies so that source changes are available without the need for re-installation.$ git clone https://github.com/source-foundry/panosifier.git
$ cd panosifier
$ pip3 install --ignore-installed -r requirements.txt -e ".[dev]"Usagepanosifier supports two command line approaches to edit panose data in one or more command line defined font paths:Define all 10 OpenType panose fields with an ordered comma-delimited list of integers with the--panoseoptionDefine with individual command line options for one or more of the 10 OpenType panose fieldsComma-delimited list definitionYou can define all panose fields at once with an ordered,  comma-delimited list of all 10 OpenType panose values.  These must be integer values.The field order is:FamilyTypeSerifStyleWeightProportionContrastStrokeVariationArmStyleLetterFormMidlineXHeightThe following image exemplifies this order in the--panoseoption definition idiom.  Note that the values in this example are not intended to be valid for a font, but rather to demonstrate how the definition order maps to panose definition fields.Individual panose field optionsThere are ten available OpenType panose definitions.  Each panose field has a corresponding option in the panosifier tool.  These options allow you to define each field individually and make panose definitions explicit in scripted build workflows.  Define these options with integer values.The example below modifies the panose data write in the comma-delimited list section above with new FamilyType and Proportion values of 2 and 9, respectively:Usepanosifier --helpto view all available options.Note: This tool does not perform sanity checks on your definitions and can be used to write invalid definitions in fonts.  The tool assumes that you understand how to set these panose values.  Please refer to thepanose documentationfor detailed background.Reportingpanosifier reports panose data definitions in the standard output stream at the end of execution.ContributingContributions are warmly welcomed.  A development dependency environment can be installed in editable mode with the developer installation documentation above.Please use the standard Github pull request approach to propose source changes.Source file lintingWe lint Python source files withflake8.  See the Makefiletest-linttarget for details.TestingContinuous integration testing is performed on the GitHub Actions service with thepytesttoolchain.  Test modules are located in thetestsdirectory of the repository.Perform local Python interpreter version testing with the following command executed from the root of the repository:$ tox -e [PYTHON INTERPRETER VERSION]Please see thetoxdocumentation for additional details.Test coverageWe perform unit test coverage testing with thecoveragetool.  See the Makefiletest-coveragetarget for details.Acknowledgmentspanosifier is built with the fantastic freefonttoolsPython library.LicenseApache License v2.0