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