How do I implement the cyrillic numeral combining marks correctly?

I’m trying to get the million sign to center around the letters, but I can’t seem to get it to work. Other enclosing marks seems to work for the most part without any issues.

Is there any guide somewhere for how to implement the cyrillic numeral marks and other enclosing marks correctly?

These were just made as a quick test to test see if the mark was centered correcty.

What should that look like? And what is the underlying string?

This
1

Should look like this.
Screenshot 2022-01-22 at 11.15.42

This string is “◌҉”, dottedCircle + millionssigncomb-cy

The strings above where “а҉” and “и҉”, a-cy + millionssigncomb-cy and ii-cy + millionssigncomb-cy.

I assume you tried mark positioning with a center anchor and it didn’t work in your target environment.

First find out if the target environment supports advanced shaping at all. In which renderer are you trying to make the font work?

Have a look at this file. It shows the mark attachment of the millionssigncomb and the GPOS to make space for it.

some notes:

  1. I needed to set the subCategory to Nonspacing.
  2. have a look at the mark feature. The numbers are calculated:
<((million.width - a.width) / 2) 0 (million.width - a.width) 0>
  1. The mark feature code will not produce correct spacing in a multiple master context. But the deviation is minimal (deepening if the differences in the width of the different glyphs)

millionssigncomb.glyphs.zip (2.3 KB)