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

Make sure images come through #88

Merged
merged 1 commit into from
Sep 9, 2021
Merged

Make sure images come through #88

merged 1 commit into from
Sep 9, 2021

Conversation

frankrolf
Copy link
Contributor

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.

This simple fix ensures that image file names are actually recognized as such.
@coveralls
Copy link

Coverage Status

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

@benkiel
Copy link
Contributor

benkiel commented Sep 9, 2021

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

@benkiel benkiel merged commit f28ef21 into unified-font-object:master Sep 9, 2021
@frankrolf frankrolf deleted the dont_kill_images branch September 9, 2021 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants