Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[checkoutlinesUFO] glyph file names might not correspond to existing file names … #703

Closed
frankrolf opened this issue Dec 18, 2018 · 4 comments
Assignees
Labels

Comments

@frankrolf
Copy link
Member

frankrolf commented Dec 18, 2018

… resulting in overlaps not being removed in the OTF file.

The attached UFO file (c/o @rbmntjs) has a singe AE glyph, drawn with overlaps.
Nevertheless, it does not make it through the FDK workflow, and I have finally found out why:

Consider the following steps:

① remove overlap

$ checkoutlinesufo -e SerifText-Bold.ufo
AE There is an overlap.Done with font

checkoutlinesufo recoginzes the overlap – great!

② generate OTF

$ makeotf -f SerifText-Bold.ufo/
makeotf [Warning] Could not find default features file at 'None'. Font will be built without any layout features.
makeotfexe [NOTE] Adding glyph .notdef, SID 0.
Built development mode font 'SerifText-Bold.otf'.

③ convert back to UFO

$ tx -ufo -o SerifText-Bold_roundtrip.ufo SerifText-Bold.otf

The new UFO still has the overlaps in it, which means they are present in the OTF as well.
By coincidence I found out the reason for this is the glyphname-to-filename writer in checkoutlinesufo.

This is the original file tree of the UFO file:

SerifText-Bold.ufo:
	fontinfo.plist
	glyphs:
		AE_.glif
		contents.plist
	layercontents.plist
	lib.plist
	metainfo.plist

Here is how it looks after running checkoutlinesufo:

SerifText-Bold.ufo:
	data:
		com.adobe.type.processedHashMap
	fontinfo.plist
	glyphs:
		AE_.glif
		contents.plist
	glyphs.com.adobe.type.processedglyphs:
		A_E_.glif
		contents.plist
	layercontents.plist
	lib.plist
	metainfo.plist

As is obvious, A_E_.glif is not equivalent to AE_.glif, which is why makeotf does not recognize them as equivalent. When I rename the latter to A_E_.glif (and re-wire in contents.plist), everything works as expected.

I suggest for makeotf to compare the glif files through the contents.plist rather than their file names.
An intermediate solution for Robin might be normalizing the UFO file before running checkoutlinesUFO.

SerifText-Bold.ufo.zip

@miguelsousa
Copy link
Member

I suggest for makeotf to compare the glif files through the contents.plist rather than their file names.

Agree. Looking into it.

@miguelsousa
Copy link
Member

The failure to produce a font (via makeotf) without overlaps is caused by tx. I opened #740 specifically to address it.

@miguelsousa
Copy link
Member

AFAICT checkoutlinesUFO is not doing anything wrong; the GLIF files it writes in glyphs.com.adobe.type.processedglyphs have a normalized filename, but that's a good thing, I think.
I'll leave this issue open until #740 is fixed.

miguelsousa added a commit that referenced this issue Feb 16, 2019
miguelsousa added a commit that referenced this issue Feb 16, 2019
@miguelsousa
Copy link
Member

The bug in tx (#740) is fixed. Also added a makeotf test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants