Skip to Content

Can APDFL set text using base 14 fonts without corresponding fonts on the system?

Estimated Reading Time: 1 Minutes

The PDF format includes a set of 14 standard fonts that can be used without prior definition. APDFL can set text using the base 14 fonts, even if the fonts do not exist on the local system.

Don't use PDEFontCreateFromSysFont. Use the PDEFontCreate() API with one of the Base 14 font names, like this:

memset(&pdeFontAttrs, 0, sizeof(PDEFontAttrs));
pdeFontAttrs.name = ASAtomFromString("Courier");
pdeFontAttrs.type = ASAtomFromString("Type1");
curFont = PDEFontCreate(&pdeFontAttrs, sizeof(PDEFontAttrs),
0, 255, 0, 0, ASAtomNull, 0, 0, 0, 0);

The font will be referenced (not embedded), which is an appropriate method for a Base14 font references. Any viewer should be able to display the resulting text, either in the referenced font or in a suitable substitute.

To reference the base-14 fonts, use the following font names:

  • Times-Roman
  • Times-Italic
  • Times-Bold
  • Times-BoldItalic
  • Helvetica
  • Helvetica-Oblique
  • Helvetica-Bold
  • Helvetica-BoldOblique
  • Courier
  • Courier-Oblique
  • Courier-Bold
  • Courier-BoldOblique
  • Symbol
  • ZapfDingbats

Adobe Systems distributes, with the PDF Library and Acrobat, the Courier faces, the Symbol and Dingbat fonts, as well as four Chinese/Japanese/Korean/Vietnamese (CJKV) fonts and CMaps for Asian text documents. The product also includes a Serif and Sans-serif pair of MultiMaster fonts. The software does not include the Times and Helvetica fonts. The font resources for Adobe PDF Library are in the \Resources\Font folder.

Can APDFL set text using base 14 fonts without corresponding fonts on the system?
  • COMMENT