Arial Fonts in PDF files

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Arial Fonts in PDF files

Postby JudgeTerry » Fri Sep 05, 2014 6:37 pm

Is there a work around for the problem with Adobe PDF readers no longer supporting the Arial Narrow Font? I have tried:

VpeSetEmbedAllFonts(hDoc,TRUE)
VpeSetSubsetAllFonts(hDoc,TRUE)

and also tried:

VpeSetFontControl(hDoc, "Arial", "Helvetica", FALSE, FALSE)

Neither one of the above results in a satisfactory 'PDF' print. Currently I am having my customers print the documents and then scan them into a .PDF raster document. This is not being well accepted by my customers.

Any ideas would be welcome..
Terry
JudgeTerry
 
Posts: 30
Joined: Thu Jan 22, 2009 10:56 pm

Re: Arial Fonts in PDF files

Postby JudgeTerry » Fri Sep 05, 2014 9:36 pm

I found a work around using the Roboto fonts from Google:

VpeSetFontControl(hDoc, "Arial Narrow", "Roboto Condensed", VPETRUE, VPETRUE)
VpeSetFontControl(hDoc, "Arial Narrow Bold", "Roboto Condensed Bold", VPETRUE, VPETRUE)
VpeSetFontControl(hDoc, "Arial Narrow Bold Italic", "Roboto Condensed Bold Italic", VPETRUE, VPETRUE)
VpeSetFontControl(hDoc, "Arial Black Italic", "Roboto Italic", VPETRUE, VPETRUE)
VpeSetFontControl(hDoc, "Arial", "Roboto Regular", VPETRUE, VPETRUE)

I was not successful using Helvetica fonts as substitutes, and any of the Arial fonts seem to cause problems in PDF files since a recent update of Acrobat.

Terry
JudgeTerry
 
Posts: 30
Joined: Thu Jan 22, 2009 10:56 pm

Re: Arial Fonts in PDF files

Postby IDEAL Software Support » Mon Sep 08, 2014 12:45 pm

This has nothing to do with newer versions of Acrobat Reader. It is a bug in VPE v7.0, which was brought to our attention last Friday.

We fixed the problem over the weekend and will release the update within the next days.

Here is the changelog:
  • Fixed problem, which could cause wrong text rendering with some fonts, e.g. "Arial Black" or "Arial Narrow". To support export conforming to PDF/A, our internal true-type font processor had been changed to use the CMAP format 0 table always. But this table can contain erroneous information, so that the character widths are computed wrongly. As a result, the text layout was wrong.
  • Fixed a bug, which could cause exported PDF/A not to be validated by the Adobe Preflight tool as valid PDF/A.
  • Added support for Delphi RAD Studio XE 7.
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Re: Arial Fonts in PDF files

Postby IDEAL Software Support » Mon Sep 08, 2014 12:53 pm

VpeSetFontControl(hDoc, "Arial", "Helvetica", FALSE, FALSE) does work.

Short explanation for other readers: It instructs VPE to substitute the font "Arial" with the font "Helvetica" when exporting a VPE document to PDF. The PDF file format specifies 14 built-in PostScript fonts, which are guaranteed to be provided by PDF Readers on any platform (i.e. Mac OS X, Windows, Linux, Android, iOS, etc.). Helvetica is compatible with Arial, so that a generated PDF file can be smaller, because there is no requirement to embed the Arial font into the PDF file. The same applies to "Times New Roman", which can be substituted with the "Times" PostScript font.
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Re: Arial Fonts in PDF files

Postby JudgeTerry » Mon Sep 08, 2014 2:13 pm

The following 14 fonts are included per the PDF specification:

Times
Times italic
Times bold
Times bold italic
Courier
Courier oblique
Courier bold
Courier bold oblique
Helvetica
Helvetica oblique
Helvetica bold
Helvetica bold oblique
Symbol
Zapf Dingbats

Therefore if using the 'Arial Narrow' font would it be a good idea to imbed the font?
JudgeTerry
 
Posts: 30
Joined: Thu Jan 22, 2009 10:56 pm

Re: Arial Fonts in PDF files

Postby JudgeTerry » Mon Sep 08, 2014 2:23 pm

Will the update also fix the spacing problem on 'Old English' Fonts in the PDF files?
JudgeTerry
 
Posts: 30
Joined: Thu Jan 22, 2009 10:56 pm

Re: Arial Fonts in PDF files

Postby IDEAL Software Support » Mon Sep 08, 2014 4:29 pm

If this problem did occur in v7.0 only, it is very likely that the update will fix the problem.

Otherwise we are not aware of any problems with "Old English" fonts. Please note: if you have problems with fonts, which are created by non-professional font designers, it is often the case that such fonts contain bad data structures. If you are sure your font is a professional font, please create a support case by contacting our support e-mail address and describe the problem as detailed as possible. If the font is not copyrighted, please attach it to your e-mail.
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Re: Arial Fonts in PDF files

Postby IDEAL Software Support » Mon Sep 08, 2014 4:35 pm

Therefore if using the 'Arial Narrow' font would it be a good idea to imbed the font?


There is no compatible built-in PostScript font for 'Arial Narrow'. The 'Arial Narrow' font has completely different metrics. You should therefore embed the font into the PDF file - except you are 100% sure that all receivers of the PDF file have this font installed. But Microsoft (and other font designers), change their fonts from time to time, so embedding (and subsetting, for smaller PDF files) is always a good idea. This is also the reason, why the PDF/A format (for digital preservation) requires that all used fonts are embedded, so the document can be fully reproduced at any time on any machine.
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Re: Arial Fonts in PDF files

Postby JudgeTerry » Mon Sep 08, 2014 7:34 pm

I will wait for the update and let you know if the 'Old English' problem is fixed. Also I plan to embed and subset all used fonts.

Question: If you set a font as embedded and subset -- and then do not use the font in a document, will it cause any problems and/or significant size increase to the PDF file?

Thanks for your support,
Terry
JudgeTerry
 
Posts: 30
Joined: Thu Jan 22, 2009 10:56 pm

Re: Arial Fonts in PDF files

Postby IDEAL Software Support » Tue Sep 09, 2014 9:17 am

If a font is not used, it is not embedded into PDF, even if you explicitly use VpeSetFontControl().
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: Bing [Bot] and 12 guests

cron