GithubHelp home page GithubHelp logo

fonttools / fontbakery Goto Github PK

View Code? Open in Web Editor NEW
535.0 49.0 99.0 78.27 MB

🧁 A font quality assurance tool for everyone

Home Page: https://fontbakery.readthedocs.io

License: Apache License 2.0

Python 96.14% HTML 1.69% Shell 0.08% PureBasic 2.01% CSS 0.07%
command-line-tool font quality-assurance

fontbakery's Introduction

Latest PyPI Version Python License: Apache 2.0

Font Bakery

Font Bakery is a command-line tool for checking the quality of font projects.

For a quick overview, check out the list of checks currently offered. And for a full written introduction check out our documentation at Read The Docs.

For video introductions, see the TypeCon 2018 and ATypI 2020 FontBakery presentations.

Font Bakery has an active community of contributors from foundries around the world, including Adobe Fonts, Dalton Maag, Type Network, and Google Fonts.

Font Bakery is not an official Google project, and Google provides no support for it. However, throughout 2018-2024 a project maintainer, Felipe Corrêa da Silva Sanches (@felipesanches), is commissioned by the Google Fonts team to maintain it. The original software architecture (and maintenance of it) is by Lasse Fister (@graphicore).

Run Font Bakery automatically on Github Actions

Simon Cozens prepared a template git repo that makes it easy to build, check and proof fonts. He's also prepared a nice 1 minute video showcasing it.

License

Font Bakery is available under the Apache 2.0 license.

All comments on the issue tracker or on pull requests will be treated as also licensed under this license such that they can be incorporated into the project code.

Install

See the Font Bakery Installation Guide for your platform:

Usage

Font Bakery is primarily a Terminal app, learn more in the Command Line Usage Guide.

If you write little Python scripts in your workflow, you can easily write custom checks.

For full developer documentation, check out fontbakery.readthedocs.io (a hosted and compiled copy of contents in the /docs directory.)

Contributing

See the guide to Getting Started as a Contributor.

History

The project was initiated by Dave Crossland in 2013 to accelerate the onboarding process for Google Fonts. In 2017 Lasse Fister and Felipe Sanches rewrote it into a modern, modular architecture suitable for both individuals and large distributors. Felipe has maintained the check contents since 2016.

In 2017, Lasse began a sister project, Font Bakery Dashboard: A UI and a cloud system that scales up for checking 1,000s of font files super fast and in parallel, by using 1,000s of "container" virtual machines. See his TypoLabs 2018 talk on YouTube and its presentation deck. However, the project was halted at the end of 2019.

Most of the checks are for OpenType binary files, and project metadata files. (Currently, the Google Fonts METADATA.pb files are supported.)

If you are developing a font project publicly with Github (or a similar host) you can set up a Continuous Integration service (such as GHActions) to run Font Bakery on each commit, so that with each update all checks will be run on your files.

Trivia

fontbakery's People

Contributors

adrientetar avatar andriyko avatar aurium avatar bramstein avatar chrissimpkins avatar cjchapman avatar davelab6 avatar drj11 avatar eliheuer avatar eniallator avatar felipesanches avatar graphicore avatar guidoferreyra avatar hugovk avatar jenskutilek avatar josh-hadley avatar kaydeearts avatar khaledhosny avatar m4rc1e avatar madig avatar miguelsousa avatar moyogo avatar ollimeier avatar rosawagner avatar simoncozens avatar thundernixon avatar vitalyvolkov avatar vv-monsalve avatar xen avatar yanone 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  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  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

fontbakery's Issues

Add `make clean`

Add a make clean command that will wipe the data directory and database so the system is 'reset' to try out new developments

Add 'About' page that contains ALL copyright notices and libre license texts

All fontbakery dependencies should be noted in an About page, accessible from the footer.

Each dependency should have its license text and copyright notice.

This information can be added to the page by parsing the requirements.txt file, so it doesn't have to be maintained by hand.

This should also parse the AUTHORS.txt file and place the list of Font Bakery authors at the top of the page.

Webhook api endpoint

Method that should be registered as webhook into github project settings.

Also need test script that will invoke call for testing.

Change license to Apache v2.0

This issue is formal public act of asking permissions from all contributors to change permission to Apache Public License from wrongly declared GPL. There is only 2 contibutors at this moment:

@xen
@davelab6

I think it is enough to ask code authors to agree with this changes.

Documentation pages

Pages that should be in user documentation:

  • About
  • Tutorial
  • Current build options
  • Configuration file format description?

Repository summary page

Should contains:

  • Title
  • Git address
  • Dialog to select License file (probably .txt files in the list)
  • Dialog to select ufo folders (only filter folders that have .ufo extension)
  • Confirm button
  • ask permission for using font name or rename. If rename user should provide name for each folder.

If user select to rename then font folders and fontinfo.plist need to be updated according provided information during copy proccess.

Error on adding a project

I tried to add a git repo from 'Mass github add repositories' tab and when I clicked the star icon I got this error:

/bin/sh: line 0: cd: /Users/dcrossland/src/bakery-xen/data: No such file or directory
2013-05-09 05:23:36 [15210] [ERROR] Error handling request
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/gunicorn/workers/sync.py", line 126, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1701, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1689, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1687, in wsgi_app
    response = self.full_dispatch_request()
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1360, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1358, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1344, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/dcrossland/src/bakery-xen/bakery/settings/views.py", line 138, in addhook
    git_clone(login = g.user.login, project_id = project.id, clone = project.clone)
  File "/Library/Python/2.7/site-packages/celery/local.py", line 240, in <lambda>
    __call__ = lambda x, *a, **kw: x._get_current_object()(*a, **kw)
  File "/Library/Python/2.7/site-packages/celery/app/task.py", line 330, in __call__
    return self.run(*args, **kwargs)
  File "/Users/dcrossland/src/bakery-xen/bakery/tasks.py", line 21, in git_clone
    subprocess.call(CLONE_PREPARE_SH % params, shell=True, cwd=WORK_DATA_ROOT)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1228, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory: '/Users/dcrossland/src/bakery-xen/data'
