How can i define a font-family fallback on fonts used. It seems I can only select 1 font-family per text

Asked by M-goetzke

When adding text to a svg i can select a font-family for that text. In my case it defaulted to 'sans'. Now that works inside the editor window but in a browser it wont find that font of course.

Now I would like to use a 'web-safe' font with fallbacks for the different operating systems such as font-family:Arial, sans-serif. When I alter the SVG with a text-editor that works but even just opening and doing some things in Inkscape and saving out again can sometimes cause it to get quoted on saving into font-family:'Arial, sans-serif' which breaks the font of course.

Is this possible anywhere ?

The optimum would obviously be to use the fonts when available and fallback to path rendering when not, but i am not sure SVG can even do that.

Regards,
Matthias

Question information

Language:
English Edit question
Status:
Answered
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Hachmann (marenhachmann) said :
#1

Hi Matthias,

if it doesn't matter if the text can be modified or copied in you web graphics, you could just convert everything to paths, this will also generally make the rendering in a web browser faster. You could even leave the original text in and make it transparent or put it on an invisible layer, so it can still be edited later. (The latter is what I would do if this is important).

I also suggest you try out to add the fallback fonts in the XML editor buit in into inkscape, I honestly don't know what will happen, but at least you could give it a try.

Can you help with this problem?

Provide an answer of your own, or ask M-goetzke for more information if necessary.

To post a message you must log in.