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

Font names fail to match from Figma to AE #61

Closed
qinyiyao opened this issue Apr 20, 2021 · 4 comments
Closed

Font names fail to match from Figma to AE #61

qinyiyao opened this issue Apr 20, 2021 · 4 comments

Comments

@qinyiyao
Copy link
Contributor

Many font names will fail to match in AE and fall back to Myriad Pro. This is due to the simple font name transformation rules used in the plugin.

To start, many fonts do not have PostScript names that perfectly match the their display names. “Arial Regular” on macOS has a PostScript name of ArialMT. (At least mine.) Note that: first, the MT could be the foundry name (Monotype) for disambiguation; second, the “Regular” style name is sometimes omitted since it’s the default weight. Same applies to “IBM Plex Sans Regular” IBMPlexSans or “Source Sans Pro Italic” SourceSansPro-It.

In addition, there may or may not be issues with other types of characters (:–—&()+", etc.) or non-latin-based characters.

The ideal solution would be to actually pass the source PostScript name from Figma to AE.

I made a tiny fix #60 to deal with font names with multiple spaces in them, but that’s a different problem and it’s still a terrible solution for font name referencing.

To Reproduce

  1. In Figma, create a text layer and choose Arial.
  2. Send to AE.
  3. Font family will revert back to the default Myriad Pro.

Sketch plugin not tested.

You can also check the correct PostScript name in AE by opening up any expression field, and do the following:

Screen Shot 2021-04-20 at 4 31 26 AM

Screen Shot 2021-04-20 at 4 40 03 AM

This will prompt you to select a font with 2 dropdowns. Confirming it will put a PostScript name in string inside the expression field.

@adamplouff
Copy link
Collaborator

Great catch on that. Approved the PR

@kompanets
Copy link

@qinyiyao
Hey, I`m facing the same issue. I carefully read your text but I'm a designer, now a programmer, and I can't get it.
Can you explain to Gramma step by step what I need to do?

@qinyiyao
Copy link
Contributor Author

qinyiyao commented Apr 9, 2023

@qinyiyao
Hey, I`m facing the same issue. I carefully read your text but I'm a designer, now a programmer, and I can't get it.
Can you explain to Gramma step by step what I need to do?

Inspect the font name in macOS Font Book:

CleanShot 2023-04-08 at 19 19 04@2x

Family Name + - + Style Name with spaces removed Arial-Bold does not necessarily equal the actual PostScript Name Arial-BoldMT which is how AE uniquely identifies fonts.

@kompanets
Copy link

@qinyiyao Thank you a lot, your response really helped me! I have just renamed Postscript and now AE defines a font correctly!
It seems, now, I have overwhelming work to do renaming most of the fonts in my system

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

No branches or pull requests

3 participants