-
Notifications
You must be signed in to change notification settings - Fork 215
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
demo.svg looks wired in my environment #655
Comments
Thanks for reporting! yeah that does not look great :) the svg:s are generated using https://github.com/wader/ansisvg and it has a bunch of test cases so maybe we can find a simple case or a case that works better to understand more what is going on. Generated svg output for test cases can be found at https://github.com/wader/ansisvg/tree/master/ansitosvg/testdata Maybe try https://github.com/wader/ansisvg/blob/master/ansitosvg/testdata/fontname.ansi.svg (uses font "Monaco") and https://github.com/wader/ansisvg/blob/master/ansitosvg/testdata/oneline.ansi.svg Any idea how i could reproduce myself? i'm running macOS and Chrome also so maybe i can add some localization profile etc? |
Hi again, did some tests. Think i can kind of reproduce the rendering by replacing Does monospace work on other websites for you? or just not in svg:s? any local browser settings that might affect this? |
@wader, thank you for reviewing my issue! I discovered that Chrome's default monospace font for Japanese is not actually monospace, which appears to be a bug in Chromium that has persisted for over a decade (see https://bugs.chromium.org/p/chromium/issues/detail?id=75585). As a workaround, I've changed the monospace font setting to a true fixed-width font. However, I'm concerned that other users may also encounter rendering problems like this. This is just an idea, but would it be possible to change the file format to PNG to avoid any potential rendering issues? |
Aha nice find, interesting!
Yeap will have to figure something out
That could be a workaround, the only real reason i use SVG at the moment is because i wanted to see if it could work and a little bit to get nice scaling :) but i probably want to try fix this in ansisvg either way. Know if there any common non-broken monospace font names we could use? maybe can give it priority and fallback to font family monospace etc? |
@wader "Osaka-mono" worked well for me! I also tested "Courier New" and "Monaco" in my environment, and they seem to work. However, please note that these fonts are not specifically designed for Japanese language, so I would not recommend using them. |
Thanks for testing. When i use "monospace" the font "courier" seems to be select in my env ("courier new" is a tiny bit thiner). Does "courier" look ok for you? Thinking if "Courier, monospace" is a good compromise. |
@wader "courier" also worked in my environment: |
Seems there are issues picking a fixed width font using family "monospace" so try use Courier first and then fallback to monospace. wader/fq#655
Seems there are issues picking a fixed width font using family "monospace" so try use Courier first and then fallback to monospace. wader/fq#655
Regenerate with new ansisvg that uses Courier with monospace as fallback Related to #655
btw had a look at other ANSI to SVG tools and use of courier is quite common, so let's try that |
@wader It looks very beautiful! |
demo.svg(https://github.com/wader/fq/blob/master/doc/demo.svg) looks wired in my browser.
I think that the font specified in
demo.svg
(monospace) and the coordinate of SVG text elements don't match in my environment.environment:
The text was updated successfully, but these errors were encountered: