Load Fonts in Java Notes


#1

Notes support,

We are getting the following error when trying to run Java Notes on a Linux servers.
class com.aspose.note.system.exceptions.InvalidOperationException: Cannot find any fonts installed on the system.

In the Java Slide product we fix that by using FontsLoader.loadExternalFonts(fontsDir);But this method doesn’t seem to exist in Java Notes. Any ideas on how we can load fonts?

Thanks


#2

@eboraks2017,

Can you please list the available fonts and check if these are available or not? https://community.jaspersoft.com/wiki/how-do-i-list-fonts-are-available-my-jvm. The API requires true type fonts to be installed for it to work on Linux.


#3

Kashif,

Linux servers are usually not coming with fonts. So, I know that there are no fonts on the server. Installing notes isn’t always an option since it requires root (admin) credentials.

Other Aspose products allow us to load fonts using the method I mention in the ticket. Why Notes doesn’t support this functionality?


#4

@eboraks2017,

Aspose.Note API supports only TrueType fonts and support of other type of fonts is not available at the moment. In order to solve this issue, user can copy TTF fonts to one of the following directories:

/usr/share/fonts // Ubuntu, openSUSE
/usr/local/share/fonts // Fedora
/usr/X11R6/lib/X11/fonts // RHEL
/usr/share/X11/fonts // CentOS

~/.fonts of the user running the application.