Using Kern On for other-than-Latin scripts?

Post Reply
tiro_j
Posts: 20
Joined: 26 Jan 2021

Using Kern On for other-than-Latin scripts?

Post by tiro_j »

I was hoping that I might be able to use Kern On for my Cherokee font, but it seems not to work, presumably because it relies on some internal knowledge of Latin characters?

A tool like Kern On would be especially helpful for syllabic scripts like Cherokee, since they tend to require significant amounts of kerning and manually require checking every possible combination.
User avatar
Tim Ahrens
Site Admin
Posts: 404
Joined: 11 Jul 2019

Re: Using Kern On for other-than-Latin scripts?

Post by Tim Ahrens »

The Kern On engine is completely unaware of scripts. However, it will only autokern pairs that are in the built-in list of pairs (plus OT features applied, of course). You can inspect this list if you are curious, just right-click the .glyphsPlugin file, show package contents, then it’s the file pair_frequencies.txt in Contents/Resources.

As you will see, the list does not contain Cherokee yet but it’s easy for me to add if you give me a little assistance. I didn’t want to randomly throw in scripts I don’t understand, and I was expecting to collaborate with the users who are using Kern On with certain scripts.

Can you point me to a god Cherokee text corpus? Then I can generate and add the necessary pairs and it should work with Kern On.
tiro_j
Posts: 20
Joined: 26 Jan 2021

Re: Using Kern On for other-than-Latin scripts?

Post by tiro_j »

I am not aware of a substantial Cherokee corpus, and I also need to be able to support the historical lowercase characters that do not occur in most Cherokee text. The nature of syllabic scripts is that kerning needs to accommodate all pairs of all characters: because most of the letters represent consonant + vowel syllables, which combine much more liberally than letters in an alphabetic script, which are constrained by phonology. When I am kerning syllabic scripts manually, I step through every single combination—between control spacing characters—and adjust any that don’t fit the spacing pattern.

So maybe the first thing I need is a script that spits out a list of all UC-UC UC-LC and LC-LC Cherokee pairs.
User avatar
Tim Ahrens
Site Admin
Posts: 404
Joined: 11 Jul 2019

Re: Using Kern On for other-than-Latin scripts?

Post by Tim Ahrens »

Sounds good! Including all the possible syllable combinations in Cherokee is easy, I just need to add one line to my pairs-crunching script.

Plus, there is a Wikipedia in Cherokee, around 120k characters, so that’s not too bad as a start. Kern On likes to know a bit about the real-world frequency of pairs – for model suggestions and class kerning generation – so it’s good to have this as a source. In addition to the combinations between two syllables, we need the combinations with punctuation, symbols and the like, and I’ll extract that from Wikipedia as well (altough that may not cover the full real-world usage, as Wikipedia has rather specific conventions for some languages).

I’ll see how far I can get.
tiro_j
Posts: 20
Joined: 26 Jan 2021

Re: Using Kern On for other-than-Latin scripts?

Post by tiro_j »

Thanks, Tim. Priority for me at the moment is LC-LC and UC-LC: I am extending an existing Cherokee typeface that already has UC-UC kerning that I am not allowed to touch.
User avatar
Tim Ahrens
Site Admin
Posts: 404
Joined: 11 Jul 2019

Re: Using Kern On for other-than-Latin scripts?

Post by Tim Ahrens »

Quick update: I’m working on it. Nearly there!

Quick question: Do you need 0x13F6, 0x13F7, 0x13FE, 0x13FF? Are they the historical characters you were referring to?
tiro_j
Posts: 20
Joined: 26 Jan 2021

Re: Using Kern On for other-than-Latin scripts?

Post by tiro_j »

Yes, I do need those, but also the rest of the Cherokee lowercase in the Cherokee Supplement block:
https://www.unicode.org/charts/PDF/UAB70.pdf

It would also be helpful to have pairs for Cherokee characters and some common punctuation:

‘ “ ' " before

