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

one feature in a set does not seem to be frozen #12

Closed
tessus opened this issue Oct 20, 2019 · 4 comments
Closed

one feature in a set does not seem to be frozen #12

tessus opened this issue Oct 20, 2019 · 4 comments

Comments

@tessus
Copy link

tessus commented Oct 20, 2019

According to the wiki page of Fira Code pyftfeatfreeze can be used to create a font that uses style sets permanently:

This works great for all style sets (features) but one (ss02). Since it works with all but ss02 I do not think it is an issue with the pyftfeatfreeze script, but maybe I'm wrong.

As you can see from the output, the script remapped also ss02:

$ pyftfeatfreeze.py -n -v -f 'ss02,ss03,ss04,ss05' FiraCode-Regular.otf out/FiraCode-Regular.otf
[featfreeze][info] [RemapByOTL] Running with options: Namespace(features='ss02,ss03,ss04,ss05', info=False, inpath='FiraCode-Regular.otf', lang=None, names=True, outpath='out/FiraCode-Regular.otf', rename=False, replacenames=u'', report=False, script='latn', usesuffix=u'', verbose=True, zapnames=False)
/Users/tessus/bin/pyftfeatfreeze.py:140: UserWarning: 'verbose' is deprecated; configure logging instead
  self.inpath, 0, verbose=False, recalcBBoxes=False)
[featfreeze][info] [openFont] Opened font: FiraCode-Regular.otf
[featfreeze][info] [filterFeatureIndex] FeatureIndex: [3, 19, 35, 51, 67, 93, 109, 125, 141, 157, 173, 189, 205, 221, 237, 253, 269, 285, 301, 317, 333]
[featfreeze][info] [filterLookupList] Features to apply: [u'ss02', u'ss03', u'ss04', u'ss05']
[featfreeze][info] [filterLookupList] Lookups: [174, 175, 176, 177, 178, 179]
[featfreeze][info] [applySubstitutions] Remap: 'dollar' -> 'dollar.ss05'
[featfreeze][info] [applySubstitutions] Remap: 'at' -> 'at.ss06'
[featfreeze][info] [applySubstitutions] Remap: 'ampersand' -> 'ampersand.ss03'
[featfreeze][info] [applySubstitutions] Remap: 'ampersand_ampersand.liga' -> 'ampersand.ss03'
[featfreeze][info] [applySubstitutions] Remap: 'greater_equal.liga' -> 'greater_equal.ss02'
[featfreeze][info] [applySubstitutions] Remap: 'less_equal.liga' -> 'less_equal.ss02'
dollar.ss05 at.ss06 ampersand.ss03 ampersand.ss03 greater_equal.ss02 less_equal.ss02
[featfreeze][info] [saveFont] Saved font: out/FiraCode-Regular.otf
[featfreeze][good] Finished processing.

However, the ligatures still look like image instead of image.

I'm sorry to open an issue, but I just want to make sure that this is not a bug with the script.

@tessus
Copy link
Author

tessus commented Oct 22, 2019

I can attach both files (before and after), if that helps somehow. Or pleaes let me know what other info is needed to narrow down the problem.

@madig
Copy link
Collaborator

madig commented Oct 29, 2019

Wild guess: the liga glyphs have no Unicode value assigned and this script works by switching out Unicode values, the substitution therefore does nothing.

@twardoch
Copy link
Owner

That's correct. pyftfeafreeze only affects 1:1 substitutions where the source glyph has a Unicode codepoint. But if the source glyphs are results of a ligature substitutions, pyftfeafreeze won't have an effect.

Remapping whole chains of lookups is a much more ambitious and complicated task, world require a serious upgrade of the program’s logic. I don't have the resources to tackle it, but if someone contributes a PR, I'll gladly accept it.

@tessus
Copy link
Author

tessus commented Oct 29, 2019

Thank you very much for the info, but I don't really understand what that means. But I will forward your explanation to the developer of the font. Maybe he knows what to do.
SInce it worked for 3 out of the 4 substitutions, he might be able to change the font so that the lesser equal and greater equal signs are not liga glyphs. That should fix the issue.

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