Question about GPOS

Hi, I’m new to Glyphs and considering purchasing the full version.

I’m working on a font to display Gregorian chant notation. When a glyph is displayed on the musical staff, its vertical position currently is determined by the actual position of the ligature itself:

Obviously this is a bit unwieldy and inelegant. Instead, I’d like to use GPOS (contextual positioning), if that’s what it’s called, so that the vertical position of the ligature is determined by what comes before it.

I understand the concept, but I’m not sure how to go about it in Glyphs. Can anyone advise, or point me towards some tutorials?

Thanks!

Glyph positioning (GPOS) is defined using feature code in Glyphs. Open FileFont Info and go to the Features tab. There, add a calt feature if non exists already.[1] The code in the feature looks like this:

pos one uni002E' <0 100 0 0>;
pos two uni002E' <0 200 0 0>;
pos three uni002E' <0 300 0 0>;
pos four uni002E' <0 400 0 0>;

The pattern above means: move the glyph uni002E up 100 units when proceeded by the glyph one, 200 units for two, …

The ' after the glyph name indicates which glyph gets moved. The other glyph names in a pos rule serve as context. The <X Y W H> notation changes the x/y position and the width/height of the glyph.

This is just an example, maybe you need more glyph names in a single rule. The actual feature code depends on the character patterns that are use to typeset the Gregorian chant notation.


  1. I am choosing the calt (contextual alternatives) feature here, but there are multiple features that fit this propose and some apps might require the use of another feature like kern. ↩︎

1 Like

These can help
http://opentypecookbook.com

https://simoncozens.github.io/fonts-and-layout//features-2.html

1 Like

Or use mark positioning. Add a “top” anchor in the numbers and a “_top” anchor in the pieces that should attache. Those need to be set as category: “Mark” and subCategory: “Nonspacing”. then you just type those glyphs next to each other and they will attach.

And can you explain the glyph names? Why is there a “uni0002”?

1 Like

Very helpful, thank you all!

It’s supposed to be a period. For some reason when I brought it into Glyphs, it changed the period to these Unicode points…

Can you send me the original file you imported into glyphs?

Sure, it’s here: Dropbox

Check Preferences > User settings > Keep glyphs names from imported files. That way, it replaces the “uniXXXX” with readable names. You can “fix” that by opening Font Info > Other, disable “Use Custom Naming”. Then select all glyphs and run “Glyph > Update Glyph Info”.

1 Like

Great, thank you!