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

Add static method PostProcessor.rename_glyphs #600

Merged
merged 1 commit into from Mar 16, 2022

Conversation

m4rc1e
Copy link
Contributor

@m4rc1e m4rc1e commented Mar 16, 2022

I need to rename glyphs in a ttf using a custom mapping. I don't really want to write my own function to do this since we're already doing it in this repo quite nicely.

No offence taken if this gets rejected.

@anthrotype
Copy link
Member

make sure you do your renaming as first thing after loading a TTFont before loading any other table otherwise you incur in #485

@m4rc1e
Copy link
Contributor Author

m4rc1e commented Mar 16, 2022

Thanks for the tip!

If you're happy, I'll squash the two commits.

@anthrotype
Copy link
Member

sure! LGTM

@m4rc1e m4rc1e changed the title Turn PostProcessor._rename_glyphs_from_ufo into a static method Add static method PostProcessor.rename_glyphs Mar 16, 2022
@m4rc1e
Copy link
Contributor Author

m4rc1e commented Mar 16, 2022

hold up. I'm arse clowning here.

@anthrotype anthrotype merged commit 89d6285 into googlefonts:main Mar 16, 2022
@anthrotype
Copy link
Member

oops merged :)

@@ -155,7 +155,7 @@ def process_glyph_names(self, useProductionNames=None):

if useProductionNames:
logger.info("Renaming glyphs to final production names")
self._rename_glyphs_from_ufo()
self.rename_glyphs(self.otf, self._build_production_names())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want to keep this line as it was before

self._rename_glyphs_from_ufo()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep that was my arse clowing. Give me a sec.

@m4rc1e m4rc1e deleted the rename-glyphs branch March 16, 2022 17:47
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

2 participants