unified-font-object / ufoNormalizer

A tool that will normalize the XML and other data inside of a UFO.
Other
51 stars 19 forks source link

Make sure images come through #88

Closed frankrolf closed 2 years ago

frankrolf commented 2 years ago

The former imageFileRef[:] notation would change a file name (e.g. image.png) to ['i', 'm', 'a', 'g', 'e', '.', 'p', 'n', 'g']. Downstream in imageFileName = imageFileRef[0] if imageFileRef else None this was passed on as i – and therefore not recognized as an image. Finally, in imagesToPurge = availableImages - referencedImages, the available images were actual image paths, while referenced images were just strings like a, b, c – this means that all images were just flushed.

I’ve tested with my own data and the UFO in #65 – both work. I also tested using a UFO with multiple images, which also works fine.

coveralls commented 2 years ago

Coverage Status

Coverage remained the same at 87.814% when pulling 7e0f9500c0e6e68a739bdb69b8d0e2ea2e8fb46a on frankrolf:dont_kill_images into 6d2e69ce056c24d60d397881d56f018cad2f2475 on unified-font-object:master.

benkiel commented 2 years ago

Thank you 100000x for this, fixing this has been on my todo list for way too long