fontFeatures


NamefontFeatures JSON
Version 1.8.0 PyPI version JSON
download
home_pagehttps://github.com/simoncozens/fontFeatures
SummaryPython library for manipulating OpenType font features
upload_time2023-07-17 10:34:18
maintainer
docs_urlNone
authorSimon Cozens
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            ## `fontFeatures` library

*If you're looking for the FEE language, it has been renamed to FEZ and moved to its own library (fez).*

OpenType fonts are "programmed" using features, which are normally authored in Adobe's [feature file format](http://adobe-type-tools.github.io/afdko/OpenTypeFeatureFileSpecification.html). This like source code to a computer program: it's a user-friendly, but computer-unfriendly, way to represent the features.

Inside a font, the features are compiled in an efficient [internal format](https://simoncozens.github.io/fonts-and-layout/features.html#how-features-are-stored). This is like the binary of a computer program: computers can use it, but they can't do else anything with it, and people can't read it.

The purpose of this library is to provide a middle ground for representing features in a machine-manipulable format, kind of like the abstract syntax tree of a computer programmer. This is so that:

* features can be represented in a structured human-readable *and* machine-readable way, analogous to the XML files of the [Unified Font Object](http://unifiedfontobject.org/) format.
* features can be more directly authored by programs (such as font editors), rather than them having to output AFDKO feature file format.
* features can be easily manipulated by programs - for example, features from two files merged together, or lookups moved between languages.

> How is this different from fontTool's `feaLib`? I'm glad you asked. `feaLib` translates between the Adobe feature file format and a abstract syntax tree representing *elements of the feature file* - not representing the feature data. The AST is still "source equivalent". For example, when you code an `aalt` feature in feature file format, you might include code like `feature salt` to include lookups from another feature. But what's actually *meant* by that is a set of lookups. `fontFeatures` allows you to manipulate meaning, not description.

### Components

fontFeatures consists of the following components:

* `fontFeatures` itself, which is an abstract representation of the different layout operations inside a font.
* `fontFeatures.feaLib` (included as a mixin) which translates between Adobe feature syntax and fontFeatures representation.
* `fontFeatures.ttLib`, which translates between OpenType binary fonts and fontFeatures representation. (Currently only OTF -> `fontFeatures` is partially implemented; there is no `fontFeatures` -> OTF compiler yet.)
* `fontFeatures.fontDameLib` which translate FontDame text files into fontFeatures objects.

And the following utilities:

* `otf2fea`: translates an OTF file into Adobe features syntax.
* `txt2fea`: translates a FontDame txt file into Adobe features syntax.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/simoncozens/fontFeatures",
    "name": "fontFeatures",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Simon Cozens",
    "author_email": "simon@simon-cozens.org",
    "download_url": "https://files.pythonhosted.org/packages/c3/d4/0e5e4d68e2c24bf5ee289de7197736c3da9c367d59c09dd6a42e9827d62e/fontFeatures-1.8.0.tar.gz",
    "platform": null,
    "description": "## `fontFeatures` library\n\n*If you're looking for the FEE language, it has been renamed to FEZ and moved to its own library (fez).*\n\nOpenType fonts are \"programmed\" using features, which are normally authored in Adobe's [feature file format](http://adobe-type-tools.github.io/afdko/OpenTypeFeatureFileSpecification.html). This like source code to a computer program: it's a user-friendly, but computer-unfriendly, way to represent the features.\n\nInside a font, the features are compiled in an efficient [internal format](https://simoncozens.github.io/fonts-and-layout/features.html#how-features-are-stored). This is like the binary of a computer program: computers can use it, but they can't do else anything with it, and people can't read it.\n\nThe purpose of this library is to provide a middle ground for representing features in a machine-manipulable format, kind of like the abstract syntax tree of a computer programmer. This is so that:\n\n* features can be represented in a structured human-readable *and* machine-readable way, analogous to the XML files of the [Unified Font Object](http://unifiedfontobject.org/) format.\n* features can be more directly authored by programs (such as font editors), rather than them having to output AFDKO feature file format.\n* features can be easily manipulated by programs - for example, features from two files merged together, or lookups moved between languages.\n\n> How is this different from fontTool's `feaLib`? I'm glad you asked. `feaLib` translates between the Adobe feature file format and a abstract syntax tree representing *elements of the feature file* - not representing the feature data. The AST is still \"source equivalent\". For example, when you code an `aalt` feature in feature file format, you might include code like `feature salt` to include lookups from another feature. But what's actually *meant* by that is a set of lookups. `fontFeatures` allows you to manipulate meaning, not description.\n\n### Components\n\nfontFeatures consists of the following components:\n\n* `fontFeatures` itself, which is an abstract representation of the different layout operations inside a font.\n* `fontFeatures.feaLib` (included as a mixin) which translates between Adobe feature syntax and fontFeatures representation.\n* `fontFeatures.ttLib`, which translates between OpenType binary fonts and fontFeatures representation. (Currently only OTF -> `fontFeatures` is partially implemented; there is no `fontFeatures` -> OTF compiler yet.)\n* `fontFeatures.fontDameLib` which translate FontDame text files into fontFeatures objects.\n\nAnd the following utilities:\n\n* `otf2fea`: translates an OTF file into Adobe features syntax.\n* `txt2fea`: translates a FontDame txt file into Adobe features syntax.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python library for manipulating OpenType font features",
    "version": "1.8.0",
    "project_urls": {
        "Homepage": "https://github.com/simoncozens/fontFeatures"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c6c2857c3049a2011d2f56e36d386f4343e772099b2233eaa5dc4c7a83c12537",
                "md5": "141ad569b94bea89f2da7f4985e3163c",
                "sha256": "26c559c2b335090700738b4064aca3213f01a0ea84b8c29741d3315396b19f28"
            },
            "downloads": -1,
            "filename": "fontFeatures-1.8.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "141ad569b94bea89f2da7f4985e3163c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 103154,
            "upload_time": "2023-07-17T10:34:16",
            "upload_time_iso_8601": "2023-07-17T10:34:16.044432Z",
            "url": "https://files.pythonhosted.org/packages/c6/c2/857c3049a2011d2f56e36d386f4343e772099b2233eaa5dc4c7a83c12537/fontFeatures-1.8.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c3d40e5e4d68e2c24bf5ee289de7197736c3da9c367d59c09dd6a42e9827d62e",
                "md5": "56e2cbe96c4ce657735e2c3fe865c371",
                "sha256": "5cb243f752325148de4aa7615857c8aaff722123dc6d4e1b811bd71134873a26"
            },
            "downloads": -1,
            "filename": "fontFeatures-1.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "56e2cbe96c4ce657735e2c3fe865c371",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 1234846,
            "upload_time": "2023-07-17T10:34:18",
            "upload_time_iso_8601": "2023-07-17T10:34:18.105935Z",
            "url": "https://files.pythonhosted.org/packages/c3/d4/0e5e4d68e2c24bf5ee289de7197736c3da9c367d59c09dd6a42e9827d62e/fontFeatures-1.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-17 10:34:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "simoncozens",
    "github_project": "fontFeatures",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "lcname": "fontfeatures"
}
        
Elapsed time: 0.15377s