PDF build not finding fonts on server

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
nickey427
Propeller Head
Posts: 11
Joined: Sat Mar 01, 2014 2:20 pm

PDF build not finding fonts on server

Post by nickey427 »

Here's an interesting one: my work machine can find the fonts described below when building a PDF or CHM. Our automated doc build server has the identical fonts (copied from my machine), but cannot find them when building a PDF. However, it can find the fonts when building a CHM.

I have gone thru this with MadCap Support, who found nothing wrong with the build server. Support provided a workaround to embed the fonts into the Flare project, which I have adapted as shown below.

styles.css:

@import url('FuturaStd-Medium.css');
@import url('MyriadPro-Light.css');
@import url('SourceCodePro-Regular.css');

FuturaStd-Medium.css:

@font-face {
font-family: 'FuturaStd';
src: url('fonts/FuturaStd-Medium.otf') format('opentype');
font-weight: normal;
font-style: normal;

}

MyriadPro-Light.css:

@font-face {
font-family: 'MyriadPro';
src: url('fonts/MyriadPro-Light.otf') format('opentype');
font-weight: normal;
font-style: normal;

}

SourceCodePro-Regular.css:

@font-face {
font-family: 'Source Code Pro';
src: url('fonts/SourceCodePro-Regular.otf') format('opentype');
font-weight: normal;
font-style: normal;

}

I can't use a different font type because of licensing restrictions. Does anyone see anything wrong with the CSS samples shown above? Could this be the same .net problem from 4 years ago, i.e., wrong version on build server?

We use Perforce. The doc build is kicked off whenever files are checked in.
NorthEast
Master Propellus Maximus
Posts: 6363
Joined: Mon Mar 05, 2007 8:33 am

Re: PDF build not finding fonts on server

Post by NorthEast »

Did MadCap support say that font-face would work with PDFs?

I've never got font-face working for PDF outputs, so I'd assumed it doesn't work.
So when I build PDFs, I install the font in Windows.

I can only get font-face working for HTML5 help, WebHelp, and CHM [my mistake - CHM doesn't support font-face]
nickey427
Propeller Head
Posts: 11
Joined: Sat Mar 01, 2014 2:20 pm

Re: PDF build not finding fonts on server

Post by nickey427 »

@font-face {
font-family: 'Roboto';
src: url('fonts/Roboto-BoldItalic-webfont.eot');
src: url('fonts/Roboto-BoldItalic-webfont.eot?#iefix') format('embedded-opentype'),
url('fonts/Roboto-BoldItalic-webfont.woff') format('woff'),
url('fonts/Roboto-BoldItalic-webfont.ttf') format('truetype'),
url('fonts/Roboto-BoldItalic-webfont.svg#robotobold_italic') format('svg');
font-weight: 700;
font-style: italic;

}

is what I got from Support, and it does work. I'll post the solution when I talk with them again/sort it out some other way. I suspect it may be my specification of 'opentype'.

Not sure what you mean by "install the font". ?
NorthEast
Master Propellus Maximus
Posts: 6363
Joined: Mon Mar 05, 2007 8:33 am

Re: PDF build not finding fonts on server

Post by NorthEast »

Yep, the above example is the standard way to use font-face for the web; it works for me in help, just not PDFs.
nickey427 wrote:Not sure what you mean by "install the font". ?
I mean that font has been installed in Windows; e.g. the font is available in Windows applications like Flare and Word.
So if the font isn't installed, and is only referenced using font-face, it won't be available in the Flare interface.

I couldn't get font-face to work for PDFs; I can only get fonts that are installed in Windows to work with PDFs.
nickey427
Propeller Head
Posts: 11
Joined: Sat Mar 01, 2014 2:20 pm

Re: PDF build not finding fonts on server

Post by nickey427 »

Hmm, this should be interesting, then.
I think I mangled Support's sample. I'm trying:

@font-face {
font-family: 'Myriad Pro Light';
src: url('fonts/MyriadPro-Light.otf');
src: url('fonts/MyriadPro-Light.otf') format('opentype');
font-weight: 600;
font-style: normal;

}

but it will take over 30 minutes to get it built on the server. (We create the entire doc set at one go, and that's going to be the way it stays for a while.)
nickey427
Propeller Head
Posts: 11
Joined: Sat Mar 01, 2014 2:20 pm

Re: PDF build not finding fonts on server

Post by nickey427 »

Support has confirmed that this is a bug (#90407) in madbuild.exe. The fonts are embedded correctly on a Windows 8 machine, but not on our Windows 7 machines.
BPell
Propeller Head
Posts: 11
Joined: Tue Sep 11, 2018 12:31 pm

Re: PDF build not finding fonts on server

Post by BPell »

Dave Lee wrote:Did MadCap support say that font-face would work with PDFs?

I've never got font-face working for PDF outputs, so I'd assumed it doesn't work.
So when I build PDFs, I install the font in Windows.

I can only get font-face working for HTML5 help, WebHelp, and CHM.
I was successful in using @font-face to embed my custom font for HTML5 output, but it didn't work for the CHM output. Any advice?
NorthEast
Master Propellus Maximus
Posts: 6363
Joined: Mon Mar 05, 2007 8:33 am

Re: PDF build not finding fonts on server

Post by NorthEast »

BPell wrote:I was successful in using @font-face to embed my custom font for HTML5 output, but it didn't work for the CHM output. Any advice?
CHMs render content in IE7 compatible mode, so they don't support most newer features in CSS3 - like font-face.
BPell
Propeller Head
Posts: 11
Joined: Tue Sep 11, 2018 12:31 pm

Re: PDF build not finding fonts on server

Post by BPell »

Thanks for the response, Dave.

I'm still in beginner mode with Flare, so I appreciate your patience. You'd indicated in a previous post that you'd gotten font-face to work with CHM, so I'm confused. Is there no way to get my custom font to appear in my CHM output?
NorthEast
Master Propellus Maximus
Posts: 6363
Joined: Mon Mar 05, 2007 8:33 am

Re: PDF build not finding fonts on server

Post by NorthEast »

BPell wrote:Thanks for the response, Dave.

I'm still in beginner mode with Flare, so I appreciate your patience. You'd indicated in a previous post that you'd gotten font-face to work with CHM, so I'm confused. Is there no way to get my custom font to appear in my CHM output?
Sorry, font-face doesn't work in my CHMs.

It was 4 years ago, but I'm guessing the CHMs might have appeared to work due to having fonts installed in Windows.
BPell
Propeller Head
Posts: 11
Joined: Tue Sep 11, 2018 12:31 pm

Re: PDF build not finding fonts on server

Post by BPell »

Thanks again, Dave. At least I've figured out how to default to a 2nd choice of font if the custom font isn't found, so no more Times New Roman!
Post Reply