-
Notifications
You must be signed in to change notification settings - Fork 29
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
Text does not fit in nodes #18
Comments
Hi @fkohrt , Thanks for reporting! I have taken a look and it seems to be an issue on mermaid.js side, see similar issues:
There is a work-around by setting an extra CSS, please see here. For example, add following code into {
"themeCSS": ".label foreignObject { font-size: 90% }"
} |
Hi @jihchi, thanks for following up and the quick fix! Closing this as it's an issue with upstream. |
davejm
added a commit
to davejm/mermaid.ink
that referenced
this issue
Apr 21, 2024
…e other things including text overflow bug. New additions: - Allow setting image size with width, height and scale URL parameters. If width and height are unset, the behaviour is as before to keep backwards compatibility. (fixes jihchi#131, jihchi#85) - Allow setting maximum allowed image width and height via ENV var - Allow setting custom font-awesome CSS URL for SVG via ENV var - Add support for PDF output with options for setting paper size format, fitting PDF size to image, setting landscape (fixes jihchi#303) - Allow setting "site-wide" diagram theme using theme URL parameter (fixes jihchi#231) - Add examples of new features to index.html page Fixes/improvements: - Fix google chrome executable path for Puppeteer by making absolute - Fix typo in .dockerignore that was causing docker image build issues - Fix corepack pnpm not being present for node user in docker image - Add some extra error handling in getOptionsFromCode for state deserialization - Fix to make sure "mermaid" key from deserialized state is parsed as JSON - Remove unnecessary font-awesome v4-shims CSS from mermaid.html (all.min.css should be enough) - Fix text overflow caused by font-awesome font loading by waiting for page fonts to load (fixes jihchi#18) - Use the same version of CDN-hosted font-awesome CSS in SVG as vendored font-awesome by default - When outputting SVG, clone the SVG element before injecting CDN-hosted font-awesome CSS to prevent unnecessary load on server-side - Use XMLSerializer instead of manual tag fixing to ensure SVG is properly converted to XML when outputting SVG - Use sharp image processor and pdf-lib packages in tests to validate format, size etc.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sometimes nodes are too small to fit the text inside them. Strangely, this is only an issue for
mermaid.ink
, but not for "Download SVG" at the Mermaid Live Editor.Take, for example, the following code:
The last text part of each node is cut off:
Links with this example:
mermaid.ink
The text was updated successfully, but these errors were encountered: