Archi Forum

Archi => General Archi Discussion => Topic started by: DuncanWilliam on May 21, 2020, 13:08:16 PM

Title: Export to PDF doesnt keep fonts
Post by: DuncanWilliam on May 21, 2020, 13:08:16 PM
Hi all,

I have developed a view in Archi and changed the default font to CMU Serif, when I try to export it to PDF the PDF is in Arial.

Can this be changed?

Thanks,
Duncan
Title: Re: Export to PDF doesnt keep fonts
Post by: Phil Beauvoir on May 21, 2020, 13:10:17 PM
When you say "and changed the default font to CMU Serif" do you mean in Archi's preferences? What is the font when you select the object in a View?

Also, please:

- version of Archi?
- OS platform?
- steps to reproduce the problem...
Title: Re: Export to PDF doesnt keep fonts
Post by: DuncanWilliam on May 21, 2020, 13:35:36 PM
Hi Phil

Yes the default font in the preferences. In the view it is CMU Serif (default). The PDF is however in Arial.

Archi Version: 4.6.0
OS: Windows 10

Im modeling a business view. First I select the view -> file -> export -> view as image -> select location -> as PDF -> save.
Title: Re: Export to PDF doesnt keep fonts
Post by: Phil Beauvoir on May 21, 2020, 13:38:47 PM
I assume you're exporting the view as an image and selecting the PDF option. Please try:

- setting the default font in preferences back to its default setting
- manually setting an object to CMU serif
- export to image

If no luck try playing with different fonts, it may be that the PDF export library is having a problem with that particular font. ie. is the problem with all fonts, or just one?
Title: Re: Export to PDF doesnt keep fonts
Post by: DuncanWilliam on May 21, 2020, 13:44:25 PM
All of the fonts.

Apologies the pdf is printing out the fonts in the default Segue not Arial.

I restored fonts back to defaults (segue) and chance on item to CMU Serif manually. I then saved and exported to PDF but all fonts are still Segue. I then exported to SVG and I get the output as shown in Archi (one item CMU Serif the rest default).
Title: Re: Export to PDF doesnt keep fonts
Post by: DuncanWilliam on May 21, 2020, 13:46:20 PM
It seems to be that specific font. I changed the default to a random font and it exports to PDF fine.

Is there a way of importing the CMU Serif font into Archi?
Title: Re: Export to PDF doesnt keep fonts
Post by: Phil Beauvoir on May 21, 2020, 14:00:58 PM
I tried with that font and got the same result. It might be that the Java graphics library (batik and fop transcoder) has a bug or issue with that particular font.

> Is there a way of importing the CMU Serif font into Archi?

That wont help. The issue is in the Java graphics libraries.

The only thing you can do is use a different font, or export as SVG.

Edit: I tried with the latest versions of batik and fop transcoder - same thing. Just that font.
Title: Re: Export to PDF doesnt keep fonts
Post by: DuncanWilliam on May 21, 2020, 14:17:41 PM
Not too worry. SVG will work fine.

Thanks for your help.
Title: Re: Export to PDF doesnt keep fonts
Post by: Phil Beauvoir on May 21, 2020, 18:05:54 PM
Duncan - I have found the issue, see here - https://github.com/archimatetool/archi/issues/628

If you uninstall your font, then re-install it by right-clicking on the font file and choosing "Install for all users" it will export in the image. I don't know why this is.
Title: Re: Export to PDF doesnt keep fonts
Post by: DuncanWilliam on May 21, 2020, 20:12:21 PM
Works a treat!

Many thanks for your effort.
Title: Re: Export to PDF doesnt keep fonts
Post by: Phil Beauvoir on May 21, 2020, 20:13:10 PM
The issue is under investigation, but that's the workaround for now.