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

Inline SVGs text font-family is removed when rendering. #10537

Open
4 of 7 tasks
MrCroxx opened this issue Sep 30, 2024 · 2 comments
Open
4 of 7 tasks

Inline SVGs text font-family is removed when rendering. #10537

MrCroxx opened this issue Sep 30, 2024 · 2 comments
Labels
bug An error in the Docusaurus core causing instability or issues with its execution external This issue is caused by an external dependency and not Docusaurus.

Comments

@MrCroxx
Copy link

MrCroxx commented Sep 30, 2024

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

I'm using inline SVGs to render a SVG with customized font-family. But the font-family is not right when rendering. I checked the rendered inline SVG and the original one, found the font-family is removed.

image image

Reproducible demo

No response

Steps to reproduce

  1. Customize font-family in a SVG.
  2. Render it via inline SVG.
  3. tada

Expected behavior

The font-family property should be reserved.

Actual behavior

The font-family property is removed.

Your environment

  • Public source code:
  • Public site URL:
  • Docusaurus version used:
  • Environment name and version (e.g. Chrome 89, Node.js 16.4):
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS):

Self-service

  • I'd be willing to fix this bug myself.
@MrCroxx MrCroxx added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Sep 30, 2024
@MrCroxx
Copy link
Author

MrCroxx commented Sep 30, 2024

Checked with SVGR playground, the """ is treated as normal text and cause the bug.

@MrCroxx
Copy link
Author

MrCroxx commented Sep 30, 2024

FYI gregberge/svgr#963

@slorber slorber added external This issue is caused by an external dependency and not Docusaurus. and removed status: needs triage This issue has not been triaged by maintainers labels Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution external This issue is caused by an external dependency and not Docusaurus.
Projects
None yet
Development

No branches or pull requests

2 participants