ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  include fonts in pdf
Posted by Gerard Troost on Jan-13-2021 19:10
Attachments:
I am trying to make pdf from some of my charts but it seems that the ttf fonts are not used. The SVG (and .png) are looking good but the PDF falls back on the default (and also non italic) font. Is this a know issue and if so, is there a fix / work around for this?
Knipsel.JPG

  Re: include fonts in pdf
Posted by Peter Kwan on Jan-13-2021 22:06
Hi Gerard,

ChartDirector PDF will embed TTF fonts, but non-TTF font are not embedded. In particular, it does not embed Type 1 fonts (or CFF fonts). If your font is an OTF font, it may be a TTF or a CFF font.

Would you mind to provide the following information for us to try to reproduce the issue?

- The font you are using.
- The programming langauge and application framework (eg. C++/MFC, VB/Windows Forms, Java/JSP, PHP, etc).
- The operating system you are using.

Regards
Peter Kwan

  Re: include fonts in pdf
Posted by Peter Kwan on Jan-13-2021 22:14
Hi Gerard,

Another possibility is that the copyright of the font does not permit embedding.

Each TTF font has a flag that indicates if embedding is allowed. ChartDirector will not embed a TTF font if it sets the flag that disallow embedding. If I can obtain the font, I can try it too see if it can be embedded.

Regards
Peter Kwan

  Re: include fonts in pdf
Posted by Gerard Troost on Jan-13-2021 22:24
Thanks for you very quick reply! I will ask the designer, he should have permission for this.

  Re: include fonts in pdf
Posted by Gerard Troost on Jan-13-2021 23:56
I looked in the details of the font but i should be available to include. It's this font: https://fontsgeek.com/fonts/myriad-pro-italic

I am using PHP7.4 with a chartdirector version from 5 months ago.

  Re: include fonts in pdf
Posted by Gerard Troost on Jan-14-2021 00:21
oh and i use Ubuntu 20.04.1 LTS

  Re: include fonts in pdf
Posted by Peter Kwan on Jan-14-2021 15:44
Attachments:
Hi Gerard Troost,

The font you mentioned is not a true type font.

If you double click on the font on Windows, you can see the font details. A true type font will be displayed as having "True Type Outlines", while CFF font will be displayed as having "Postscript Outlines". I have attached two screenshots for your reference.

(The file extension is not a reliable means to determine the font type. We need to use a font viewer to determine the actual font type.)

For your case, is it possible to use an alternative TTF font?

Regards
Peter Kwan
fontttf.png
fontcff.png

  Re: include fonts in pdf
Posted by Gerard Troost on Jan-14-2021 21:48
Attachments:
Perfect this helps! I now used PT_Sans and it indeed seems okay now.

Thanks a lot for you very clear and fast help!
Knipsel.JPG