SVG images used to publish with a specific font and now a different font is used in PDF Generator output. For example, text in my .svg files used to be published using Arial and now it's published using Times New Roman.
Portions of this procedure can be completed only by users assigned the Administrator role in Heretto CCMS.
Might be caused by an upgrade of the Prince XML version used by PDF Generator.
- Learn which fonts are pre-installed.
Commonly used fonts that are pre-installed include:
-
Arial.ttf
-
NotoSans.ttf
-
NotoSerif.tff
-
Tahoma.tff
-
Verdana.tff
For the full list, contact your Customer Success Manager (CSM).
- Use this example to prepare the CSS code that you need for importing your font.
@font-face {
font-family: "Arial";
font-style: normal;
src: url(/usr/share/fonts/Arial.ttf) format("truetype");
}
Important: Do not use either quotation mark or apostrophe characters in the url() CSS function.
- Replace Arial with the name of your font.
- Replace woff2 with the appropriate font format.
For ttf fonts, use format("truetype"). For otf fonts, use format("opentype"). For woff fonts, use woff. For woff2 fonts, use woff2.
- (Administrators only) Go to your PDF Generator scenario and open the CSS tab. Paste the code that you prepared under
@import rules but above your proper CSS code.
/* These are the base styles provided by Heretto and are subject to change as we make improvements. If you don't want these changes you can remove this link to start from scratch. Cheers!*/
@import url("https://jorsek.github.io/pdfgen.github.io/styles1.1/gray_pdf.css");
@font-face {
font-family: "Arial";
font-style: normal;
src: url(/usr/share/fonts/Arial.ttf) format("truetype");
}
/* My styling edits start here */
h1.title {
- Apply the new font to the elements that you want to modify.
Be sure to use the right CSS selectors to select the elements properly.
h1.title {
font-family: "Arial", normal;
}