Masked components with nine.dnom not exporting

I’m working on the missing components.

1 Like

Hi there, I’m back to annoy you with this old problem :smiley:
Have you had the chance to fix the missing components, or can you suggest any workaround?

I’m not familiar with the mask / reverse properties you are using but this snippet (which I have handy from having encountered the same issue before) for exporting the VF might help as a workaround to achieve what mekkablue suggested above:

EDIT: removed the Font variable to reference Glyphs.font instead

vf_path = "~/Desktop/"
font_copy = Glyphs.font.copy()
to_decompose = "zero.dnom one.dnom two.dnom three.dnom four.dnom five.dnom six.dnom seven.dnom eight.dnom nine.dnom".split(" ")
to_remove_overlap = "zero.dnom one.dnom two.dnom three.dnom four.dnom five.dnom six.dnom seven.dnom eight.dnom nine.dnom".split(" ")

for glyph in to_decompose:
	if font_copy.glyphs[glyph]:
		for layer in font_copy.glyphs[glyph].layers:
			if len(layer.components) > 0:
				if layer.isMasterLayer or layer.isSpecialLayer:
					layer.decomposeComponents()
					print("Removing components in %s %s" % (glyph, layer.name))

for glyph in to_remove_overlap:
	if font_copy.glyphs[glyph]:
		for layer in font_copy.glyphs[glyph].layers:
			if layer.isMasterLayer or layer.isSpecialLayer:
				layer.removeOverlap()
				print("Removing overlaps in %s %s" % (glyph, layer.name))

font_copy.export(FontPath=vf_path, Format=VARIABLE, Containers=[PLAIN, WOFF, WOFF2], AutoHint=True)

1 Like

Thanks for the replies! I’ve managed to solve it: if anybody’s wondering, adding a “Decompose Glyphs” parameter in the Variable instance in G3 solves the issue, but make sure not to have any overlapping nodes in the components.

I’m still working on this. I hope to fix this on some point.

1 Like

Hi! Also running into into this issue when trying to export variable font with mask / reverse properties

These glyphs are not compatible: one.blackCircled, two.blackCircled, three.blackCircled, five.blackCircled, six.blackCircled, seven.blackCircled, nine.blackCircled
Can’t convert to compatible TrueType curves.

“Decompose glyphs” CP on instances doesn’t seem to fix it for me.
Any chance this will get fixed sometime soon?
Merci!

I tried with a file that you send me some time ago. I see the problems with mask but when using reverse, it works fine.

The masking involves a remove overlap operation that that seem to change the path structure that is causing the incompatibly. I’ll see if I can fix this.

I improved the mask operation to produce compatible outlines.

But as you like to use the .circled numbers as counters in the .blackcircles, you can’t have overlaps in them. That is mostly a problem with the six and nine.

Thanks Georg — Finally got it to export! :tada:
The problem when using the CP was it yielded incompatible outlines… So I had to manually decompose then it works fine (works better with “reverse” than “mask”)

When you use “reverse” instead of “mask” you shouldn’t need the parameter. It exports fine directly.

Hey @mekkablue I found this thread while also working on solid circled numbers. I’m also trying to set the “reversePaths” attribute for all solid circles in the composite glyphs. How would I have to change the macro code you posted in order to achieve this? They’re not set to “Mask” so I can’t replace the attribute the way it’s shown in your example. thanks!

This check if the mast bit is set. Something like this should work.

for l in Font.selectedLayers:
	c = l.components[1]
	c.setAttribute_forKey_(1, "reversePaths")
	print("%s: reversePaths set" % l.parent.name)
print("Done.")

This will set the “reversePaths” attribute for the number components (as this is what you should do).