Coder Social home page Coder Social logo

yanone / babelfont Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simoncozens/babelfont

0.0 0.0 0.0 1.48 MB

Interrogate and manipulate UFO, TTF and OTF fonts with a common interface

License: BSD 3-Clause "New" or "Revised" License

Python 98.35% Makefile 1.65%

babelfont's Introduction

Babelfont: Load, examine and save fonts in a variety of formats

This describes Babelfont >3.0, which is a complete rewrite from the previous version.

Babelfont is a utility for loading fonts and examining fonts in a variety of formats. It can also be used to write fonts in some of these formats, making it possible to convert between font formats.

Here are the formats which are currently supported:

Format Read Write
Glyphs 2 * *
Glyphs 3 * *
.glyphspackage *
UFO *
Designspace *
Fontlab VFJ partial
TTF partial *
OTF partial
Babelfont * *

Babelfont converts all of the above font formats into a intermediary set of objects, whose object hierarchy can be seen here. The allows the developer to examine any font (single master or variable), without needing to worry about the details of each font format.

For example:

from babelfont import load

font = load("Myfont.glyphs") # Or .designspace, or whatever
default_a = font.default_master.get_glyph_layer("A")
top_anchor = default_a.anchors_dict["top"].x
print("Top anchor = (%i,%i)" % (top_anchor.x, top_anchor.y))
print("LSB, RSB = (%i,%i)" % (default_a.lsb, default_a.rsb))
font.save("Myfont.ttf")

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.