If your SVG contains text elements, the font may change on publish due to missing font styles or browser rendering differences. This happens because SVG files can include live text which relies on external fonts to display as intended.
1. Understand How SVG Handles Fonts
- SVGs can embed either live text (preserved as selectable/editable text) or flattened text (converted to paths).
- When live text is used, the SVG relies on the user's system or web fonts to render the text.
- Webflow doesn’t automatically include your design tool’s custom fonts inside an SVG unless the text is outlined.
2. Check If Your SVG Uses Live Text
- Open the SVG file in a code editor or vector editor.
- If you see raw text (e.g.,
<text>
elements), it's likely using live text. - If text appears as
<path>
elements only, the text has been converted to outlines, and font changes should not occur.
3. Convert Text to Outlines Before Importing
- In your design tool (e.g., Figma, Illustrator, Sketch), convert text to outlines/paths before exporting your SVG.
- In Illustrator: Select the text → Right-click → Create Outlines.
- This ensures the text becomes part of the image as vector shapes, preserving appearance on all browsers and devices.
4. Avoid Relying on Web Fonts in SVGs
- SVGs do not automatically pull in your project’s Webflow fonts unless you're embedding the font via
@font-face
in the SVG itself. - To avoid font mismatch:
- Either outline the text (see above) or
- Host and embed the font manually in the SVG using
@font-face
, but this is complex and less reliable.
5. Re-upload the Corrected SVG
- After converting text to outlines, export and re-upload the new SVG into Webflow.
- Publish again to ensure it renders consistently across all browsers.
Summary
If your SVG’s font changes upon publishing, it's likely because it includes live text relying on unavailable fonts. Convert all text to outlines in your design software before exporting the SVG, then re-upload it in Webflow to maintain visual consistency.