Token preview value mismatch for anchors in translated coordinate-space

The new ${…} tokens can be used to read the x/y coordinates of an anchor. For glyphs with an *origin anchor (which redefines the (0, 0) point of the glyph), the preview value of anchor-tokens is incorrectly computed from the natural (0, 0) point instead of from *origin.

For example, I have an /dotbelowcomb with an _bottom and a *origin anchor:

_bottom is placed at (200, 0) and *origin is placed at (400, 0). On export, the coordinates are translated such that *origin is at (0, 0), which places _bottom at (−200, 0).

When inspecting the value of a token referencing _bottom, a value of +200 is shown:

Note that only the preview is affected by this bug. The value that is inserted into the feature code when exporting is the correct value of -200.

Here is the test file from the screenshots above:
Test.glyphs (6.4 KB)

1 Like

Thanks, I fixed it.

1 Like

Confirm fixed in 3060, thank you!