Page 1 of 1

Styling SVG fonts for a PDF using CSS

Posted: Mon Jul 03, 2023 4:47 pm
by TopSolid
How to define fonts for SVG text tag using chemistry CSS?

Re: Styling SVG fonts for a PDF using CSS

Posted: Tue Jul 04, 2023 11:28 am
by andrei_pomacu
Hi,
In Chemsitry exists a parameter called use.css.for.embedded.svg which on default is set on yes.
In your CSS you just need to match that tag element and use font-family rule to change the font.

Code: Select all

text {
  font-family: Arial, sans-serif;
}
If the font-family rule does not apply directly of the elements that you have targeted using CSS you can visit this topic in order to detect which rule need to override in order to achieve your font changing.
Regards,
Andrei

Re: Styling SVG fonts for a PDF using CSS

Posted: Wed Jul 05, 2023 10:40 am
by TopSolid
Thanks Andrei, it is now working!
Best

Re: Styling SVG fonts for a PDF using CSS

Posted: Wed Sep 20, 2023 9:20 am
by Paco
Hello,

Thanks for the useful information. Changing the font with the font-family rule seems to be a practical solution.