Round corners CP not applying to all glyphs on export

I have a font which applies Offset Path and Round Corners as a CP. In this font there are two glyphs which produce different results for the same path. In the image attached to this post, the left image here shows what appears in the Preview window in Glyphs, and the right image is the result that is created on export. Note there is no break in the fraction and the numeral four in the exported version, but the fraction bar is broken in the second glyph.

I have attached a Glyphs file containing only these two glyphs. In this example I have decomposed the fraction glyph, just to be sure that it isn’t something to do with components In the original the fraction bar is a component and even as a component Glyphs treats it differently on export. (2.2 KB)

Any idea what is happening here? Or is this a known bug?

It might be applied before or after the remove overlap stage. Can you send me a sample file?

Look at the pixel font tutorial. There is a section about post processing the pixels and this exact problem is described as well.

EDIT: Please refer to the version of this file in my latest post below.

There is a sample file attached to the first post:

I’ve read through the tutorial and the part covering expansion before applying Round Corners. This is different though. The font contains two glyphs using the same component. For some reason Round Corners is applied differently to each glyph, even though the result should be the same.

I will upload another example with clearer instructions, this time including the original component.

Okay, here is the version using the same component in each of the two glyphs.

  1. Open the file and view the glyphs to see that both glyphs contain the same component.
  2. Look at the CPs applied in Instances. There are no exclusions, the CPs apply to all glyphs.
  3. Export as an OTF with Remove Overlap selected and Autohint / TTF deselected.
  4. Find the newly created OTF and open it in Glyphs.
  5. Compare the two glyphs. Both the 4 numeral (not a component) and the fraction slash (a component) have been processed differently, even though the processing should not be different between the two.

File: TEST with (2.3 KB)

Doing a few more tests, manually doing a Remove Overlap and unchecking it on export seems to solve the problem. So the problem appears to be with Remove Overlap on Export which isn’t working in the same way as the menu command.

What of the two results are you looking for?
The problem seems to be with the remove overlap and the touching corners. You need to produce at least one units overlap to produce reliable result. I don’t know exactly why it is sometimes different for the same shape.

One other thing you can try is to offset first. Use a PreFilter to be sure:
PreFilter = “OffsetCurve;3;3;0;0.5;”;
Filter = “RoundCorner;53;”;
Filter = “RoundCorner;-53;”;

Different results: It ends up at a different position, which can lead to a different rounding for the x-coordinate. And the shape is not drawn precisely. Consider using a coarser grid.

The 1/1000th em differences are there for a reason, I put them in there on purpose for the purposes of the filter. This offsetting of the points is the same in both cases, but produce different results in the two different glyphs. It shouldn’t, especially not with the same component.

Here’s a video of me moving a single point back and forth. You can see how moving this single point affects the other glyphs.

The correct result is the image on the left. The 1u differences should result in the same result in both glyphs. A positioning of points in a component should not be changed by other items in the same glyph where there is no overlap.

I’ll have another go with the prefiltering and report back.

Having the Offset Curve as a Pre Filter results in the wrong curves, the offset needs to be applied last so that the inner and outer curves are the same.

However adding Remove Overlap as a Pre Filter solves the problem. The issue seems to be with Remove Overlap during the export. As far as I can tell it still applies Remove Overlap before CP Filters are applied, but it isn’t producing the same accuracy as doing it manually or as a CP Filter.

Why don’t you work with _pixel components? The compromises in point positioning are not necessary. Instead you could expand the pixel glyph by one unit.

Because it isn’t a pixel font, it contains curves. I want to connect some diagonal connections but not others.