Hi, I would like to ask for your advice on whether it is possible to use Google fonts or fonts other than those currently available in the text editor in automation when creating a PDF document?
Thank you. ![]()
Hi, I would like to ask for your advice on whether it is possible to use Google fonts or fonts other than those currently available in the text editor in automation when creating a PDF document?
Thank you. ![]()
You should be able to import a Google font and apply it in a code block before the PDF. Then call the code block at the very top of the PDF while in html view.
<style>
@import url('https://fonts.googleapis.com/css2?family=Sekuya&display=swap');
</style>
.sekuya-regular {
font-family: "Sekuya", system-ui;
font-weight: 400;
font-style: normal;
}
Be warned - the TinyMCE editor adds lots of artifacts when toggling between the editor and code view. Itβs a known bug.
If I remember correctly, we ended up writing the entire PDF in a code block and then calling it in the PDF itself.
I got you when Iβm on a computer. Give me a few hours
Thank you. I figured it out. Performed the calculation
`<style>
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap');
body, html, p, h1, h2, h3, h4, h5, h6, div, span, table, td, th, li, strong, em {
font-family: "Source Sans 3", system-ui, sans-serif !important;
}
</style>`
I called it PDFFont and added the @PDFFont variable to the PDF generator right at the beginning and it works!