PDF build not finding fonts on server
PDF build not finding fonts on server
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.
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.
Re: PDF build not finding fonts on server
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]
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]
Re: PDF build not finding fonts on server
@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". ?
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". ?
Re: PDF build not finding fonts on server
Yep, the above example is the standard way to use font-face for the web; it works for me in help, just not PDFs.
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.
I mean that font has been installed in Windows; e.g. the font is available in Windows applications like Flare and Word.nickey427 wrote:Not sure what you mean by "install the font". ?
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.
Re: PDF build not finding fonts on server
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.)
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.)
Re: PDF build not finding fonts on server
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.
Re: PDF build not finding fonts on server
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?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.
Re: PDF build not finding fonts on server
CHMs render content in IE7 compatible mode, so they don't support most newer features in CSS3 - like font-face.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?
Re: PDF build not finding fonts on server
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?
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?
Re: PDF build not finding fonts on server
Sorry, font-face doesn't work in my CHMs.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?
It was 4 years ago, but I'm guessing the CHMs might have appeared to work due to having fonts installed in Windows.
Re: PDF build not finding fonts on server
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!