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 subfamily support #3

Closed
tomibennett opened this issue Nov 4, 2022 · 4 comments
Closed

font subfamily support #3

tomibennett opened this issue Nov 4, 2022 · 4 comments

Comments

@tomibennett
Copy link

Hello,

I used the tool to generate a full set of variations and it worked as expected, except for the subfamily and/or style setting.

For instance I'm unable to set the following subfamilies:

  • light
  • retina
  • medium
@MuTsunTsai
Copy link
Owner

TrueType specification suggests that the subfamily name should be one of the four basic styles (regular, italic, bold, and bold italic), and for other weight (e.g. light) the subfamily name should simply be regular. Refer to Code 2 of:

https://learn.microsoft.com/en-us/typography/opentype/spec/name#name-ids

I could, however, use Code 17 for those extended subfamily names you mentioned, technically called typographic subfamily name, and add a new input field for it. How about that?

@tomibennett
Copy link
Author

tomibennett commented Nov 8, 2022

I don't have enough knowledge in this domain to answer. However, I'm willing to test the change and share my report.

I listed the font with the fc-list command and indeed, the style field only contains Regular or Bold.

% fc-list | grep Fira | grep Tommy
FiraCode-Retina_Tommy.ttf: Fira Code Tommy:style=Regular
FiraCode-Light_Tommy.ttf: Fira Code Tommy:style=Regular
FiraCode-Medium_Tommy.ttf: Fira Code Tommy:style=Regular
FiraCode-Bold_Tommy.ttf: Fira Code Tommy:style=Bold

Would the change you propose, fill the style field with the appropriate values, like with the default font where we can see that non-basic families are set?

% fc-list | grep "Fira.*Nerd"
Fira Code Retina Nerd Font Complete Mono.ttf: FiraCode Nerd Font Mono:style=Retina,Regular
Fira Code Medium Nerd Font Complete Mono.ttf: FiraCode Nerd Font Mono:style=Medium,Regular
Fira Code Light Nerd Font Complete Mono.ttf: FiraCode Nerd Font Mono:style=Light,Regular
Fira Code SemiBold Nerd Font Complete Mono.ttf: FiraCode Nerd Font Mono:style=SemiBold,Regular
Fira Code Regular Nerd Font Complete Mono.ttf: FiraCode Nerd Font Mono:style=Regular
Fira Code Bold Nerd Font Complete Mono.ttf: FiraCode Nerd Font Mono:style=Bold

@MuTsunTsai
Copy link
Owner

Yes it will in this case. I just examine Fira Code SemiBold Nerd Font Complete Mono.ttf and sure enough, it assigns SemiBold exactly on Code 17 as expected. I've added the feature just now; see if it works for you.

@MuTsunTsai
Copy link
Owner

I will assume the issue is fixed and close it. Feel free to reopen it if needed.

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

2 participants