Skip to main content

A python API for evaluating coverage of glyph sets in font projects.

Project description

Attention: Repository under transition

The assembly of character sets is currently undergoing a transition from the previous approach of using the glyphsets command and data.json as a database to using the gflanguages package as the database and assembling .nam and other files from that.

[!NOTE]
Please see GLYPHSETS.md for an up-to-date description of the state of the new language definitions.

How to assemble glyphs and characters using the new approach

  1. Define the glyphset in the Python module in Lib/glyphsets/definitions/__init__.py with language codes for your character set.
  2. Optional: Have a .stub.nam file under GF_Glyphsets/*/definitions/ for your character set, containing encoded characters that you want to see included that can't be inferred from the gflanguages definitions.
  3. Optional: Have a .stub.glyphs file under GF_Glyphsets/*/definitions/ for your character set, containing unencoded glyphs that you want to see included.
  4. Update all glyphsets using sh build.sh, see below for details.

The final .glyphs files are the sum of gflanguages + .stub.nam + .stub.glyphs. See chart below.

[!NOTE]
glyphsets uses the version of gflanguages that's currently installed on your system to query for characters per language. This enables you working on both packages locally at once. In any case, make sure that the gflanguages package is up-to-date on your system.

[!NOTE]
Bonus points: Sadly, in the creation of the .glyphs files, it's not possible to exactly recreate the glyph sorting that Glyphs.app uses by default, so the .glyphs files look a bit different from what's expected. If you care, please open every freshly adjusted .glyphs file in Glyphs.app, select all glyphs, and run "Update Glyph Info" from the "Glyphs" menu on them to sort them and save the file. But the files will work as-is in any case.

Data flow visualization

Visualizes in a simplified way how the various data sources are combined into a final glyphset, then rendered out to various format. This process is repeated for every glyphset defined in Lib/glyphsets/definitions/__init__.py.

Read this top to bottom.

┌──────────────────┐
│ Language codes   │
│ "en_Latn"        │
│ "de_Latn"        │
│ ...              │
└──────────────────┘
         │
┌──────────────────┐   ┌──────────────────┐   ┌──────────────────┐
│ gflanguages      │   │ .stub.nam        │   │ .stub.glyphs     │
│ (Python package) │   │ (optional)       │   │ (optional)       │
└──────────────────┘   └──────────────────┘   └──────────────────┘
         │                      │                      │
         ╰──────────────────────┼──────────────────────╯
                                │
                ╔═══════════════════════════════╗
                ║ complete glyphset             ║ 
                ╚═══════════════════════════════╝
                                │
         ╭──────────────────────┼──────────────────────┬──────────────────────╮
         │                      │                      │                      │
┌──────────────────┐   ┌──────────────────┐   ┌──────────────────┐   ┌──────────────────┐
│ .txt             │   │ .nam             │   │ .glyphs          │   │ .plist           │
│ (nice & prod)    │   │                  │   │                  │   │                  │
└──────────────────┘   └──────────────────┘   └──────────────────┘   └──────────────────┘

Acknowledgements

GF Greek Glyph Sets defined by Irene Vlachou @irenevl and Thomas Linard @thlinard. Documented by Alexei Vanyashin @alexeiva January 2017.

GF Glyph Sets defined by Alexei Vanyashin (@alexeiva) and Kalapi Gajjar (@kalapi) from 2016-06-27 to 2016-10-11, with input from Dave Crossland, Denis Jacquerye, Frank Grießhammer, Georg Seifert, Gunnar Vilhjálmsson, Jacques Le Bailly, Michael Everson, Nhung Nguyen (Vietnamese lists), Pablo Impallari (Impallari Encoding), Rainer Erich Scheichelbauer (@mekkablue), Thomas Jockin, Thomas Phinney (Adobe Cyrillic lists), and Underware (Latin Plus Encoding)

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

glyphsets-0.6.14.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

glyphsets-0.6.14-py3-none-any.whl (100.1 kB view details)

Uploaded Python 3

File details

Details for the file glyphsets-0.6.14.tar.gz.

File metadata

  • Download URL: glyphsets-0.6.14.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for glyphsets-0.6.14.tar.gz
Algorithm Hash digest
SHA256 94c46072169d80ac9f14bc3a645d6c24028100aef9ce6c3becbdf8316f69ed32
MD5 508ae6ae5873dfba2512fac760d1fe2f
BLAKE2b-256 91c72c89a0d64ba78cf67d8e37f75ae6aa0ed6fc16bc739498516240585a9f8a

See more details on using hashes here.

File details

Details for the file glyphsets-0.6.14-py3-none-any.whl.

File metadata

  • Download URL: glyphsets-0.6.14-py3-none-any.whl
  • Upload date:
  • Size: 100.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for glyphsets-0.6.14-py3-none-any.whl
Algorithm Hash digest
SHA256 219742c8fc757c2eb12de0574bdad0964730cfffaf0646899b85ad90262685d3
MD5 8a5c6cc15b7c8d94d797fa1cf8ed5d89
BLAKE2b-256 25a6ba22ce83161d570f6f4ca2da1feaf91008bb5b7a79c0fe6ade0c17198449

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