’ ” ' " , ; : . ? ! after
tiro_j
Posts: 20
Joined: 26 Jan 2021

Re: Using Kern On for other-than-Latin scripts?

Post by tiro_j »

Thought: have you considered having the list of Kern On pairs in an external resource, where it could be more easily customised by users without messing with the .py file?
User avatar
Tim Ahrens
Site Admin
Posts: 404
Joined: 11 Jul 2019

Re: Using Kern On for other-than-Latin scripts?

Post by Tim Ahrens »

It seems in the world of font-making tools, there are two schools of thought:
  • Assume that each user has different needs and personal preferences of how to do things and, therefore, allow customizations – and even encourage them. This seems to be the RoboFont reasoning, as fas as I have understood.
  • Assume that the requirements are essentially the same for all users, and that personal taste is overrated and is to be considered irrational. The tool tries to be as powerful as possible so as to be sufficient for all users. Of course, ultimately, customizations and exceptions to the standard workflow must be supported. This seems to be the reasoning of Glyphs.
For Kern On, I tend to follow the latter, not only because (so far) it’s a Glyphs plugin. Instead of making every user add their necessary bits I think it’s better to add the support for e.g. writing systems centrally and permanently. While some users may need support for pairs that no-one else needs, I am not expecting any conflicts, any contradictions between users’ needs.

That said, there is always the possibility to add independent pairs and “user-set auto pairs” from the KO panel, of course.

There is no .py file in the .glyphsPlugin package, just a plain .txt file. Feel free to extend it but I’d strongly recommend to submit this to me so it can be included permanently. As I mentioned above, I am quite confident that such edits (extensions or refinements) would not be rejected by other users.
tiro_j
Posts: 20
Joined: 26 Jan 2021

Re: Using Kern On for other-than-Latin scripts?

Post by tiro_j »

I am thinking about projects with unique glyph variants, and how to roll those in to Kern On kerning? Does this happen automatically based on glyph naming, e.g. /a.ss01/ would participate in Kern On kerning because /a/ does?

Also wondering about custom glyph naming—we don’t use Glyphs naming conventions in most of our projects— and in the case of Cherokee, for example, some of our sources use uniXXXX format names and some use custom human-friendly names. Does Kern On use Glyphs’ glyphdata.xml naming aliases? Will it pick up on a custom glyphdata.xml file stored with the font source?
User avatar
Tim Ahrens
Site Admin
Posts: 404
Joined: 11 Jul 2019

Re: Using Kern On for other-than-Latin scripts?

Post by Tim Ahrens »

Kern On ignores glyph names. Instead, it “applies” the OT features to the list of Unicode pairs. As long as your Glyphs have Unicode values assigned and you have set up the OT features the autokerning should be complete. Just let me know if you think something is missing.

I suggest to have a look at the Under the Hood video, where this is explained starting at 1:38.
tiro_j
Posts: 20
Joined: 26 Jan 2021

Re: Using Kern On for other-than-Latin scripts?

Post by tiro_j »

Thanks, Tim. That sounds sensible (even though it means I have to do .fea code, which I mostly avoid).
User avatar
Tim Ahrens
Site Admin
Posts: 404
Joined: 11 Jul 2019

Re: Using Kern On for other-than-Latin scripts?

Post by Tim Ahrens »

No need to write your own .fea code. The auto-generated OT features in Glyphs will do!
tiro_j
Posts: 20
Joined: 26 Jan 2021

Re: Using Kern On for other-than-Latin scripts?

Post by tiro_j »

Auto-generating OTL features in Glyphs relies on using Glyphs-conformant glyph names or spending a bunch of time creating a custom glyphdata.xml, and even then doesn’t work reliably for many of the scripts I deal with. If I do my GSUB work in VOLT before the kerning stage, I can use Volto* to generate .fea code though.

To be clear: I am only using Glyphs to access Kern-On. It isn’t part of my usual toolchain.
_____
*https://github.com/TiroTypeworks/TiroTo ... ster/Volto
Post Reply