Referencing Specific TrueType Fonts for Aspose Diagram


#1

Hello,


We are using Aspose Diagram on Red Hat Linux, which does not have true type fonts installed. We would like to reference a specific folder as per the documentation for Aspose Words, which includes the fonts that we require.

What methods, do we use to point Aspose Diagram to a folder containing the fonts to be used in conversion?

We have attempted: FontSettings.setFontsFolders(new String[] {"/fonts/", “/data/fonts/”}, true); but receive errors on compile.

Please advise.

Thanks,
Artur

#2

+1


I have seen answers in other posts which suggest installing the mscore fonts on Ubuntu however that is not an option for us.

We do not have system admin access to install fonts but are able to copy and make them available from a directory.

Is there any method to reference a folder so that Aspose can use the contained fonts during its image and pdf conversion processes?

Thanks,
Andrew

#3

Hi, Artur & Andrew


Thank you for contacting support. We’re working over your query and will get back to you soon.


#4

Hi, Artur & Andrew


Thank you for being patient. We’re sorry to share with you that there is no way to include the available fonts from a directory. We have logged a feature request to add its support under ticket id DIAGRAMJAVA-50151 in our issue tracking system. Your post has also been linked to these. We’ll let you once a significant progress has been made in this regard. We’re sorry for the inconvenience caused.


#5

Hi, Artur & Andrew


Thank you for being patient. We have a good news for you that the issue id DIAGRAMJAVA-50151 has now been resolved. If there is no issue in the QA phase, then this fix will be included in the next version of Aspose.Diagram for Java 5.2.0. We’ll inform you via this forum thread as soon as the new release is published.


#6

Hello, Thank you for the update. This is good news indeed.


Please do let us know as soon as you are ready for release. We are also happy to support with the testing.

#7

Hi Andrew,


Sure, we will keep you informed of any progress and let you know in this forum thread.


#8

Hello, what is the update on this?


#9

Hi Andrew,


Thank you for the inquiry. It’s release date is not final yet. However, we’ve asked our product team to let us know about the expected release date. We’ll also let you know immediately once a response is available from them.


#10

Hi Andrew,


Thank you for being patient. Our product team is working to finalize this release. It is expected in the next one or two weeks.


#11

The issues you have found earlier (filed as DIAGRAMJAVA-50151) have been fixed in Aspose.Diagram for Java 5.2.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

#12

Thank you. Can you please update either here or your documentation on the instructions of how to use the new font location api?


Currently we can only see documentation for Visual Basic & C#.

Thanks,
Andrew

#13

Hi Andrew,


Thank you for the inquiry. Please refer to the following help topic: How to Specify TrueType Fonts Location


#14

Dear Aspose,


Thank you very much for you update.
We already tried provided functionality and it’s now working for us as expected.
We faced two problems:
  1. When using setFontDirs(), Diagram takes only first font on provided directory, and uses it over whole diagram. It happens even if we have different fonts on Visio file, and all of them are stored on directory that is provided to setFontDirs() method;
  2. We have different results on PNG and PDF. Please see attached files and look at the fonts. Without using setFontDirs() results is the same, otherwise we have different fonts on PNG and PDF.
Can you plase help us with that?

#15

Hi Andrew,


Thank you for pointing to this issue. Please attach your source Visio diagram in this forum thread for testing purposes. We’ll investigate and answer you accordingly.


#16

Regarding to my previous post, please also find attached a VDX file we use.


Also, here’s our code for generating PNG and PDF:

// PNG file
Diagram diagram = new Diagram(fileloc.toString());
String[] fontDirs = new String[] { fontsPath };
diagram.setFontDirs(fontDirs);
ImageSaveOptions options = new ImageSaveOptions(SaveFileFormat.PNG);
options.setResolution(400);
diagram.save(fname+ “.png”, options);

// PDF file
Diagram diagram = new Diagram(fileloc.toString());
String[] fontDirs = new String[] { fontsPath };
diagram.setFontDirs(fontDirs);
diagram.save(fname+ “.pdf”, SaveFileFormat.PDF);

#17

Hi Andrew,


Thank you for providing the source Visio diagram. It looks different than the output PDF and PNG files. We require a few more clarifications from you. Did you check on the Windows operating system? Or just facing this issue on the Linux Server? Please zip your fonts folder and attach in this forum thread. Please also provide us your Linux environment details, i.e. Linux Operating System (version), IDE (Eclipse, Netbeans etc.), Application type and JDK version.

We’re looking forward to help you.


#18

Dear Aspose,


  • Please find fonts folder attached;
  • We use Red Hat Enterprise Linux Server release 6.6 (Santiago);
  • java version "1.7.0_79"
  • OpenJDK Runtime Environment (rhel-2.5.5.1.el6_6-i386 u79-b14)
  • OpenJDK Server VM (build 24.79-b02, mixed mode)

#19

Hi Andrew,


Thank you for supplying fonts and the environment details. We have logged two investigations as follows:

DIAGRAMNET-50432 - VDX to PDF conversion, Diagram.setFontDirs method use only first font over the whole diagram
DIAGRAMNET-50433 - VDX to PNG conversion, Diagram.setFontDirs method use only first font over the whole diagram

Your post has also been linked to these issues. We’ll keep you informed regarding any available updates. We’re sorry for the inconvenience caused.

Updated part: We have logged separate issue ids against the Java platform.
DIAGRAMJAVA-50197 - VDX to PDF conversion, Diagram.setFontDirs method use only first font over the whole diagram
DIAGRAMJAVA-50199 - VDX to PNG conversion, Diagram.setFontDirs method use only first font over the whole diagram


#20

Hello Imran,


What is the update on this? It has been a couple of weeks since the last update.

Is this progressing at all?

Is there anything else you need from our end to support with your testing?

Currently this is a major issue and forcing us to explore alternative options from Aspose if it doesn’t look like to be fixed in the near future.

Thanks,
Andrew