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

Take the style from the filename if it's longer than the subfamily (fixes #257) #526

Merged
merged 2 commits into from
Jan 30, 2021

Conversation

duganchen
Copy link
Contributor

@duganchen duganchen commented Sep 16, 2020

The font patcher now takes the style ("Italic", "Regular", etc) from the filename if it's longer (contains more information) than the "subfamily".

Description

Updates the font patcher's algorithm for detecting the style (Italic, Regular, etc) in the font's Postscript name, so that it's more accurate.

When I first tested this with IBM Plex Mono 5.3.1, I could confirm that it fixes fixes #257 by successfully giving each generated font a unique Postscript name.

I have since tested it with VictorMono and JetBrainsMono. I have also imported all three into Font Book on OS X, and confirmed that this pull request does, indeed, resolve the issue.

Requirements / Checklist

  • Read the Contributing Guidelines
  • Read or at least glanced at the FAQ
  • Read or at least glanced at the Wiki
  • Scripts execute without error (if necessary):
    • If any of the scripts were modified they have been tested and execute without error, e.g.:
      • ./font-patcher Inconsolata.otf --fontawesome --octicons --pomicons
      • ./gotta-patch-em-all-font-patcher\!.sh Hermit
  • Extended the README and documentation if necessary, e.g. You added a new font please update the table

What does this Pull Request (PR) do?

Fixes #257.

How should this be manually tested?

The literal command I used to test this is in my comment here:

#323 (comment)

After that, I did "fc-cache -f -v" and "kitty list-fonts --psnames", checking that each Blex Mono font file's Postscript name is unique.

Any background context you can provide?

I tested the font patcher on Fedora 32. I tested the results on Fedora 32 and on OS X.

What are the relevant tickets (if any)?

#257

Copy link
Owner

@ryanoasis ryanoasis left a comment

Choose a reason for hiding this comment

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

typo change, other comment is open ended question. Thanks for taking on this fix...

font-patcher Outdated Show resolved Hide resolved
font-patcher Show resolved Hide resolved
Fix "Subfmaily" typo
@duganchen
Copy link
Contributor Author

You know, I did fix the typo...

@ryanoasis
Copy link
Owner

Thanks!

@ryanoasis ryanoasis merged commit 4fe99fb into ryanoasis:master Jan 30, 2021
@Finii Finii mentioned this pull request Jan 13, 2022
5 tasks
LNKLEO pushed a commit to LNKLEO/Nerd that referenced this pull request Nov 24, 2023
Take the style from the filename if it's longer than the subfamily (fixes ryanoasis#257)
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.

BlexMono: All italic variants shown as duplicates (on macOS, at least)
2 participants