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

The aalt feature seems to be enabled by default #62

Open
fredizzimo opened this issue Sep 18, 2024 · 4 comments
Open

The aalt feature seems to be enabled by default #62

fredizzimo opened this issue Sep 18, 2024 · 4 comments

Comments

@fredizzimo
Copy link

For the full context check this Neovide issue

But in short, the font PragmataPro Mono enables these features when aalt is enabled, and that combination looks exactly like the screenshot provided.

feature aalt {
  feature fina;
  feature medi;
  feature init;
  feature ss03; ← Fraktur
  feature ss04; ← Fraktur Bold
  feature ss05; ← Poker symbols with lines above and bottom
  feature ss06; ← Script
  feature ss07; ← Script Bold
  feature ss08; ← Serif Bold
  feature ss09; ← Serif Italic
  feature ss10; ← Serif Bold Italic
  feature ss11; ← Braille
} aalt;

The issue is that Neovide does not enable aalt, and the font does not have it enabled by default either. Still Swash thinks it's enabled, until we explicitly disable it with -aalt

One of my theories is that the support for font features with TrueType fonts is a bit broken, since we have not seen any similar reports for any other fonts. But that's just a guess. and I decided not to debug it further for the moment, since the font is not free.

Do you have any ideas what could cause it?

@griffinwxk
Copy link

griffinwxk commented Nov 1, 2024

Per @fredizzimo 's request, I attach the testing code I did some time ago using swash_demo:

I added the following near the end of main.rs, right before db.build()

db.enter_span(&[S::family_list("PragmataPro Mono Liga"), S::Weight(Weight::BOLD)]);
db.add_text("\n\nDoes this BOLDING work?");
db.leave_span();

db.enter_span(&[S::family_list("PragmataPro Mono Liga"), S::Style(Style::Italic)]);
db.add_text("\n\nDoes this Italic work?");
db.leave_span();

The result is this:
Screenshot 2024-11-01 at 3 53 17 PM

Oddly enough, when I use the non-Liga version (using the font family "PragmataPro Mono" instead), the fonts renders fine. Same results for non-Mono versions: Liga = problem, non-Liga = good.

It doesn't completely match the behavior in neovide though. In neovide, every combination of (non-)Mono/(non-)Liga seems to be rendered wrong.

I use the latest release of PragmataPro (0.830 I think).

@ningw42
Copy link

ningw42 commented Dec 26, 2024

I came from fabrizioschiavi/pragmatapro#300 and neovide/neovide#2786.
And, I also got a very similar look from https://github.com/raphamorim/rio, which seems to use swash too per search results.

Left is neovide with guifont set to PragmataPro.
Right is rio with font set to PragmataPro, and has neovim opened.
image

This is how Windows Terminal renders the same neovim interface, with PragmataPro.
image

@fredizzimo
Copy link
Author

@dfrg do you have any idea what could cause this? This bug affects quite a few users of Neovide and apparently the Rio terminal too, which have bought the font and hope to be able to use it.

Since the font is not free, maybe @fabrizioschiavi can provide more info if needed, or someone in this thread help with the debugging.

@dfrg
Copy link
Owner

dfrg commented Jan 11, 2025

Apologies for letting this slip through. I’ll take a look and see if I can figure out what’s going on.

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

4 participants