Jump to content
You must now use your email address to sign in [click for more info] ×

How to embed fonts in SVG Affinity Designer


Recommended Posts

I think you would need to do that manually, @All Media Lab, by:

  1. Finding or creating a web font version of the font.
  2. Hosting that font on a server.
  3. Generating a URL/URI for the server-hosted font.
  4. Editing the text of the SVG to refer to that URL/URI.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

7 minutes ago, All Media Lab said:

I need to use the SVG for a animation application and normally you can convert text "Write text as paths" in for example Keyshape (an other SVG animation editor). Is this possible in Designer? This means that the font are sort of "embed" then!

You can convert the text to curves which will preserve their appearance. Check the 'Export text as curves for font independence' check box in the export dialog.

1214647513_ScreenShot2021-10-27at10_14_15AM.thumb.png.1edfc781f381ec64eb6255a7059d08f5.png

Unfortunately actual SVG font embedding isn't supported.

Link to comment
Share on other sites

You can also do it in the Designer Document. Layer > Convert to Curves

I would think long and hard about doing this though, If it is a lot of text you'll have to retype everything if there is a simple one letter typo. 

@Bryan Rieger has the better idea, just do it on export.

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

  • 10 months later...

Although it's a pity AD does not support font subsetting for SVG, there is still a solution: Sometimes (e.g. when translating screens) screen text should not be outlined but exported as text in the SVG. AD transfers all settings (size, position, colour) into the SVG, but misses the font-family and font weight. Since SVGs are simply XML, i.e. text files, you can open them with a text editor and edit them. With an editor such as BBEdit, you can even do some grep on a batch of SVGs and fix typos en passant.

Link to comment
Share on other sites

4 hours ago, tboettiger said:

Although it's a pity AD does not support font subsetting for SVG,

Usually, fonts aren't embedded into an svg so I don't understand the concept of subsetting

A web page can contain a <style> statement like
body{font-family: Arial, Helvetica, sans-serif;}

or you can add your own font like
@font-face{font-family:'mine'; src:url('mine.woff2') format('woff2');}
In this case you can generate the font so that it only contains the subset, obviously mindful of copyright

Svg's can contain <style> definitions

If you really must embed fonts into an svg then
https://observablehq.com/@mootari/embedding-fonts-into-an-svg
is worth a look
The snag with this approach is that the font is only available to the svg and the file size goes ballistic, better to use the @font-face approach

None of this is doable with Affinity programs

Microsoft Windows 11 Home, Intel i7-1360P 2.20 GHz, 32 GB RAM, 1TB SSD, Intel Iris Xe
Affinity Photo - 24/05/20, Affinity Publisher - 06/12/20, KTM Superduke - 27/09/10

Link to comment
Share on other sites

  • 3 weeks later...

I second any request for adding font embedding in SVG files. Without this, exporting images to PDF remains the safest choice. This would also mean that they will be likely converted to PNG when preparing a project for the web, instead of remaining vector images in the SVG format.

Paolo

 

Link to comment
Share on other sites

On 9/14/2022 at 11:25 PM, David in Яuislip said:

The snag with this approach is that the font is only available to the svg and the file size goes ballistic, better to use the @font-face approach

Embedding a font entirely into a SVG file (via base64 encoding inclusion) is also a @font-face definition & usage approach! - See related ...

 

 

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

1 hour ago, v_kyr said:

Embedding a font entirely into a SVG file (via base64 encoding inclusion) is also a @font-face definition & usage approach!

Quite right, probably lack of alcohol

Microsoft Windows 11 Home, Intel i7-1360P 2.20 GHz, 32 GB RAM, 1TB SSD, Intel Iris Xe
Affinity Photo - 24/05/20, Affinity Publisher - 06/12/20, KTM Superduke - 27/09/10

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.