Giter Club home page Giter Club logo

vfit's Introduction

About

VFIT (Variable Font Instancing Tool) allows you to generate custom, static instances of a variable font defined in a configuration file.

Installation

VFIT is now available on the Python Package Index. You can install VFIT with the following command:

$ pip3 install vfit

Alternatively, you can install VFIT by downloading a pre-built wheel from the Releases section or by building it yourself.

# Skip this step if you're downloading a prebuilt wheel.
$ git clone https://github.com/jonpalmisc/vfit.git && cd vfit
$ poetry build && cd dist

# Install VFIT from the wheel.
$ pip install vfit-version-py3-none-any.whl

Usage

To begin, you will need a variable font file to work with. Your first step will be creating a configuration file. See sample.json for an example.

Next, run VFIT and pass your configuration and variable font file as arguments:

$ vfit config.json variable.ttf

If you would like to generate instances into a specific directory, you can use the -o option. For more options, see vfit --help.

Contributing

All contributions are welcome. If you find a bug or have a request for a feature, feel free to create a new issue (or even better, a pull request).

If you are submitting a pull request, please format your code with yapf using the default settings. Additionally, I am aware that camelCase naming is against the convention for Python, but it is the convention used by fonttools, so I have chosen to use it here as well for consistency.

Credits

Special thanks to Viktor Rubenko, who knows way more about font technology than I do and has been incredibly helpful in fixing strange bugs.

The VFIT logo uses NewGlyph's Armada variable font.

License

Copyright © 2020 Jon Palmisciano

VFIT is available under the MIT License. See LICENSE.txt for more information.

vfit's People

Contributors

alexmyczko avatar jonpalmisc avatar viktorrubenko avatar zorfling avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vfit's Issues

Subfamilies are not generated correctly for Windows

The way that subfamilies are currently handled does not seem to work on Windows. On macOS, subfamilies such as condensed/extended variants can be grouped together under one main family, but on Windows, this breaks catastrophically. I'm not exactly sure how to fix this yet - I need to go over the OpenType specification some more.

ValueError: Missing required table fvar

Sorry to bring this up if the project is defunct (or I'm missing some obvious step), I keep getting this error trying to generate a set of static font family files:

$ vfit -o ./output-folder -f woff2 sample.json font.otf
Traceback (most recent call last):                                                                            
  File "/home/jonathan/.local/bin/vfit", line 8, in <module>
    sys.exit(main())
  File "/home/jonathan/.local/lib/python3.9/site-packages/vfit/app.py", line 65, in main
    core.generateInstances(cfg, args)
  File "/home/jonathan/.local/lib/python3.9/site-packages/vfit/core.py", line 21, in generateInstances
    instantiateFont(font, style["axes"], inplace=True, overlap=True)
  File "/home/jonathan/.local/lib/python3.9/site-packages/fontTools/varLib/instancer/__init__.py", line 1196, in instantiateVariableFont
    sanityCheckVariableTables(varfont)
  File "/home/jonathan/.local/lib/python3.9/site-packages/fontTools/varLib/instancer/__init__.py", line 1126, in sanityCheckVariableTables
    raise ValueError("Missing required table fvar")
ValueError: Missing required table fvar

Some paths intersect incorrectly

Sometimes paths intersect incorrectly in the static output. I'm not sure what causes this but it appears to be caused by the instancing process.

This issue only appears on Mac as far as I can tell!

image

Some name table properties are non-modifiable or hardcoded

Currently, there is limited support for customizing the name table, and the version field is hardcoded to "Version 1.000". Ideally, users would be able to set additional name table entries such as the copyright string or manufacturer URL.

Add version flag

There should be a way to easily print the program version like in many other CLI tools.

Add ability to permanently change letter tracking/spacing

Some fonts look better when the space between letters is increased or decreased. Chang this manually in software such as Photoshop is tedious, and some software like Word or Excel makes it very difficult to make these changes. It would be nice to be able to modify tracking before generating static cuts.

For example, so I can make the font have the spacing shown on the bottom as default:

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.