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.
Coverage remained the same at 87.814% when pulling 7e0f9500c0e6e68a739bdb69b8d0e2ea2e8fb46a on frankrolf:dont_kill_images into 6d2e69ce056c24d60d397881d56f018cad2f2475 on unified-font-object:master.
The former
imageFileRef[:]
notation would change a file name (e.g.image.png
) to['i', 'm', 'a', 'g', 'e', '.', 'p', 'n', 'g']
. Downstream inimageFileName = imageFileRef[0] if imageFileRef else None
this was passed on asi
– and therefore not recognized as an image. Finally, inimagesToPurge = availableImages - referencedImages
, the available images were actual image paths, while referenced images were just strings likea
,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.