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
- Define the glyphset in the Python module in
Lib/glyphsets/definitions/__init__.py
with language codes for your character set. - Optional: Have a
.stub.nam
file underGF_Glyphsets/*/definitions/
for your character set, containing encoded characters that you want to see included that can't be inferred from thegflanguages
definitions. - Optional: Have a
.stub.glyphs
file underGF_Glyphsets/*/definitions/
for your character set, containing unencoded glyphs that you want to see included. - 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) │ │ │ │ │ │ │
└──────────────────┘ └──────────────────┘ └──────────────────┘ └──────────────────┘
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file glyphsets-0.6.13.tar.gz
.
File metadata
- Download URL: glyphsets-0.6.13.tar.gz
- Upload date:
- Size: 973.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34b0f89c9fd781c35818d89086f6db4bda8881536cc49c15575cf1a0febcc538 |
|
MD5 | 74bbe9a57ce20ef3cffc626e62b3b05e |
|
BLAKE2b-256 | 9d36620fe6399b6f6f8475bebbb75f6b1a1aa3b0e866cf775a0c3b042a72481a |
File details
Details for the file glyphsets-0.6.13-py3-none-any.whl
.
File metadata
- Download URL: glyphsets-0.6.13-py3-none-any.whl
- Upload date:
- Size: 69.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eee5f74c3556d585d0f37730d7614665e8c5f54163e2981f9b546dfb8a99161b |
|
MD5 | 7e47467eecbf0429a0117103e6149e1c |
|
BLAKE2b-256 | 6ed89eef1e043f8e7279f36ca53f44701236c67a694742ed24e223556db249e4 |