Set fonts’ location, substitute fonts and get font information with Aspose.Imaging for Java 3.0.2

Share on FacebookTweet about this on TwitterShare on LinkedIn

Aspose.Imaging for Java logo We are pleased to announce the release of Aspose.Imaging for Java 3.0.2. This minor release takes care of font related issues while converting MetaFile format to raster image.

Set Font Folder While Converting WMF file

Using Aspose.Imaging for Java, developers can specify the font folder path used while converting WMF file. FontSettings class has been introduced to manage font settings. Using FontSettings class you can specify the font folder. Here is the code to set the font folder.


com.aspose.imaging.fileformats.metafile.FontSettings.addFontsFolder("/home/username/.fonts");

Get Font Information

Using Aspose.Imaging for Java, developers can get information about the font used in the WMF file while converting WMF file. FontSettings class has been introduced to get font information. Using FontSettings class you can get

  • List of font names accessible to Aspose.Imaging API.
  • List of font names used in the metafile.
  • List of font names that are missing in the environment with respect to WMF file loaded.

Set Substitute Fonts

Using Aspose.Imaging for Java, developers can specify the substitute fonts instead of original font while converting WMF file. FontSettings class has been introduced to manage font settings. Using FontSettings class you can specify the substitute fonts that should be used instead of original font while converting WMF file. Here is the code to specify substitute fonts.


    String[] substituteFontName = {"font1", "font2"}; 
    com.aspose.imaging.fileformats.metafile.FontSettings.addFontSubstitutes("originalFontName", substituteFontName );

Please refer to the release notes of Aspose.Imaging for Java 3.0.2 for a full view of improvements along with sample code snippets for newly added features. If you are planning to upgrade the API to the latest revision, we strongly suggest you to check the Public API Change section to know what has been changed in the public API since your current version.

Aspose.Imaging for Java Resources

The resources, you may need to accomplish your tasks:

As always we appreciate your feedback so if you ever have anything to tell us about this release or anything else, please head to the Aspose.Imaging forum for a chat.