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

Revisiting server-side rendering SVG #966

Open
UlyssesZh opened this issue Nov 23, 2023 · 0 comments
Open

Revisiting server-side rendering SVG #966

UlyssesZh opened this issue Nov 23, 2023 · 0 comments

Comments

@UlyssesZh
Copy link

This was discussed in #742 and #578 (but probably other issues). From the issue comments by @paulrosen, I see the main difficulty is calculating text size without DOM. I can think of several ways:

  • Actually introduce DOM by using jsdom or other similar libraries.
  • Let the user input all necessary font information (font face, size, weight, etc) and use canvas to calculate the font size.
  • Just do not support contents depending on text sizes. Like katex, provide an official CSS file that guarantees to work with the output SVG.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant