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

Double Pipe Ligature Causes Line Height to Change Dynamically #293

Open
stevemolitor opened this issue Apr 22, 2024 · 3 comments
Open

Double Pipe Ligature Causes Line Height to Change Dynamically #293

stevemolitor opened this issue Apr 22, 2024 · 3 comments

Comments

@stevemolitor
Copy link

In the gif below, notice that the line height of the first line gets shifted down when I type the || ligature:

I'm using Emacs 29.3 on MacOS with PragmataPro Mono Liga. If I increase the font height to 15 or higher the problem goes away. The problem only occurs on font heights of 14 or lower.

This only happens with this ligature. Others like && work fine with no shifting.

I do not see this problem in my Emacs with other fonts with similar ligatures like Iosevka.

I also do not see the problem in VSCode, so this could be an Emacs-specific issue. Still it's odd that it only happens to me with PragamataPro, and only this particular ligature.

@stevemolitor
Copy link
Author

Actually, it happens at various font sizes - the issue occurs at font sizes 10, 11, 12, 13, 17, 18, 19. But it does not occur at sizes 14, 15, 16, 20.

Could the hinting be off at some sizes?

@fabrizioschiavi
Copy link
Owner

Thanks, @stevemolitor, for bringing this to my attention.
I revisited my ligature design to check for any mistakes, but I couldn't find any errors.
I suspect it might be an IDE issue, but I'm not sure where the problem lies

@stevemolitor
Copy link
Author

Thanks @fabrizioschiavi.

I noticed that PragmataPro does not render ligatures well in Emacs in other ways. In the gif below, you can see that turning ligatures on and off (by enabling and disabling auto-composition-mode) shifts the character alignment around. This does not happen in VS Code, nor with other ligature fonts in Emacs:

So something is different about how PragmataPro implements ligatures. I can't say it's wrong per se since it seems to work in other editors, but OTOH Emacs handles other ligaturized fonts fine. I only see these issues with PragmataPro in Emacs. Iosevka, Berkely Mono, Commit Mono, JetBrains Mono, Fira Code, etc.

For example, here is FiraCode. Note that the alignment does not shift around as I turn ligatures on and off:

Could there be something different in how PragmataPro implements ligatures compared to other fonts?

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

2 participants