justinpenner / TalkingLeaves

A GlyphsApp plugin to help you explore the world’s languages and writing systems
MIT License
27 stars 2 forks source link

🍃 TalkingLeaves

TalkingLeaves is a GlyphsApp plugin to explore the world’s languages and writing systems. It also comes with useful features to show you what languages your font may already support, and which glyphs are needed to support more languages.

Screenshot of the TalkingLeaves plugin window

What does it mean to “support” a language?

For many languages, this simply means having the right set of Unicode characters, like A–Z and a–z for English. This is all that TalkingLeaves checks for at the moment – just character sets.

In the future, TalkingLeaves will help you learn what other features are needed for certain languages, such as additional unencoded glyphs including ligatures and alternate forms, mark attachments, and other positioning and substitution rules.

For example, you can read issue #16 to learn about plans to improve support for Arabic languages, which require unencoded “positional” glyphs that are contextually substituted depending whether they appear at the beginning, middle, or end of a word.

For now, do not rely on TalkingLeaves to confirm which languages your font already supports. This can realistically only be done by analyzing your exported font file, checking its glyph set and the behaviour of its OpenType features. A rigorous check to confirm language support would include running it through both Hyperglot and Shaperglot, and potentially more research for certain languages.

What else can it do?

TalkingLeaves can help you understand the range of writing systems and character sets used around the world at a high level, or it can help you find some interesting facts and outliers. Talking Leaves can answer questions like:

Those answers, of course, may change and grow as more languages are added to the Hyperglot database, which powers TalkingLeaves.

What does “Talking Leaves” mean?

“Talking leaves” is a beautiful metaphor for written language – attributed to the famous Cherokee neographer Sequoyah, who was one of the only people in history to invent the first writing system for their own people. The Cherokee syllabary was enormously successful, and within a few decades Cherokee literacy went from zero to nearly 100%, surpassing the literacy rate of the surrounding European settlers. Sequoyah’s work went on to inspire many more indigenous peoples to develop their own writing systems.

Installation

TalkingLeaves requires some dependencies that need to be installed via Python’s pip package manager. This is currently tricky because most Glyphs users are using the GlyphsPython module, which is a Python framework that doesn’t come with a working copy of pip. So we’ll need to install Python first if you don’t already have it.

Install Python and pip

You can install Python via Python.org, or use a package manager such as Homebrew or MacPorts. Run pip3 or pip in your Terminal to ensure pip is working.

Install dependencies

[!IMPORTANT] Make sure GlyphsPython is selected in Glyphs > Preferences > Addons, and take note of the GlyphsPython version number. Run the following command in Terminal, replacing 3.11.9 with your GlyphsPython version number.

pip3 install --python-version=3.11.9 --only-binary=:all: --target="/Users/$USER/Library/Application Support/Glyphs 3/Scripts/site-packages" --upgrade hyperglot pandas

[!NOTE]

  • --python-version tells pip to find packages for the specified Python version that you’re using in Glyphs.
  • --only-binary disallows build-from-source packages and is required when using --python-version.
  • --target installs the packages in a Glyphs-only location, and keeps them out of your pip list.

[!WARNING] I recommend sticking with GlyphsPython in Glyphs > Preferences > Addons, but if you need to use another Python, you may need to delete the contents of ~/Library/Application Support/Glyphs 3/Scripts/site-packages and then install the dependencies again with the new Python version number. You’ll also need to install pyobjc.

Install TalkingLeaves plugin

Drag TalkingLeaves.glyphsPlugin and drop it onto the Glyphs icon in your dock. Glyphs will ask you to confirm the install, then you can restart Glyphs to begin using TalkingLeaves. Open a font, then open TalkingLeaves via the Window menu or ⌄⌘T.

Roadmap

Contributing

If you have any ideas, bug reports, or other requests, I would love to hear them! You can file an issue, or send me an email or a DM. You can find various ways to contact me at justinpenner.ca.

The database of languages that powers TalkingLeaves comes from Hyperglot, an open-source project by Rosetta Type. If you want to contribute, see https://github.com/rosettatype/hyperglot/

Related resources