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

Incorrect display on FF 66a with "Minimum font size" set #39

Open
pabuisson opened this issue Jan 9, 2019 · 9 comments
Open

Incorrect display on FF 66a with "Minimum font size" set #39

pabuisson opened this issue Jan 9, 2019 · 9 comments
Labels

Comments

@pabuisson
Copy link

pabuisson commented Jan 9, 2019

Hey,

Following up on this. Here's what I get when I display a term SVG in Firefox 66 (nightly), on macOS :

capture d ecran 2019-01-09 a 21 30 32

The image is animated alright, but font size and spacing and everything seems broken. Same svg is displayed nicely on the same machine with a blink-based browser or an old FF-56.

I tried to turn off every ad-blocking and tracker-blocking and content-blocking addon and it's still the same.

@marionebl
Copy link
Owner

marionebl commented Jan 12, 2019

Thanks for reporting @pabuisson! I use FF 64 and can not reproduce the issue either. Test with FF Nightly pending.

@marionebl
Copy link
Owner

@pabuisson:

Using FF 66.0a1 (2019-01-11) I could not reproduce the issue. Are all the svg images on Darren's post affected for you?

@pabuisson
Copy link
Author

Yes all images. It might be an issue with an addon of mine, I'll try to find what could lead to this. Maybe in a few hours though. I'll keep you posted.

@pabuisson
Copy link
Author

pabuisson commented Jan 12, 2019

Found it! It was not related to any addon. Actually, in my Firefox, I got the "Minimum font size" setting set to 9. That's what's making the SVG looks like the screenshot of the first post. If I set "Minimum font size" to "None", then I get the expected result :

capture d ecran 2019-01-12 a 10 17 43

I checked my chrome-based browsers, they also have this "Minimum font size" setting set to 9 but it has no impact on the SVG rendering.

Hope it helped!

@pabuisson pabuisson changed the title Incorrect display on FF 66a / macOS Incorrect display on FF 66a with "Minimum font size" set Jan 12, 2019
@marionebl
Copy link
Owner

Thank you for the analysis! I'll see what svg-term-cli can do to mitigate the issue.

@marionebl marionebl added the bug label Jan 12, 2019
@jwhitley
Copy link

This appears to be the current and correct tracking issue in Bugzilla. Sadly there was a whole run of attempts to fix this, which all got backed out due to causing other intermittent regressions:

https://bugzilla.mozilla.org/show_bug.cgi?id=935056

But it does contain some info on what causes the regression, essentially Firefox applying minimum size clamping too early in SVG text size computation. E.g. FF applies minimum size clamping to "5px" in the SVG file's coordinate system, not the actual on-screen rendered text size due factoring in the SVG viewport. That suggests a possible solution where manipulating/scaling the coordinate system in the generated SVGs, but leaving the final on-screen size the same, may produce a fix.

@jwhitley
Copy link

For posterity's sake, I also found this comment on a nearly identical Chromium issue, before a fix was landed there:

https://bugs.chromium.org/p/chromium/issues/detail?id=232332#c11

The minimal font size restriction can be bypassed in SVG by setting text-rendering="geometricPrecision" on the text element or parent elements[...]

Unfortunately, that attribute appears to have zero effect on the Firefox bug. I manually edited the svg-term-cli parrot example to test this, but it's not a workaround.

@jwhitley
Copy link

See also this SO post on this exact issue.

@jonathanlermitage
Copy link

Thx for the font.minimum-size workaround! I faced this issue with Firefox 98, I can show animated SVG correctly now 🥳

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

No branches or pull requests

4 participants