Class WindowsFontDirFinder

  • All Implemented Interfaces:
    FontDirFinder

    public class WindowsFontDirFinder
    extends java.lang.Object
    implements FontDirFinder
    FontFinder for native Windows platforms. This class is based on a class provided by Apache FOP. see org.apache.fop.fonts.autodetect.WindowsFontDirFinder
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.io.File> find()
      Finds a list of font files.
      private java.lang.String getWinDir​(java.lang.String osName)
      Attempts to read windir environment variable on windows (disclaimer: This is a bit dirty but seems to work nicely).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WindowsFontDirFinder

        public WindowsFontDirFinder()
    • Method Detail

      • getWinDir

        private java.lang.String getWinDir​(java.lang.String osName)
                                    throws java.io.IOException
        Attempts to read windir environment variable on windows (disclaimer: This is a bit dirty but seems to work nicely).
        Throws:
        java.io.IOException
      • find

        public java.util.List<java.io.File> find()
        Finds a list of font files.
        Specified by:
        find in interface FontDirFinder
        Returns:
        a list of detected font files