2013-05-09 05:23:36 [15211] [ERROR] Error handling request
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/gunicorn/workers/sync.py", line 126, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1701, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1689, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1687, in wsgi_app
    response = self.full_dispatch_request()
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1360, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1253, in handle_user_exception
    return self.handle_http_exception(e)
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1213, in handle_http_exception
    return handler(e)
  File "/Users/dcrossland/src/bakery-xen/bakery/app.py", line 58, in page_not_found
    return render_template("misc/404.html"), 404
  File "/Library/Python/2.7/site-packages/flask/templating.py", line 125, in render_template
    context, ctx.app)
  File "/Library/Python/2.7/site-packages/flask/templating.py", line 107, in _render
    rv = template.render(context)
  File "/Library/Python/2.7/site-packages/jinja2/environment.py", line 894, in render
    return self.environment.handle_exception(exc_info, True)
  File "/Users/dcrossland/src/bakery-xen/bakery/templates/misc/404.html", line 1, in top-level template code
    {% extends "pages/base.html" %}
  File "/Library/Python/2.7/site-packages/flask/templating.py", line 61, in get_source
    raise TemplateNotFound(template)
TemplateNotFound: pages/base.html
2013-05-09 05:23:41 [15207] [INFO] Handling signal: winch
2013-05-09 05:23:41 [15207] [INFO] SIGWINCH ignored. Not daemonized
2013-05-09 05:23:41 [15207] [INFO] Handling signal: winch
2013-05-09 05:23:41 [15207] [INFO] SIGWINCH ignored. Not daemonized
2013-05-09 05:23:41 [15207] [INFO] Handling signal: winch

Splash page changes

Blocks:

  • recent build
  • list of all avialable project from logged in user on the site (table with states)

Add edit METADATA.json to setup

And allow to edit this file if it exsits. Also after bump genmetadata.py generate new file METADATA.json.new if it is exsits then allow to edit 2 side pannel mode and ask to delete new file when user is done.

Project selection and config

Travis require special .travis.yml files. We can probably use something similar. Parameters:

  • path to UFO folders
  • build options

Add copyright info into project files

  • Add to EVERY bakery code file this text:
Copyright 2013 The Font Bakery Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

See AUTHORS.txt for the list of Authors and LICENSE.txt for the License.
  • Add a unit test for the codebase that checks that this text is present in every file

Add numpy as a requirement

The fonttools package depends on numpy:

Downloading/unpacking fonttools2 (from -r requirements.txt (line 17))
  Downloading fonttools2-2.3.tar.gz (323kB): 323kB downloaded
  Running setup.py egg_info for package fonttools2
    /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'console'
      warnings.warn(msg)
    WARNING: '' not a valid package name; please use only.-separated package names in setup.py
    *** Warning: FontTools needs the numpy library, see:
            http://numpy.scipy.org/

    warning: no files found matching 'Doc/ChangeLog'

Templates

Templates list.

Main template:

  • - main template
  • - header
  • - footer

Splash page:

  • - splash page (last project state)
  • - last 10 build projects (left sidebar)
  • - last project report

Auxiliary pages:

  • - about
  • - contacts
  • - more?

Search:

  • - project name search autocomplete (for search widget)

Project page:

  • - Current build report
  • - Build history
  • - Files downloads
  • - badge code?
  • - more?

Error pages:

  • - 404
  • - 500

Auth:

  • login error

Personal:

  • - Project list
  • - setup instructions
  • - user projects list
  • - my repositories

Email:

  • Email template
  • Project build resul
  • Project download/other error

Settings:

  • Add/remove projects to site
  • refresh projects list

Documentation in different task #13

Email notifications

Each project should have a state attribute to email the user after each run, and the UI should have a place to check/uncheck this attribute

Improve the way subsets are made

Modify the build script to replace subset.py with pyftsubset

  • add all the unicodes-*txt lists to pyfontaine and make a new release
  • make pyfontaine's new release a dependency of fontbakery
  • change https://github.com/googlefonts/fontbakery/blob/master/bakery/tasks.py#L432 so that instead of using the old subset.py we use pyftsubset - use this shell script as a guide
  • use pyfontaine in upstream test suite to check each original UFO or TTX font has 100% of the chars in all of the selected subsets (those in unicodes-*txt lists). The tests are not blocker tests required to pass but are important
  • use pyfontaine in result test suite to confirm each subset has 100% of the chars that it should; again, not a blocker but are important
  • change the setup page to show the subset selection as a table, showing the subset in col 1, the percentage of the subset that is complete in col 2, and a checkbox if the subset should be made and copied to the .out directory in col 3

OAuth

Github login and API methods access.

Few example font repositories

I need links for several github (or hosted elsewhere but able to pull into github) repositories for test. I'll do clone and other stuff by myself.

Git fetcher

Fetch project and try to get special file and check if it ok.

Settings page

Add/remove projects to site and webhooks registration

Settings page with checkboxes

List of Github repositories and dialod to check every repository user want to select (with checkbox) and add button with modal dialog confirmation to allow to use repository.

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.