com.aspose.words

Class PhysicalFontInfo

  • java.lang.Object
    • com.aspose.words.PhysicalFontInfo
public class PhysicalFontInfo 
extends java.lang.Object

Specifies information about physical font available to Aspose.Words font engine.

Example:

Shows how to get available fonts and information about them.
// Add a new folder source which will instruct Aspose.Words to search the following folder for fonts.
FontSourceBase[] folderFontSource = {new FolderFontSource(getMyDir() + "MyFonts\\", true)};

for (PhysicalFontInfo fontInfo : folderFontSource[0].getAvailableFonts()) {
    System.out.println(MessageFormat.format("FontFamilyName : {0}", fontInfo.getFontFamilyName()));
    System.out.println(MessageFormat.format("FullFontName  : {0}", fontInfo.getFullFontName()));
    System.out.println(MessageFormat.format("Version  : {0}", fontInfo.getVersion()));
    System.out.println(MessageFormat.format("FilePath : {0}\n", fontInfo.getFilePath()));
}

Property Getters/Setters Summary
java.lang.StringgetFilePath()
Path to the font file if any.
java.lang.StringgetFontFamilyName()
Family name of the font.
java.lang.StringgetFullFontName()
Full name of the font.
java.lang.StringgetVersion()
Version string of the font.
 

    • Property Getters/Setters Detail

      • getFilePath

        public java.lang.String getFilePath()
        
        Path to the font file if any.

        Example:

        Shows how to get available fonts and information about them.
        // Add a new folder source which will instruct Aspose.Words to search the following folder for fonts.
        FontSourceBase[] folderFontSource = {new FolderFontSource(getMyDir() + "MyFonts\\", true)};
        
        for (PhysicalFontInfo fontInfo : folderFontSource[0].getAvailableFonts()) {
            System.out.println(MessageFormat.format("FontFamilyName : {0}", fontInfo.getFontFamilyName()));
            System.out.println(MessageFormat.format("FullFontName  : {0}", fontInfo.getFullFontName()));
            System.out.println(MessageFormat.format("Version  : {0}", fontInfo.getVersion()));
            System.out.println(MessageFormat.format("FilePath : {0}\n", fontInfo.getFilePath()));
        }
      • getFontFamilyName

        public java.lang.String getFontFamilyName()
        
        Family name of the font.

        Example:

        Shows how to get available fonts and information about them.
        // Add a new folder source which will instruct Aspose.Words to search the following folder for fonts.
        FontSourceBase[] folderFontSource = {new FolderFontSource(getMyDir() + "MyFonts\\", true)};
        
        for (PhysicalFontInfo fontInfo : folderFontSource[0].getAvailableFonts()) {
            System.out.println(MessageFormat.format("FontFamilyName : {0}", fontInfo.getFontFamilyName()));
            System.out.println(MessageFormat.format("FullFontName  : {0}", fontInfo.getFullFontName()));
            System.out.println(MessageFormat.format("Version  : {0}", fontInfo.getVersion()));
            System.out.println(MessageFormat.format("FilePath : {0}\n", fontInfo.getFilePath()));
        }
      • getFullFontName

        public java.lang.String getFullFontName()
        
        Full name of the font.

        Example:

        Shows how to get available fonts and information about them.
        // Add a new folder source which will instruct Aspose.Words to search the following folder for fonts.
        FontSourceBase[] folderFontSource = {new FolderFontSource(getMyDir() + "MyFonts\\", true)};
        
        for (PhysicalFontInfo fontInfo : folderFontSource[0].getAvailableFonts()) {
            System.out.println(MessageFormat.format("FontFamilyName : {0}", fontInfo.getFontFamilyName()));
            System.out.println(MessageFormat.format("FullFontName  : {0}", fontInfo.getFullFontName()));
            System.out.println(MessageFormat.format("Version  : {0}", fontInfo.getVersion()));
            System.out.println(MessageFormat.format("FilePath : {0}\n", fontInfo.getFilePath()));
        }
      • getVersion

        public java.lang.String getVersion()
        
        Version string of the font.

        Example:

        Shows how to get available fonts and information about them.
        // Add a new folder source which will instruct Aspose.Words to search the following folder for fonts.
        FontSourceBase[] folderFontSource = {new FolderFontSource(getMyDir() + "MyFonts\\", true)};
        
        for (PhysicalFontInfo fontInfo : folderFontSource[0].getAvailableFonts()) {
            System.out.println(MessageFormat.format("FontFamilyName : {0}", fontInfo.getFontFamilyName()));
            System.out.println(MessageFormat.format("FullFontName  : {0}", fontInfo.getFullFontName()));
            System.out.println(MessageFormat.format("Version  : {0}", fontInfo.getVersion()));
            System.out.println(MessageFormat.format("FilePath : {0}\n", fontInfo.getFilePath()));
        }