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

Firefox and ligatures under DOM renderer #5156

Closed
jerch opened this issue Sep 11, 2024 · 1 comment
Closed

Firefox and ligatures under DOM renderer #5156

jerch opened this issue Sep 11, 2024 · 1 comment
Labels
area/renderer-dom type/bug Something is misbehaving

Comments

@jerch
Copy link
Member

jerch commented Sep 11, 2024

Coming from #5155.

Recent Firefox versions changed 'ff' into a ligature repr, which causes issues in the DOM renderer and its char width measurement.

Repro:

  • start demo
  • switch to DOM renderer
  • open demo in Firefox v130
  • input 'abcdefgh' in terminal --> f gets rendered too wide

See #5155 (comment) for a possible quickfix. Problem of that quickfix is, that it will disable ligature support. A better fix would be to find a way to measure the char width independent of the ligature merging, e.g. by placing spans around the chars in the measure container.

Edit: Imho this still looks like a bug in ligature handling of firefox to me, as the 'ff' ligature breaks out of the monospace grid, while all others '==', '>=', ... stay within the correct width progression.

Edit2: The culprit causing this seems to be the "courier" font. If I remove it from font-family: "Fira Code", courier-new, courier, monospace, "Powerline Extra Symbols"; the broken ligature vanishs. Did MS change that old font recently?

Edit3: Nvm, my system uses "Courier" from the tex-packages, which includes ligatures. "Courier New" is the MS font, which does not have those ff ligatures. Btw thats a know issue with monospace fonts being not 100% monospace complicant ( e.g. ArtifexSoftware/urw-base35-fonts#31). Not sure if we can do anything here, it is yet again font madness.

@jerch jerch added type/bug Something is misbehaving area/renderer-dom labels Sep 11, 2024
@jerch jerch added this to the 6.0.0 milestone Sep 11, 2024
@jerch
Copy link
Member Author

jerch commented Sep 12, 2024

@Tyriar Gonna close this issue unresolved - imho we cannot really do anything about this. Already tried the span idea from above in a playground branch, but the result is worse, it also disables all maybe wanted ligature behavior.

Only thing that can be done about it - the integrator/user may not use a font that exhibits this behavior. Imho we cannot give any helpful advice upfront beside that, as we dont know, which fonts are affected. (Also I have no clue, why only Firefox is affected, but not Chrome/Webkit/Safari).

@jerch jerch closed this as completed Sep 12, 2024
@jerch jerch removed this from the 6.0.0 milestone Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/renderer-dom type/bug Something is misbehaving
Projects
None yet
Development

No branches or pull requests

1 participant