If you have a font that has a style component in it's 'Family' SFNT variable (e.g. ('English (US)', 'Family', 'Source Code Pro Medium')), then trying to shorten this name by removing the style component fails:
Font.appendSFNTName('English (US)', 'Family', "Source Code Pro") doesn't overwrite the existing 'Family' variable.
However, if you change the new variable slightly, even add one space or anything, e.g. Font.appendSFNTName('English (US)', 'Family', "Source Code Pro ") or
sourceFont.appendSFNTName('English (US)', 'Family', "Source Code P")
then it will overwrite existing value
The only solution so far seems to be to clear this value with
Font.appendSFNTName('English (US)', 'Family', '') and then doing what you originally wanted to
Font.appendSFNTName('English (US)', 'Family', "Source Code Pro")
System: OS X 10.11.3
FontForge (installed via Homebrew): stable 20150824
If you have a font that has a style component in it's 'Family' SFNT variable (e.g.
('English (US)', 'Family', 'Source Code Pro Medium')), then trying to shorten this name by removing the style component fails:Font.appendSFNTName('English (US)', 'Family', "Source Code Pro")doesn't overwrite the existing 'Family' variable.However, if you change the new variable slightly, even add one space or anything, e.g.
Font.appendSFNTName('English (US)', 'Family', "Source Code Pro ")orsourceFont.appendSFNTName('English (US)', 'Family', "Source Code P")then it will overwrite existing value
The only solution so far seems to be to clear this value with
Font.appendSFNTName('English (US)', 'Family', '')and then doing what you originally wanted toFont.appendSFNTName('English (US)', 'Family', "Source Code Pro")System: OS X 10.11.3
FontForge (installed via Homebrew): stable 20150824