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

Liguritized Input Sans runs into numerous spacing problems. #72

Open
jcklpe opened this issue Aug 29, 2019 · 1 comment
Open

Liguritized Input Sans runs into numerous spacing problems. #72

jcklpe opened this issue Aug 29, 2019 · 1 comment

Comments

@jcklpe
Copy link

jcklpe commented Aug 29, 2019

I used Ligaturizer to add some ligatures to Input Sans, a non-monospaced programming font.

Unfortunately this seems to have caused some problems as you can see here:

image

image

image

Any suggestions on how this can be fixed?

Also I realize that this is a pretty weird usecase but it would be nice to have a proportional font that still had various programing related ligatures like FiraCode.

@ToxicFrog
Copy link
Owner

Ligaturizer attempts to scale ligatures to match the size of the font being patched; to do this, it makes some assumptions, the most foundational being that all characters in the input font are 1em wide and thus the width of any ligature is (number of characters in ligature) em.

I think fixing this would "just" be a matter of changing correct_character_width and correct_ligature_width to use the size of the glyph (or the set of glyphs making up the ligature) in self, rather than just using self.emwidth. That said, variable-width fonts are hairy enough compared to fixed-width ones that I'm not completely confident in that statement.

I would welcome a patch for this, as long as it doesn't break support for fixed-width fonts, but I doubt I'll ever get around to implementing it myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants