Copy link to clipboard
Copied
Generating a PDF output I get a file where some lines (only a few out of 200 pages) have the wrong font (usually TMS Roman), while the majority has the right font (OpenSans) that I set in css file.
Topics are imported from a Word file and are NOT in a "clean" HTML however the HTML generated output is fine, showing OpenSans font everywhere.
Adobe Support suggested to start from a brand new project, I tried importing only topics and css but the result is the same.
I'm using
RoboHelp version 2020.8.34
OS Windows 10 Enterprise 22H2 OS build 19045.4780
Have a look at the HTML in the topic that has the lines that are displaying the wrong font - is it referencing another CSS? Does it contain in-line styling?
(almost) solved!
I found that I forgot to set fallback fonts in my .css file.
I replaced the occurences of
font-family: 'Open Sans';
with
font-family: 'Open Sans', Arial, Helvetica, sans-serif;
and I obtained a good-looking pdf.
Maybe it is NOT the perfect solution but it is enough for my needs
Copy link to clipboard
Copied
I would clean up the source topics' HTML in RH - that's probably where the generation of the PDF output is going astray.
Copy link to clipboard
Copied
I tried generating a pdf with only two topics that I cleaned getting rid of all <div> </div> and <span> </span> that I got during the import from Word but the result is the same: some lines with the wrong font
Copy link to clipboard
Copied
Now I tried using the default "book" master page and ... it works! Font all OpenSans!
I have to compare with "book" the master page that I'm using (though I'm sure I started from a duplicate of "book")
Copy link to clipboard
Copied
Have a look at the HTML in the topic that has the lines that are displaying the wrong font - is it referencing another CSS? Does it contain in-line styling?
Copy link to clipboard
Copied
Thank you Jeff you addresed me in the right direction (the .css)!
Copy link to clipboard
Copied
(almost) solved!
I found that I forgot to set fallback fonts in my .css file.
I replaced the occurences of
font-family: 'Open Sans';
with
font-family: 'Open Sans', Arial, Helvetica, sans-serif;
and I obtained a good-looking pdf.
Maybe it is NOT the perfect solution but it is enough for my needs