Skip to content

Commit

Permalink
Merge pull request #526 from duganchen/plex-italic-names
Browse files Browse the repository at this point in the history
Take the style from the filename if it's longer than the subfamily (fixes #257)
  • Loading branch information
ryanoasis authored Jan 30, 2021
2 parents 901680e + 0c37287 commit 4fe99fb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions font-patcher
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,11 @@ class font_patcher:
# some fonts have inaccurate 'SubFamily', if it is Regular let us trust the filename more:
if subFamily == "Regular":
subFamily = fallbackStyle

# This is meant to cover the case where the SubFamily is "Italic" and the filename is *-BoldItalic.
if len(subFamily) < len(fallbackStyle):
subFamily = fallbackStyle

if self.args.windows:
maxFamilyLength = 31
maxFontLength = maxFamilyLength - len('-' + subFamily)
Expand Down

0 comments on commit 4fe99fb

Please sign in to comment.