Complex pixel outlines exporting, but shapes are messed up

Hi everyone!

I’m calling for a bit of help here. I am currently working on a Variable Font project, with many many paths. This is a pixel font and the variable is the shape of the pixel. I would also like to export 8 static fonts, one for each pixel shape. The style of the font is a bit complex in itself and I have +100 ‘complex’ ornaments and patterns. There are 463 glyphs in total.

Here is the 8 pixel shapes, each one in an ‘instance’ between the 1st and 8th pixel shape. To achieve the interpolation, I have many ‘hidden’ points in my pixel components, for the interpolation to go smoothly.

I achieved to export a VF from Glyphs. It weights very light compared to what I was thinking for these complexe outlines: 476Ko (and between 85Ko and 62Ko for the .woffs). I have a preview of the font in my finder for the .woffs but not for the .ttf.

The font displays well in FontGoggles and in Illustrator. The interpolation is working. But not well.
Here is my 1st issue. When I zoom on the font, all my outlines aren’t smooth, the pixels are ‘broken’ (even if they display well in Glyphs). It’s like at export the grid is changing and the outlines are sticking to a thicker grid…

My 2nd issue is that when I’m trying to test the VF in Dinamo’s Font Gauntlet or Wakamai, the font cannot display. Here is the error message I get:

It seems that it can read and recognise the font in itself, but cannot display the right outlines.

Is it possible that what I’m trying to achieve is impossible? Too heavy, too many outlines? Or am I missing something here?
Here are the issues for the VF.

Now, I have other issues exporting the Static Files. I read the article on Creating fonts with complex outlines.
As theses fonts will be static, I don’t need hidden points in my pixel components so I pathfinded them in order to simplify.

After many try and test, I manage to export my files: .ttf, disabled subroutines, no hinting, no remove overlap. And my pixel component is exportable, as someone give the advice in this topic (Export issue. How many nodes are too many nodes?).
I only have one master, and use the Rename Glyphs custom parameters in my instances to interchange the different pixels on export.

I just have an exporting issue with one complex ornament for 1 of my pixel shape, causing Glyphs to crash each time I try to export it (even alone), but at this point, I can live without it.

The issue I have here is that the pixels still have messed outlines, as in my VF export:

I have tried several parameters to prevent that:

  • increasing the UPM
  • increasing the UPM and scaling the font to the greater UPM
  • setting grid spacing to 0 and subdivisions to 0
  • decomposed all the glyphs to decompose all their pixels

I still have these broken outlines.

My version of Glyphs is 3.1 (3133) and I am working on a M1 Macbook Pro running on Monterey 12.2.1.

So if I summarise my questions:

1- Why isn’t my VF displaying in browsers?
2- Why are my pixels ‘broken’ in my VF and static fonts?
3- Is what I am trying to do even possible?

Thank you very much in advance for you help!

TTFs cannot have grid spacing of less than 1u. What you can do, however, is use a higher UPM. You can achieve that with a Scale to UPM parameter in your Variable Font Setting in Font Info > Exports.

The tricks you do on the path, including self-overlapping (first pixel shape) and touching in a single coordinate (second from the right), are probably too much for the renderers. YMMV but you will need to experiment to fond out which distortions are still accepted by the browsers.

For bugs in illustrator, it’s usually good to check if it changes when you change your rendering type (view > view using CPU). The CPU is usually much more precise, although far slower. Not much you can change about this: on detailed work there will be irregularities. Mind, print and pixel exports should be fine though.

If you don’t scale your components and they are all set on the grid, they shouldn’t change depending on your UPM.

1 Like

It was indeed a UPM scaling issue for the static files. Now UPM is 3700, and all the points and handles are on the grid, with integer coordinates. Before I had coordinates with decimals, so I guess it was too heavy to export.
So I’ve managed to export static files, with no “broken” pixels!

For the VF, I reduced the number of points of the pixel from 144 to 36 by changing their shapes and now it seems to export pretty well. The VF displays on browsers and the transition during the interpolation is running smoothly. Same in Illustrator. Even if the VF file size seems quite light (“only” 400Ko) but I’ll make a few more tests to see if something is missing…

So with higher UPM and fewer points I managed to export the static and VF files. Thank you very much for your help and answers!