Skip to main content

Tools for converting FontLab Studio 5 (VFB) files.

Project description

vfbLib

Converter and deserializer for FontLab Studio 5 VFB files.

FontLab’s own vfb2ufo converter is from 2015, only outputs UFO v2, and contains serious bugs that are never going to be fixed. Its support on macOS is subject to Apple’s mercy (no native support for Apple Silicon).

That’s why a single determined programmer with a hex editor set out to rectify this situation.

Installation

This is a development version. Handle with care. To install from source:

git clone git@github.com:LucasFonts/vfbLib.git
cd vfbLib
pip install .

Improvements Over vfb2ufo

  • Outputs normalized UFO v3
  • Outputs FontLab user data (font and glyph level)
  • Mark colors are written to the official UFO v3 lib key
  • Guideline data is written to the official UFO v3 elements
  • Anchors are preserved in composite glyphs
  • PostScript hinting is written correctly, but to the Adobe lib key
  • Supports more UFO font info attributes:
    • openTypeGaspRangeRecords
    • openTypeHeadLowestRecPPEM
    • openTypeNameRecords
    • openTypeOS2WeightClass is written correctly

Command Line Script Usage

vfb3ufo

Convert a VFB to one UFO per master. Command line options are compatible to FontLab’s vfb2ufo, but not all of them are implemented yet.

$ vfb3ufo MyFile.vfb

will convert the file to MyFile.ufo in the same directory. Existing files will not be overwritten unless you specify the -fo option.

vfb3ufo -h
usage: vfb3ufo [-h] [-p PATH] [-fo] [-ttx] [-64] [-s] [-z] [-m] inputpath [outputpath]

VFB3UFO Converter Copyright (c) 2022 by LucasFonts Build 2022-11-08

positional arguments:
  inputpath             input file path (.vfb)
  outputpath            output file path (.ufo[z])

options:
  -h, --help            show this help message and exit
  -p PATH, --path PATH  output folder
  -fo, --force-overwrite
                        force overwrite

Additional options:

  -m, --minimal         parse only minimal amount of data

Unimplemented options:

  -64, --base64         write GLIF lib 'data' section using base64 (recommended)
  -s, --silent          no display (silent mode)
  -ttx, --ttx           convert binary OpenType Layout data using TTX-like format
  -z, --zip             write UFOZ (compressed UFO)

vfb2json

Generate a representation that closely adheres to the VFB structure.

$ vfb2json MyFile.vfb

will convert the file to MyFile.json in the same directory. Existing files will be overwritten.

We expect this to be mostly used for debugging purposes.

vfb2json -h
usage: vfb2json [-h] [-m] [-p PATH] inputpath

VFB2JSON Converter Copyright (c) 2022 by LucasFonts Build 2022-11-08

positional arguments:
  inputpath             input file path (.vfb)

options:
  -h, --help            show this help message and exit
  -m, --minimal         parse only minimal amount of data
  -p PATH, --path PATH  output folder

Copyright

© 2022 by LucasFonts GmbH, Berlin

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vfbLib-0.2.0.tar.gz (30.7 kB view details)

Uploaded Source

Built Distribution

vfbLib-0.2.0-py2.py3-none-any.whl (39.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file vfbLib-0.2.0.tar.gz.

File metadata

  • Download URL: vfbLib-0.2.0.tar.gz
  • Upload date:
  • Size: 30.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for vfbLib-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cd061701bbaa9c15344855fbbc6783d2b428f246bb098edea032a6e44fa67f67
MD5 6888f4b9fb7e7d38661a111b693f8287
BLAKE2b-256 5ac3f6d7ddcd9b0e1639964b4f68a01d16ac9f9b7a19217b25dcf6329e000986

See more details on using hashes here.

File details

Details for the file vfbLib-0.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: vfbLib-0.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 39.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for vfbLib-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ea707f56f44fd7e7091e94cf5394586e248e97e05eac6828944fe31dc403424c
MD5 7b47a83eae89a3d8c239971e323fb23c
BLAKE2b-256 409ef6f06fcd64aa28c5aa872db6c71dfbc1d0d48e2c41abc1b7576b9c3c8b12

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page