We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

fontsSources paths


Is there a way to return the complete fonts-sources paths that Aspose will go through?

The following returns sourceBase-type (whether system, memory, etc) but not the actual path being sought:

FontSourceBase[] fontSourceBase = FontSettings.getFontsSources();

System.out.println( "… font sourceBase #: " +fontSourceBase.length );

for( int i=0; i lt fontSourceBase.length; i++)

System.out.println( "… font sourceBase: " + fontSourceBase[i].getType() );

Hi Gautam,

Thanks for your inquiry. Please try using the following code:
for (FontSourceBase src : FontSettings.getFontsSources()){
if (src.getType() == FontSourceType.FONTS_FOLDER){
FolderFontSource fsrc = (FolderFontSource)src;
Hope, this helps.

Best regards,


Thanks for the reply.

FontSettings.getFontsSources() returns 3 by default, which is FontSourceType.SYSTEM_FONTS.

This cannot be cast into FolderFontSource.

Therefore this code does not return something like C:\Windows\fonts, or the multiple paths on Solaris/Linux that would be searched for fonts.


Hi Gautam,

Thanks for your inquiry. You’re right that you can’t cast SystemFontSource to FolderFontSource. But, you can always be sure that Aspose.Words will look for fonts in following standard/default locations:

Windows: [%windir%\Fonts]
Linux: [/usr/share/fonts], [/usr/local/share/fonts] and [/usr/X11R6/lib/X11/fonts]
Mac OS X: [/Library/Fonts]

Hope, this helps.

Best regards,


And is it the same for Solaris as for Linux?

It would be great if you could add a way to query this as you can see that it may not be a single-folder path such as in Linux and Solaris.

Alternatively, if I get the system paths and add my my user-path(s) to this onto setFontsFolder(), would this show the full search path?

Best regards.

Hi Gautam,

Thanks for the additional information. We are in coordination with product team to get answer pertaining to your queries. Soon you will be updated with the required information.

Best regards,

The issues you have found earlier (filed as WORDSNET-12857) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.