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
Left edge of viewBox is always 0 with --exact-bbox #248
Comments
Using concepts used in https://simoncozens.github.io/fonts-and-layout/concepts.html#advance-widths, it seems the outline bounding box for \documentclass{article}
\pagestyle{empty}
\begin{document}
\fboxsep=0pt
\fbox{C}
\fbox{\textit{C}}
\fbox{$C$}
\end{document} |
Yes, that's exactly the issue here. The character offset is not taken into account when computing the bounding box. I've fixed it and will commit the patch after some more testing. |
Indeed! You would use other options (for example |
Then my previous understanding of Update: Sorry I was wrong to think this issue is about |
Yes, they are usually enclosed in the box when calling dvisvgm without |
Wow, that was fast! Looks great, thank you. |
There is apparently a mistake in calculating the minimum x coordinate of the bounding box (for DVI input). In the MWE below, the SVG viewBox is too wide, and has min-X equal to 0; however the content's left edge is about 0.5 units to the right. (The other three edges are correct.)
Here is a Bash script to reproduce the issue (tested on Debian and on Windows in MINGW64-variant MSYS bash, with dvisvgm built from
master
today).The output from the script:
Attached are the output SVG (it's very small!) and a cropped screenshot from Inkscape showing the bounding box and content.
The text was updated successfully, but these errors were encountered: