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

[macCreatorType] preserve existing other metadata when setting filetype & creator #3171

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NSGod
Copy link

@NSGod NSGod commented Jun 19, 2023

This addresses #3170.

I'll just note that I'm not fluent in Python, so I don't know if there'd be a better way to fix this than what I came up with.

@anthrotype
Copy link
Member

thanks, this looks good, though I haven't tested it. I wonder how difficult it'd be to add a test.

Also it doesn't look like this setMacCreatorAndType function is used anywhere in fontTools... Anybody remembers why it's there? /cc @justvanrossum

@NSGod out of curiousity, what do you use this method for?

@justvanrossum
Copy link
Collaborator

Anybody remembers why it's there?

It quite a legacy thing for MacOS Classic. I found two spots in old fonttools where it was used, and rightfully removed later. I can't find other references to it.

@NSGod
Copy link
Author

NSGod commented Jul 21, 2023

@NSGod out of curiousity, what do you use this method for?

Well, I haven't actually used fontTools all that much yet, or that code at all, for that matter (still learning Python). I've written software that converts between the older formats and newer ones, so I'm keenly aware of the importance of the com.apple.FinderInfo. It was kind of an effort to force myself to learn Python.

While the type and creator code are no longer important, the rest of the info includes things like file label and custom icon bit might be worthwhile to preserve if overwriting files.

@anthrotype
Copy link
Member

so it looks like neither us nor yourself are using that piece of code, I am tempted to just get rid of it or deprecate it/leave as is and if one cares about retaining those attributes they can implement this in their own code..

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.

None yet

3 participants