This is an archived forum post. The information may be outdated. Contact us if you have any questions.

Limitation on font types

grupster wrote on 2012-02-10:
Hello, is there a limitation regarding the font types we can use? I have been testing with custom (not web safe) fonts and using @font-face worked. However, today I used new fonts and the PDF is blank.
support wrote on 2012-02-10:
Hello, the service supports WOFF and TTF custom fonts. Please post a code example that does not work for you and we will look into it.
grupster wrote on 2012-02-10:
Attached is the sample code. I am actually using OTF font files and it also works. I tried TTF and it did not solve the problem. Notice how I used "caligula" for one of the lables and then the gotham fonts for other labels. The caligula font is rendered correctly on the PDF, the others are not.

I have one only clue: caligula is an royalty free font whereas gotham isn't. Maybe your API is checking for that?

support wrote on 2012-02-10:
Support for the OTF font format is limited. Some OTF font files may work while others may not. Is it an option for you to use TTF instead of OTF?

Another reason for using TTF is that the API embeds only TTF subsets into generated PDFs which leads to smaller PDF files.
grupster wrote on 2012-02-10:
Here's the same code with TTF fonts. Still the PDF does not render the labels with these fonts :(
support wrote on 2012-02-12:
The information about supported font formats provided in the previous post was not accurate. Here is a list of font formats the service supports:

  1. TrueType
  2. OpenType with TrueType outlines
  3. WOFF wrapper

OpenType may also contain a glyph outline format called PostScript outlines. Support for this OpenType flavor is limited.

Regarding the Gotham fonts you use, it seems there is some problem with these particular font files. I'm not able to say if the font files are broken or if there is a bug in our service. I tried ttfdump and it reports the following error for Gotham-Bold.ttf:
Error: Table "T000a" not referenced. Data Misalignment?

Also, text written using the font does not show up when I load your test page in an older Chrome Version (12.0.742.77, Linux).

So if it is possible, please try to use another typeface instead of Gotham.
grupster wrote on 2012-02-15:
EDIT: Never mind this test, the fonts are not rendered in this example, it is using GIFs. Will try to find another website that uses that font and renders as HTML.

I used your tool to convert this page to pdf

Please test yourself. This site uses the Gotham fonts and the conversion to PDF is perfect. I guess my TTF files are corrupt? I did "hack" them from a site since I am only doing testing for now. I will buy the fonts for the production environment but I have a question:
Is it possible that the fonts need to be "installed" in the web server for the conversion to work?

support wrote on 2012-02-16:
It does not make any difference whether the fonts are installed on our server or if they are downloaded through the @font-face declaration. The behavior should be the same in both cases.