/[gzz]/gzz/gzz/vob/GLTextStyle.java
ViewVC logotype

Diff of /gzz/gzz/vob/GLTextStyle.java

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

revision 1.11 by benja, Fri Sep 20 19:45:27 2002 UTC revision 1.12 by tjl, Mon Sep 23 08:24:26 2002 UTC
# Line 39  public static final String rcsid = "$Id$ Line 39  public static final String rcsid = "$Id$
39    
40    
41    
42      static GZZGL.Font theStaticFont;      static GL.Font theStaticFont;
43      static GLTextStyle[] instances = new GLTextStyle[250];      static GLTextStyle[] instances = new GLTextStyle[250];
44    
45      static public GLTextStyle create(String family, int style, int size) {      static public GLTextStyle create(String family, int style, int size) {
# Line 47  public static final String rcsid = "$Id$ Line 47  public static final String rcsid = "$Id$
47          GLTextStyle s = instances[size];          GLTextStyle s = instances[size];
48          if(s == null) {          if(s == null) {
49              if(theStaticFont == null)              if(theStaticFont == null)
50                  theStaticFont = GZZGL.createFont("gfx/fonts/a010013l.pfb", 16);                  theStaticFont = GL.createFont("gfx/fonts/a010013l.pfb", 16);
51              s = new GLTextStyle(theStaticFont, size / (float)16);              s = new GLTextStyle(theStaticFont, size / (float)16);
52              instances[size] = s;              instances[size] = s;
53          }          }
# Line 56  public static final String rcsid = "$Id$ Line 56  public static final String rcsid = "$Id$
56    
57    
58      float fontScale;      float fontScale;
59      GZZGL.Font theFont;      GL.Font theFont;
60      short[] charWidths = new short[256];      short[] charWidths = new short[256];
61    
62      private GLTextStyle(GZZGL.Font f, float scale) {      private GLTextStyle(GL.Font f, float scale) {
63          this.theFont = f;          this.theFont = f;
64          this.fontScale = scale;          this.fontScale = scale;
65          f.getWidths(charWidths);          f.getWidths(charWidths);

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

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