/[libvob]/libvob/org/nongnu/libvob/gl/GL.java
ViewVC logotype

Diff of /libvob/org/nongnu/libvob/gl/GL.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by tjl, Mon Mar 10 18:15:54 2003 UTC revision 1.5 by tjl, Mon Mar 17 12:48:19 2003 UTC
# Line 505  public class GL { Line 505  public class GL {
505           */           */
506          public void getWidths(float[] w) { putFontWidths(getId(), w); }          public void getWidths(float[] w) { putFontWidths(getId(), w); }
507      }      }
508    
509        static String defaultFontFile = "/usr/share/fonts/type1/gsfonts/n019004l.pfb";
510    
511      /** Create a new font.      /** Create a new font.
512       * @param name Filename to load the font from.       * @param name Filename to load the font from.
513         *                  null for default.
514       * @param loadPt The pixel size to load the font at.       * @param loadPt The pixel size to load the font at.
515       */       */
516      static public Font createFont(String name, int loadPt) {      static public Font createFont(String name, int loadPt) {
517          return new Font(createFontImpl(name, loadPt));          return new Font(createFontImpl(
518                        name == null ? defaultFontFile : name,
519                        loadPt));
520      }      }
521        
522    
523        static private native int createFontImpl(String filename, int loadPt);
524      static private native float getFontHeight(int id);      static private native float getFontHeight(int id);
525      static private native float getFontYOffs(int id);      static private native float getFontYOffs(int id);
     static private native int createFontImpl(String name, int loadPt);  
526      static private native void deleteFont(int id);      static private native void deleteFont(int id);
527      static private native void putFontWidths(int id, float[] w);      static private native void putFontWidths(int id, float[] w);
528    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26