,

A Python Tool for panose Data Editing in Fonts

Blake Bradford Avatar

·

As a software engineer or a font enthusiast, you may often find yourself in a situation where you need to edit or define panose data in fonts. Panose data plays a crucial role in defining various attributes of a font, such as the family type, weight, proportion, and more. However, depending on the font compiler and the specific requirements of your project, the behavior and handling of panose data can vary.

That’s where panosifier comes to the rescue! panosifier is a Python 3.6+ command line application developed by Source Foundry that provides you with a simple and efficient way to edit panose data in fonts. With panosifier, you can define panose values in your type design source files or modify build-time decisions in variable font format files.

Getting Started with panosifier

To get started with panosifier, you need to install it in a Python 3.6+ virtual environment. You can do this easily by running the following command in your terminal:

#
$ pip install panosifier

Once installed, you can define your panose values using the command line options provided by panosifier. You can either specify all 10 panose fields with a comma-delimited panose value list or define individual panose fields separately.

panosifier provides a well-documented API, allowing you to define panose values individually for each field. This is particularly useful when you need to incorporate panose data editing into your scripted build workflows.

Editing Panose Data with panosifier

panosifier supports two command line approaches for editing panose data in one or more font files:

  1. Comma-delimited list definition: With this approach, you can define all 10 panose fields at once by providing an ordered comma-delimited list of integers representing the panose values. panosifier will update the corresponding panose fields in the font files accordingly.

  2. Individual panose field options: Alternatively, you can specify each panose field individually using the command line options provided by panosifier. This allows you to explicitly define individual panose fields and make panose data modifications in a more granular and controlled manner.

It’s important to note that panosifier does not perform sanity checks on your panose definitions. Therefore, it’s crucial to ensure that you understand the implications of each panose field and set the values accordingly. For detailed information on panose data and its different fields, refer to the panose documentation.

Reporting and Testing

After running panosifier, the tool will report the panose data definitions in the standard output stream. This helps you verify the changes made to the panose data in your font files. Additionally, panosifier provides thorough testing and coverage through the use of tools like pytest and coverage. This ensures the reliability and accuracy of the tool in handling panose data editing.

Contributing to panosifier

Contributions to panosifier are warmly welcomed. If you have any suggestions or improvements, you can propose them through the standard GitHub pull request approach. To facilitate development, a development dependency environment can be installed in editable mode using the developer installation instructions provided in the README.

Acknowledgments

panosifier wouldn’t be possible without the fantastic free fonttools Python library. fonttools is a powerful and widely used library for various font manipulation tasks, and it forms the foundation of panosifier.

Conclusion

panosifier is a valuable addition to your font editing toolkit. With its intuitive command line interface and versatile panose data editing capabilities, you can effortlessly define and modify panose data in your fonts. Whether you’re a type designer, a font developer, or a software engineer working with fonts, panosifier is a reliable and efficient tool that empowers you to take control over your font’s panose attributes.

If you have any questions or want to dive deeper into panosifier, feel free to explore the documentation provided in the repository. Don’t hesitate to reach out to the panosifier community for support and discussions.

Happy font editing!

References

Acknowledgments:
– panosifier is built with the fantastic free fonttools Python library.

License: Apache License v2.0

Leave a Reply

Your email address will not be published. Required fields are marked *