< prev index next >

src/java.desktop/share/classes/sun/font/FontManagerNativeLibrary.java

Print this page




  36                System.loadLibrary("awt");
  37                if (System.getProperty("os.name").startsWith("Windows")) {
  38                    /* Ideally fontmanager library should not depend on
  39                       particular implementation of the font scaler.
  40                       However, freetype scaler is basically small wrapper on
  41                       top of freetype library (that is used in binary form).
  42 
  43                       This wrapper is compiled into fontmanager and this make
  44                       fontmanger library depending on freetype library.
  45 
  46                       On Windows DLL's in the JRE's BIN directory cannot be
  47                       found by windows DLL loading as that directory is not
  48                       on the Windows PATH.
  49 
  50                       To avoid link error we have to load freetype explicitly
  51                       before we load fontmanager.
  52 
  53                       NB: consider moving freetype wrapper part to separate
  54                           shared library in order to avoid dependency. */
  55                    System.loadLibrary("freetype");


  56                }
  57                System.loadLibrary("fontmanager");
  58 
  59                return null;
  60             }
  61         });
  62     }
  63 
  64     /*
  65      * Call this method to ensure libraries are loaded.
  66      *
  67      * Method acts as trigger to ensure this class is loaded
  68      * (and therefore initializer code is executed).
  69      * Actual loading is performed by static initializer.
  70      * (no need to execute doPrivilledged block more than once)
  71      */
  72     public static void load() {}
  73 }


  36                System.loadLibrary("awt");
  37                if (System.getProperty("os.name").startsWith("Windows")) {
  38                    /* Ideally fontmanager library should not depend on
  39                       particular implementation of the font scaler.
  40                       However, freetype scaler is basically small wrapper on
  41                       top of freetype library (that is used in binary form).
  42 
  43                       This wrapper is compiled into fontmanager and this make
  44                       fontmanger library depending on freetype library.
  45 
  46                       On Windows DLL's in the JRE's BIN directory cannot be
  47                       found by windows DLL loading as that directory is not
  48                       on the Windows PATH.
  49 
  50                       To avoid link error we have to load freetype explicitly
  51                       before we load fontmanager.
  52 
  53                       NB: consider moving freetype wrapper part to separate
  54                           shared library in order to avoid dependency. */
  55                    System.loadLibrary("freetype");
  56                    /* Same for harfbuzz */
  57                    System.loadLibrary("harfbuzz");
  58                }
  59                System.loadLibrary("fontmanager");
  60 
  61                return null;
  62             }
  63         });
  64     }
  65 
  66     /*
  67      * Call this method to ensure libraries are loaded.
  68      *
  69      * Method acts as trigger to ensure this class is loaded
  70      * (and therefore initializer code is executed).
  71      * Actual loading is performed by static initializer.
  72      * (no need to execute doPrivilledged block more than once)
  73      */
  74     public static void load() {}
  75 }
< prev index next >