aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2008-06-21 02:33:51 +0000
committerSven Gothel <[email protected]>2008-06-21 02:33:51 +0000
commit006acbb9463af33a8b45aa0b3a298604eba72d82 (patch)
tree2c71662575a2c098b22c4b19b471bb5c732041c5 /src
parentcbc45e816f4ee81031bffce19a99550681462a24 (diff)
2nd big refactoring.
Goals are orthogonal components for: - OS Windowing system - NEWT, X11, Windows, MacOsX - GL Windowing GLUE - EGL, GLX, WGL, CGL - GL profiles - core and util packages - generate all Java components from any platform All above goals are achieved. TODO: - Native compilation fix and test - Check/Fix Win32, MacOSX and the mobile devices - .. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1665 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src')
-rwxr-xr-xsrc/classes/com/sun/javafx/newt/Display.java47
-rw-r--r--src/classes/com/sun/javafx/newt/EventListener.java4
-rwxr-xr-xsrc/classes/com/sun/javafx/newt/NewtFactory.java34
-rwxr-xr-xsrc/classes/com/sun/javafx/newt/Screen.java48
-rwxr-xr-xsrc/classes/com/sun/javafx/newt/Window.java172
-rwxr-xr-xsrc/classes/com/sun/javafx/newt/windows/WindowsDisplay.java2
-rwxr-xr-xsrc/classes/com/sun/javafx/newt/windows/WindowsScreen.java2
-rwxr-xr-xsrc/classes/com/sun/javafx/newt/windows/WindowsWindow.java47
-rwxr-xr-xsrc/classes/com/sun/javafx/newt/x11/X11Display.java2
-rwxr-xr-xsrc/classes/com/sun/javafx/newt/x11/X11Screen.java2
-rwxr-xr-xsrc/classes/com/sun/javafx/newt/x11/X11Window.java54
-rw-r--r--src/classes/com/sun/opengl/impl/GLContextImpl.java152
-rw-r--r--src/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java22
-rw-r--r--src/classes/com/sun/opengl/impl/GLDrawableImpl.java78
-rw-r--r--src/classes/com/sun/opengl/impl/GLPbufferImpl.java53
-rw-r--r--src/classes/com/sun/opengl/impl/NativeLibLoader.java2
-rw-r--r--src/classes/com/sun/opengl/impl/NullWindow.java147
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/ProjectFloat.java1033
-rw-r--r--src/classes/com/sun/opengl/impl/awt/AWTUtil.java121
-rw-r--r--src/classes/com/sun/opengl/impl/awt/JAWTWindow.java50
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/egl/EGLContext.java4
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/egl/EGLDrawable.java11
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java20
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/gl2/ProjectDouble.java1034
-rw-r--r--src/classes/com/sun/opengl/impl/gl2/Util.java244
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/gl2/fixme/GLObjectTracker.java835
-rw-r--r--src/classes/com/sun/opengl/impl/glu/GLUquadricImpl.java1188
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/glu/gl2/nurbs/GL2Backend.java49
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/glu/gl2/nurbs/GL2CurveEvaluator.java205
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/glu/gl2/nurbs/GL2SurfaceEvaluator.java217
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/glu/gl2/nurbs/GLUgl2nurbsImpl.java862
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/j2d/Java2D.java569
-rw-r--r--src/classes/com/sun/opengl/impl/j2d/Java2DGLContext.java52
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/awt/MacOSXJAWTWindow.java103
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java377
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawable.java117
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java173
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXExternalCGLContext.java123
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOffscreenCGLContext.java64
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOffscreenCGLDrawable.java54
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOnscreenCGLContext.java131
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOnscreenCGLDrawable.java105
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java340
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java243
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/awt/MacOSXAWTCGLDrawableFactory.java64
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/awt/MacOSXJava2DCGLContext.java160
-rw-r--r--src/classes/com/sun/opengl/impl/windows/awt/WindowsJAWTWindow.java108
-rw-r--r--src/classes/com/sun/opengl/impl/windows/wgl/WindowsDummyWGLDrawable.java100
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/windows/wgl/WindowsExternalWGLContext.java102
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/windows/wgl/WindowsExternalWGLDrawable.java79
-rw-r--r--src/classes/com/sun/opengl/impl/windows/wgl/WindowsOffscreenWGLContext.java64
-rw-r--r--src/classes/com/sun/opengl/impl/windows/wgl/WindowsOffscreenWGLDrawable.java138
-rw-r--r--src/classes/com/sun/opengl/impl/windows/wgl/WindowsOnscreenWGLContext.java88
-rw-r--r--src/classes/com/sun/opengl/impl/windows/wgl/WindowsOnscreenWGLDrawable.java113
-rw-r--r--src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLContext.java155
-rw-r--r--src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java343
-rw-r--r--src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java300
-rw-r--r--src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java662
-rw-r--r--src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java276
-rw-r--r--src/classes/com/sun/opengl/impl/x11/awt/X11JAWTWindow.java57
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/DRIHack.java129
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXContext.java131
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java229
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java339
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawable.java143
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java636
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXContext.java85
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java144
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11OnscreenGLXContext.java101
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java92
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXContext.java97
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java240
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/awt/X11AWTGLXDrawableFactory.java181
-rwxr-xr-xsrc/classes/com/sun/opengl/util/awt/ImageUtil.java127
-rwxr-xr-xsrc/classes/com/sun/opengl/util/awt/gl2/GL2Screenshot.java433
-rwxr-xr-xsrc/classes/com/sun/opengl/util/gl2/GL2TileRenderer.java601
-rw-r--r--src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmap8x13.java2080
-rw-r--r--src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmap9x15.java2081
-rw-r--r--src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmapHelvetica10.java1800
-rw-r--r--src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmapHelvetica12.java1810
-rw-r--r--src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmapHelvetica18.java1919
-rw-r--r--src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmapTimesRoman10.java1799
-rw-r--r--src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmapTimesRoman24.java2082
-rw-r--r--src/classes/com/sun/opengl/util/glut/fonts/GLUTStrokeMonoRoman.java2493
-rw-r--r--src/classes/com/sun/opengl/util/glut/fonts/GLUTStrokeRoman.java2493
-rw-r--r--src/classes/com/sun/opengl/util/glut/gl2/GLUTgl2.java1345
-rw-r--r--src/classes/com/sun/opengl/util/glut/rec/BitmapCharRec.java69
-rw-r--r--src/classes/com/sun/opengl/util/glut/rec/BitmapFontRec.java63
-rw-r--r--src/classes/com/sun/opengl/util/glut/rec/CoordRec.java56
-rw-r--r--src/classes/com/sun/opengl/util/glut/rec/StrokeCharRec.java63
-rw-r--r--src/classes/com/sun/opengl/util/glut/rec/StrokeFontRec.java66
-rw-r--r--src/classes/com/sun/opengl/util/glut/rec/StrokeRec.java57
-rwxr-xr-xsrc/classes/com/sun/opengl/util/io/FileUtil.java89
-rwxr-xr-xsrc/classes/com/sun/opengl/util/io/StreamUtil.java74
-rwxr-xr-xsrc/classes/com/sun/opengl/util/io/TGAWriter.java118
-rwxr-xr-xsrc/classes/com/sun/opengl/util/j2d/gl2/GL2Overlay.java216
-rwxr-xr-xsrc/classes/com/sun/opengl/util/j2d/gl2/GL2TextRenderer.java1939
-rwxr-xr-xsrc/classes/com/sun/opengl/util/j2d/gl2/GL2TextureRenderer.java701
-rwxr-xr-xsrc/classes/com/sun/opengl/util/texture/Texture.java74
-rwxr-xr-xsrc/classes/com/sun/opengl/util/texture/TextureData.java619
-rwxr-xr-xsrc/classes/com/sun/opengl/util/texture/TextureProvider.java163
-rwxr-xr-xsrc/classes/com/sun/opengl/util/texture/TextureUtil.java113
102 files changed, 39142 insertions, 949 deletions
diff --git a/src/classes/com/sun/javafx/newt/Display.java b/src/classes/com/sun/javafx/newt/Display.java
index 220a612a4..2aa55246f 100755
--- a/src/classes/com/sun/javafx/newt/Display.java
+++ b/src/classes/com/sun/javafx/newt/Display.java
@@ -35,31 +35,50 @@ package com.sun.javafx.newt;
public abstract class Display {
+ private static Class getDisplayClass(String type)
+ throws ClassNotFoundException
+ {
+ Class displayClass = null;
+ if (NewtFactory.KD.equals(type)) {
+ displayClass = Class.forName("com.sun.javafx.newt.kd.KDDisplay");
+ } else if (NewtFactory.WINDOWS.equals(type)) {
+ displayClass = Class.forName("com.sun.javafx.newt.windows.WindowsDisplay");
+ } else if (NewtFactory.X11.equals(type)) {
+ displayClass = Class.forName("com.sun.javafx.newt.x11.X11Display");
+ } else if (NewtFactory.MACOSX.equals(type)) {
+ displayClass = Class.forName("com.sun.javafx.newt.macosx.MacOSXDisplay");
+ } else {
+ throw new RuntimeException("Unknown display type \"" + type + "\"");
+ }
+ return displayClass;
+ }
+
protected static Display create(String type, String name) {
try {
- Class displayClass = null;
- if (NewtFactory.KD.equals(type)) {
- displayClass = Class.forName("com.sun.javafx.newt.kd.KDDisplay");
- } else if (NewtFactory.WINDOWS.equals(type)) {
- displayClass = Class.forName("com.sun.javafx.newt.windows.WindowsDisplay");
- } else if (NewtFactory.X11.equals(type)) {
- displayClass = Class.forName("com.sun.javafx.newt.x11.X11Display");
- } else if (NewtFactory.MACOSX.equals(type)) {
- displayClass = Class.forName("com.sun.javafx.newt.macosx.MacOSXDisplay");
- } else {
- throw new RuntimeException("Unknown display type \"" + type + "\"");
- }
+ Class displayClass = getDisplayClass(type);
Display display = (Display) displayClass.newInstance();
display.name=name;
display.handle=0;
- display.initNative();
+ display.createNative();
+ return display;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ protected static Display wrapHandle(String type, String name, long handle) {
+ try {
+ Class displayClass = getDisplayClass(type);
+ Display display = (Display) displayClass.newInstance();
+ display.name=name;
+ display.handle=handle;
return display;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
- protected abstract void initNative();
+ protected abstract void createNative();
public String getName() {
return name;
diff --git a/src/classes/com/sun/javafx/newt/EventListener.java b/src/classes/com/sun/javafx/newt/EventListener.java
index 881d66b87..2af63bd7c 100644
--- a/src/classes/com/sun/javafx/newt/EventListener.java
+++ b/src/classes/com/sun/javafx/newt/EventListener.java
@@ -35,5 +35,9 @@ package com.sun.javafx.newt;
public interface EventListener
{
+ public static final int WINDOW = 1 << 0;
+ public static final int MOUSE = 1 << 1;
+ public static final int KEY = 1 << 2;
+
}
diff --git a/src/classes/com/sun/javafx/newt/NewtFactory.java b/src/classes/com/sun/javafx/newt/NewtFactory.java
index addc867d0..9f19be289 100755
--- a/src/classes/com/sun/javafx/newt/NewtFactory.java
+++ b/src/classes/com/sun/javafx/newt/NewtFactory.java
@@ -64,17 +64,49 @@ public abstract class NewtFactory {
return windowType;
}
+ /**
+ * Create a Display entity, incl native creation
+ */
public static Display createDisplay(String name) {
return Display.create(getWindowType(), name);
}
+ /**
+ * Create a Screen entity, incl native creation
+ */
public static Screen createScreen(Display display, int index) {
return Screen.create(getWindowType(), display, index);
}
- public static Window createWindow(Screen screen, int visualID) {
+ /**
+ * Create a Window entity, incl native creation
+ */
+ public static Window createWindow(Screen screen, long visualID) {
return Window.create(getWindowType(), screen, visualID);
}
+ /**
+ * Instantiate a Display entity using the native handle.
+ */
+ public static Display wrapDisplay(String name, long handle) {
+ return Display.wrapHandle(getWindowType(), name, handle);
+ }
+
+ /**
+ * Instantiate a Screen entity using the native handle.
+ */
+ public static Screen wrapScreen(Display display, int index, long handle) {
+ return Screen.wrapHandle(getWindowType(), display, index, handle);
+ }
+
+ /**
+ * Instantiate a Window entity using the native handle.
+ */
+ public static Window wrapWindow(Screen screen, long visualID,
+ long windowHandle, boolean fullscreen, boolean visible,
+ int x, int y, int width, int height) {
+ return Window.wrapHandle(getWindowType(), screen, visualID,
+ windowHandle, fullscreen, visible, x, y, width, height);
+ }
}
diff --git a/src/classes/com/sun/javafx/newt/Screen.java b/src/classes/com/sun/javafx/newt/Screen.java
index 77414d00e..38669b9e0 100755
--- a/src/classes/com/sun/javafx/newt/Screen.java
+++ b/src/classes/com/sun/javafx/newt/Screen.java
@@ -35,32 +35,52 @@ package com.sun.javafx.newt;
public abstract class Screen {
+ private static Class getScreenClass(String type)
+ throws ClassNotFoundException
+ {
+ Class screenClass = null;
+ if (NewtFactory.KD.equals(type)) {
+ screenClass = Class.forName("com.sun.javafx.newt.kd.KDScreen");
+ } else if (NewtFactory.WINDOWS.equals(type)) {
+ screenClass = Class.forName("com.sun.javafx.newt.windows.WindowsScreen");
+ } else if (NewtFactory.X11.equals(type)) {
+ screenClass = Class.forName("com.sun.javafx.newt.x11.X11Screen");
+ } else if (NewtFactory.MACOSX.equals(type)) {
+ screenClass = Class.forName("com.sun.javafx.newt.macosx.MacOSXScreen");
+ } else {
+ throw new RuntimeException("Unknown window type \"" + type + "\"");
+ }
+ return screenClass;
+ }
+
protected static Screen create(String type, Display display, int idx) {
try {
- Class screenClass = null;
- if (NewtFactory.KD.equals(type)) {
- screenClass = Class.forName("com.sun.javafx.newt.kd.KDScreen");
- } else if (NewtFactory.WINDOWS.equals(type)) {
- screenClass = Class.forName("com.sun.javafx.newt.windows.WindowsScreen");
- } else if (NewtFactory.X11.equals(type)) {
- screenClass = Class.forName("com.sun.javafx.newt.x11.X11Screen");
- } else if (NewtFactory.MACOSX.equals(type)) {
- screenClass = Class.forName("com.sun.javafx.newt.macosx.MacOSXScreen");
- } else {
- throw new RuntimeException("Unknown window type \"" + type + "\"");
- }
+ Class screenClass = getScreenClass(type);
Screen screen = (Screen) screenClass.newInstance();
screen.display = display;
screen.index = idx;
screen.handle = 0;
- screen.initNative();
+ screen.createNative();
+ return screen;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ protected static Screen wrapHandle(String type, Display display, int idx, long handle) {
+ try {
+ Class screenClass = getScreenClass(type);
+ Screen screen = (Screen) screenClass.newInstance();
+ screen.display = display;
+ screen.index = idx;
+ screen.handle = handle;
return screen;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
- protected abstract void initNative();
+ protected abstract void createNative();
public Display getDisplay() {
return display;
diff --git a/src/classes/com/sun/javafx/newt/Window.java b/src/classes/com/sun/javafx/newt/Window.java
index 8c1cecd3f..c485a93b1 100755
--- a/src/classes/com/sun/javafx/newt/Window.java
+++ b/src/classes/com/sun/javafx/newt/Window.java
@@ -45,26 +45,32 @@ public abstract class Window implements NativeWindow
public static final boolean DEBUG_KEY_EVENT = false;
public static final boolean DEBUG_IMPLEMENTATION = false;
- protected static Window create(String type, Screen screen, int visualID) {
+ private static Class getWindowClass(String type)
+ throws ClassNotFoundException
+ {
+ Class windowClass = null;
+ if (NewtFactory.KD.equals(type)) {
+ windowClass = Class.forName("com.sun.javafx.newt.kd.KDWindow");
+ } else if (NewtFactory.WINDOWS.equals(type)) {
+ windowClass = Class.forName("com.sun.javafx.newt.windows.WindowsWindow");
+ } else if (NewtFactory.X11.equals(type)) {
+ windowClass = Class.forName("com.sun.javafx.newt.x11.X11Window");
+ } else if (NewtFactory.MACOSX.equals(type)) {
+ windowClass = Class.forName("com.sun.javafx.newt.macosx.MacOSXWindow");
+ } else {
+ throw new RuntimeException("Unknown window type \"" + type + "\"");
+ }
+ return windowClass;
+ }
+
+ protected static Window create(String type, Screen screen, long visualID) {
try {
- Class windowClass = null;
- if (NewtFactory.KD.equals(type)) {
- windowClass = Class.forName("com.sun.javafx.newt.kd.KDWindow");
- } else if (NewtFactory.WINDOWS.equals(type)) {
- windowClass = Class.forName("com.sun.javafx.newt.windows.WindowsWindow");
- } else if (NewtFactory.X11.equals(type)) {
- windowClass = Class.forName("com.sun.javafx.newt.x11.X11Window");
- } else if (NewtFactory.MACOSX.equals(type)) {
- windowClass = Class.forName("com.sun.javafx.newt.macosx.MacOSXWindow");
- } else {
- throw new RuntimeException("Unknown window type \"" + type + "\"");
- }
+ Class windowClass = getWindowClass(type);
Window window = (Window) windowClass.newInstance();
+ window.invalidate();
window.screen = screen;
window.visualID = visualID;
- window.windowHandle = 0;
- window.locked = false;
- window.initNative();
+ window.createNative();
return window;
} catch (Throwable t) {
t.printStackTrace();
@@ -72,16 +78,64 @@ public abstract class Window implements NativeWindow
}
}
- protected abstract void initNative();
+ protected static Window wrapHandle(String type, Screen screen, long visualID,
+ long windowHandle, boolean fullscreen, boolean visible,
+ int x, int y, int width, int height)
+ {
+ try {
+ Class windowClass = getWindowClass(type);
+ Window window = (Window) windowClass.newInstance();
+ window.invalidate();
+ window.screen = screen;
+ window.visualID = visualID;
+ window.windowHandle = windowHandle;
+ window.fullscreen=fullscreen;
+ window.visible=visible;
+ window.x=x;
+ window.y=y;
+ window.width=width;
+ window.height=height;
+ return window;
+ } catch (Throwable t) {
+ t.printStackTrace();
+ throw new RuntimeException(t);
+ }
+ }
+
+ /**
+ * create native windowHandle, ie creates a new native invisible window
+ */
+ protected abstract void createNative();
+
+ protected abstract void closeNative();
public Screen getScreen() {
return screen;
}
- public abstract int getDisplayWidth();
- public abstract int getDisplayHeight();
+ public abstract int getDisplayWidth();
+ public abstract int getDisplayHeight();
- public abstract void pumpMessages();
+ /**
+ * eventMask is a bitfield of EventListener event flags
+ */
+ public void pumpMessages(int eventMask) {
+ if(this.eventMask!=eventMask && eventMask>0) {
+ this.eventMask=eventMask;
+ eventMask*=-1;
+ }
+ dispatchMessages(eventMask);
+ }
+
+ public void pumpMessages() {
+ int em = 0;
+ //if(windowistener.size()>0) em |= EventListener.WINDOW;
+ if(mouseListener.size()>0) em |= EventListener.MOUSE;
+ if(keyListener.size()>0) em |= EventListener.KEY;
+ pumpMessages(em);
+ }
+
+ public abstract void dispatchMessages(int eventMask);
public String toString() {
return "Window[handle "+windowHandle+
@@ -90,33 +144,62 @@ public abstract class Window implements NativeWindow
}
protected Screen screen;
- protected int visualID;
+ protected long visualID;
protected long windowHandle;
- protected boolean locked;
+ protected boolean locked=false;
+ protected boolean fullscreen, visible;
+ protected int width, height, x, y;
+ protected int eventMask;
//
// NativeWindow impl
//
- public boolean lockSurface() throws NativeWindowException {
+ public int lockSurface() throws NativeWindowException {
if (locked) {
throw new NativeWindowException("Surface already locked");
}
- locked = true;
- return true;
+ // locked = true;
+ // return LOCK_SUCCESS;
+ return LOCK_NOT_SUPPORTED;
}
public void unlockSurface() {
- if (!locked) {
- throw new NativeWindowException("Surface already locked");
+ if (locked) {
+ locked = false;
}
- locked = false;
}
public boolean isSurfaceLocked() {
return locked;
}
+ public void close() {
+ closeNative();
+ invalidate();
+ }
+
+ public void invalidate() {
+ unlockSurface();
+ screen = null;
+ visualID = 0;
+ windowHandle = 0;
+ locked = false;
+ fullscreen=false;
+ visible=false;
+ eventMask = 0;
+
+ // Default position and dimension will be re-set immediately by user
+ width = 100;
+ height = 100;
+ x=0;
+ y=0;
+ }
+
+ protected void clearEventMask() {
+ eventMask=0;
+ }
+
public long getDisplayHandle() {
return screen.getDisplay().getHandle();
}
@@ -133,20 +216,39 @@ public abstract class Window implements NativeWindow
return windowHandle;
}
- public int getVisualID() {
+ public long getVisualID() {
return visualID;
}
- public abstract int getWidth();
- public abstract int getHeight();
- public abstract int getX();
- public abstract int getY();
+ public boolean isVisible() {
+ return visible;
+ }
+
+ public int getX() {
+ return x;
+ }
+
+ public int getY() {
+ return y;
+ }
+
+ public int getWidth() {
+ return width;
+ }
+
+ public int getHeight() {
+ return height;
+ }
+
+ public boolean isFullscreen() {
+ return fullscreen;
+ }
+
public abstract void setVisible(boolean visible);
+
public abstract void setSize(int width, int height);
public abstract void setPosition(int x, int y);
- public abstract boolean isVisible();
public abstract boolean setFullscreen(boolean fullscreen);
- public abstract boolean isFullscreen();
//
// MouseListener Support
diff --git a/src/classes/com/sun/javafx/newt/windows/WindowsDisplay.java b/src/classes/com/sun/javafx/newt/windows/WindowsDisplay.java
index ce2ac8c4a..e66a9ac08 100755
--- a/src/classes/com/sun/javafx/newt/windows/WindowsDisplay.java
+++ b/src/classes/com/sun/javafx/newt/windows/WindowsDisplay.java
@@ -40,7 +40,7 @@ public class WindowsDisplay extends Display {
public WindowsDisplay() {
}
- public void initNative() {
+ protected void createNative() {
handle = 0;
}
}
diff --git a/src/classes/com/sun/javafx/newt/windows/WindowsScreen.java b/src/classes/com/sun/javafx/newt/windows/WindowsScreen.java
index cf163ce48..5b38d22d2 100755
--- a/src/classes/com/sun/javafx/newt/windows/WindowsScreen.java
+++ b/src/classes/com/sun/javafx/newt/windows/WindowsScreen.java
@@ -40,7 +40,7 @@ public class WindowsScreen extends Screen {
public WindowsScreen() {
}
- public void initNative() {
+ protected void createNative() {
handle = 0;
}
}
diff --git a/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java b/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java
index 01f763f0f..eda64cc20 100755
--- a/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java
+++ b/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java
@@ -37,12 +37,6 @@ import com.sun.javafx.newt.*;
import com.sun.opengl.impl.*;
public class WindowsWindow extends Window {
- private boolean fullscreen, visible;
- // Default width and height -- will likely be re-set immediately by user
- private int width = 100;
- private int height = 100;
- private int x=0;
- private int y=0;
private static final String WINDOW_CLASS_NAME = "NewtWindow";
static {
@@ -56,16 +50,18 @@ public class WindowsWindow extends Window {
public WindowsWindow() {
}
- public void initNative() {
+ protected void createNative() {
long wndClass = getWindowClass();
- fullscreen=false;
- visible=false;
windowHandle = CreateWindow(WINDOW_CLASS_NAME, getHInstance(), visualID, x, y, width, height);
if (windowHandle == 0) {
throw new RuntimeException("Error creating window");
}
}
+ protected void closeNative() {
+ CloseWindow(windowHandle);
+ }
+
public void setVisible(boolean visible) {
if(this.visible!=visible) {
this.visible=visible;
@@ -80,26 +76,6 @@ public class WindowsWindow extends Window {
public void setPosition(int x, int y) {
}
- public boolean isVisible() {
- return visible;
- }
-
- public int getX() {
- return x;
- }
-
- public int getY() {
- return y;
- }
-
- public int getWidth() {
- return width;
- }
-
- public int getHeight() {
- return height;
- }
-
public boolean setFullscreen(boolean fullscreen) {
if(this.fullscreen!=fullscreen) {
this.fullscreen=fullscreen;
@@ -108,10 +84,6 @@ public class WindowsWindow extends Window {
return true;
}
- public boolean isFullscreen() {
- return fullscreen;
- }
-
public int getDisplayWidth() {
return 640; // FIXME
}
@@ -120,8 +92,8 @@ public class WindowsWindow extends Window {
return 480; // FIXME
}
- public void pumpMessages() {
- DispatchMessages(windowHandle);
+ public void dispatchMessages(int eventMask) {
+ DispatchMessages(windowHandle, eventMask);
}
//----------------------------------------------------------------------
@@ -153,10 +125,11 @@ public class WindowsWindow extends Window {
private static native boolean initIDs();
private static native long LoadLibraryW(String libraryName);
private static native long RegisterWindowClass(String windowClassName, long hInstance);
- private native long CreateWindow(String windowClassName, long hInstance, int visualID,
+ private native long CreateWindow(String windowClassName, long hInstance, long visualID,
int x, int y, int width, int height);
+ private native void CloseWindow(long windowHandle);
private native void setVisible0(long windowHandle, boolean visible);
- private static native void DispatchMessages(long windowHandle);
+ private static native void DispatchMessages(long windowHandle, int eventMask);
private native void setSize0(long windowHandle, int width, int height);
private native boolean setFullScreen0(long windowHandle, boolean fullscreen);
diff --git a/src/classes/com/sun/javafx/newt/x11/X11Display.java b/src/classes/com/sun/javafx/newt/x11/X11Display.java
index 5a4ed8eed..00df325c6 100755
--- a/src/classes/com/sun/javafx/newt/x11/X11Display.java
+++ b/src/classes/com/sun/javafx/newt/x11/X11Display.java
@@ -44,7 +44,7 @@ public class X11Display extends Display {
public X11Display() {
}
- public void initNative() {
+ protected void createNative() {
handle = CreateDisplay(name);
if (handle == 0 ) {
throw new RuntimeException("Error creating display: "+name);
diff --git a/src/classes/com/sun/javafx/newt/x11/X11Screen.java b/src/classes/com/sun/javafx/newt/x11/X11Screen.java
index 279507fab..4094c557c 100755
--- a/src/classes/com/sun/javafx/newt/x11/X11Screen.java
+++ b/src/classes/com/sun/javafx/newt/x11/X11Screen.java
@@ -44,7 +44,7 @@ public class X11Screen extends Screen {
public X11Screen() {
}
- public void initNative() {
+ protected void createNative() {
handle = GetScreen(display.getHandle(), index);
if (handle == 0 ) {
throw new RuntimeException("Error creating screen: "+index);
diff --git a/src/classes/com/sun/javafx/newt/x11/X11Window.java b/src/classes/com/sun/javafx/newt/x11/X11Window.java
index d9a6e07ba..63e558bbc 100755
--- a/src/classes/com/sun/javafx/newt/x11/X11Window.java
+++ b/src/classes/com/sun/javafx/newt/x11/X11Window.java
@@ -38,13 +38,7 @@ import com.sun.opengl.impl.*;
public class X11Window extends Window {
private static final String WINDOW_CLASS_NAME = "NewtWindow";
- // Default width and height -- will likely be re-set immediately by user
- private int width = 100;
- private int height = 100;
- private int x=0;
- private int y=0;
// non fullscreen dimensions ..
- private boolean fullscreen, visible;
private int nfs_width, nfs_height, nfs_x, nfs_y;
static {
@@ -58,19 +52,22 @@ public class X11Window extends Window {
public X11Window() {
}
- public void initNative() {
- fullscreen=false;
- visible=false;
+ protected void createNative() {
long w = CreateWindow(getDisplayHandle(), getScreenHandle(), getScreenIndex(), visualID, x, y, width, height);
if (w == 0 || w!=windowHandle) {
throw new RuntimeException("Error creating window: "+w);
}
}
+ protected void closeNative() {
+ CloseWindow(getDisplayHandle(), windowHandle);
+ }
+
public void setVisible(boolean visible) {
if(this.visible!=visible) {
this.visible=visible;
setVisible0(getDisplayHandle(), windowHandle, visible);
+ clearEventMask();
}
}
@@ -82,26 +79,6 @@ public class X11Window extends Window {
setPosition0(getDisplayHandle(), windowHandle, x, y);
}
- public boolean isVisible() {
- return visible;
- }
-
- public int getX() {
- return x;
- }
-
- public int getY() {
- return y;
- }
-
- public int getWidth() {
- return width;
- }
-
- public int getHeight() {
- return height;
- }
-
public boolean setFullscreen(boolean fullscreen) {
if(this.fullscreen!=fullscreen) {
int x,y,w,h;
@@ -122,14 +99,6 @@ public class X11Window extends Window {
return true;
}
- public boolean isFullscreen() {
- return fullscreen;
- }
-
- public void pumpMessages() {
- DispatchMessages(getDisplayHandle(), windowHandle);
- }
-
public int getDisplayWidth() {
return getDisplayWidth0(getDisplayHandle(), getScreenIndex());
}
@@ -138,15 +107,20 @@ public class X11Window extends Window {
return getDisplayHeight0(getDisplayHandle(), getScreenIndex());
}
+ public void dispatchMessages(int eventMask) {
+ DispatchMessages(getDisplayHandle(), windowHandle, eventMask);
+ }
+
//----------------------------------------------------------------------
// Internals only
//
private static native boolean initIDs();
private native long CreateWindow(long display, long screen, int screen_index,
- int visualID, int x, int y, int width, int height);
+ long visualID, int x, int y, int width, int height);
+ private native void CloseWindow(long display, long windowHandle);
private native void setVisible0(long display, long windowHandle, boolean visible);
- private native void DispatchMessages(long display, long windowHandle);
+ private native void DispatchMessages(long display, long windowHandle, int eventMask);
private native void setSize0(long display, long windowHandle, int width, int height);
private native void setPosition0(long display, long windowHandle, int x, int y);
private native int getDisplayWidth0(long display, int scrn_idx);
@@ -170,7 +144,7 @@ public class X11Window extends Window {
}
}
- private void windowCreated(int visualID, long windowHandle) {
+ private void windowCreated(long visualID, long windowHandle) {
this.visualID = visualID;
this.windowHandle = windowHandle;
}
diff --git a/src/classes/com/sun/opengl/impl/GLContextImpl.java b/src/classes/com/sun/opengl/impl/GLContextImpl.java
index eb9cf0e55..13b847e51 100644
--- a/src/classes/com/sun/opengl/impl/GLContextImpl.java
+++ b/src/classes/com/sun/opengl/impl/GLContextImpl.java
@@ -39,9 +39,8 @@
package com.sun.opengl.impl;
-// FIXME: refactor
-// import java.awt.Component;
import java.nio.*;
+import java.lang.reflect.*;
import javax.media.opengl.*;
import com.sun.gluegen.runtime.*;
@@ -67,53 +66,14 @@ public abstract class GLContextImpl extends GLContext {
protected FunctionAvailabilityCache functionAvailability;
// Table that holds the addresses of the native C-language entry points for
// OpenGL functions.
- private GLProcAddressTable glProcAddressTable;
+ private ProcAddressTable glProcAddressTable;
// Tracks creation and initialization of buffer objects to avoid
// repeated glGet calls upon glMapBuffer operations
private GLBufferSizeTracker bufferSizeTracker;
- /* FIXME: needed only by the Java 2D / JOGL bridge; refactor
-
- // Tracks creation and deletion of server-side OpenGL objects when
- // the Java2D/OpenGL pipeline is active and using FBOs to render
- private GLObjectTracker tracker;
- // Supports deletion of these objects when no other context is
- // current which can support immediate deletion of them
- private GLObjectTracker deletedObjectTracker;
-
- */
-
protected GL gl;
- /* FIXME: refactor these dependencies on the Java 2D / JOGL bridge
-
- public GLContextImpl(GLContext shareWith) {
- this(shareWith, false);
- }
-
- public GLContextImpl(GLContext shareWith, boolean dontShareWithJava2D) {
- functionAvailability = new FunctionAvailabilityCache(this);
- GLContext shareContext = shareWith;
- if (!dontShareWithJava2D) {
- shareContext = Java2D.filterShareContext(shareWith);
- }
- if (shareContext != null) {
- GLContextShareSet.registerSharing(this, shareContext);
- }
- // Always indicate real behind-the-scenes sharing to track deleted objects
- if (shareContext == null) {
- shareContext = Java2D.filterShareContext(shareWith);
- }
- GLContextShareSet.registerForObjectTracking(shareWith, this, shareContext);
- GLContextShareSet.registerForBufferObjectSharing(shareWith, this);
- // This must occur after the above calls into the
- // GLContextShareSet, which set up state needed by the GL object
- setGL(createGL());
- }
-
- */
-
public GLContextImpl(GLContext shareWith) {
functionAvailability = new FunctionAvailabilityCache(this);
if (shareWith != null) {
@@ -152,6 +112,7 @@ public abstract class GLContextImpl extends GLContext {
int res = 0;
try {
res = makeCurrentImpl();
+
/* FIXME: refactor dependence on Java 2D / JOGL bridge
if ((tracker != null) &&
(res == CONTEXT_CURRENT_NEW)) {
@@ -251,7 +212,7 @@ public abstract class GLContextImpl extends GLContext {
lock.setFailFastMode(!isSynchronized);
}
- public GL getGL() {
+ public final GL getGL() {
return gl;
}
@@ -265,9 +226,40 @@ public abstract class GLContextImpl extends GLContext {
// Helpers for various context implementations
//
+ private Object createObject(String suffix) {
+ String clazzName = null;
+ Class factoryClass = null;
+ Constructor factory = null;
+
+ try {
+ if(GLProfile.isGL2()) {
+ clazzName="com.sun.opengl.impl.gl2.GL2"+suffix;
+ } else if(GLProfile.isGLES1()) {
+ clazzName="com.sun.opengl.impl.es1.GLES1"+suffix;
+ } else if(GLProfile.isGLES1()) {
+ clazzName="com.sun.opengl.impl.es2.GLES2"+suffix;
+ } else {
+ throw new GLException("uncovered profile");
+ }
+ factoryClass = Class.forName(clazzName);
+ if (factoryClass == null) {
+ throw new GLException(clazzName + " not yet implemented");
+ }
+ try {
+ factory = factoryClass.getDeclaredConstructor(new Class[] { GLContextImpl.class });
+ } catch(NoSuchMethodException nsme) {
+ throw new GLException(clazzName + "(GLContextImpl) not yet implemented / missing cstr");
+ }
+ return factory.newInstance(new Object[] { this });
+ } catch (Exception e) {
+ throw new GLException(e);
+ }
+ }
+
/** Create the GL for this context. */
protected GL createGL() {
- GLImpl gl = new GLImpl(this);
+ GL gl = (GL) createObject("Impl");
+
/* FIXME: refactor dependence on Java 2D / JOGL bridge
if (tracker != null) {
gl.setObjectTracker(tracker);
@@ -276,12 +268,7 @@ public abstract class GLContextImpl extends GLContext {
return gl;
}
- public GLProcAddressTable getGLProcAddressTable() {
- if (glProcAddressTable == null) {
- // FIXME: cache ProcAddressTables by capability bits so we can
- // share them among contexts with the same capabilities
- glProcAddressTable = new GLProcAddressTable();
- }
+ public final ProcAddressTable getGLProcAddressTable() {
return glProcAddressTable;
}
@@ -350,6 +337,11 @@ public abstract class GLContextImpl extends GLContext {
if (DEBUG) {
System.err.println(getThreadName() + ": !!! Initializing OpenGL extension address table for " + this);
}
+ if (glProcAddressTable == null) {
+ glProcAddressTable = (ProcAddressTable) createObject("ProcAddressTable");
+ // FIXME: cache ProcAddressTables by capability bits so we can
+ // share them among contexts with the same capabilities
+ }
resetProcAddressTable(getGLProcAddressTable());
}
@@ -364,7 +356,7 @@ public abstract class GLContextImpl extends GLContext {
* "glPolygonOffsetEXT" to check if the {@link
* javax.media.opengl.GL#glPolygonOffsetEXT(float,float)} is available).
*/
- protected boolean isFunctionAvailable(String glFunctionName) {
+ public boolean isFunctionAvailable(String glFunctionName) {
return functionAvailability.isFunctionAvailable(mapToRealGLFunctionName(glFunctionName));
}
@@ -417,7 +409,44 @@ public abstract class GLContextImpl extends GLContext {
return bufferSizeTracker;
}
- /* FIXME: refactor dependence on Java 2D / JOGL bridge
+ //---------------------------------------------------------------------------
+ // Helpers for context optimization where the last context is left
+ // current on the OpenGL worker thread
+ //
+
+ public boolean isOptimizable() {
+ return optimizationEnabled;
+ }
+
+ public boolean hasWaiters() {
+ return lock.hasWaiters();
+ }
+
+ /* FIXME: needed only by the Java 2D / JOGL bridge; refactor
+
+ public GLContextImpl(GLContext shareWith) {
+ this(shareWith, false);
+ }
+
+ public GLContextImpl(GLContext shareWith, boolean dontShareWithJava2D) {
+ functionAvailability = new FunctionAvailabilityCache(this);
+ GLContext shareContext = shareWith;
+ if (!dontShareWithJava2D) {
+ shareContext = Java2D.filterShareContext(shareWith);
+ }
+ if (shareContext != null) {
+ GLContextShareSet.registerSharing(this, shareContext);
+ }
+ // Always indicate real behind-the-scenes sharing to track deleted objects
+ if (shareContext == null) {
+ shareContext = Java2D.filterShareContext(shareWith);
+ }
+ GLContextShareSet.registerForObjectTracking(shareWith, this, shareContext);
+ GLContextShareSet.registerForBufferObjectSharing(shareWith, this);
+ // This must occur after the above calls into the
+ // GLContextShareSet, which set up state needed by the GL object
+ setGL(createGL());
+ }
//---------------------------------------------------------------------------
// Helpers for integration with Java2D/OpenGL pipeline when FBOs are
@@ -440,18 +469,13 @@ public abstract class GLContextImpl extends GLContext {
return deletedObjectTracker;
}
- */
-
- //---------------------------------------------------------------------------
- // Helpers for context optimization where the last context is left
- // current on the OpenGL worker thread
- //
+ // Tracks creation and deletion of server-side OpenGL objects when
+ // the Java2D/OpenGL pipeline is active and using FBOs to render
+ private GLObjectTracker tracker;
+ // Supports deletion of these objects when no other context is
+ // current which can support immediate deletion of them
+ private GLObjectTracker deletedObjectTracker;
- public boolean isOptimizable() {
- return optimizationEnabled;
- }
+ */
- public boolean hasWaiters() {
- return lock.hasWaiters();
- }
}
diff --git a/src/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java b/src/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java
index 20616f34d..21fe5b386 100644
--- a/src/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java
+++ b/src/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java
@@ -58,18 +58,16 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory implements
/** Dynamically looks up the given function. */
public abstract long dynamicLookupFunction(String glFuncName);
- /** Locks the AWT for the purposes of Java2D/JOGL integration. This
- * is not necessary on some platforms.
- */
- public abstract void lockAWTForJava2D();
+ protected GLDrawableFactoryImpl() {
+ super();
+ }
- /** Unlocks the AWT for the purposes of Java2D/JOGL integration.
- * This is not necessary on some platforms.
- */
- public abstract void unlockAWTForJava2D();
+ public static GLDrawableFactoryImpl getFactoryImpl(boolean awt) {
+ return (GLDrawableFactoryImpl) getFactory(awt);
+ }
- protected GLDrawableFactoryImpl(String profile) {
- super(profile);
+ public static GLDrawableFactoryImpl getFactoryImpl(Object target) {
+ return (GLDrawableFactoryImpl) getFactory(target);
}
// Helper function for more lazily loading the GLU library;
@@ -83,12 +81,10 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory implements
// implement this functionality on all other platforms
//
- /* FIXME: refactor dependencies on Java SE
public abstract boolean canCreateContextOnJava2DSurface();
- public abstract GLContext createContextOnJava2DSurface(Graphics g, GLContext shareWith)
+ public abstract GLContext createContextOnJava2DSurface(Object graphics, GLContext shareWith)
throws GLException;
- */
//----------------------------------------------------------------------
// Gamma adjustment support
diff --git a/src/classes/com/sun/opengl/impl/GLDrawableImpl.java b/src/classes/com/sun/opengl/impl/GLDrawableImpl.java
index 690bfd88c..26f3d6585 100644
--- a/src/classes/com/sun/opengl/impl/GLDrawableImpl.java
+++ b/src/classes/com/sun/opengl/impl/GLDrawableImpl.java
@@ -42,18 +42,29 @@ package com.sun.opengl.impl;
import javax.media.opengl.*;
public abstract class GLDrawableImpl implements GLDrawable {
- protected GLDrawableFactory factory;
- protected NativeWindow component;
- private GLCapabilities chosenCapabilities;
+ protected GLDrawableImpl(GLDrawableFactory factory, NativeWindow comp, boolean realized) {
+ this.factory = factory;
+ this.component = comp;
+ this.realized = realized;
+ this.chosenCapabilities=null;
+ }
/** For offscreen GLDrawables (pbuffers and "pixmap" drawables),
indicates that native resources should be reclaimed. */
- public abstract void destroy() throws GLException;
+ public void destroy() throws GLException {
+ }
+
+ public void swapBuffers() throws GLException {
+ }
public static String toHexString(long hex) {
return GLContextImpl.toHexString(hex);
}
+ public GLCapabilities getCapabilities() {
+ return chosenCapabilities;
+ }
+
public GLCapabilities getChosenGLCapabilities() {
if (chosenCapabilities == null)
return null;
@@ -63,7 +74,7 @@ public abstract class GLDrawableImpl implements GLDrawable {
}
public void setChosenGLCapabilities(GLCapabilities caps) {
- chosenCapabilities = caps;
+ chosenCapabilities = (caps==null) ? null : (GLCapabilities) caps.clone();
}
public NativeWindow getNativeWindow() {
@@ -74,7 +85,60 @@ public abstract class GLDrawableImpl implements GLDrawable {
return factory;
}
- public String getProfile() {
- return factory.getProfile();
+ public void setRealized(boolean realized) {
+ this.realized = realized;
+ if(!realized) {
+ setChosenGLCapabilities(null);
+ component.invalidate();
+ }
+ }
+
+ public boolean getRealized() {
+ return realized;
+ }
+
+ public void setSize(int width, int height) {
+ component.setSize(width, height);
+ }
+
+ public int getWidth() {
+ return component.getWidth();
}
+
+ /** Returns the current height of this GLDrawable. */
+ public int getHeight() {
+ return component.getHeight();
+ }
+
+ public int lockSurface() throws GLException {
+ if (!realized) {
+ return NativeWindow.LOCK_SURFACE_NOT_READY;
+ }
+ return component.lockSurface();
+ }
+
+ public void unlockSurface() {
+ component.unlockSurface();
+ }
+
+ public boolean isSurfaceLocked() {
+ return component.isSurfaceLocked();
+ }
+
+ protected GLDrawableFactory factory;
+ protected NativeWindow component;
+ private GLCapabilities chosenCapabilities;
+
+ // Indicates whether the component (if an onscreen context) has been
+ // realized. Plausibly, before the component is realized the JAWT
+ // should return an error or NULL object from some of its
+ // operations; this appears to be the case on Win32 but is not true
+ // at least with Sun's current X11 implementation (1.4.x), which
+ // crashes with no other error reported if the DrawingSurfaceInfo is
+ // fetched from a locked DrawingSurface during the validation as a
+ // result of calling show() on the main thread. To work around this
+ // we prevent any JAWT or OpenGL operations from being done until
+ // addNotify() is called on the component.
+ protected boolean realized;
+
}
diff --git a/src/classes/com/sun/opengl/impl/GLPbufferImpl.java b/src/classes/com/sun/opengl/impl/GLPbufferImpl.java
index cf4ae31af..7a7b2772a 100644
--- a/src/classes/com/sun/opengl/impl/GLPbufferImpl.java
+++ b/src/classes/com/sun/opengl/impl/GLPbufferImpl.java
@@ -39,9 +39,11 @@
package com.sun.opengl.impl;
+/**
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.event.*;
+ */
import java.beans.PropertyChangeListener;
import javax.media.opengl.*;
@@ -76,6 +78,14 @@ public class GLPbufferImpl implements GLPbuffer {
throw new GLException("Not yet implemented");
}
+ public NativeWindow getNativeWindow() {
+ return pbufferDrawable.getNativeWindow();
+ }
+
+ public GLDrawableFactory getFactory() {
+ return pbufferDrawable.getFactory();
+ }
+
public int getWidth() {
return pbufferDrawable.getWidth();
}
@@ -149,10 +159,52 @@ public class GLPbufferImpl implements GLPbuffer {
return pbufferDrawable.getChosenGLCapabilities();
}
+ public GLCapabilities getCapabilities() {
+ if (pbufferDrawable == null)
+ return null;
+
+ return pbufferDrawable.getCapabilities();
+ }
+
+ public void setChosenGLCapabilities(GLCapabilities caps) {
+ pbufferDrawable.setChosenGLCapabilities(caps);
+ }
+
+
+ private boolean surfaceLocked = false;
+
+ public int lockSurface() throws GLException {
+ surfaceLocked=true;
+ return NativeWindow.LOCK_SUCCESS;
+ }
+
+ public void unlockSurface() {
+ surfaceLocked=false;
+ }
+
+ public boolean isSurfaceLocked() {
+ return surfaceLocked;
+ }
+
+ private boolean tkLocked = false;
+
+ public void lockToolkit() throws GLException {
+ tkLocked=true;
+ }
+
+ public void unlockToolkit() {
+ tkLocked=false;
+ }
+
+ public boolean isToolkitLocked() {
+ return tkLocked;
+ }
+
//----------------------------------------------------------------------
// No-ops for ComponentEvents
//
+ /*
public void addComponentListener(ComponentListener l) {}
public void removeComponentListener(ComponentListener l) {}
public void addFocusListener(FocusListener l) {}
@@ -177,6 +229,7 @@ public class GLPbufferImpl implements GLPbuffer {
PropertyChangeListener listener) {}
public void removePropertyChangeListener(String propertyName,
PropertyChangeListener listener) {}
+ */
public void destroy() {
if (Threading.isSingleThreaded() &&
diff --git a/src/classes/com/sun/opengl/impl/NativeLibLoader.java b/src/classes/com/sun/opengl/impl/NativeLibLoader.java
index aaf782296..4fe59b003 100644
--- a/src/classes/com/sun/opengl/impl/NativeLibLoader.java
+++ b/src/classes/com/sun/opengl/impl/NativeLibLoader.java
@@ -97,7 +97,7 @@ public class NativeLibLoader {
loaderAction = action;
}
- private static synchronized void loadLibrary(String libname, String[] preload,
+ protected static synchronized void loadLibrary(String libname, String[] preload,
boolean doPreload, boolean ignoreError) {
if (loaderAction != null && !loaded.contains(libname))
{
diff --git a/src/classes/com/sun/opengl/impl/NullWindow.java b/src/classes/com/sun/opengl/impl/NullWindow.java
new file mode 100644
index 000000000..7bac93ee2
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/NullWindow.java
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ */
+
+package com.sun.opengl.impl;
+
+import javax.media.opengl.*;
+
+public class NullWindow implements NativeWindow {
+ protected boolean locked;
+ protected int width, height, scrnIndex;
+ protected long windowHandle, displayHandle;
+
+
+ public NullWindow() {
+ locked=false;
+ width=0;
+ height=0;
+ scrnIndex=-1;
+ windowHandle=0;
+ displayHandle=0;
+ }
+
+ protected void init(Object windowObject) throws NativeWindowException {
+ }
+
+ protected void initNative() throws NativeWindowException {
+ }
+
+ public synchronized void invalidate() {
+ locked = false;
+ }
+
+ public synchronized int lockSurface() throws NativeWindowException {
+ if (locked) {
+ throw new NativeWindowException("Surface already locked");
+ }
+ locked = true;
+ return LOCK_SUCCESS;
+ }
+
+ public synchronized void unlockSurface() {
+ if (locked) {
+ locked = false;
+ }
+ }
+
+ public synchronized boolean isSurfaceLocked() {
+ return locked;
+ }
+
+ public long getDisplayHandle() {
+ return windowHandle;
+ }
+ public void setDisplayHandle(long handle) {
+ windowHandle=handle;
+ }
+ public long getScreenHandle() {
+ return 0;
+ }
+ public int getScreenIndex() {
+ return scrnIndex;
+ }
+ public void setScreenIndex(int idx) {
+ scrnIndex=idx;
+ }
+ public long getWindowHandle() {
+ return windowHandle;
+ }
+ public void setWindowHandle(long handle) {
+ windowHandle=handle;
+ }
+ public long getVisualID() {
+ return 0;
+ }
+
+ public void setSize(int width, int height) {
+ this.width=width;
+ this.height=height;
+ }
+
+ public int getWidth() {
+ return width;
+ }
+
+ public int getHeight() {
+ return height;
+ }
+
+ public int getX() {
+ return 0;
+ }
+ public int getY() {
+ return 0;
+ }
+
+ public void setPosition(int x, int y) {
+ }
+
+ public void setVisible(boolean visible) {
+ }
+
+ public boolean isVisible() {
+ return false;
+ }
+
+ public boolean setFullscreen(boolean fullscreen) {
+ return false; // FIXME
+ }
+
+ public boolean isFullscreen() {
+ return false; // FIXME
+ }
+
+}
diff --git a/src/classes/com/sun/opengl/impl/ProjectFloat.java b/src/classes/com/sun/opengl/impl/ProjectFloat.java
new file mode 100755
index 000000000..4e6c4ac85
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/ProjectFloat.java
@@ -0,0 +1,1033 @@
+/*
+** License Applicability. Except to the extent portions of this file are
+** made subject to an alternative license as permitted in the SGI Free
+** Software License B, Version 1.1 (the "License"), the contents of this
+** file are subject only to the provisions of the License. You may not use
+** this file except in compliance with the License. You may obtain a copy
+** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
+** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
+**
+** http://oss.sgi.com/projects/FreeB
+**
+** Note that, as provided in the License, the Software is distributed on an
+** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
+** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
+** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
+** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
+**
+** NOTE: The Original Code (as defined below) has been licensed to Sun
+** Microsystems, Inc. ("Sun") under the SGI Free Software License B
+** (Version 1.1), shown above ("SGI License"). Pursuant to Section
+** 3.2(3) of the SGI License, Sun is distributing the Covered Code to
+** you under an alternative license ("Alternative License"). This
+** Alternative License includes all of the provisions of the SGI License
+** except that Section 2.2 and 11 are omitted. Any differences between
+** the Alternative License and the SGI License are offered solely by Sun
+** and not by SGI.
+**
+** Original Code. The Original Code is: OpenGL Sample Implementation,
+** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
+** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
+** Copyright in any portions created by third parties is as indicated
+** elsewhere herein. All Rights Reserved.
+**
+** Additional Notice Provisions: The application programming interfaces
+** established by SGI in conjunction with the Original Code are The
+** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
+** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
+** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
+** Window System(R) (Version 1.3), released October 19, 1998. This software
+** was created using the OpenGL(R) version 1.2.1 Sample Implementation
+** published by SGI, but has not been independently verified as being
+** compliant with the OpenGL(R) version 1.2.1 Specification.
+**
+** $Date$ $Revision$
+** $Header$
+*/
+
+/*
+ * Copyright (c) 2002-2004 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ */
+package com.sun.opengl.impl;
+
+import java.nio.*;
+
+import javax.media.opengl.*;
+import javax.media.opengl.util.*;
+
+/**
+ * ProjectFloat.java
+ * <p/>
+ * <p/>
+ * Created 11-jan-2004
+ *
+ * @author Erik Duijs
+ * @author Kenneth Russell
+ */
+public class ProjectFloat {
+ private static final float[] IDENTITY_MATRIX =
+ new float[] {
+ 1.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 1.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 1.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f, 1.0f };
+
+ // Note that we have cloned parts of the implementation in order to
+ // support incoming Buffers. The reason for this is to avoid loading
+ // non-direct buffer subclasses unnecessarily, because doing so can
+ // cause performance decreases on direct buffer operations, at least
+ // on the current HotSpot JVM. It would be nicer (and make the code
+ // simpler) to simply have the array-based entry points delegate to
+ // the versions taking Buffers by wrapping the arrays.
+
+ // Array-based implementation
+ private final float[] matrix = new float[16];
+
+ private final float[][] tempMatrix = new float[4][4];
+ private final float[] in = new float[4];
+ private final float[] out = new float[4];
+
+ private final float[] forward = new float[3];
+ private final float[] side = new float[3];
+ private final float[] up = new float[3];
+
+ // Buffer-based implementation
+ private final FloatBuffer matrixBuf;
+
+ private final FloatBuffer tempMatrixBuf;
+ private final FloatBuffer inBuf;
+ private final FloatBuffer outBuf;
+
+ private final FloatBuffer forwardBuf;
+ private final FloatBuffer sideBuf;
+ private final FloatBuffer upBuf;
+
+ public ProjectFloat() {
+ // Use direct buffers to avoid loading indirect buffer
+ // implementations for applications trying to avoid doing so.
+ // Slice up one big buffer because some NIO implementations
+ // allocate a huge amount of memory to back even the smallest of
+ // buffers.
+ FloatBuffer buf = BufferUtil.newFloatBuffer(128);
+ int pos = 0;
+ int sz = 16;
+ matrixBuf = slice(buf, pos, sz);
+ pos += sz;
+ tempMatrixBuf = slice(buf, pos, sz);
+ pos += sz;
+ sz = 4;
+ inBuf = slice(buf, pos, sz);
+ pos += sz;
+ outBuf = slice(buf, pos, sz);
+ pos += sz;
+ sz = 3;
+ forwardBuf = slice(buf, pos, sz);
+ pos += sz;
+ sideBuf = slice(buf, pos, sz);
+ pos += sz;
+ upBuf = slice(buf, pos, sz);
+ }
+
+ private static FloatBuffer slice(FloatBuffer buf, int pos, int len) {
+ buf.position(pos);
+ buf.limit(pos + len);
+ return buf.slice();
+ }
+
+ /**
+ * Make matrix an identity matrix
+ */
+ private void __gluMakeIdentityf(FloatBuffer m) {
+ int oldPos = m.position();
+ m.put(IDENTITY_MATRIX);
+ m.position(oldPos);
+ }
+
+ /**
+ * Make matrix an identity matrix
+ */
+ private void __gluMakeIdentityf(float[] m) {
+ for (int i = 0; i < 16; i++) {
+ m[i] = IDENTITY_MATRIX[i];
+ }
+ }
+
+ /**
+ * Method __gluMultMatrixVecf
+ *
+ * @param matrix
+ * @param in
+ * @param out
+ */
+ private void __gluMultMatrixVecf(float[] matrix, int matrix_offset, float[] in, float[] out) {
+ for (int i = 0; i < 4; i++) {
+ out[i] =
+ in[0] * matrix[0*4+i+matrix_offset] +
+ in[1] * matrix[1*4+i+matrix_offset] +
+ in[2] * matrix[2*4+i+matrix_offset] +
+ in[3] * matrix[3*4+i+matrix_offset];
+ }
+ }
+
+ /**
+ * Method __gluMultMatrixVecf
+ *
+ * @param matrix
+ * @param in
+ * @param out
+ */
+ private void __gluMultMatrixVecf(FloatBuffer matrix, FloatBuffer in, FloatBuffer out) {
+ int inPos = in.position();
+ int outPos = out.position();
+ int matrixPos = matrix.position();
+ for (int i = 0; i < 4; i++) {
+ out.put(i + outPos,
+ in.get(0+inPos) * matrix.get(0*4+i+matrixPos) +
+ in.get(1+inPos) * matrix.get(1*4+i+matrixPos) +
+ in.get(2+inPos) * matrix.get(2*4+i+matrixPos) +
+ in.get(3+inPos) * matrix.get(3*4+i+matrixPos));
+ }
+ }
+
+ /**
+ * @param src
+ * @param inverse
+ *
+ * @return
+ */
+ private boolean __gluInvertMatrixf(float[] src, float[] inverse) {
+ int i, j, k, swap;
+ float t;
+ float[][] temp = tempMatrix;
+
+ for (i = 0; i < 4; i++) {
+ for (j = 0; j < 4; j++) {
+ temp[i][j] = src[i*4+j];
+ }
+ }
+ __gluMakeIdentityf(inverse);
+
+ for (i = 0; i < 4; i++) {
+ //
+ // Look for largest element in column
+ //
+ swap = i;
+ for (j = i + 1; j < 4; j++) {
+ if (Math.abs(temp[j][i]) > Math.abs(temp[i][i])) {
+ swap = j;
+ }
+ }
+
+ if (swap != i) {
+ //
+ // Swap rows.
+ //
+ for (k = 0; k < 4; k++) {
+ t = temp[i][k];
+ temp[i][k] = temp[swap][k];
+ temp[swap][k] = t;
+
+ t = inverse[i*4+k];
+ inverse[i*4+k] = inverse[swap*4+k];
+ inverse[swap*4+k] = t;
+ }
+ }
+
+ if (temp[i][i] == 0) {
+ //
+ // No non-zero pivot. The matrix is singular, which shouldn't
+ // happen. This means the user gave us a bad matrix.
+ //
+ return false;
+ }
+
+ t = temp[i][i];
+ for (k = 0; k < 4; k++) {
+ temp[i][k] /= t;
+ inverse[i*4+k] /= t;
+ }
+ for (j = 0; j < 4; j++) {
+ if (j != i) {
+ t = temp[j][i];
+ for (k = 0; k < 4; k++) {
+ temp[j][k] -= temp[i][k] * t;
+ inverse[j*4+k] -= inverse[i*4+k]*t;
+ }
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * @param src
+ * @param inverse
+ *
+ * @return
+ */
+ private boolean __gluInvertMatrixf(FloatBuffer src, FloatBuffer inverse) {
+ int i, j, k, swap;
+ float t;
+
+ int srcPos = src.position();
+ int invPos = inverse.position();
+
+ FloatBuffer temp = tempMatrixBuf;
+
+ for (i = 0; i < 4; i++) {
+ for (j = 0; j < 4; j++) {
+ temp.put(i*4+j, src.get(i*4+j + srcPos));
+ }
+ }
+ __gluMakeIdentityf(inverse);
+
+ for (i = 0; i < 4; i++) {
+ //
+ // Look for largest element in column
+ //
+ swap = i;
+ for (j = i + 1; j < 4; j++) {
+ if (Math.abs(temp.get(j*4+i)) > Math.abs(temp.get(i*4+i))) {
+ swap = j;
+ }
+ }
+
+ if (swap != i) {
+ //
+ // Swap rows.
+ //
+ for (k = 0; k < 4; k++) {
+ t = temp.get(i*4+k);
+ temp.put(i*4+k, temp.get(swap*4+k));
+ temp.put(swap*4+k, t);
+
+ t = inverse.get(i*4+k + invPos);
+ inverse.put(i*4+k + invPos, inverse.get(swap*4+k + invPos));
+ inverse.put(swap*4+k + invPos, t);
+ }
+ }
+
+ if (temp.get(i*4+i) == 0) {
+ //
+ // No non-zero pivot. The matrix is singular, which shouldn't
+ // happen. This means the user gave us a bad matrix.
+ //
+ return false;
+ }
+
+ t = temp.get(i*4+i);
+ for (k = 0; k < 4; k++) {
+ temp.put(i*4+k, temp.get(i*4+k) / t);
+ inverse.put(i*4+k + invPos, inverse.get(i*4+k + invPos) / t);
+ }
+ for (j = 0; j < 4; j++) {
+ if (j != i) {
+ t = temp.get(j*4+i);
+ for (k = 0; k < 4; k++) {
+ temp.put(j*4+k, temp.get(j*4+k) - temp.get(i*4+k) * t);
+ inverse.put(j*4+k + invPos, inverse.get(j*4+k + invPos) - inverse.get(i*4+k + invPos) * t);
+ }
+ }
+ }
+ }
+ return true;
+ }
+
+
+ /**
+ * @param a
+ * @param b
+ * @param r
+ */
+ private void __gluMultMatricesf(float[] a, int a_offset, float[] b, int b_offset, float[] r) {
+ for (int i = 0; i < 4; i++) {
+ for (int j = 0; j < 4; j++) {
+ r[i*4+j] =
+ a[i*4+0+a_offset]*b[0*4+j+b_offset] +
+ a[i*4+1+a_offset]*b[1*4+j+b_offset] +
+ a[i*4+2+a_offset]*b[2*4+j+b_offset] +
+ a[i*4+3+a_offset]*b[3*4+j+b_offset];
+ }
+ }
+ }
+
+
+ /**
+ * @param a
+ * @param b
+ * @param r
+ */
+ private void __gluMultMatricesf(FloatBuffer a, FloatBuffer b, FloatBuffer r) {
+ int aPos = a.position();
+ int bPos = b.position();
+ int rPos = r.position();
+
+ for (int i = 0; i < 4; i++) {
+ for (int j = 0; j < 4; j++) {
+ r.put(i*4+j + rPos,
+ a.get(i*4+0+aPos)*b.get(0*4+j+bPos) +
+ a.get(i*4+1+aPos)*b.get(1*4+j+bPos) +
+ a.get(i*4+2+aPos)*b.get(2*4+j+bPos) +
+ a.get(i*4+3+aPos)*b.get(3*4+j+bPos));
+ }
+ }
+ }
+
+ /**
+ * Normalize vector
+ *
+ * @param v
+ */
+ private static void normalize(float[] v) {
+ float r;
+
+ r = (float) Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
+ if ( r == 0.0 )
+ return;
+
+ r = 1.0f / r;
+
+ v[0] *= r;
+ v[1] *= r;
+ v[2] *= r;
+
+ return;
+ }
+
+ /**
+ * Normalize vector
+ *
+ * @param v
+ */
+ private static void normalize(FloatBuffer v) {
+ float r;
+
+ int vPos = v.position();
+
+ r = (float) Math.sqrt(v.get(0+vPos) * v.get(0+vPos) +
+ v.get(1+vPos) * v.get(1+vPos) +
+ v.get(2+vPos) * v.get(2+vPos));
+ if ( r == 0.0 )
+ return;
+
+ r = 1.0f / r;
+
+ v.put(0+vPos, v.get(0+vPos) * r);
+ v.put(1+vPos, v.get(1+vPos) * r);
+ v.put(2+vPos, v.get(2+vPos) * r);
+
+ return;
+ }
+
+
+ /**
+ * Calculate cross-product
+ *
+ * @param v1
+ * @param v2
+ * @param result
+ */
+ private static void cross(float[] v1, float[] v2, float[] result) {
+ result[0] = v1[1] * v2[2] - v1[2] * v2[1];
+ result[1] = v1[2] * v2[0] - v1[0] * v2[2];
+ result[2] = v1[0] * v2[1] - v1[1] * v2[0];
+ }
+
+ /**
+ * Calculate cross-product
+ *
+ * @param v1
+ * @param v2
+ * @param result
+ */
+ private static void cross(FloatBuffer v1, FloatBuffer v2, FloatBuffer result) {
+ int v1Pos = v1.position();
+ int v2Pos = v2.position();
+ int rPos = result.position();
+
+ result.put(0+rPos, v1.get(1+v1Pos) * v2.get(2+v2Pos) - v1.get(2+v1Pos) * v2.get(1+v2Pos));
+ result.put(1+rPos, v1.get(2+v1Pos) * v2.get(0+v2Pos) - v1.get(0+v1Pos) * v2.get(2+v2Pos));
+ result.put(2+rPos, v1.get(0+v1Pos) * v2.get(1+v2Pos) - v1.get(1+v1Pos) * v2.get(0+v2Pos));
+ }
+
+ /**
+ * Method gluOrtho2D.
+ *
+ * @param left
+ * @param right
+ * @param bottom
+ * @param top
+ */
+ public void gluOrtho2D(GL2ES1 gl, float left, float right, float bottom, float top) {
+ gl.glOrthof(left, right, bottom, top, -1, 1);
+ }
+
+ /**
+ * Method gluPerspective.
+ *
+ * @param fovy
+ * @param aspect
+ * @param zNear
+ * @param zFar
+ */
+ public void gluPerspective(GL2ES1 gl, float fovy, float aspect, float zNear, float zFar) {
+ float sine, cotangent, deltaZ;
+ float radians = fovy / 2 * (float) Math.PI / 180;
+
+ deltaZ = zFar - zNear;
+ sine = (float) Math.sin(radians);
+
+ if ((deltaZ == 0) || (sine == 0) || (aspect == 0)) {
+ return;
+ }
+
+ cotangent = (float) Math.cos(radians) / sine;
+
+ __gluMakeIdentityf(matrixBuf);
+
+ matrixBuf.put(0 * 4 + 0, cotangent / aspect);
+ matrixBuf.put(1 * 4 + 1, cotangent);
+ matrixBuf.put(2 * 4 + 2, - (zFar + zNear) / deltaZ);
+ matrixBuf.put(2 * 4 + 3, -1);
+ matrixBuf.put(3 * 4 + 2, -2 * zNear * zFar / deltaZ);
+ matrixBuf.put(3 * 4 + 3, 0);
+
+ gl.glMultMatrixf(matrixBuf);
+ }
+
+ /**
+ * Method gluLookAt
+ *
+ * @param eyex
+ * @param eyey
+ * @param eyez
+ * @param centerx
+ * @param centery
+ * @param centerz
+ * @param upx
+ * @param upy
+ * @param upz
+ */
+ public void gluLookAt(GL2ES1 gl,
+ float eyex,
+ float eyey,
+ float eyez,
+ float centerx,
+ float centery,
+ float centerz,
+ float upx,
+ float upy,
+ float upz) {
+ FloatBuffer forward = this.forwardBuf;
+ FloatBuffer side = this.sideBuf;
+ FloatBuffer up = this.upBuf;
+
+ forward.put(0, centerx - eyex);
+ forward.put(1, centery - eyey);
+ forward.put(2, centerz - eyez);
+
+ up.put(0, upx);
+ up.put(1, upy);
+ up.put(2, upz);
+
+ normalize(forward);
+
+ /* Side = forward x up */
+ cross(forward, up, side);
+ normalize(side);
+
+ /* Recompute up as: up = side x forward */
+ cross(side, forward, up);
+
+ __gluMakeIdentityf(matrixBuf);
+ matrixBuf.put(0 * 4 + 0, side.get(0));
+ matrixBuf.put(1 * 4 + 0, side.get(1));
+ matrixBuf.put(2 * 4 + 0, side.get(2));
+
+ matrixBuf.put(0 * 4 + 1, up.get(0));
+ matrixBuf.put(1 * 4 + 1, up.get(1));
+ matrixBuf.put(2 * 4 + 1, up.get(2));
+
+ matrixBuf.put(0 * 4 + 2, -forward.get(0));
+ matrixBuf.put(1 * 4 + 2, -forward.get(1));
+ matrixBuf.put(2 * 4 + 2, -forward.get(2));
+
+ gl.glMultMatrixf(matrixBuf);
+ gl.glTranslatef(-eyex, -eyey, -eyez);
+ }
+
+ /**
+ * Method gluProject
+ *
+ * @param objx
+ * @param objy
+ * @param objz
+ * @param modelMatrix
+ * @param projMatrix
+ * @param viewport
+ * @param win_pos
+ *
+ * @return
+ */
+ public boolean gluProject(float objx,
+ float objy,
+ float objz,
+ float[] modelMatrix,
+ int modelMatrix_offset,
+ float[] projMatrix,
+ int projMatrix_offset,
+ int[] viewport,
+ int viewport_offset,
+ float[] win_pos,
+ int win_pos_offset ) {
+
+ float[] in = this.in;
+ float[] out = this.out;
+
+ in[0] = objx;
+ in[1] = objy;
+ in[2] = objz;
+ in[3] = 1.0f;
+
+ __gluMultMatrixVecf(modelMatrix, modelMatrix_offset, in, out);
+ __gluMultMatrixVecf(projMatrix, projMatrix_offset, out, in);
+
+ if (in[3] == 0.0f)
+ return false;
+
+ in[3] = (1.0f / in[3]) * 0.5f;
+
+ // Map x, y and z to range 0-1
+ in[0] = in[0] * in[3] + 0.5f;
+ in[1] = in[1] * in[3] + 0.5f;
+ in[2] = in[2] * in[3] + 0.5f;
+
+ // Map x,y to viewport
+ win_pos[0+win_pos_offset] = in[0] * viewport[2+viewport_offset] + viewport[0+viewport_offset];
+ win_pos[1+win_pos_offset] = in[1] * viewport[3+viewport_offset] + viewport[1+viewport_offset];
+ win_pos[2+win_pos_offset] = in[2];
+
+ return true;
+ }
+
+ /**
+ * Method gluProject
+ *
+ * @param objx
+ * @param objy
+ * @param objz
+ * @param modelMatrix
+ * @param projMatrix
+ * @param viewport
+ * @param win_pos
+ *
+ * @return
+ */
+ public boolean gluProject(float objx,
+ float objy,
+ float objz,
+ FloatBuffer modelMatrix,
+ FloatBuffer projMatrix,
+ IntBuffer viewport,
+ FloatBuffer win_pos) {
+
+ FloatBuffer in = this.inBuf;
+ FloatBuffer out = this.outBuf;
+
+ in.put(0, objx);
+ in.put(1, objy);
+ in.put(2, objz);
+ in.put(3, 1.0f);
+
+ __gluMultMatrixVecf(modelMatrix, in, out);
+ __gluMultMatrixVecf(projMatrix, out, in);
+
+ if (in.get(3) == 0.0f)
+ return false;
+
+ in.put(3, (1.0f / in.get(3)) * 0.5f);
+
+ // Map x, y and z to range 0-1
+ in.put(0, in.get(0) * in.get(3) + 0.5f);
+ in.put(1, in.get(1) * in.get(3) + 0.5f);
+ in.put(2, in.get(2) * in.get(3) + 0.5f);
+
+ // Map x,y to viewport
+ int vPos = viewport.position();
+ int wPos = win_pos.position();
+ win_pos.put(0+wPos, in.get(0) * viewport.get(2+vPos) + viewport.get(0+vPos));
+ win_pos.put(1+wPos, in.get(1) * viewport.get(3+vPos) + viewport.get(1+vPos));
+ win_pos.put(2+wPos, in.get(2));
+
+ return true;
+ }
+
+
+ /**
+ * Method gluUnproject
+ *
+ * @param winx
+ * @param winy
+ * @param winz
+ * @param modelMatrix
+ * @param projMatrix
+ * @param viewport
+ * @param obj_pos
+ *
+ * @return
+ */
+ public boolean gluUnProject(float winx,
+ float winy,
+ float winz,
+ float[] modelMatrix,
+ int modelMatrix_offset,
+ float[] projMatrix,
+ int projMatrix_offset,
+ int[] viewport,
+ int viewport_offset,
+ float[] obj_pos,
+ int obj_pos_offset) {
+ float[] in = this.in;
+ float[] out = this.out;
+
+ __gluMultMatricesf(modelMatrix, modelMatrix_offset, projMatrix, projMatrix_offset, matrix);
+
+ if (!__gluInvertMatrixf(matrix, matrix))
+ return false;
+
+ in[0] = winx;
+ in[1] = winy;
+ in[2] = winz;
+ in[3] = 1.0f;
+
+ // Map x and y from window coordinates
+ in[0] = (in[0] - viewport[0+viewport_offset]) / viewport[2+viewport_offset];
+ in[1] = (in[1] - viewport[1+viewport_offset]) / viewport[3+viewport_offset];
+
+ // Map to range -1 to 1
+ in[0] = in[0] * 2 - 1;
+ in[1] = in[1] * 2 - 1;
+ in[2] = in[2] * 2 - 1;
+
+ __gluMultMatrixVecf(matrix, 0, in, out);
+
+ if (out[3] == 0.0)
+ return false;
+
+ out[3] = 1.0f / out[3];
+
+ obj_pos[0+obj_pos_offset] = out[0] * out[3];
+ obj_pos[1+obj_pos_offset] = out[1] * out[3];
+ obj_pos[2+obj_pos_offset] = out[2] * out[3];
+
+ return true;
+ }
+
+
+ /**
+ * Method gluUnproject
+ *
+ * @param winx
+ * @param winy
+ * @param winz
+ * @param modelMatrix
+ * @param projMatrix
+ * @param viewport
+ * @param obj_pos
+ *
+ * @return
+ */
+ public boolean gluUnProject(float winx,
+ float winy,
+ float winz,
+ FloatBuffer modelMatrix,
+ FloatBuffer projMatrix,
+ IntBuffer viewport,
+ FloatBuffer obj_pos) {
+ FloatBuffer in = this.inBuf;
+ FloatBuffer out = this.outBuf;
+
+ __gluMultMatricesf(modelMatrix, projMatrix, matrixBuf);
+
+ if (!__gluInvertMatrixf(matrixBuf, matrixBuf))
+ return false;
+
+ in.put(0, winx);
+ in.put(1, winy);
+ in.put(2, winz);
+ in.put(3, 1.0f);
+
+ // Map x and y from window coordinates
+ int vPos = viewport.position();
+ int oPos = obj_pos.position();
+ in.put(0, (in.get(0) - viewport.get(0+vPos)) / viewport.get(2+vPos));
+ in.put(1, (in.get(1) - viewport.get(1+vPos)) / viewport.get(3+vPos));
+
+ // Map to range -1 to 1
+ in.put(0, in.get(0) * 2 - 1);
+ in.put(1, in.get(1) * 2 - 1);
+ in.put(2, in.get(2) * 2 - 1);
+
+ __gluMultMatrixVecf(matrixBuf, in, out);
+
+ if (out.get(3) == 0.0f)
+ return false;
+
+ out.put(3, 1.0f / out.get(3));
+
+ obj_pos.put(0+oPos, out.get(0) * out.get(3));
+ obj_pos.put(1+oPos, out.get(1) * out.get(3));
+ obj_pos.put(2+oPos, out.get(2) * out.get(3));
+
+ return true;
+ }
+
+
+ /**
+ * Method gluUnproject4
+ *
+ * @param winx
+ * @param winy
+ * @param winz
+ * @param clipw
+ * @param modelMatrix
+ * @param projMatrix
+ * @param viewport
+ * @param near
+ * @param far
+ * @param obj_pos
+ *
+ * @return
+ */
+ public boolean gluUnProject4(float winx,
+ float winy,
+ float winz,
+ float clipw,
+ float[] modelMatrix,
+ int modelMatrix_offset,
+ float[] projMatrix,
+ int projMatrix_offset,
+ int[] viewport,
+ int viewport_offset,
+ float near,
+ float far,
+ float[] obj_pos,
+ int obj_pos_offset ) {
+ float[] in = this.in;
+ float[] out = this.out;
+
+ __gluMultMatricesf(modelMatrix, modelMatrix_offset, projMatrix, projMatrix_offset, matrix);
+
+ if (!__gluInvertMatrixf(matrix, matrix))
+ return false;
+
+ in[0] = winx;
+ in[1] = winy;
+ in[2] = winz;
+ in[3] = clipw;
+
+ // Map x and y from window coordinates
+ in[0] = (in[0] - viewport[0+viewport_offset]) / viewport[2+viewport_offset];
+ in[1] = (in[1] - viewport[1+viewport_offset]) / viewport[3+viewport_offset];
+ in[2] = (in[2] - near) / (far - near);
+
+ // Map to range -1 to 1
+ in[0] = in[0] * 2 - 1;
+ in[1] = in[1] * 2 - 1;
+ in[2] = in[2] * 2 - 1;
+
+ __gluMultMatrixVecf(matrix, 0, in, out);
+
+ if (out[3] == 0.0f)
+ return false;
+
+ obj_pos[0+obj_pos_offset] = out[0];
+ obj_pos[1+obj_pos_offset] = out[1];
+ obj_pos[2+obj_pos_offset] = out[2];
+ obj_pos[3+obj_pos_offset] = out[3];
+ return true;
+ }
+
+ /**
+ * Method gluUnproject4
+ *
+ * @param winx
+ * @param winy
+ * @param winz
+ * @param clipw
+ * @param modelMatrix
+ * @param projMatrix
+ * @param viewport
+ * @param near
+ * @param far
+ * @param obj_pos
+ *
+ * @return
+ */
+ public boolean gluUnProject4(float winx,
+ float winy,
+ float winz,
+ float clipw,
+ FloatBuffer modelMatrix,
+ FloatBuffer projMatrix,
+ IntBuffer viewport,
+ float near,
+ float far,
+ FloatBuffer obj_pos) {
+ FloatBuffer in = this.inBuf;
+ FloatBuffer out = this.outBuf;
+
+ __gluMultMatricesf(modelMatrix, projMatrix, matrixBuf);
+
+ if (!__gluInvertMatrixf(matrixBuf, matrixBuf))
+ return false;
+
+ in.put(0, winx);
+ in.put(1, winy);
+ in.put(2, winz);
+ in.put(3, clipw);
+
+ // Map x and y from window coordinates
+ int vPos = viewport.position();
+ in.put(0, (in.get(0) - viewport.get(0+vPos)) / viewport.get(2+vPos));
+ in.put(1, (in.get(1) - viewport.get(1+vPos)) / viewport.get(3+vPos));
+ in.put(2, (in.get(2) - near) / (far - near));
+
+ // Map to range -1 to 1
+ in.put(0, in.get(0) * 2 - 1);
+ in.put(1, in.get(1) * 2 - 1);
+ in.put(2, in.get(2) * 2 - 1);
+
+ __gluMultMatrixVecf(matrixBuf, in, out);
+
+ if (out.get(3) == 0.0f)
+ return false;
+
+ int oPos = obj_pos.position();
+ obj_pos.put(0+oPos, out.get(0));
+ obj_pos.put(1+oPos, out.get(1));
+ obj_pos.put(2+oPos, out.get(2));
+ obj_pos.put(3+oPos, out.get(3));
+ return true;
+ }
+
+
+ /**
+ * Method gluPickMatrix
+ *
+ * @param x
+ * @param y
+ * @param deltaX
+ * @param deltaY
+ * @param viewport
+ */
+ public void gluPickMatrix(GL2ES1 gl,
+ float x,
+ float y,
+ float deltaX,
+ float deltaY,
+ IntBuffer viewport) {
+ if (deltaX <= 0 || deltaY <= 0) {
+ return;
+ }
+
+ /* Translate and scale the picked region to the entire window */
+ int vPos = viewport.position();
+ gl.glTranslatef((viewport.get(2+vPos) - 2 * (x - viewport.get(0+vPos))) / deltaX,
+ (viewport.get(3+vPos) - 2 * (y - viewport.get(1+vPos))) / deltaY,
+ 0);
+ gl.glScalef(viewport.get(2) / deltaX, viewport.get(3) / deltaY, 1.0f);
+ }
+
+ /**
+ * Method gluPickMatrix
+ *
+ * @param x
+ * @param y
+ * @param deltaX
+ * @param deltaY
+ * @param viewport
+ * @param viewport_offset
+ */
+ public void gluPickMatrix(GL2ES1 gl,
+ float x,
+ float y,
+ float deltaX,
+ float deltaY,
+ int[] viewport,
+ int viewport_offset) {
+ if (deltaX <= 0 || deltaY <= 0) {
+ return;
+ }
+
+ /* Translate and scale the picked region to the entire window */
+ gl.glTranslatef((viewport[2+viewport_offset] - 2 * (x - viewport[0+viewport_offset])) / deltaX,
+ (viewport[3+viewport_offset] - 2 * (y - viewport[1+viewport_offset])) / deltaY,
+ 0);
+ gl.glScalef(viewport[2+viewport_offset] / deltaX, viewport[3+viewport_offset] / deltaY, 1.0f);
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/awt/AWTUtil.java b/src/classes/com/sun/opengl/impl/awt/AWTUtil.java
new file mode 100644
index 000000000..980d07729
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/awt/AWTUtil.java
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ */
+
+package com.sun.opengl.impl.awt;
+
+import com.sun.opengl.impl.*;
+
+import javax.media.opengl.*;
+
+import java.lang.reflect.*;
+import java.awt.GraphicsEnvironment;
+
+public class AWTUtil {
+ // See whether we're running in headless mode
+ private static boolean headlessMode;
+ private static Class j2dClazz = null;
+ private static Method isOGLPipelineActive = null;
+ private static Method isQueueFlusherThread = null;
+ private static boolean j2dOk = false;
+
+ static {
+ lockedToolkit = false;
+ headlessMode = GraphicsEnvironment.isHeadless();
+ try {
+ j2dClazz = Class.forName("com.sun.opengl.impl.j2d.Java2D");
+ isOGLPipelineActive = j2dClazz.getMethod("isOGLPipelineActive", null);
+ isQueueFlusherThread = j2dClazz.getMethod("isQueueFlusherThread", null);
+ j2dOk = true;
+ } catch (Exception e) {}
+ }
+
+ private static boolean lockedToolkit;
+
+ public static void lockToolkit() throws GLException {
+ if (lockedToolkit) {
+ throw new GLException("Toolkit already locked");
+ }
+ lockedToolkit = true;
+
+ if (headlessMode) {
+ // Workaround for running (to some degree) in headless
+ // environments but still supporting rendering via pbuffers
+ // For full correctness, would need to implement a Lock class
+ return;
+ }
+
+ if(j2dOk) {
+ try {
+ if( !((Boolean)isOGLPipelineActive.invoke(null, null)).booleanValue() ||
+ !((Boolean)isQueueFlusherThread.invoke(null, null)).booleanValue() ) {
+ JAWT.getJAWT().Lock();
+ }
+ } catch (Exception e) { j2dOk=false; }
+ }
+ if(!j2dOk) {
+ JAWT.getJAWT().Lock();
+ }
+ }
+
+ public static void unlockToolkit() {
+ if (lockedToolkit) {
+ if (headlessMode) {
+ // Workaround for running (to some degree) in headless
+ // environments but still supporting rendering via pbuffers
+ // For full correctness, would need to implement a Lock class
+ return;
+ }
+
+ if(j2dOk) {
+ try {
+ if( !((Boolean)isOGLPipelineActive.invoke(null, null)).booleanValue() ||
+ !((Boolean)isQueueFlusherThread.invoke(null, null)).booleanValue() ) {
+ JAWT.getJAWT().Unlock();
+ }
+ } catch (Exception e) { j2dOk=false; }
+ }
+ if(!j2dOk) {
+ JAWT.getJAWT().Unlock();
+ }
+ lockedToolkit = false;
+ }
+ }
+
+ public static boolean isToolkitLocked() {
+ return lockedToolkit;
+ }
+
+}
diff --git a/src/classes/com/sun/opengl/impl/awt/JAWTWindow.java b/src/classes/com/sun/opengl/impl/awt/JAWTWindow.java
index 068088f71..630a75d5d 100644
--- a/src/classes/com/sun/opengl/impl/awt/JAWTWindow.java
+++ b/src/classes/com/sun/opengl/impl/awt/JAWTWindow.java
@@ -32,9 +32,6 @@
* You acknowledge that this software is not designed or intended for use
* in the design, construction, operation or maintenance of any nuclear
* facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
*/
package com.sun.opengl.impl.awt;
@@ -42,21 +39,28 @@ package com.sun.opengl.impl.awt;
import com.sun.opengl.impl.*;
import java.awt.Component;
+import java.awt.GraphicsEnvironment;
import javax.media.opengl.*;
import com.sun.opengl.impl.*;
public abstract class JAWTWindow implements NativeWindow {
protected static final boolean DEBUG = Debug.debug("GLDrawable");
+ // See whether we're running in headless mode
+ private static boolean headlessMode;
+
+ static {
+ headlessMode = GraphicsEnvironment.isHeadless();
+ }
+
// lifetime: forever
protected Component component;
protected boolean locked;
- // lifetime: valid while locked
+ // lifetime: valid after lock, forever until invalidate
protected long display;
protected long screen;
protected long drawable;
- // lifetime: valid after lock, forever
protected long visualID;
protected int screenIndex;
@@ -65,36 +69,38 @@ public abstract class JAWTWindow implements NativeWindow {
}
protected void init(Object windowObject) throws NativeWindowException {
- this.locked = false;
- this.component = (Component)comp;
- this.display= null;
- this.screen= null;
- this.screenIndex = -1;
- this.drawable= null;
- this.visualID = 0;
+ invalidate();
+ this.component = (Component)windowObject;
initNative();
}
- public abstract boolean initNative() throws NativeWindowException;
+ protected abstract void initNative() throws NativeWindowException;
+
+ public synchronized void invalidate() {
+ locked = false;
+ component = null;
+ display= 0;
+ screen= 0;
+ screenIndex = -1;
+ drawable= 0;
+ visualID = 0;
+ }
- public boolean lockSurface() throws NativeWindowException {
+ public synchronized int lockSurface() throws NativeWindowException {
if (locked) {
throw new NativeWindowException("Surface already locked");
}
locked = true;
+ return LOCK_SUCCESS;
}
- public void unlockSurface() {
- if (!locked) {
- throw new NativeWindowException("Surface already locked");
+ public synchronized void unlockSurface() {
+ if (locked) {
+ locked = false;
}
- locked = false;
- display= null;
- screen= null;
- drawable= null;
}
- public boolean isSurfaceLocked() {
+ public synchronized boolean isSurfaceLocked() {
return locked;
}
diff --git a/src/classes/com/sun/opengl/impl/egl/EGLContext.java b/src/classes/com/sun/opengl/impl/egl/EGLContext.java
index ab0fbb304..932cf5822 100755
--- a/src/classes/com/sun/opengl/impl/egl/EGLContext.java
+++ b/src/classes/com/sun/opengl/impl/egl/EGLContext.java
@@ -122,12 +122,10 @@ public class EGLContext extends GLContextImpl {
}
}
- EGLDrawableFactory factory = (EGLDrawableFactory) drawable.getFactory();
- boolean isGLES2 = EGLDrawableFactory.PROFILE_GLES2.equals(factory.getProfile());
int[] contextAttrs = null;
// FIXME: need to determine whether to specify the context
// attributes based on the EGL version
- if (isGLES2) {
+ if (GLProfile.isGLES2()) {
contextAttrs = new int[] {
EGL.EGL_CONTEXT_CLIENT_VERSION, 2,
EGL.EGL_NONE
diff --git a/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java b/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java
index 0227ba32f..b562d7423 100755
--- a/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java
+++ b/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java
@@ -41,7 +41,6 @@ import javax.media.opengl.*;
public class EGLDrawable extends GLDrawableImpl {
private long display;
- private GLCapabilities capabilities;
private GLCapabilitiesChooser chooser;
private _EGLConfig config;
private long surface;
@@ -51,9 +50,8 @@ public class EGLDrawable extends GLDrawableImpl {
NativeWindow component,
GLCapabilities capabilities,
GLCapabilitiesChooser chooser) throws GLException {
- this.factory = factory;
- this.component = component;
- this.capabilities = capabilities;
+ super(factory, component, true);
+ setChosenGLCapabilities(capabilities);
this.chooser = chooser;
display = EGL.eglGetDisplay((component.getDisplayHandle()>0)?component.getDisplayHandle():EGL.EGL_DEFAULT_DISPLAY);
@@ -141,11 +139,6 @@ public class EGLDrawable extends GLDrawableImpl {
EGL.eglSwapBuffers(display, surface);
}
- public GLCapabilities getChosenGLCapabilities() {
- // FIXME
- return null;
- }
-
public String toString() {
return "EGLDrawable[ displayHandle " + component.getDisplayHandle() +
", screenHandle "+ component.getScreenHandle() +
diff --git a/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java b/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java
index bd0f83a3c..a796aa01c 100755
--- a/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java
+++ b/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java
@@ -48,8 +48,8 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
// We need more than one of these on certain devices (the NVidia APX 2500 in particular)
private List/*<NativeLibrary>*/ glesLibraries;
- public EGLDrawableFactory(String profile) {
- super(profile);
+ public EGLDrawableFactory() {
+ super();
loadGLESLibrary();
EGL.resetProcAddressTable(this);
@@ -67,7 +67,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
glesLibNames.add("GLES_CM");
glesLibNames.add("GLES_CL");
// NVidia APX 2500
- if (PROFILE_GLES2.equals(getProfile())) {
+ if (GLProfile.isGLES2()) {
glesLibNames.add("libGLESv2_CM");
glesLibNames.add("GLESv2_CM");
} else {
@@ -85,7 +85,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
}
if (libs.isEmpty()) {
- throw new GLException("Unable to dynamically load OpenGL ES library for profile \"" + getProfile() + "\"");
+ throw new GLException("Unable to dynamically load OpenGL ES library for profile \"" + GLProfile.getProfile() + "\"");
}
// On the NVidia APX 2500 we need to separately load the EGL library
@@ -158,12 +158,6 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
return 0;
}
- public void lockAWTForJava2D() {
- }
-
- public void unlockAWTForJava2D() {
- }
-
public boolean canCreateContextOnJava2DSurface() {
return false;
}
@@ -185,7 +179,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
// FIXME: we need to query the EGL version to determine
// whether we are allowed to specify the renderable type
- if (PROFILE_GLES2.equals(getProfile())) {
+ if (GLProfile.isGLES2()) {
attrs[attrs.length - 3] = EGL.EGL_RENDERABLE_TYPE;
attrs[attrs.length - 2] = EGL.EGL_OPENGL_ES2_BIT;
}
@@ -340,10 +334,8 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
*/
- /*
- public GLContext createContextOnJava2DSurface(Graphics g, GLContext shareWith)
+ public GLContext createContextOnJava2DSurface(Object graphics, GLContext shareWith)
throws GLException {
throw new GLException("Unimplemented on this platform");
}
- */
}
diff --git a/src/classes/com/sun/opengl/impl/gl2/ProjectDouble.java b/src/classes/com/sun/opengl/impl/gl2/ProjectDouble.java
new file mode 100755
index 000000000..760aba15d
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/gl2/ProjectDouble.java
@@ -0,0 +1,1034 @@
+/*
+** License Applicability. Except to the extent portions of this file are
+** made subject to an alternative license as permitted in the SGI Free
+** Software License B, Version 1.1 (the "License"), the contents of this
+** file are subject only to the provisions of the License. You may not use
+** this file except in compliance with the License. You may obtain a copy
+** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
+** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
+**
+** http://oss.sgi.com/projects/FreeB
+**
+** Note that, as provided in the License, the Software is distributed on an
+** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
+** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
+** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
+** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
+**
+** NOTE: The Original Code (as defined below) has been licensed to Sun
+** Microsystems, Inc. ("Sun") under the SGI Free Software License B
+** (Version 1.1), shown above ("SGI License"). Pursuant to Section
+** 3.2(3) of the SGI License, Sun is distributing the Covered Code to
+** you under an alternative license ("Alternative License"). This
+** Alternative License includes all of the provisions of the SGI License
+** except that Section 2.2 and 11 are omitted. Any differences between
+** the Alternative License and the SGI License are offered solely by Sun
+** and not by SGI.
+**
+** Original Code. The Original Code is: OpenGL Sample Implementation,
+** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
+** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
+** Copyright in any portions created by third parties is as indicated
+** elsewhere herein. All Rights Reserved.
+**
+** Additional Notice Provisions: The application programming interfaces
+** established by SGI in conjunction with the Original Code are The
+** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
+** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
+** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
+** Window System(R) (Version 1.3), released October 19, 1998. This software
+** was created using the OpenGL(R) version 1.2.1 Sample Implementation
+** published by SGI, but has not been independently verified as being
+** compliant with the OpenGL(R) version 1.2.1 Specification.
+**
+** $Date$ $Revision$
+** $Header$
+*/
+
+/*
+ * Copyright (c) 2002-2004 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ */
+package com.sun.opengl.impl.gl2;
+
+import java.nio.*;
+
+import javax.media.opengl.*;
+import javax.media.opengl.util.*;
+import com.sun.opengl.impl.*;
+
+/**
+ * Project.java
+ * <p/>
+ * <p/>
+ * Created 11-jan-2004
+ *
+ * @author Erik Duijs
+ * @author Kenneth Russell
+ */
+public class ProjectDouble {
+ private static final double[] IDENTITY_MATRIX =
+ new double[] {
+ 1.0, 0.0, 0.0, 0.0,
+ 0.0, 1.0, 0.0, 0.0,
+ 0.0, 0.0, 1.0, 0.0,
+ 0.0, 0.0, 0.0, 1.0 };
+
+ // Note that we have cloned parts of the implementation in order to
+ // support incoming Buffers. The reason for this is to avoid loading
+ // non-direct buffer subclasses unnecessarily, because doing so can
+ // cause performance decreases on direct buffer operations, at least
+ // on the current HotSpot JVM. It would be nicer (and make the code
+ // simpler) to simply have the array-based entry points delegate to
+ // the versions taking Buffers by wrapping the arrays.
+
+ // Array-based implementation
+ private final double[] matrix = new double[16];
+
+ private final double[][] tempMatrix = new double[4][4];
+ private final double[] in = new double[4];
+ private final double[] out = new double[4];
+
+ private final double[] forward = new double[3];
+ private final double[] side = new double[3];
+ private final double[] up = new double[3];
+
+ // Buffer-based implementation
+ private final DoubleBuffer matrixBuf;
+
+ private final DoubleBuffer tempMatrixBuf;
+ private final DoubleBuffer inBuf;
+ private final DoubleBuffer outBuf;
+
+ private final DoubleBuffer forwardBuf;
+ private final DoubleBuffer sideBuf;
+ private final DoubleBuffer upBuf;
+
+ public ProjectDouble() {
+ // Use direct buffers to avoid loading indirect buffer
+ // implementations for applications trying to avoid doing so.
+ // Slice up one big buffer because some NIO implementations
+ // allocate a huge amount of memory to back even the smallest of
+ // buffers.
+ DoubleBuffer buf = BufferUtil.newDoubleBuffer(128);
+ int pos = 0;
+ int sz = 16;
+ matrixBuf = slice(buf, pos, sz);
+ pos += sz;
+ tempMatrixBuf = slice(buf, pos, sz);
+ pos += sz;
+ sz = 4;
+ inBuf = slice(buf, pos, sz);
+ pos += sz;
+ outBuf = slice(buf, pos, sz);
+ pos += sz;
+ sz = 3;
+ forwardBuf = slice(buf, pos, sz);
+ pos += sz;
+ sideBuf = slice(buf, pos, sz);
+ pos += sz;
+ upBuf = slice(buf, pos, sz);
+ }
+
+ private static DoubleBuffer slice(DoubleBuffer buf, int pos, int len) {
+ buf.position(pos);
+ buf.limit(pos + len);
+ return buf.slice();
+ }
+
+ /**
+ * Make matrix an identity matrix
+ */
+ private void __gluMakeIdentityd(DoubleBuffer m) {
+ int oldPos = m.position();
+ m.put(IDENTITY_MATRIX);
+ m.position(oldPos);
+ }
+
+ /**
+ * Make matrix an identity matrix
+ */
+ private void __gluMakeIdentityd(double[] m) {
+ for (int i = 0; i < 16; i++) {
+ m[i] = IDENTITY_MATRIX[i];
+ }
+ }
+
+ /**
+ * Method __gluMultMatrixVecd
+ *
+ * @param matrix
+ * @param in
+ * @param out
+ */
+ private void __gluMultMatrixVecd(double[] matrix, int matrix_offset, double[] in, double[] out) {
+ for (int i = 0; i < 4; i++) {
+ out[i] =
+ in[0] * matrix[0*4+i+matrix_offset] +
+ in[1] * matrix[1*4+i+matrix_offset] +
+ in[2] * matrix[2*4+i+matrix_offset] +
+ in[3] * matrix[3*4+i+matrix_offset];
+ }
+ }
+
+ /**
+ * Method __gluMultMatrixVecd
+ *
+ * @param matrix
+ * @param in
+ * @param out
+ */
+ private void __gluMultMatrixVecd(DoubleBuffer matrix, DoubleBuffer in, DoubleBuffer out) {
+ int inPos = in.position();
+ int outPos = out.position();
+ int matrixPos = matrix.position();
+ for (int i = 0; i < 4; i++) {
+ out.put(i + outPos,
+ in.get(0+inPos) * matrix.get(0*4+i+matrixPos) +
+ in.get(1+inPos) * matrix.get(1*4+i+matrixPos) +
+ in.get(2+inPos) * matrix.get(2*4+i+matrixPos) +
+ in.get(3+inPos) * matrix.get(3*4+i+matrixPos));
+ }
+ }
+
+ /**
+ * @param src
+ * @param inverse
+ *
+ * @return
+ */
+ private boolean __gluInvertMatrixd(double[] src, double[] inverse) {
+ int i, j, k, swap;
+ double t;
+ double[][] temp = tempMatrix;
+
+ for (i = 0; i < 4; i++) {
+ for (j = 0; j < 4; j++) {
+ temp[i][j] = src[i*4+j];
+ }
+ }
+ __gluMakeIdentityd(inverse);
+
+ for (i = 0; i < 4; i++) {
+ //
+ // Look for largest element in column
+ //
+ swap = i;
+ for (j = i + 1; j < 4; j++) {
+ if (Math.abs(temp[j][i]) > Math.abs(temp[i][i])) {
+ swap = j;
+ }
+ }
+
+ if (swap != i) {
+ //
+ // Swap rows.
+ //
+ for (k = 0; k < 4; k++) {
+ t = temp[i][k];
+ temp[i][k] = temp[swap][k];
+ temp[swap][k] = t;
+
+ t = inverse[i*4+k];
+ inverse[i*4+k] = inverse[swap*4+k];
+ inverse[swap*4+k] = t;
+ }
+ }
+
+ if (temp[i][i] == 0) {
+ //
+ // No non-zero pivot. The matrix is singular, which shouldn't
+ // happen. This means the user gave us a bad matrix.
+ //
+ return false;
+ }
+
+ t = temp[i][i];
+ for (k = 0; k < 4; k++) {
+ temp[i][k] /= t;
+ inverse[i*4+k] /= t;
+ }
+ for (j = 0; j < 4; j++) {
+ if (j != i) {
+ t = temp[j][i];
+ for (k = 0; k < 4; k++) {
+ temp[j][k] -= temp[i][k] * t;
+ inverse[j*4+k] -= inverse[i*4+k]*t;
+ }
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * @param src
+ * @param inverse
+ *
+ * @return
+ */
+ private boolean __gluInvertMatrixd(DoubleBuffer src, DoubleBuffer inverse) {
+ int i, j, k, swap;
+ double t;
+
+ int srcPos = src.position();
+ int invPos = inverse.position();
+
+ DoubleBuffer temp = tempMatrixBuf;
+
+ for (i = 0; i < 4; i++) {
+ for (j = 0; j < 4; j++) {
+ temp.put(i*4+j, src.get(i*4+j + srcPos));
+ }
+ }
+ __gluMakeIdentityd(inverse);
+
+ for (i = 0; i < 4; i++) {
+ //
+ // Look for largest element in column
+ //
+ swap = i;
+ for (j = i + 1; j < 4; j++) {
+ if (Math.abs(temp.get(j*4+i)) > Math.abs(temp.get(i*4+i))) {
+ swap = j;
+ }
+ }
+
+ if (swap != i) {
+ //
+ // Swap rows.
+ //
+ for (k = 0; k < 4; k++) {
+ t = temp.get(i*4+k);
+ temp.put(i*4+k, temp.get(swap*4+k));
+ temp.put(swap*4+k, t);
+
+ t = inverse.get(i*4+k + invPos);
+ inverse.put(i*4+k + invPos, inverse.get(swap*4+k + invPos));
+ inverse.put(swap*4+k + invPos, t);
+ }
+ }
+
+ if (temp.get(i*4+i) == 0) {
+ //
+ // No non-zero pivot. The matrix is singular, which shouldn't
+ // happen. This means the user gave us a bad matrix.
+ //
+ return false;
+ }
+
+ t = temp.get(i*4+i);
+ for (k = 0; k < 4; k++) {
+ temp.put(i*4+k, temp.get(i*4+k) / t);
+ inverse.put(i*4+k + invPos, inverse.get(i*4+k + invPos) / t);
+ }
+ for (j = 0; j < 4; j++) {
+ if (j != i) {
+ t = temp.get(j*4+i);
+ for (k = 0; k < 4; k++) {
+ temp.put(j*4+k, temp.get(j*4+k) - temp.get(i*4+k) * t);
+ inverse.put(j*4+k + invPos, inverse.get(j*4+k + invPos) - inverse.get(i*4+k + invPos) * t);
+ }
+ }
+ }
+ }
+ return true;
+ }
+
+
+ /**
+ * @param a
+ * @param b
+ * @param r
+ */
+ private void __gluMultMatricesd(double[] a, int a_offset, double[] b, int b_offset, double[] r) {
+ for (int i = 0; i < 4; i++) {
+ for (int j = 0; j < 4; j++) {
+ r[i*4+j] =
+ a[i*4+0+a_offset]*b[0*4+j+b_offset] +
+ a[i*4+1+a_offset]*b[1*4+j+b_offset] +
+ a[i*4+2+a_offset]*b[2*4+j+b_offset] +
+ a[i*4+3+a_offset]*b[3*4+j+b_offset];
+ }
+ }
+ }
+
+
+ /**
+ * @param a
+ * @param b
+ * @param r
+ */
+ private void __gluMultMatricesd(DoubleBuffer a, DoubleBuffer b, DoubleBuffer r) {
+ int aPos = a.position();
+ int bPos = b.position();
+ int rPos = r.position();
+
+ for (int i = 0; i < 4; i++) {
+ for (int j = 0; j < 4; j++) {
+ r.put(i*4+j + rPos,
+ a.get(i*4+0+aPos)*b.get(0*4+j+bPos) +
+ a.get(i*4+1+aPos)*b.get(1*4+j+bPos) +
+ a.get(i*4+2+aPos)*b.get(2*4+j+bPos) +
+ a.get(i*4+3+aPos)*b.get(3*4+j+bPos));
+ }
+ }
+ }
+
+ /**
+ * Normalize vector
+ *
+ * @param v
+ */
+ private static void normalize(double[] v) {
+ double r;
+
+ r = Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
+ if ( r == 0.0 )
+ return;
+
+ r = 1.0 / r;
+
+ v[0] *= r;
+ v[1] *= r;
+ v[2] *= r;
+
+ return;
+ }
+
+ /**
+ * Normalize vector
+ *
+ * @param v
+ */
+ private static void normalize(DoubleBuffer v) {
+ double r;
+
+ int vPos = v.position();
+
+ r = Math.sqrt(v.get(0+vPos) * v.get(0+vPos) +
+ v.get(1+vPos) * v.get(1+vPos) +
+ v.get(2+vPos) * v.get(2+vPos));
+ if ( r == 0.0 )
+ return;
+
+ r = 1.0 / r;
+
+ v.put(0+vPos, v.get(0+vPos) * r);
+ v.put(1+vPos, v.get(1+vPos) * r);
+ v.put(2+vPos, v.get(2+vPos) * r);
+
+ return;
+ }
+
+
+ /**
+ * Calculate cross-product
+ *
+ * @param v1
+ * @param v2
+ * @param result
+ */
+ private static void cross(double[] v1, double[] v2, double[] result) {
+ result[0] = v1[1] * v2[2] - v1[2] * v2[1];
+ result[1] = v1[2] * v2[0] - v1[0] * v2[2];
+ result[2] = v1[0] * v2[1] - v1[1] * v2[0];
+ }
+
+ /**
+ * Calculate cross-product
+ *
+ * @param v1
+ * @param v2
+ * @param result
+ */
+ private static void cross(DoubleBuffer v1, DoubleBuffer v2, DoubleBuffer result) {
+ int v1Pos = v1.position();
+ int v2Pos = v2.position();
+ int rPos = result.position();
+
+ result.put(0+rPos, v1.get(1+v1Pos) * v2.get(2+v2Pos) - v1.get(2+v1Pos) * v2.get(1+v2Pos));
+ result.put(1+rPos, v1.get(2+v1Pos) * v2.get(0+v2Pos) - v1.get(0+v1Pos) * v2.get(2+v2Pos));
+ result.put(2+rPos, v1.get(0+v1Pos) * v2.get(1+v2Pos) - v1.get(1+v1Pos) * v2.get(0+v2Pos));
+ }
+
+ /**
+ * Method gluOrtho2D.
+ *
+ * @param left
+ * @param right
+ * @param bottom
+ * @param top
+ */
+ public void gluOrtho2D(GL2 gl, double left, double right, double bottom, double top) {
+ gl.glOrtho(left, right, bottom, top, -1, 1);
+ }
+
+ /**
+ * Method gluPerspective.
+ *
+ * @param fovy
+ * @param aspect
+ * @param zNear
+ * @param zFar
+ */
+ public void gluPerspective(GL2 gl, double fovy, double aspect, double zNear, double zFar) {
+ double sine, cotangent, deltaZ;
+ double radians = fovy / 2 * Math.PI / 180;
+
+ deltaZ = zFar - zNear;
+ sine = Math.sin(radians);
+
+ if ((deltaZ == 0) || (sine == 0) || (aspect == 0)) {
+ return;
+ }
+
+ cotangent = Math.cos(radians) / sine;
+
+ __gluMakeIdentityd(matrixBuf);
+
+ matrixBuf.put(0 * 4 + 0, cotangent / aspect);
+ matrixBuf.put(1 * 4 + 1, cotangent);
+ matrixBuf.put(2 * 4 + 2, - (zFar + zNear) / deltaZ);
+ matrixBuf.put(2 * 4 + 3, -1);
+ matrixBuf.put(3 * 4 + 2, -2 * zNear * zFar / deltaZ);
+ matrixBuf.put(3 * 4 + 3, 0);
+
+ gl.glMultMatrixd(matrixBuf);
+ }
+
+ /**
+ * Method gluLookAt
+ *
+ * @param eyex
+ * @param eyey
+ * @param eyez
+ * @param centerx
+ * @param centery
+ * @param centerz
+ * @param upx
+ * @param upy
+ * @param upz
+ */
+ public void gluLookAt(GL2 gl,
+ double eyex,
+ double eyey,
+ double eyez,
+ double centerx,
+ double centery,
+ double centerz,
+ double upx,
+ double upy,
+ double upz) {
+ DoubleBuffer forward = this.forwardBuf;
+ DoubleBuffer side = this.sideBuf;
+ DoubleBuffer up = this.upBuf;
+
+ forward.put(0, centerx - eyex);
+ forward.put(1, centery - eyey);
+ forward.put(2, centerz - eyez);
+
+ up.put(0, upx);
+ up.put(1, upy);
+ up.put(2, upz);
+
+ normalize(forward);
+
+ /* Side = forward x up */
+ cross(forward, up, side);
+ normalize(side);
+
+ /* Recompute up as: up = side x forward */
+ cross(side, forward, up);
+
+ __gluMakeIdentityd(matrixBuf);
+ matrixBuf.put(0 * 4 + 0, side.get(0));
+ matrixBuf.put(1 * 4 + 0, side.get(1));
+ matrixBuf.put(2 * 4 + 0, side.get(2));
+
+ matrixBuf.put(0 * 4 + 1, up.get(0));
+ matrixBuf.put(1 * 4 + 1, up.get(1));
+ matrixBuf.put(2 * 4 + 1, up.get(2));
+
+ matrixBuf.put(0 * 4 + 2, -forward.get(0));
+ matrixBuf.put(1 * 4 + 2, -forward.get(1));
+ matrixBuf.put(2 * 4 + 2, -forward.get(2));
+
+ gl.glMultMatrixd(matrixBuf);
+ gl.glTranslated(-eyex, -eyey, -eyez);
+ }
+
+ /**
+ * Method gluProject
+ *
+ * @param objx
+ * @param objy
+ * @param objz
+ * @param modelMatrix
+ * @param projMatrix
+ * @param viewport
+ * @param win_pos
+ *
+ * @return
+ */
+ public boolean gluProject(double objx,
+ double objy,
+ double objz,
+ double[] modelMatrix,
+ int modelMatrix_offset,
+ double[] projMatrix,
+ int projMatrix_offset,
+ int[] viewport,
+ int viewport_offset,
+ double[] win_pos,
+ int win_pos_offset ) {
+
+ double[] in = this.in;
+ double[] out = this.out;
+
+ in[0] = objx;
+ in[1] = objy;
+ in[2] = objz;
+ in[3] = 1.0;
+
+ __gluMultMatrixVecd(modelMatrix, modelMatrix_offset, in, out);
+ __gluMultMatrixVecd(projMatrix, projMatrix_offset, out, in);
+
+ if (in[3] == 0.0)
+ return false;
+
+ in[3] = (1.0 / in[3]) * 0.5;
+
+ // Map x, y and z to range 0-1
+ in[0] = in[0] * in[3] + 0.5f;
+ in[1] = in[1] * in[3] + 0.5f;
+ in[2] = in[2] * in[3] + 0.5f;
+
+ // Map x,y to viewport
+ win_pos[0+win_pos_offset] = in[0] * viewport[2+viewport_offset] + viewport[0+viewport_offset];
+ win_pos[1+win_pos_offset] = in[1] * viewport[3+viewport_offset] + viewport[1+viewport_offset];
+ win_pos[2+win_pos_offset] = in[2];
+
+ return true;
+ }
+
+ /**
+ * Method gluProject
+ *
+ * @param objx
+ * @param objy
+ * @param objz
+ * @param modelMatrix
+ * @param projMatrix
+ * @param viewport
+ * @param win_pos
+ *
+ * @return
+ */
+ public boolean gluProject(double objx,
+ double objy,
+ double objz,
+ DoubleBuffer modelMatrix,
+ DoubleBuffer projMatrix,
+ IntBuffer viewport,
+ DoubleBuffer win_pos) {
+
+ DoubleBuffer in = this.inBuf;
+ DoubleBuffer out = this.outBuf;
+
+ in.put(0, objx);
+ in.put(1, objy);
+ in.put(2, objz);
+ in.put(3, 1.0);
+
+ __gluMultMatrixVecd(modelMatrix, in, out);
+ __gluMultMatrixVecd(projMatrix, out, in);
+
+ if (in.get(3) == 0.0)
+ return false;
+
+ in.put(3, (1.0 / in.get(3)) * 0.5);
+
+ // Map x, y and z to range 0-1
+ in.put(0, in.get(0) * in.get(3) + 0.5f);
+ in.put(1, in.get(1) * in.get(3) + 0.5f);
+ in.put(2, in.get(2) * in.get(3) + 0.5f);
+
+ // Map x,y to viewport
+ int vPos = viewport.position();
+ int wPos = win_pos.position();
+ win_pos.put(0+wPos, in.get(0) * viewport.get(2+vPos) + viewport.get(0+vPos));
+ win_pos.put(1+wPos, in.get(1) * viewport.get(3+vPos) + viewport.get(1+vPos));
+ win_pos.put(2+wPos, in.get(2));
+
+ return true;
+ }
+
+
+ /**
+ * Method gluUnproject
+ *
+ * @param winx
+ * @param winy
+ * @param winz
+ * @param modelMatrix
+ * @param projMatrix
+ * @param viewport
+ * @param obj_pos
+ *
+ * @return
+ */
+ public boolean gluUnProject(double winx,
+ double winy,
+ double winz,
+ double[] modelMatrix,
+ int modelMatrix_offset,
+ double[] projMatrix,
+ int projMatrix_offset,
+ int[] viewport,
+ int viewport_offset,
+ double[] obj_pos,
+ int obj_pos_offset) {
+ double[] in = this.in;
+ double[] out = this.out;
+
+ __gluMultMatricesd(modelMatrix, modelMatrix_offset, projMatrix, projMatrix_offset, matrix);
+
+ if (!__gluInvertMatrixd(matrix, matrix))
+ return false;
+
+ in[0] = winx;
+ in[1] = winy;
+ in[2] = winz;
+ in[3] = 1.0;
+
+ // Map x and y from window coordinates
+ in[0] = (in[0] - viewport[0+viewport_offset]) / viewport[2+viewport_offset];
+ in[1] = (in[1] - viewport[1+viewport_offset]) / viewport[3+viewport_offset];
+
+ // Map to range -1 to 1
+ in[0] = in[0] * 2 - 1;
+ in[1] = in[1] * 2 - 1;
+ in[2] = in[2] * 2 - 1;
+
+ __gluMultMatrixVecd(matrix, 0, in, out);
+
+ if (out[3] == 0.0)
+ return false;
+
+ out[3] = 1.0 / out[3];
+
+ obj_pos[0+obj_pos_offset] = out[0] * out[3];
+ obj_pos[1+obj_pos_offset] = out[1] * out[3];
+ obj_pos[2+obj_pos_offset] = out[2] * out[3];
+
+ return true;
+ }
+
+
+ /**
+ * Method gluUnproject
+ *
+ * @param winx
+ * @param winy
+ * @param winz
+ * @param modelMatrix
+ * @param projMatrix
+ * @param viewport
+ * @param obj_pos
+ *
+ * @return
+ */
+ public boolean gluUnProject(double winx,
+ double winy,
+ double winz,
+ DoubleBuffer modelMatrix,
+ DoubleBuffer projMatrix,
+ IntBuffer viewport,
+ DoubleBuffer obj_pos) {
+ DoubleBuffer in = this.inBuf;
+ DoubleBuffer out = this.outBuf;
+
+ __gluMultMatricesd(modelMatrix, projMatrix, matrixBuf);
+
+ if (!__gluInvertMatrixd(matrixBuf, matrixBuf))
+ return false;
+
+ in.put(0, winx);
+ in.put(1, winy);
+ in.put(2, winz);
+ in.put(3, 1.0);
+
+ // Map x and y from window coordinates
+ int vPos = viewport.position();
+ int oPos = obj_pos.position();
+ in.put(0, (in.get(0) - viewport.get(0+vPos)) / viewport.get(2+vPos));
+ in.put(1, (in.get(1) - viewport.get(1+vPos)) / viewport.get(3+vPos));
+
+ // Map to range -1 to 1
+ in.put(0, in.get(0) * 2 - 1);
+ in.put(1, in.get(1) * 2 - 1);
+ in.put(2, in.get(2) * 2 - 1);
+
+ __gluMultMatrixVecd(matrixBuf, in, out);
+
+ if (out.get(3) == 0.0)
+ return false;
+
+ out.put(3, 1.0 / out.get(3));
+
+ obj_pos.put(0+oPos, out.get(0) * out.get(3));
+ obj_pos.put(1+oPos, out.get(1) * out.get(3));
+ obj_pos.put(2+oPos, out.get(2) * out.get(3));
+
+ return true;
+ }
+
+
+ /**
+ * Method gluUnproject4
+ *
+ * @param winx
+ * @param winy
+ * @param winz
+ * @param clipw
+ * @param modelMatrix
+ * @param projMatrix
+ * @param viewport
+ * @param near
+ * @param far
+ * @param obj_pos
+ *
+ * @return
+ */
+ public boolean gluUnProject4(double winx,
+ double winy,
+ double winz,
+ double clipw,
+ double[] modelMatrix,
+ int modelMatrix_offset,
+ double[] projMatrix,
+ int projMatrix_offset,
+ int[] viewport,
+ int viewport_offset,
+ double near,
+ double far,
+ double[] obj_pos,
+ int obj_pos_offset ) {
+ double[] in = this.in;
+ double[] out = this.out;
+
+ __gluMultMatricesd(modelMatrix, modelMatrix_offset, projMatrix, projMatrix_offset, matrix);
+
+ if (!__gluInvertMatrixd(matrix, matrix))
+ return false;
+
+ in[0] = winx;
+ in[1] = winy;
+ in[2] = winz;
+ in[3] = clipw;
+
+ // Map x and y from window coordinates
+ in[0] = (in[0] - viewport[0+viewport_offset]) / viewport[2+viewport_offset];
+ in[1] = (in[1] - viewport[1+viewport_offset]) / viewport[3+viewport_offset];
+ in[2] = (in[2] - near) / (far - near);
+
+ // Map to range -1 to 1
+ in[0] = in[0] * 2 - 1;
+ in[1] = in[1] * 2 - 1;
+ in[2] = in[2] * 2 - 1;
+
+ __gluMultMatrixVecd(matrix, 0, in, out);
+
+ if (out[3] == 0.0)
+ return false;
+
+ obj_pos[0+obj_pos_offset] = out[0];
+ obj_pos[1+obj_pos_offset] = out[1];
+ obj_pos[2+obj_pos_offset] = out[2];
+ obj_pos[3+obj_pos_offset] = out[3];
+ return true;
+ }
+
+ /**
+ * Method gluUnproject4
+ *
+ * @param winx
+ * @param winy
+ * @param winz
+ * @param clipw
+ * @param modelMatrix
+ * @param projMatrix
+ * @param viewport
+ * @param near
+ * @param far
+ * @param obj_pos
+ *
+ * @return
+ */
+ public boolean gluUnProject4(double winx,
+ double winy,
+ double winz,
+ double clipw,
+ DoubleBuffer modelMatrix,
+ DoubleBuffer projMatrix,
+ IntBuffer viewport,
+ double near,
+ double far,
+ DoubleBuffer obj_pos) {
+ DoubleBuffer in = this.inBuf;
+ DoubleBuffer out = this.outBuf;
+
+ __gluMultMatricesd(modelMatrix, projMatrix, matrixBuf);
+
+ if (!__gluInvertMatrixd(matrixBuf, matrixBuf))
+ return false;
+
+ in.put(0, winx);
+ in.put(1, winy);
+ in.put(2, winz);
+ in.put(3, clipw);
+
+ // Map x and y from window coordinates
+ int vPos = viewport.position();
+ in.put(0, (in.get(0) - viewport.get(0+vPos)) / viewport.get(2+vPos));
+ in.put(1, (in.get(1) - viewport.get(1+vPos)) / viewport.get(3+vPos));
+ in.put(2, (in.get(2) - near) / (far - near));
+
+ // Map to range -1 to 1
+ in.put(0, in.get(0) * 2 - 1);
+ in.put(1, in.get(1) * 2 - 1);
+ in.put(2, in.get(2) * 2 - 1);
+
+ __gluMultMatrixVecd(matrixBuf, in, out);
+
+ if (out.get(3) == 0.0)
+ return false;
+
+ int oPos = obj_pos.position();
+ obj_pos.put(0+oPos, out.get(0));
+ obj_pos.put(1+oPos, out.get(1));
+ obj_pos.put(2+oPos, out.get(2));
+ obj_pos.put(3+oPos, out.get(3));
+ return true;
+ }
+
+
+ /**
+ * Method gluPickMatrix
+ *
+ * @param x
+ * @param y
+ * @param deltaX
+ * @param deltaY
+ * @param viewport
+ */
+ public void gluPickMatrix(GL2 gl,
+ double x,
+ double y,
+ double deltaX,
+ double deltaY,
+ IntBuffer viewport) {
+ if (deltaX <= 0 || deltaY <= 0) {
+ return;
+ }
+
+ /* Translate and scale the picked region to the entire window */
+ int vPos = viewport.position();
+ gl.glTranslated((viewport.get(2+vPos) - 2 * (x - viewport.get(0+vPos))) / deltaX,
+ (viewport.get(3+vPos) - 2 * (y - viewport.get(1+vPos))) / deltaY,
+ 0);
+ gl.glScaled(viewport.get(2) / deltaX, viewport.get(3) / deltaY, 1.0);
+ }
+
+ /**
+ * Method gluPickMatrix
+ *
+ * @param x
+ * @param y
+ * @param deltaX
+ * @param deltaY
+ * @param viewport
+ * @param viewport_offset
+ */
+ public void gluPickMatrix(GL2 gl,
+ double x,
+ double y,
+ double deltaX,
+ double deltaY,
+ int[] viewport,
+ int viewport_offset) {
+ if (deltaX <= 0 || deltaY <= 0) {
+ return;
+ }
+
+ /* Translate and scale the picked region to the entire window */
+ gl.glTranslated((viewport[2+viewport_offset] - 2 * (x - viewport[0+viewport_offset])) / deltaX,
+ (viewport[3+viewport_offset] - 2 * (y - viewport[1+viewport_offset])) / deltaY,
+ 0);
+ gl.glScaled(viewport[2+viewport_offset] / deltaX, viewport[3+viewport_offset] / deltaY, 1.0);
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/gl2/Util.java b/src/classes/com/sun/opengl/impl/gl2/Util.java
new file mode 100644
index 000000000..0fc72daa9
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/gl2/Util.java
@@ -0,0 +1,244 @@
+/*
+ * Copyright (c) 2002-2004 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ */
+
+package com.sun.opengl.impl.gl2;
+
+import com.sun.opengl.impl.*;
+
+import java.nio.IntBuffer;
+import javax.media.opengl.*;
+
+/**
+ * Util.java
+ * <p/>
+ * <p/>
+ * Created 7-jan-2004
+ *
+ * @author Erik Duijs
+ */
+class Util {
+
+ /**
+ * temp int[] of one for getting an int from some GL functions
+ */
+ private int[] scratch = new int[1];
+
+ /**
+ * Return ceiling of integer division
+ *
+ * @param a
+ * @param b
+ *
+ * @return int
+ */
+ protected static int ceil(int a, int b) {
+ return (a % b == 0 ? a / b : a / b + 1);
+ }
+
+ /**
+ * Method compPerPix.
+ *
+ * @param format
+ *
+ * @return int
+ */
+ protected static int compPerPix(int format) {
+ /* Determine number of components per pixel */
+ switch ( format ) {
+ case GL2.GL_COLOR_INDEX:
+ case GL2.GL_STENCIL_INDEX:
+ case GL2.GL_DEPTH_COMPONENT:
+ case GL2.GL_RED:
+ case GL2.GL_GREEN:
+ case GL2.GL_BLUE:
+ case GL2.GL_ALPHA:
+ case GL2.GL_LUMINANCE:
+ return 1;
+ case GL2.GL_LUMINANCE_ALPHA:
+ return 2;
+ case GL2.GL_RGB:
+ case GL2.GL_BGR:
+ return 3;
+ case GL2.GL_RGBA:
+ case GL2.GL_BGRA:
+ return 4;
+ default :
+ return -1;
+ }
+ }
+
+ /**
+ * Method nearestPower.
+ * <p/>
+ * Compute the nearest power of 2 number. This algorithm is a little strange, but it works quite well.
+ *
+ * @param value
+ *
+ * @return int
+ */
+ protected static int nearestPower(int value) {
+ int i;
+
+ i = 1;
+
+ /* Error! */
+ if ( value == 0 )
+ return -1;
+
+ for ( ; ; ) {
+ if ( value == 1 ) {
+ return i;
+ } else if ( value == 3 ) {
+ return i << 2;
+ }
+ value >>= 1;
+ i <<= 1;
+ }
+ }
+
+ /**
+ * Method bytesPerPixel.
+ *
+ * @param format
+ * @param type
+ *
+ * @return int
+ */
+ protected static int bytesPerPixel(int format, int type) {
+ int n, m;
+
+ switch ( format ) {
+ case GL2.GL_COLOR_INDEX:
+ case GL2.GL_STENCIL_INDEX:
+ case GL2.GL_DEPTH_COMPONENT:
+ case GL2.GL_RED:
+ case GL2.GL_GREEN:
+ case GL2.GL_BLUE:
+ case GL2.GL_ALPHA:
+ case GL2.GL_LUMINANCE:
+ n = 1;
+ break;
+ case GL2.GL_LUMINANCE_ALPHA:
+ n = 2;
+ break;
+ case GL2.GL_RGB:
+ case GL2.GL_BGR:
+ n = 3;
+ break;
+ case GL2.GL_RGBA:
+ case GL2.GL_BGRA:
+ n = 4;
+ break;
+ default :
+ n = 0;
+ }
+
+ switch ( type ) {
+ case GL2.GL_UNSIGNED_BYTE:
+ m = 1;
+ break;
+ case GL2.GL_BYTE:
+ m = 1;
+ break;
+ case GL2.GL_BITMAP:
+ m = 1;
+ break;
+ case GL2.GL_UNSIGNED_SHORT:
+ m = 2;
+ break;
+ case GL2.GL_SHORT:
+ m = 2;
+ break;
+ case GL2.GL_UNSIGNED_INT:
+ m = 4;
+ break;
+ case GL2.GL_INT:
+ m = 4;
+ break;
+ case GL2.GL_FLOAT:
+ m = 4;
+ break;
+ default :
+ m = 0;
+ }
+
+ return n * m;
+ }
+
+ /**
+ * Convenience method for returning an int, rather than getting it out of a buffer yourself.
+ *
+ * @param what
+ *
+ * @return int
+ */
+ protected int glGetIntegerv(GL gl, int what) {
+ gl.glGetIntegerv(what, scratch, 0);
+ return scratch[0];
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/gl2/fixme/GLObjectTracker.java b/src/classes/com/sun/opengl/impl/gl2/fixme/GLObjectTracker.java
new file mode 100755
index 000000000..885f3cb28
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/gl2/fixme/GLObjectTracker.java
@@ -0,0 +1,835 @@
+/*
+ * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.gl2;
+
+import com.sun.opengl.impl.*;
+
+import java.nio.*;
+import javax.media.opengl.*;
+
+/**
+ * Tracks the creation of server-side OpenGL objects which can be
+ * shared between contexts. Ordinarily, when an OpenGL context is
+ * deleted and no other contexts are sharing server-side objects with
+ * it, all of the server-side objects are automatically deleted by the
+ * OpenGL implementation. It is not necessary for the end user to
+ * explicitly delete these objects. However, when the Java2D/OpenGL
+ * pipeline is active and frame buffer objects are being used for
+ * rendering, it is necessary for all OpenGL contexts created by JOGL
+ * to share server-side objects with the Java2D OpenGL context. This
+ * means that these objects "leak" into the namespace used by Java2D.
+ * In order to prevent memory leaks and to present the same
+ * programming model to the end user, it is necessary to track the
+ * creation and destruction of all of these server-side OpenGL objects
+ * and to explicitly release them when all of the JOGL-created
+ * contexts which can see them have been released. <P>
+ *
+ * The {@link #ref ref} and {@link #unref unref} methods should be
+ * used during the creation and destruction of OpenGL contexts by JOGL
+ * in order to update the liveness of the objects being tracked. The
+ * various other methods should be called by the OpenGL binding in the
+ * various named methods.
+ */
+
+public class GLObjectTracker {
+ private static final boolean DEBUG = Debug.debug("GLObjectTracker");
+
+ //----------------------------------------------------------------------
+ // Adders
+ //
+
+ // glGenBuffers
+ public synchronized void addBuffers(int n, IntBuffer ids) {
+ add(getList(BUFFERS), n, ids);
+ }
+
+ // glGenBuffers
+ public synchronized void addBuffers(int n, int[] ids, int ids_offset) {
+ add(getList(BUFFERS), n, ids, ids_offset);
+ }
+
+ // glGenBuffersARB
+ public synchronized void addBuffersARB(int n, IntBuffer ids) {
+ add(getList(BUFFERS_ARB), n, ids);
+ }
+
+ // glGenBuffersARB
+ public synchronized void addBuffersARB(int n, int[] ids, int ids_offset) {
+ add(getList(BUFFERS_ARB), n, ids, ids_offset);
+ }
+
+ // glGenFencesAPPLE
+ public synchronized void addFencesAPPLE(int n, IntBuffer ids) {
+ add(getList(FENCES_APPLE), n, ids);
+ }
+
+ // glGenFencesAPPLE
+ public synchronized void addFencesAPPLE(int n, int[] ids, int ids_offset) {
+ add(getList(FENCES_APPLE), n, ids, ids_offset);
+ }
+
+ // glGenFencesNV
+ public synchronized void addFencesNV(int n, IntBuffer ids) {
+ add(getList(FENCES_NV), n, ids);
+ }
+
+ // glGenFencesNV
+ public synchronized void addFencesNV(int n, int[] ids, int ids_offset) {
+ add(getList(FENCES_NV), n, ids, ids_offset);
+ }
+
+ // glGenFragmentShadersATI
+ public synchronized void addFragmentShadersATI(int start, int n) {
+ add(getList(FRAGMENT_SHADERS_ATI), start, n);
+ }
+
+ // glGenFramebuffersEXT
+ public synchronized void addFramebuffersEXT(int n, IntBuffer ids) {
+ add(getList(FRAMEBUFFERS_EXT), n, ids);
+ }
+
+ // glGenFramebuffersEXT
+ public synchronized void addFramebuffersEXT(int n, int[] ids, int ids_offset) {
+ add(getList(FRAMEBUFFERS_EXT), n, ids, ids_offset);
+ }
+
+ // glGenLists
+ public synchronized void addLists(int start, int n) {
+ add(getList(LISTS), start, n);
+ }
+
+ // glGenOcclusionQueriesNV
+ public synchronized void addOcclusionQueriesNV(int n, IntBuffer ids) {
+ add(getList(OCCLUSION_QUERIES_NV), n, ids);
+ }
+
+ // glGenOcclusionQueriesNV
+ public synchronized void addOcclusionQueriesNV(int n, int[] ids, int ids_offset) {
+ add(getList(OCCLUSION_QUERIES_NV), n, ids, ids_offset);
+ }
+
+ // glCreateProgram
+ public synchronized void addProgramObject(int obj) {
+ add(getList(PROGRAM_OBJECTS), obj, 1);
+ }
+
+ // glCreateProgramObjectARB
+ public synchronized void addProgramObjectARB(int obj) {
+ add(getList(PROGRAM_AND_SHADER_OBJECTS_ARB), obj, 1);
+ }
+
+ // glGenProgramsARB
+ public synchronized void addProgramsARB(int n, IntBuffer ids) {
+ add(getList(PROGRAMS_ARB), n, ids);
+ }
+
+ // glGenProgramsARB
+ public synchronized void addProgramsARB(int n, int[] ids, int ids_offset) {
+ add(getList(PROGRAMS_ARB), n, ids, ids_offset);
+ }
+
+ // glGenProgramsNV
+ public synchronized void addProgramsNV(int n, IntBuffer ids) {
+ add(getList(PROGRAMS_NV), n, ids);
+ }
+
+ // glGenProgramsNV
+ public synchronized void addProgramsNV(int n, int[] ids, int ids_offset) {
+ add(getList(PROGRAMS_NV), n, ids, ids_offset);
+ }
+
+ // glGenQueries
+ public synchronized void addQueries(int n, IntBuffer ids) {
+ add(getList(QUERIES), n, ids);
+ }
+
+ // glGenQueries
+ public synchronized void addQueries(int n, int[] ids, int ids_offset) {
+ add(getList(QUERIES), n, ids, ids_offset);
+ }
+
+ // glGenQueriesARB
+ public synchronized void addQueriesARB(int n, IntBuffer ids) {
+ add(getList(QUERIES_ARB), n, ids);
+ }
+
+ // glGenQueriesARB
+ public synchronized void addQueriesARB(int n, int[] ids, int ids_offset) {
+ add(getList(QUERIES_ARB), n, ids, ids_offset);
+ }
+
+ // glGenRenderbuffersEXT
+ public synchronized void addRenderbuffersEXT(int n, IntBuffer ids) {
+ add(getList(RENDERBUFFERS_EXT), n, ids);
+ }
+
+ // glGenRenderbuffersEXT
+ public synchronized void addRenderbuffersEXT(int n, int[] ids, int ids_offset) {
+ add(getList(RENDERBUFFERS_EXT), n, ids, ids_offset);
+ }
+
+ // glCreateShader
+ public synchronized void addShaderObject(int obj) {
+ add(getList(SHADER_OBJECTS), obj, 1);
+ }
+
+ // glCreateShaderObjectARB
+ public synchronized void addShaderObjectARB(int obj) {
+ add(getList(PROGRAM_AND_SHADER_OBJECTS_ARB), obj, 1);
+ }
+
+ // glGenTextures
+ public synchronized void addTextures(int n, IntBuffer ids) {
+ add(getList(TEXTURES), n, ids);
+ }
+
+ // glGenTextures
+ public synchronized void addTextures(int n, int[] ids, int ids_offset) {
+ add(getList(TEXTURES), n, ids, ids_offset);
+ }
+
+ // glGenVertexArraysAPPLE
+ public synchronized void addVertexArraysAPPLE(int n, IntBuffer ids) {
+ add(getList(VERTEX_ARRAYS_APPLE), n, ids);
+ }
+
+ // glGenVertexArraysAPPLE
+ public synchronized void addVertexArraysAPPLE(int n, int[] ids, int ids_offset) {
+ add(getList(VERTEX_ARRAYS_APPLE), n, ids, ids_offset);
+ }
+
+ // glGenVertexShadersEXT
+ public synchronized void addVertexShadersEXT(int start, int n) {
+ add(getList(VERTEX_SHADERS_EXT), start, n);
+ }
+
+ //----------------------------------------------------------------------
+ // Removers
+ //
+
+ // glDeleteBuffers
+ public synchronized void removeBuffers(int n, IntBuffer ids) {
+ remove(getList(BUFFERS), n, ids);
+ }
+
+ // glDeleteBuffers
+ public synchronized void removeBuffers(int n, int[] ids, int ids_offset) {
+ remove(getList(BUFFERS), n, ids, ids_offset);
+ }
+
+ // glDeleteBuffersARB
+ public synchronized void removeBuffersARB(int n, IntBuffer ids) {
+ remove(getList(BUFFERS_ARB), n, ids);
+ }
+
+ // glDeleteBuffersARB
+ public synchronized void removeBuffersARB(int n, int[] ids, int ids_offset) {
+ remove(getList(BUFFERS_ARB), n, ids, ids_offset);
+ }
+
+ // glDeleteFencesAPPLE
+ public synchronized void removeFencesAPPLE(int n, IntBuffer ids) {
+ remove(getList(FENCES_APPLE), n, ids);
+ }
+
+ // glDeleteFencesAPPLE
+ public synchronized void removeFencesAPPLE(int n, int[] ids, int ids_offset) {
+ remove(getList(FENCES_APPLE), n, ids, ids_offset);
+ }
+
+ // glDeleteFencesNV
+ public synchronized void removeFencesNV(int n, IntBuffer ids) {
+ remove(getList(FENCES_NV), n, ids);
+ }
+
+ // glDeleteFencesNV
+ public synchronized void removeFencesNV(int n, int[] ids, int ids_offset) {
+ remove(getList(FENCES_NV), n, ids, ids_offset);
+ }
+
+ // glDeleteFragmentShaderATI
+ public synchronized void removeFragmentShaderATI(int obj) {
+ remove(getList(FRAGMENT_SHADERS_ATI), obj, 1);
+ }
+
+ // glDeleteFramebuffersEXT
+ public synchronized void removeFramebuffersEXT(int n, IntBuffer ids) {
+ remove(getList(FRAMEBUFFERS_EXT), n, ids);
+ }
+
+ // glDeleteFramebuffersEXT
+ public synchronized void removeFramebuffersEXT(int n, int[] ids, int ids_offset) {
+ remove(getList(FRAMEBUFFERS_EXT), n, ids, ids_offset);
+ }
+
+ // glDeleteLists
+ public synchronized void removeLists(int start, int n) {
+ remove(getList(LISTS), start, n);
+ }
+
+ // glDeleteOcclusionQueriesNV
+ public synchronized void removeOcclusionQueriesNV(int n, IntBuffer ids) {
+ remove(getList(OCCLUSION_QUERIES_NV), n, ids);
+ }
+
+ // glDeleteOcclusionQueriesNV
+ public synchronized void removeOcclusionQueriesNV(int n, int[] ids, int ids_offset) {
+ remove(getList(OCCLUSION_QUERIES_NV), n, ids, ids_offset);
+ }
+
+ // glDeleteProgram
+ public synchronized void removeProgramObject(int obj) {
+ remove(getList(PROGRAM_OBJECTS), obj, 1);
+ }
+
+ // glDeleteObjectARB
+ public synchronized void removeProgramOrShaderObjectARB(int obj) {
+ remove(getList(PROGRAM_AND_SHADER_OBJECTS_ARB), obj, 1);
+ }
+
+ // glDeleteProgramsARB
+ public synchronized void removeProgramsARB(int n, IntBuffer ids) {
+ remove(getList(PROGRAMS_ARB), n, ids);
+ }
+
+ // glDeleteProgramsARB
+ public synchronized void removeProgramsARB(int n, int[] ids, int ids_offset) {
+ remove(getList(PROGRAMS_ARB), n, ids, ids_offset);
+ }
+
+ // glDeleteProgramsNV
+ public synchronized void removeProgramsNV(int n, IntBuffer ids) {
+ remove(getList(PROGRAMS_NV), n, ids);
+ }
+
+ // glDeleteProgramsNV
+ public synchronized void removeProgramsNV(int n, int[] ids, int ids_offset) {
+ remove(getList(PROGRAMS_NV), n, ids, ids_offset);
+ }
+
+ // glDeleteQueries
+ public synchronized void removeQueries(int n, IntBuffer ids) {
+ remove(getList(QUERIES), n, ids);
+ }
+
+ // glDeleteQueries
+ public synchronized void removeQueries(int n, int[] ids, int ids_offset) {
+ remove(getList(QUERIES), n, ids, ids_offset);
+ }
+
+ // glDeleteQueriesARB
+ public synchronized void removeQueriesARB(int n, IntBuffer ids) {
+ remove(getList(QUERIES_ARB), n, ids);
+ }
+
+ // glDeleteQueriesARB
+ public synchronized void removeQueriesARB(int n, int[] ids, int ids_offset) {
+ remove(getList(QUERIES_ARB), n, ids, ids_offset);
+ }
+
+ // glDeleteRenderbuffersEXT
+ public synchronized void removeRenderbuffersEXT(int n, IntBuffer ids) {
+ remove(getList(RENDERBUFFERS_EXT), n, ids);
+ }
+
+ // glDeleteRenderbuffersEXT
+ public synchronized void removeRenderbuffersEXT(int n, int[] ids, int ids_offset) {
+ remove(getList(RENDERBUFFERS_EXT), n, ids, ids_offset);
+ }
+
+ // glDeleteShader
+ public synchronized void removeShaderObject(int obj) {
+ remove(getList(SHADER_OBJECTS), obj, 1);
+ }
+
+ // glDeleteTextures
+ public synchronized void removeTextures(int n, IntBuffer ids) {
+ remove(getList(TEXTURES), n, ids);
+ }
+
+ // glDeleteTextures
+ public synchronized void removeTextures(int n, int[] ids, int ids_offset) {
+ remove(getList(TEXTURES), n, ids, ids_offset);
+ }
+
+ // glDeleteVertexArraysAPPLE
+ public synchronized void removeVertexArraysAPPLE(int n, IntBuffer ids) {
+ remove(getList(VERTEX_ARRAYS_APPLE), n, ids);
+ }
+
+ // glDeleteVertexArraysAPPLE
+ public synchronized void removeVertexArraysAPPLE(int n, int[] ids, int ids_offset) {
+ remove(getList(VERTEX_ARRAYS_APPLE), n, ids, ids_offset);
+ }
+
+ // glDeleteVertexShaderEXT
+ public synchronized void removeVertexShaderEXT(int obj) {
+ remove(getList(VERTEX_SHADERS_EXT), obj, 1);
+ }
+
+ //----------------------------------------------------------------------
+ // Reference count maintenance and manual deletion
+ //
+
+ public synchronized void transferAll(GLObjectTracker other) {
+ for (int i = 0; i < lists.length; i++) {
+ getList(i).addAll(other.lists[i]);
+ if (other.lists[i] != null) {
+ other.lists[i].clear();
+ }
+ }
+ dirty = true;
+ }
+
+ public synchronized void ref() {
+ ++refCount;
+ }
+
+ public void unref(GLObjectTracker deletedObjectPool) {
+ boolean tryDelete = false;
+ synchronized (this) {
+ if (--refCount == 0) {
+ tryDelete = true;
+ }
+ }
+ if (tryDelete) {
+ // See whether we should try to do the work now or whether we
+ // have to postpone
+ GLContext cur = GLContext.getCurrent();
+ if ((cur != null) &&
+ (cur instanceof GLContextImpl)) {
+ GLContextImpl curImpl = (GLContextImpl) cur;
+ if (deletedObjectPool != null &&
+ deletedObjectPool == curImpl.getDeletedObjectTracker()) {
+ // Should be safe to delete these objects now
+ try {
+ delete((GL2)curImpl.getGL());
+ return;
+ } catch (GLException e) {
+ // Shouldn't happen, but if it does, transfer all objects
+ // to the deleted object pool hoping we can later clean
+ // them up
+ deletedObjectPool.transferAll(this);
+ throw(e);
+ }
+ }
+ }
+ // If we get here, we couldn't attempt to delete the objects
+ // right now; instead try to transfer them to the
+ // deletedObjectPool for later cleanup (FIXME: should consider
+ // throwing an exception if deletedObjectPool is null, since
+ // that shouldn't happen)
+ if (DEBUG) {
+ String s = null;
+ if (cur == null) {
+ s = "current context was null";
+ } else if (!(cur instanceof GLContextImpl)) {
+ s = "current context was not a GLContextImpl";
+ } else if (deletedObjectPool == null) {
+ s = "no current deletedObjectPool";
+ } else if (deletedObjectPool != ((GLContextImpl) cur).getDeletedObjectTracker()) {
+ s = "deletedObjectTracker didn't match";
+ if (((GLContextImpl) cur).getDeletedObjectTracker() == null) {
+ s += " (other was null)";
+ }
+ } else {
+ s = "unknown reason";
+ }
+ System.err.println("Deferred destruction of server-side OpenGL objects into " + deletedObjectPool + ": " + s);
+ }
+
+ if (deletedObjectPool != null) {
+ deletedObjectPool.transferAll(this);
+ }
+ }
+ }
+
+ public void clean(GL2 gl) {
+ if (dirty) {
+ try {
+ delete(gl);
+ dirty = false;
+ } catch (GLException e) {
+ // FIXME: not sure what to do here; probably a bad idea to be
+ // throwing exceptions during an otherwise-successful makeCurrent
+ }
+ }
+ }
+
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ // Kinds of sharable server-side OpenGL objects this class tracks
+ private static final int BUFFERS = 0;
+ private static final int BUFFERS_ARB = 1;
+ private static final int FENCES_APPLE = 2;
+ private static final int FENCES_NV = 3;
+ private static final int FRAGMENT_SHADERS_ATI = 4;
+ private static final int FRAMEBUFFERS_EXT = 5;
+ private static final int LISTS = 6;
+ private static final int OCCLUSION_QUERIES_NV = 7;
+ private static final int PROGRAM_AND_SHADER_OBJECTS_ARB = 8;
+ private static final int PROGRAM_OBJECTS = 9;
+ private static final int PROGRAMS_ARB = 10;
+ private static final int PROGRAMS_NV = 11;
+ private static final int QUERIES = 12;
+ private static final int QUERIES_ARB = 13;
+ private static final int RENDERBUFFERS_EXT = 14;
+ private static final int SHADER_OBJECTS = 15;
+ private static final int TEXTURES = 16;
+ private static final int VERTEX_ARRAYS_APPLE = 17;
+ private static final int VERTEX_SHADERS_EXT = 18;
+ private static final int NUM_OBJECT_TYPES = 19;
+
+ static abstract class Deleter {
+ public abstract void delete(GL2 gl, int obj);
+ }
+
+ static class ObjectList {
+ private static final int MIN_CAPACITY = 4;
+
+ private int size;
+ private int capacity;
+ private int[] data;
+ private Deleter deleter;
+ private String name;
+
+ public ObjectList(Deleter deleter) {
+ this.deleter = deleter;
+ clear();
+ }
+
+ public void add(int obj) {
+ if (size == capacity) {
+ int newCapacity = 2 * capacity;
+ int[] newData = new int[newCapacity];
+ System.arraycopy(data, 0, newData, 0, size);
+ data = newData;
+ capacity = newCapacity;
+ }
+
+ data[size++] = obj;
+ }
+
+ public void addAll(ObjectList other) {
+ if (other == null) {
+ return;
+ }
+ for (int i = 0; i < other.size; i++) {
+ add(other.data[i]);
+ }
+ }
+
+ public boolean remove(int value) {
+ for (int i = 0; i < size; i++) {
+ if (data[i] == value) {
+ if (i < size - 1) {
+ System.arraycopy(data, i+1, data, i, size - i - 1);
+ }
+ --size;
+ if ((size < capacity / 4) &&
+ (capacity > MIN_CAPACITY)) {
+ int newCapacity = capacity / 4;
+ if (newCapacity < MIN_CAPACITY) {
+ newCapacity = MIN_CAPACITY;
+ }
+ int[] newData = new int[newCapacity];
+ System.arraycopy(data, 0, newData, 0, size);
+ data = newData;
+ capacity = newCapacity;
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public void setName(String name) {
+ if (DEBUG) {
+ this.name = name;
+ }
+ }
+
+ public void delete(GL2 gl) {
+ // Just in case we start throwing exceptions during deletion,
+ // make sure we make progress rather than going into an infinite
+ // loop
+ while (size > 0) {
+ int obj = data[size - 1];
+ --size;
+ if (DEBUG) {
+ System.err.println("Deleting server-side OpenGL object " + obj +
+ ((name != null) ? (" (" + name + ")") : ""));
+ }
+ deleter.delete(gl, obj);
+ }
+ }
+
+ public void clear() {
+ size = 0;
+ capacity = MIN_CAPACITY;
+ data = new int[capacity];
+ }
+ }
+
+ private ObjectList[] lists = new ObjectList[NUM_OBJECT_TYPES];
+ private int refCount;
+ private boolean dirty;
+
+ private void add(ObjectList list, int n, IntBuffer ids) {
+ int pos = ids.position();
+ for (int i = 0; i < n; i++) {
+ list.add(ids.get(pos + i));
+ }
+ }
+
+ private void add(ObjectList list, int n, int[] ids, int ids_offset) {
+ for (int i = 0; i < n; i++) {
+ list.add(ids[i + ids_offset]);
+ }
+ }
+
+ private void add(ObjectList list, int start, int n) {
+ for (int i = 0; i < n; i++) {
+ list.add(start + i);
+ }
+ }
+
+ private void remove(ObjectList list, int n, IntBuffer ids) {
+ int pos = ids.position();
+ for (int i = 0; i < n; i++) {
+ list.remove(ids.get(pos + i));
+ }
+ }
+
+ private void remove(ObjectList list, int n, int[] ids, int ids_offset) {
+ for (int i = 0; i < n; i++) {
+ list.remove(ids[i + ids_offset]);
+ }
+ }
+
+ private void remove(ObjectList list, int start, int n) {
+ for (int i = 0; i < n; i++) {
+ list.remove(start + i);
+ }
+ }
+
+ private ObjectList getList(int which) {
+ ObjectList list = lists[which];
+ if (list == null) {
+ Deleter deleter = null;
+ String name = null;
+ // Figure out which deleter we need
+ switch (which) {
+ case BUFFERS:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteBuffers(1, new int[] { obj }, 0);
+ }
+ };
+ name = "buffer";
+ break;
+ case BUFFERS_ARB:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteBuffersARB(1, new int[] { obj }, 0);
+ }
+ };
+ name = "ARB buffer";
+ break;
+ case FENCES_APPLE:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteFencesAPPLE(1, new int[] { obj }, 0);
+ }
+ };
+ name = "APPLE fence";
+ break;
+ case FENCES_NV:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteFencesNV(1, new int[] { obj }, 0);
+ }
+ };
+ name = "NV fence";
+ break;
+ case FRAGMENT_SHADERS_ATI:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteFragmentShaderATI(obj);
+ }
+ };
+ name = "ATI fragment shader";
+ break;
+ case FRAMEBUFFERS_EXT:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteFramebuffersEXT(1, new int[] { obj }, 0);
+ }
+ };
+ name = "EXT framebuffer";
+ break;
+ case LISTS:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteLists(obj, 1);
+ }
+ };
+ name = "display list";
+ break;
+ case OCCLUSION_QUERIES_NV:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteOcclusionQueriesNV(1, new int[] { obj }, 0);
+ }
+ };
+ name = "NV occlusion query";
+ break;
+ case PROGRAM_AND_SHADER_OBJECTS_ARB:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteObjectARB(obj);
+ }
+ };
+ name = "ARB program or shader object";
+ break;
+ case PROGRAM_OBJECTS:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteProgram(obj);
+ }
+ };
+ name = "program object";
+ break;
+ case PROGRAMS_ARB:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteProgramsARB(1, new int[] { obj }, 0);
+ }
+ };
+ name = "ARB program object";
+ break;
+ case PROGRAMS_NV:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteProgramsNV(1, new int[] { obj }, 0);
+ }
+ };
+ name = "NV program";
+ break;
+ case QUERIES:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteQueries(1, new int[] { obj }, 0);
+ }
+ };
+ name = "query";
+ break;
+ case QUERIES_ARB:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteQueriesARB(1, new int[] { obj }, 0);
+ }
+ };
+ name = "ARB query";
+ break;
+ case RENDERBUFFERS_EXT:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteRenderbuffersEXT(1, new int[] { obj }, 0);
+ }
+ };
+ name = "EXT renderbuffer";
+ break;
+ case SHADER_OBJECTS:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteShader(obj);
+ }
+ };
+ name = "shader object";
+ break;
+ case TEXTURES:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteTextures(1, new int[] { obj }, 0);
+ }
+ };
+ name = "texture";
+ break;
+ case VERTEX_ARRAYS_APPLE:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteVertexArraysAPPLE(1, new int[] { obj }, 0);
+ }
+ };
+ name = "APPLE vertex array";
+ break;
+ case VERTEX_SHADERS_EXT:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteVertexShaderEXT(obj);
+ }
+ };
+ name = "EXT vertex shader";
+ break;
+ default:
+ throw new InternalError("Unexpected OpenGL object type " + which);
+ }
+
+ list = new ObjectList(deleter);
+ list.setName(name);
+ lists[which] = list;
+ }
+ return list;
+ }
+
+ private void delete(GL2 gl) {
+ for (int i = 0; i < lists.length; i++) {
+ ObjectList list = lists[i];
+ if (list != null) {
+ list.delete(gl);
+ lists[i] = null;
+ }
+ }
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/glu/GLUquadricImpl.java b/src/classes/com/sun/opengl/impl/glu/GLUquadricImpl.java
new file mode 100644
index 000000000..b348601c8
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/glu/GLUquadricImpl.java
@@ -0,0 +1,1188 @@
+/*
+** License Applicability. Except to the extent portions of this file are
+** made subject to an alternative license as permitted in the SGI Free
+** Software License B, Version 1.1 (the "License"), the contents of this
+** file are subject only to the provisions of the License. You may not use
+** this file except in compliance with the License. You may obtain a copy
+** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
+** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
+**
+** http://oss.sgi.com/projects/FreeB
+**
+** Note that, as provided in the License, the Software is distributed on an
+** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
+** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
+** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
+** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
+**
+** NOTE: The Original Code (as defined below) has been licensed to Sun
+** Microsystems, Inc. ("Sun") under the SGI Free Software License B
+** (Version 1.1), shown above ("SGI License"). Pursuant to Section
+** 3.2(3) of the SGI License, Sun is distributing the Covered Code to
+** you under an alternative license ("Alternative License"). This
+** Alternative License includes all of the provisions of the SGI License
+** except that Section 2.2 and 11 are omitted. Any differences between
+** the Alternative License and the SGI License are offered solely by Sun
+** and not by SGI.
+**
+** Original Code. The Original Code is: OpenGL Sample Implementation,
+** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
+** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
+** Copyright in any portions created by third parties is as indicated
+** elsewhere herein. All Rights Reserved.
+**
+** Additional Notice Provisions: The application programming interfaces
+** established by SGI in conjunction with the Original Code are The
+** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
+** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
+** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
+** Window System(R) (Version 1.3), released October 19, 1998. This software
+** was created using the OpenGL(R) version 1.2.1 Sample Implementation
+** published by SGI, but has not been independently verified as being
+** compliant with the OpenGL(R) version 1.2.1 Specification.
+**
+** $Date$ $Revision$
+** $Header$
+*/
+
+/*
+ * Copyright (c) 2002-2004 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ */
+
+package com.sun.opengl.impl.glu;
+
+import javax.media.opengl.util.ImmModeSink;
+import javax.media.opengl.*;
+import javax.media.opengl.glu.*;
+import java.nio.*;
+
+/**
+ * GLUquadricImpl.java
+ *
+ *
+ * Created 22-dec-2003 (originally Quadric.java)
+ * @author Erik Duijs
+ * @author Kenneth Russell, Sven Gothel
+ */
+
+public class GLUquadricImpl implements GLUquadric {
+ private int drawStyle;
+ private int orientation;
+ private boolean textureFlag;
+ private int normals;
+ private boolean immModeSinkEnabled;
+ private boolean immModeSinkImmediate;
+
+ public static final boolean USE_NORM_TXT = true;
+
+ private ImmModeSink immModeSink;
+
+ public GLUquadricImpl() {
+ drawStyle = GLU.GLU_FILL;
+ orientation = GLU.GLU_OUTSIDE;
+ textureFlag = false;
+ normals = GLU.GLU_SMOOTH;
+ if(USE_NORM_TXT) {
+ immModeSink = new ImmModeSink(GL.GL_FLOAT, GL.GL_STATIC_DRAW, 3, 3, 0, 3, 32);
+ } else {
+ immModeSink = new ImmModeSink(GL.GL_FLOAT, GL.GL_STATIC_DRAW, 3, 0, 0, 0, 32);
+ }
+ immModeSinkImmediate=true;
+ immModeSinkEnabled=GLProfile.isGLES();
+ }
+
+ public void enableImmModeSink(boolean val) {
+ if(!GLProfile.isGLES()) {
+ immModeSinkEnabled=val;
+ } else {
+ immModeSinkEnabled=true;
+ }
+ }
+
+ public boolean isImmModeSinkEnabled() {
+ return immModeSinkEnabled;
+ }
+
+ public void setImmMode(boolean val) {
+ immModeSinkImmediate=val;
+ }
+
+ public boolean getImmMode() {
+ return immModeSinkImmediate;
+ }
+
+ public ImmModeSink replaceImmModeSink() {
+ ImmModeSink res = immModeSink;
+ if(USE_NORM_TXT) {
+ immModeSink = new ImmModeSink(GL.GL_FLOAT, GL.GL_STATIC_DRAW, 3, 3, 0, 3, 32);
+ } else {
+ immModeSink = new ImmModeSink(GL.GL_FLOAT, GL.GL_STATIC_DRAW, 3, 0, 0, 0, 32);
+ }
+ return res;
+ }
+
+ public void resetImmModeSink(GL2ES1 gl) {
+ immModeSink.reset(gl);
+ }
+
+ /**
+ * specifies the draw style for quadrics.
+ *
+ * The legal values are as follows:
+ *
+ * GLU.FILL: Quadrics are rendered with polygon primitives. The polygons
+ * are drawn in a counterclockwise fashion with respect to
+ * their normals (as defined with glu.quadricOrientation).
+ *
+ * GLU.LINE: Quadrics are rendered as a set of lines.
+ *
+ * GLU.SILHOUETTE: Quadrics are rendered as a set of lines, except that edges
+ * separating coplanar faces will not be drawn.
+ *
+ * GLU.POINT: Quadrics are rendered as a set of points.
+ *
+ * @param drawStyle The drawStyle to set
+ */
+ public void setDrawStyle(int drawStyle) {
+ this.drawStyle = drawStyle;
+ }
+
+ /**
+ * specifies what kind of normals are desired for quadrics.
+ * The legal values are as follows:
+ *
+ * GLU.NONE: No normals are generated.
+ *
+ * GLU.FLAT: One normal is generated for every facet of a quadric.
+ *
+ * GLU.SMOOTH: One normal is generated for every vertex of a quadric. This
+ * is the default.
+ *
+ * @param normals The normals to set
+ */
+ public void setNormals(int normals) {
+ this.normals = normals;
+ }
+
+ /**
+ * specifies what kind of orientation is desired for.
+ * The orientation values are as follows:
+ *
+ * GLU.OUTSIDE: Quadrics are drawn with normals pointing outward.
+ *
+ * GLU.INSIDE: Normals point inward. The default is GLU.OUTSIDE.
+ *
+ * Note that the interpretation of outward and inward depends on the quadric
+ * being drawn.
+ *
+ * @param orientation The orientation to set
+ */
+ public void setOrientation(int orientation) {
+ this.orientation = orientation;
+ }
+
+ /**
+ * specifies if texture coordinates should be generated for
+ * quadrics rendered with qobj. If the value of textureCoords is true,
+ * then texture coordinates are generated, and if textureCoords is false,
+ * they are not.. The default is false.
+ *
+ * The manner in which texture coordinates are generated depends upon the
+ * specific quadric rendered.
+ *
+ * @param textureFlag The textureFlag to set
+ */
+ public void setTextureFlag(boolean textureFlag) {
+ this.textureFlag = textureFlag;
+ }
+
+ /**
+ * Returns the drawStyle.
+ * @return int
+ */
+ public int getDrawStyle() {
+ return drawStyle;
+ }
+
+ /**
+ * Returns the normals.
+ * @return int
+ */
+ public int getNormals() {
+ return normals;
+ }
+
+ /**
+ * Returns the orientation.
+ * @return int
+ */
+ public int getOrientation() {
+ return orientation;
+ }
+
+ /**
+ * Returns the textureFlag.
+ * @return boolean
+ */
+ public boolean getTextureFlag() {
+ return textureFlag;
+ }
+
+
+ /**
+ * draws a cylinder oriented along the z axis. The base of the
+ * cylinder is placed at z = 0, and the top at z=height. Like a sphere, a
+ * cylinder is subdivided around the z axis into slices, and along the z axis
+ * into stacks.
+ *
+ * Note that if topRadius is set to zero, then this routine will generate a
+ * cone.
+ *
+ * If the orientation is set to GLU.OUTSIDE (with glu.quadricOrientation), then
+ * any generated normals point away from the z axis. Otherwise, they point
+ * toward the z axis.
+ *
+ * If texturing is turned on (with glu.quadricTexture), then texture
+ * coordinates are generated so that t ranges linearly from 0.0 at z = 0 to
+ * 1.0 at z = height, and s ranges from 0.0 at the +y axis, to 0.25 at the +x
+ * axis, to 0.5 at the -y axis, to 0.75 at the -x axis, and back to 1.0 at the
+ * +y axis.
+ *
+ * @param baseRadius Specifies the radius of the cylinder at z = 0.
+ * @param topRadius Specifies the radius of the cylinder at z = height.
+ * @param height Specifies the height of the cylinder.
+ * @param slices Specifies the number of subdivisions around the z axis.
+ * @param stacks Specifies the number of subdivisions along the z axis.
+ */
+ public void drawCylinder(GL2ES1 gl, float baseRadius, float topRadius, float height, int slices, int stacks) {
+
+ float da, r, dr, dz;
+ float x, y, z, nz, nsign;
+ int i, j;
+
+ if (orientation == GLU.GLU_INSIDE) {
+ nsign = -1.0f;
+ } else {
+ nsign = 1.0f;
+ }
+
+ da = 2.0f * PI / slices;
+ dr = (topRadius - baseRadius) / stacks;
+ dz = height / stacks;
+ nz = (baseRadius - topRadius) / height;
+ // Z component of normal vectors
+
+ if (drawStyle == GLU.GLU_POINT) {
+ glBegin(gl, GL2ES1.GL_POINTS);
+ for (i = 0; i < slices; i++) {
+ x = cos((i * da));
+ y = sin((i * da));
+ if(USE_NORM_TXT) {
+ normal3f(gl, x * nsign, y * nsign, nz * nsign);
+ }
+
+ z = 0.0f;
+ r = baseRadius;
+ for (j = 0; j <= stacks; j++) {
+ glVertex3f(gl, (x * r), (y * r), z);
+ z += dz;
+ r += dr;
+ }
+ }
+ glEnd(gl);
+ } else if (drawStyle == GLU.GLU_LINE || drawStyle == GLU.GLU_SILHOUETTE) {
+ // Draw rings
+ if (drawStyle == GLU.GLU_LINE) {
+ z = 0.0f;
+ r = baseRadius;
+ for (j = 0; j <= stacks; j++) {
+ glBegin(gl, GL2ES1.GL_LINE_LOOP);
+ for (i = 0; i < slices; i++) {
+ x = cos((i * da));
+ y = sin((i * da));
+ if(USE_NORM_TXT) {
+ normal3f(gl, x * nsign, y * nsign, nz * nsign);
+ }
+ glVertex3f(gl, (x * r), (y * r), z);
+ }
+ glEnd(gl);
+ z += dz;
+ r += dr;
+ }
+ } else {
+ // draw one ring at each end
+ if (baseRadius != 0.0) {
+ glBegin(gl, GL2ES1.GL_LINE_LOOP);
+ for (i = 0; i < slices; i++) {
+ x = cos((i * da));
+ y = sin((i * da));
+ if(USE_NORM_TXT) {
+ normal3f(gl, x * nsign, y * nsign, nz * nsign);
+ }
+ glVertex3f(gl, (x * baseRadius), (y * baseRadius), 0.0f);
+ }
+ glEnd(gl);
+ glBegin(gl, GL2ES1.GL_LINE_LOOP);
+ for (i = 0; i < slices; i++) {
+ x = cos((i * da));
+ y = sin((i * da));
+ if(USE_NORM_TXT) {
+ normal3f(gl, x * nsign, y * nsign, nz * nsign);
+ }
+ glVertex3f(gl, (x * topRadius), (y * topRadius), height);
+ }
+ glEnd(gl);
+ }
+ }
+ // draw length lines
+ glBegin(gl, GL2ES1.GL_LINES);
+ for (i = 0; i < slices; i++) {
+ x = cos((i * da));
+ y = sin((i * da));
+ if(USE_NORM_TXT) {
+ normal3f(gl, x * nsign, y * nsign, nz * nsign);
+ }
+ glVertex3f(gl, (x * baseRadius), (y * baseRadius), 0.0f);
+ glVertex3f(gl, (x * topRadius), (y * topRadius), (height));
+ }
+ glEnd(gl);
+ } else if (drawStyle == GLU.GLU_FILL) {
+ float ds = 1.0f / slices;
+ float dt = 1.0f / stacks;
+ float t = 0.0f;
+ z = 0.0f;
+ r = baseRadius;
+ for (j = 0; j < stacks; j++) {
+ float s = 0.0f;
+ glBegin(gl, immModeSink.GL_QUAD_STRIP);
+ for (i = 0; i <= slices; i++) {
+ if (i == slices) {
+ x = sin(0.0f);
+ y = cos(0.0f);
+ } else {
+ x = sin((i * da));
+ y = cos((i * da));
+ }
+ if (nsign == 1.0f) {
+ if(USE_NORM_TXT) {
+ normal3f(gl, (x * nsign), (y * nsign), (nz * nsign));
+ TXTR_COORD(gl, s, t);
+ }
+ glVertex3f(gl, (x * r), (y * r), z);
+ if(USE_NORM_TXT) {
+ normal3f(gl, (x * nsign), (y * nsign), (nz * nsign));
+ TXTR_COORD(gl, s, t + dt);
+ }
+ glVertex3f(gl, (x * (r + dr)), (y * (r + dr)), (z + dz));
+ } else {
+ if(USE_NORM_TXT) {
+ normal3f(gl, x * nsign, y * nsign, nz * nsign);
+ TXTR_COORD(gl, s, t);
+ }
+ glVertex3f(gl, (x * r), (y * r), z);
+ if(USE_NORM_TXT) {
+ normal3f(gl, x * nsign, y * nsign, nz * nsign);
+ TXTR_COORD(gl, s, t + dt);
+ }
+ glVertex3f(gl, (x * (r + dr)), (y * (r + dr)), (z + dz));
+ }
+ s += ds;
+ } // for slices
+ glEnd(gl);
+ r += dr;
+ t += dt;
+ z += dz;
+ } // for stacks
+ }
+ }
+
+ /**
+ * renders a disk on the z = 0 plane. The disk has a radius of
+ * outerRadius, and contains a concentric circular hole with a radius of
+ * innerRadius. If innerRadius is 0, then no hole is generated. The disk is
+ * subdivided around the z axis into slices (like pizza slices), and also
+ * about the z axis into rings (as specified by slices and loops,
+ * respectively).
+ *
+ * With respect to orientation, the +z side of the disk is considered to be
+ * "outside" (see glu.quadricOrientation). This means that if the orientation
+ * is set to GLU.OUTSIDE, then any normals generated point along the +z axis.
+ * Otherwise, they point along the -z axis.
+ *
+ * If texturing is turned on (with glu.quadricTexture), texture coordinates are
+ * generated linearly such that where r=outerRadius, the value at (r, 0, 0) is
+ * (1, 0.5), at (0, r, 0) it is (0.5, 1), at (-r, 0, 0) it is (0, 0.5), and at
+ * (0, -r, 0) it is (0.5, 0).
+ */
+ public void drawDisk(GL2ES1 gl, float innerRadius, float outerRadius, int slices, int loops)
+ {
+ float da, dr;
+
+ /* Normal vectors */
+ if (normals != GLU.GLU_NONE) {
+ if (orientation == GLU.GLU_OUTSIDE) {
+ glNormal3f(gl, 0.0f, 0.0f, +1.0f);
+ }
+ else {
+ glNormal3f(gl, 0.0f, 0.0f, -1.0f);
+ }
+ }
+
+ da = 2.0f * PI / slices;
+ dr = (outerRadius - innerRadius) / loops;
+
+ switch (drawStyle) {
+ case GLU.GLU_FILL:
+ {
+ /* texture of a gluDisk is a cut out of the texture unit square
+ * x, y in [-outerRadius, +outerRadius]; s, t in [0, 1]
+ * (linear mapping)
+ */
+ float dtc = 2.0f * outerRadius;
+ float sa, ca;
+ float r1 = innerRadius;
+ int l;
+ for (l = 0; l < loops; l++) {
+ float r2 = r1 + dr;
+ if (orientation == GLU.GLU_OUTSIDE) {
+ int s;
+ glBegin(gl, immModeSink.GL_QUAD_STRIP);
+ for (s = 0; s <= slices; s++) {
+ float a;
+ if (s == slices)
+ a = 0.0f;
+ else
+ a = s * da;
+ sa = sin(a);
+ ca = cos(a);
+ TXTR_COORD(gl, 0.5f + sa * r2 / dtc, 0.5f + ca * r2 / dtc);
+ glVertex2f(gl, r2 * sa, r2 * ca);
+ TXTR_COORD(gl, 0.5f + sa * r1 / dtc, 0.5f + ca * r1 / dtc);
+ glVertex2f(gl, r1 * sa, r1 * ca);
+ }
+ glEnd(gl);
+ }
+ else {
+ int s;
+ glBegin(gl, immModeSink.GL_QUAD_STRIP);
+ for (s = slices; s >= 0; s--) {
+ float a;
+ if (s == slices)
+ a = 0.0f;
+ else
+ a = s * da;
+ sa = sin(a);
+ ca = cos(a);
+ TXTR_COORD(gl, 0.5f - sa * r2 / dtc, 0.5f + ca * r2 / dtc);
+ glVertex2f(gl, r2 * sa, r2 * ca);
+ TXTR_COORD(gl, 0.5f - sa * r1 / dtc, 0.5f + ca * r1 / dtc);
+ glVertex2f(gl, r1 * sa, r1 * ca);
+ }
+ glEnd(gl);
+ }
+ r1 = r2;
+ }
+ break;
+ }
+ case GLU.GLU_LINE:
+ {
+ int l, s;
+ /* draw loops */
+ for (l = 0; l <= loops; l++) {
+ float r = innerRadius + l * dr;
+ glBegin(gl, GL2ES1.GL_LINE_LOOP);
+ for (s = 0; s < slices; s++) {
+ float a = s * da;
+ glVertex2f(gl, r * sin(a), r * cos(a));
+ }
+ glEnd(gl);
+ }
+ /* draw spokes */
+ for (s = 0; s < slices; s++) {
+ float a = s * da;
+ float x = sin(a);
+ float y = cos(a);
+ glBegin(gl, GL2ES1.GL_LINE_STRIP);
+ for (l = 0; l <= loops; l++) {
+ float r = innerRadius + l * dr;
+ glVertex2f(gl, r * x, r * y);
+ }
+ glEnd(gl);
+ }
+ break;
+ }
+ case GLU.GLU_POINT:
+ {
+ int s;
+ glBegin(gl, GL2ES1.GL_POINTS);
+ for (s = 0; s < slices; s++) {
+ float a = s * da;
+ float x = sin(a);
+ float y = cos(a);
+ int l;
+ for (l = 0; l <= loops; l++) {
+ float r = innerRadius * l * dr;
+ glVertex2f(gl, r * x, r * y);
+ }
+ }
+ glEnd(gl);
+ break;
+ }
+ case GLU.GLU_SILHOUETTE:
+ {
+ if (innerRadius != 0.0) {
+ float a;
+ glBegin(gl, GL2ES1.GL_LINE_LOOP);
+ for (a = 0.0f; a < 2.0 * PI; a += da) {
+ float x = innerRadius * sin(a);
+ float y = innerRadius * cos(a);
+ glVertex2f(gl, x, y);
+ }
+ glEnd(gl);
+ }
+ {
+ float a;
+ glBegin(gl, GL2ES1.GL_LINE_LOOP);
+ for (a = 0; a < 2.0f * PI; a += da) {
+ float x = outerRadius * sin(a);
+ float y = outerRadius * cos(a);
+ glVertex2f(gl, x, y);
+ }
+ glEnd(gl);
+ }
+ break;
+ }
+ default:
+ return;
+ }
+ }
+
+ /**
+ * renders a partial disk on the z=0 plane. A partial disk is similar to a
+ * full disk, except that only the subset of the disk from startAngle
+ * through startAngle + sweepAngle is included (where 0 degrees is along
+ * the +y axis, 90 degrees along the +x axis, 180 along the -y axis, and
+ * 270 along the -x axis).
+ *
+ * The partial disk has a radius of outerRadius, and contains a concentric
+ * circular hole with a radius of innerRadius. If innerRadius is zero, then
+ * no hole is generated. The partial disk is subdivided around the z axis
+ * into slices (like pizza slices), and also about the z axis into rings
+ * (as specified by slices and loops, respectively).
+ *
+ * With respect to orientation, the +z side of the partial disk is
+ * considered to be outside (see gluQuadricOrientation). This means that if
+ * the orientation is set to GLU.GLU_OUTSIDE, then any normals generated point
+ * along the +z axis. Otherwise, they point along the -z axis.
+ *
+ * If texturing is turned on (with gluQuadricTexture), texture coordinates
+ * are generated linearly such that where r=outerRadius, the value at (r, 0, 0)
+ * is (1, 0.5), at (0, r, 0) it is (0.5, 1), at (-r, 0, 0) it is (0, 0.5),
+ * and at (0, -r, 0) it is (0.5, 0).
+ */
+ public void drawPartialDisk(GL2ES1 gl,
+ float innerRadius,
+ float outerRadius,
+ int slices,
+ int loops,
+ float startAngle,
+ float sweepAngle) {
+ int i, j, max;
+ float[] sinCache = new float[CACHE_SIZE];
+ float[] cosCache = new float[CACHE_SIZE];
+ float angle;
+ float x, y;
+ float sintemp, costemp;
+ float deltaRadius;
+ float radiusLow, radiusHigh;
+ float texLow = 0, texHigh = 0;
+ float angleOffset;
+ int slices2;
+ int finish;
+
+ if (slices >= CACHE_SIZE)
+ slices = CACHE_SIZE - 1;
+ if (slices < 2
+ || loops < 1
+ || outerRadius <= 0.0f
+ || innerRadius < 0.0f
+ || innerRadius > outerRadius) {
+ //gluQuadricError(qobj, GLU.GLU_INVALID_VALUE);
+ System.err.println("PartialDisk: GLU_INVALID_VALUE");
+ return;
+ }
+
+ if (sweepAngle < -360.0f)
+ sweepAngle = 360.0f;
+ if (sweepAngle > 360.0f)
+ sweepAngle = 360.0f;
+ if (sweepAngle < 0) {
+ startAngle += sweepAngle;
+ sweepAngle = -sweepAngle;
+ }
+
+ if (sweepAngle == 360.0f) {
+ slices2 = slices;
+ } else {
+ slices2 = slices + 1;
+ }
+
+ /* Compute length (needed for normal calculations) */
+ deltaRadius = outerRadius - innerRadius;
+
+ /* Cache is the vertex locations cache */
+
+ angleOffset = startAngle / 180.0f * PI;
+ for (i = 0; i <= slices; i++) {
+ angle = angleOffset + ((PI * sweepAngle) / 180.0f) * i / slices;
+ sinCache[i] = sin(angle);
+ cosCache[i] = cos(angle);
+ }
+
+ if (sweepAngle == 360.0f) {
+ sinCache[slices] = sinCache[0];
+ cosCache[slices] = cosCache[0];
+ }
+
+ switch (normals) {
+ case GLU.GLU_FLAT :
+ case GLU.GLU_SMOOTH :
+ if (orientation == GLU.GLU_OUTSIDE) {
+ glNormal3f(gl, 0.0f, 0.0f, 1.0f);
+ } else {
+ glNormal3f(gl, 0.0f, 0.0f, -1.0f);
+ }
+ break;
+ default :
+ case GLU.GLU_NONE :
+ break;
+ }
+
+ switch (drawStyle) {
+ case GLU.GLU_FILL :
+ if (innerRadius == .0f) {
+ finish = loops - 1;
+ /* Triangle strip for inner polygons */
+ glBegin(gl, GL2ES1.GL_TRIANGLE_FAN);
+ if (textureFlag) {
+ glTexCoord2f(gl, 0.5f, 0.5f);
+ }
+ glVertex3f(gl, 0.0f, 0.0f, 0.0f);
+ radiusLow = outerRadius - deltaRadius * ((float) (loops - 1) / loops);
+ if (textureFlag) {
+ texLow = radiusLow / outerRadius / 2;
+ }
+
+ if (orientation == GLU.GLU_OUTSIDE) {
+ for (i = slices; i >= 0; i--) {
+ if (textureFlag) {
+ glTexCoord2f(gl, texLow * sinCache[i] + 0.5f,
+ texLow * cosCache[i] + 0.5f);
+ }
+ glVertex3f(gl, radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f);
+ }
+ } else {
+ for (i = 0; i <= slices; i++) {
+ if (textureFlag) {
+ glTexCoord2f(gl, texLow * sinCache[i] + 0.5f,
+ texLow * cosCache[i] + 0.5f);
+ }
+ glVertex3f(gl, radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f);
+ }
+ }
+ glEnd(gl);
+ } else {
+ finish = loops;
+ }
+ for (j = 0; j < finish; j++) {
+ radiusLow = outerRadius - deltaRadius * ((float) j / loops);
+ radiusHigh = outerRadius - deltaRadius * ((float) (j + 1) / loops);
+ if (textureFlag) {
+ texLow = radiusLow / outerRadius / 2;
+ texHigh = radiusHigh / outerRadius / 2;
+ }
+
+ glBegin(gl, immModeSink.GL_QUAD_STRIP);
+ for (i = 0; i <= slices; i++) {
+ if (orientation == GLU.GLU_OUTSIDE) {
+ if (textureFlag) {
+ glTexCoord2f(gl, texLow * sinCache[i] + 0.5f,
+ texLow * cosCache[i] + 0.5f);
+ }
+ glVertex3f(gl, radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f);
+
+ if (textureFlag) {
+ glTexCoord2f(gl, texHigh * sinCache[i] + 0.5f,
+ texHigh * cosCache[i] + 0.5f);
+ }
+ glVertex3f(gl, radiusHigh * sinCache[i],
+ radiusHigh * cosCache[i],
+ 0.0f);
+ } else {
+ if (textureFlag) {
+ glTexCoord2f(gl, texHigh * sinCache[i] + 0.5f,
+ texHigh * cosCache[i] + 0.5f);
+ }
+ glVertex3f(gl, radiusHigh * sinCache[i],
+ radiusHigh * cosCache[i],
+ 0.0f);
+
+ if (textureFlag) {
+ glTexCoord2f(gl, texLow * sinCache[i] + 0.5f,
+ texLow * cosCache[i] + 0.5f);
+ }
+ glVertex3f(gl, radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f);
+ }
+ }
+ glEnd(gl);
+ }
+ break;
+ case GLU.GLU_POINT :
+ glBegin(gl, GL2ES1.GL_POINTS);
+ for (i = 0; i < slices2; i++) {
+ sintemp = sinCache[i];
+ costemp = cosCache[i];
+ for (j = 0; j <= loops; j++) {
+ radiusLow = outerRadius - deltaRadius * ((float) j / loops);
+
+ if (textureFlag) {
+ texLow = radiusLow / outerRadius / 2;
+
+ glTexCoord2f(gl, texLow * sinCache[i] + 0.5f,
+ texLow * cosCache[i] + 0.5f);
+ }
+ glVertex3f(gl, radiusLow * sintemp, radiusLow * costemp, 0.0f);
+ }
+ }
+ glEnd(gl);
+ break;
+ case GLU.GLU_LINE :
+ if (innerRadius == outerRadius) {
+ glBegin(gl, GL2ES1.GL_LINE_STRIP);
+
+ for (i = 0; i <= slices; i++) {
+ if (textureFlag) {
+ glTexCoord2f(gl, sinCache[i] / 2 + 0.5f, cosCache[i] / 2 + 0.5f);
+ }
+ glVertex3f(gl, innerRadius * sinCache[i], innerRadius * cosCache[i], 0.0f);
+ }
+ glEnd(gl);
+ break;
+ }
+ for (j = 0; j <= loops; j++) {
+ radiusLow = outerRadius - deltaRadius * ((float) j / loops);
+ if (textureFlag) {
+ texLow = radiusLow / outerRadius / 2;
+ }
+
+ glBegin(gl, GL2ES1.GL_LINE_STRIP);
+ for (i = 0; i <= slices; i++) {
+ if (textureFlag) {
+ glTexCoord2f(gl, texLow * sinCache[i] + 0.5f,
+ texLow * cosCache[i] + 0.5f);
+ }
+ glVertex3f(gl, radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f);
+ }
+ glEnd(gl);
+ }
+ for (i = 0; i < slices2; i++) {
+ sintemp = sinCache[i];
+ costemp = cosCache[i];
+ glBegin(gl, GL2ES1.GL_LINE_STRIP);
+ for (j = 0; j <= loops; j++) {
+ radiusLow = outerRadius - deltaRadius * ((float) j / loops);
+ if (textureFlag) {
+ texLow = radiusLow / outerRadius / 2;
+ }
+
+ if (textureFlag) {
+ glTexCoord2f(gl, texLow * sinCache[i] + 0.5f,
+ texLow * cosCache[i] + 0.5f);
+ }
+ glVertex3f(gl, radiusLow * sintemp, radiusLow * costemp, 0.0f);
+ }
+ glEnd(gl);
+ }
+ break;
+ case GLU.GLU_SILHOUETTE :
+ if (sweepAngle < 360.0f) {
+ for (i = 0; i <= slices; i += slices) {
+ sintemp = sinCache[i];
+ costemp = cosCache[i];
+ glBegin(gl, GL2ES1.GL_LINE_STRIP);
+ for (j = 0; j <= loops; j++) {
+ radiusLow = outerRadius - deltaRadius * ((float) j / loops);
+
+ if (textureFlag) {
+ texLow = radiusLow / outerRadius / 2;
+ glTexCoord2f(gl, texLow * sinCache[i] + 0.5f,
+ texLow * cosCache[i] + 0.5f);
+ }
+ glVertex3f(gl, radiusLow * sintemp, radiusLow * costemp, 0.0f);
+ }
+ glEnd(gl);
+ }
+ }
+ for (j = 0; j <= loops; j += loops) {
+ radiusLow = outerRadius - deltaRadius * ((float) j / loops);
+ if (textureFlag) {
+ texLow = radiusLow / outerRadius / 2;
+ }
+
+ glBegin(gl, GL2ES1.GL_LINE_STRIP);
+ for (i = 0; i <= slices; i++) {
+ if (textureFlag) {
+ glTexCoord2f(gl, texLow * sinCache[i] + 0.5f,
+ texLow * cosCache[i] + 0.5f);
+ }
+ glVertex3f(gl, radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f);
+ }
+ glEnd(gl);
+ if (innerRadius == outerRadius)
+ break;
+ }
+ break;
+ default :
+ break;
+ }
+ }
+
+ /**
+ * draws a sphere of the given radius centered around the origin.
+ * The sphere is subdivided around the z axis into slices and along the z axis
+ * into stacks (similar to lines of longitude and latitude).
+ *
+ * If the orientation is set to GLU.OUTSIDE (with glu.quadricOrientation), then
+ * any normals generated point away from the center of the sphere. Otherwise,
+ * they point toward the center of the sphere.
+
+ * If texturing is turned on (with glu.quadricTexture), then texture
+ * coordinates are generated so that t ranges from 0.0 at z=-radius to 1.0 at
+ * z=radius (t increases linearly along longitudinal lines), and s ranges from
+ * 0.0 at the +y axis, to 0.25 at the +x axis, to 0.5 at the -y axis, to 0.75
+ * at the -x axis, and back to 1.0 at the +y axis.
+ */
+ public void drawSphere(GL2ES1 gl, float radius, int slices, int stacks) {
+ // TODO
+
+ float rho, drho, theta, dtheta;
+ float x, y, z;
+ float s, t, ds, dt;
+ int i, j, imin, imax;
+ boolean normals;
+ float nsign;
+
+ normals = (this.normals != GLU.GLU_NONE);
+
+ if (orientation == GLU.GLU_INSIDE) {
+ nsign = -1.0f;
+ } else {
+ nsign = 1.0f;
+ }
+
+ drho = PI / stacks;
+ dtheta = 2.0f * PI / slices;
+
+ if (drawStyle == GLU.GLU_FILL) {
+ if (!textureFlag) {
+ // draw +Z end as a triangle fan
+ glBegin(gl, GL2ES1.GL_TRIANGLE_FAN);
+ if(USE_NORM_TXT) {
+ glNormal3f(gl, 0.0f, 0.0f, 1.0f);
+ }
+ glVertex3f(gl, 0.0f, 0.0f, nsign * radius);
+ for (j = 0; j <= slices; j++) {
+ theta = (j == slices) ? 0.0f : j * dtheta;
+ x = -sin(theta) * sin(drho);
+ y = cos(theta) * sin(drho);
+ z = nsign * cos(drho);
+ if(USE_NORM_TXT) {
+ if (normals) {
+ glNormal3f(gl, x * nsign, y * nsign, z * nsign);
+ }
+ }
+ glVertex3f(gl, x * radius, y * radius, z * radius);
+ }
+ glEnd(gl);
+ }
+
+ ds = 1.0f / slices;
+ dt = 1.0f / stacks;
+ t = 1.0f; // because loop now runs from 0
+ if (textureFlag) {
+ imin = 0;
+ imax = stacks;
+ } else {
+ imin = 1;
+ imax = stacks - 1;
+ }
+
+ // draw intermediate stacks as quad strips
+ for (i = imin; i < imax; i++) {
+ rho = i * drho;
+ glBegin(gl, immModeSink.GL_QUAD_STRIP);
+ s = 0.0f;
+ for (j = 0; j <= slices; j++) {
+ theta = (j == slices) ? 0.0f : j * dtheta;
+ x = -sin(theta) * sin(rho);
+ y = cos(theta) * sin(rho);
+ z = nsign * cos(rho);
+ if(USE_NORM_TXT) {
+ if (normals) {
+ glNormal3f(gl, x * nsign, y * nsign, z * nsign);
+ }
+ TXTR_COORD(gl, s, t);
+ }
+ glVertex3f(gl, x * radius, y * radius, z * radius);
+ x = -sin(theta) * sin(rho + drho);
+ y = cos(theta) * sin(rho + drho);
+ z = nsign * cos(rho + drho);
+ if(USE_NORM_TXT) {
+ if (normals) {
+ glNormal3f(gl, x * nsign, y * nsign, z * nsign);
+ }
+ TXTR_COORD(gl, s, t - dt);
+ }
+ s += ds;
+ glVertex3f(gl, x * radius, y * radius, z * radius);
+ }
+ glEnd(gl);
+ t -= dt;
+ }
+
+ if (!textureFlag) {
+ // draw -Z end as a triangle fan
+ glBegin(gl, GL2ES1.GL_TRIANGLE_FAN);
+ if(USE_NORM_TXT) {
+ glNormal3f(gl, 0.0f, 0.0f, -1.0f);
+ }
+ glVertex3f(gl, 0.0f, 0.0f, -radius * nsign);
+ rho = PI - drho;
+ s = 1.0f;
+ for (j = slices; j >= 0; j--) {
+ theta = (j == slices) ? 0.0f : j * dtheta;
+ x = -sin(theta) * sin(rho);
+ y = cos(theta) * sin(rho);
+ z = nsign * cos(rho);
+ if(USE_NORM_TXT) {
+ if (normals)
+ glNormal3f(gl, x * nsign, y * nsign, z * nsign);
+ }
+ s -= ds;
+ glVertex3f(gl, x * radius, y * radius, z * radius);
+ }
+ glEnd(gl);
+ }
+ } else if (
+ drawStyle == GLU.GLU_LINE
+ || drawStyle == GLU.GLU_SILHOUETTE) {
+ // draw stack lines
+ for (i = 1;
+ i < stacks;
+ i++) { // stack line at i==stacks-1 was missing here
+ rho = i * drho;
+ glBegin(gl, GL2ES1.GL_LINE_LOOP);
+ for (j = 0; j < slices; j++) {
+ theta = j * dtheta;
+ x = cos(theta) * sin(rho);
+ y = sin(theta) * sin(rho);
+ z = cos(rho);
+ if (normals)
+ glNormal3f(gl, x * nsign, y * nsign, z * nsign);
+ glVertex3f(gl, x * radius, y * radius, z * radius);
+ }
+ glEnd(gl);
+ }
+ // draw slice lines
+ for (j = 0; j < slices; j++) {
+ theta = j * dtheta;
+ glBegin(gl, GL2ES1.GL_LINE_STRIP);
+ for (i = 0; i <= stacks; i++) {
+ rho = i * drho;
+ x = cos(theta) * sin(rho);
+ y = sin(theta) * sin(rho);
+ z = cos(rho);
+ if (normals)
+ glNormal3f(gl, x * nsign, y * nsign, z * nsign);
+ glVertex3f(gl, x * radius, y * radius, z * radius);
+ }
+ glEnd(gl);
+ }
+ } else if (drawStyle == GLU.GLU_POINT) {
+ // top and bottom-most points
+ glBegin(gl, GL2ES1.GL_POINTS);
+ if (normals)
+ glNormal3f(gl, 0.0f, 0.0f, nsign);
+ glVertex3f(gl, 0.0f, 0.0f, radius);
+ if (normals)
+ glNormal3f(gl, 0.0f, 0.0f, -nsign);
+ glVertex3f(gl, 0.0f, 0.0f, -radius);
+
+ // loop over stacks
+ for (i = 1; i < stacks - 1; i++) {
+ rho = i * drho;
+ for (j = 0; j < slices; j++) {
+ theta = j * dtheta;
+ x = cos(theta) * sin(rho);
+ y = sin(theta) * sin(rho);
+ z = cos(rho);
+ if (normals)
+ glNormal3f(gl, x * nsign, y * nsign, z * nsign);
+ glVertex3f(gl, x * radius, y * radius, z * radius);
+ }
+ }
+ glEnd(gl);
+ }
+ }
+
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ private static final float PI = (float)Math.PI;
+ private static final int CACHE_SIZE = 240;
+
+ private final void glBegin(GL2ES1 gl, int mode) {
+ if(immModeSinkEnabled) {
+ immModeSink.glBegin(mode);
+ } else {
+ ((GL2)gl).glBegin(mode);
+ }
+ }
+
+ private final void glEnd(GL2ES1 gl) {
+ if(immModeSinkEnabled) {
+ immModeSink.glEnd(gl, immModeSinkImmediate);
+ } else {
+ ((GL2)gl).glEnd();
+ }
+ }
+
+ private final void glVertex2f(GL2ES1 gl, float x, float y) {
+ if(immModeSinkEnabled) {
+ immModeSink.glVertex2f(x, y);
+ } else {
+ ((GL2)gl).glVertex2f(x, y);
+ }
+ }
+
+ private final void glVertex3f(GL2ES1 gl, float x, float y, float z) {
+ if(immModeSinkEnabled) {
+ immModeSink.glVertex3f(x, y, z);
+ } else {
+ ((GL2)gl).glVertex3f(x, y, z);
+ }
+ }
+
+ private final void glNormal3f(GL2ES1 gl, float x, float y, float z) {
+ if(immModeSinkEnabled) {
+ immModeSink.glNormal3f(x, y, z);
+ } else {
+ ((GL2)gl).glNormal3f(x, y, z);
+ }
+ }
+
+ private final void glTexCoord2f(GL2ES1 gl, float x, float y) {
+ if(immModeSinkEnabled) {
+ immModeSink.glTexCoord2f(x, y);
+ } else {
+ ((GL2)gl).glTexCoord2f(x, y);
+ }
+ }
+
+ /**
+ * Call glNormal3f after scaling normal to unit length.
+ *
+ * @param x
+ * @param y
+ * @param z
+ */
+ private void normal3f(GL2ES1 gl, float x, float y, float z) {
+ float mag;
+
+ mag = (float)Math.sqrt(x * x + y * y + z * z);
+ if (mag > 0.00001F) {
+ x /= mag;
+ y /= mag;
+ z /= mag;
+ }
+ immModeSink.glNormal3f(x, y, z);
+ }
+
+ private final void TXTR_COORD(GL2ES1 gl, float x, float y) {
+ if (textureFlag) glTexCoord2f(gl, x,y);
+ }
+
+ private float sin(float r) {
+ return (float)Math.sin(r);
+ }
+
+ private float cos(float r) {
+ return (float)Math.cos(r);
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/glu/gl2/nurbs/GL2Backend.java b/src/classes/com/sun/opengl/impl/glu/gl2/nurbs/GL2Backend.java
new file mode 100755
index 000000000..d54f1c56f
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/glu/gl2/nurbs/GL2Backend.java
@@ -0,0 +1,49 @@
+package com.sun.opengl.impl.glu.gl2.nurbs;
+import com.sun.opengl.impl.glu.nurbs.*;
+
+/*
+ ** License Applicability. Except to the extent portions of this file are
+ ** made subject to an alternative license as permitted in the SGI Free
+ ** Software License B, Version 1.1 (the "License"), the contents of this
+ ** file are subject only to the provisions of the License. You may not use
+ ** this file except in compliance with the License. You may obtain a copy
+ ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
+ ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
+ **
+ ** http://oss.sgi.com/projects/FreeB
+ **
+ ** Note that, as provided in the License, the Software is distributed on an
+ ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
+ ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
+ ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
+ ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
+ **
+ ** Original Code. The Original Code is: OpenGL Sample Implementation,
+ ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
+ ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
+ ** Copyright in any portions created by third parties is as indicated
+ ** elsewhere herein. All Rights Reserved.
+ **
+ ** Additional Notice Provisions: The application programming interfaces
+ ** established by SGI in conjunction with the Original Code are The
+ ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
+ ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
+ ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
+ ** Window System(R) (Version 1.3), released October 19, 1998. This software
+ ** was created using the OpenGL(R) version 1.2.1 Sample Implementation
+ ** published by SGI, but has not been independently verified as being
+ ** compliant with the OpenGL(R) version 1.2.1 Specification.
+ */
+
+/**
+ * Class responsible for rendering
+ * @author Tomas Hrasky
+ *
+ */
+public class GL2Backend extends Backend {
+ public GL2Backend() {
+ super();
+ curveEvaluator = new GL2CurveEvaluator();
+ surfaceEvaluator = new GL2SurfaceEvaluator();
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/glu/gl2/nurbs/GL2CurveEvaluator.java b/src/classes/com/sun/opengl/impl/glu/gl2/nurbs/GL2CurveEvaluator.java
new file mode 100755
index 000000000..5be4f9049
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/glu/gl2/nurbs/GL2CurveEvaluator.java
@@ -0,0 +1,205 @@
+package com.sun.opengl.impl.glu.gl2.nurbs;
+import com.sun.opengl.impl.glu.nurbs.*;
+
+/*
+ ** License Applicability. Except to the extent portions of this file are
+ ** made subject to an alternative license as permitted in the SGI Free
+ ** Software License B, Version 1.1 (the "License"), the contents of this
+ ** file are subject only to the provisions of the License. You may not use
+ ** this file except in compliance with the License. You may obtain a copy
+ ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
+ ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
+ **
+ ** http://oss.sgi.com/projects/FreeB
+ **
+ ** Note that, as provided in the License, the Software is distributed on an
+ ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
+ ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
+ ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
+ ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
+ **
+ ** Original Code. The Original Code is: OpenGL Sample Implementation,
+ ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
+ ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
+ ** Copyright in any portions created by third parties is as indicated
+ ** elsewhere herein. All Rights Reserved.
+ **
+ ** Additional Notice Provisions: The application programming interfaces
+ ** established by SGI in conjunction with the Original Code are The
+ ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
+ ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
+ ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
+ ** Window System(R) (Version 1.3), released October 19, 1998. This software
+ ** was created using the OpenGL(R) version 1.2.1 Sample Implementation
+ ** published by SGI, but has not been independently verified as being
+ ** compliant with the OpenGL(R) version 1.2.1 Specification.
+ */
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2;
+import javax.media.opengl.glu.GLU;
+import javax.media.opengl.glu.gl2.GLUgl2;
+
+/**
+ * Class rendering curves with OpenGL
+ * @author Tomáš Hráský
+ *
+ */
+class GL2CurveEvaluator implements CurveEvaluator {
+
+ /**
+ * Output triangles (for callback) or render curve
+ */
+ private boolean output_triangles;
+
+ /**
+ * OpenGL object
+ */
+ private GL2 gl;
+
+ /**
+ * Not used
+ */
+ private int vertex_flag;
+
+ /**
+ * Not used
+ */
+ private int normal_flag;
+
+ /**
+ * Not used
+ */
+ private int color_flag;
+
+ /**
+ * Not used
+ */
+ private int texcoord_flag;
+
+ /**
+ * Number of bezier arc - used for color distinguishing of arcs forming NURBS curve
+ */
+ private int poradi;
+
+ /**
+ * Makes new Evaluator
+ */
+ public GL2CurveEvaluator() {
+ gl = GLUgl2.getCurrentGL2();
+ }
+
+ /**
+ * Pushes eval bit
+ */
+ public void bgnmap1f() {
+ // DONE
+ if (output_triangles) {
+ vertex_flag = 0;
+ normal_flag = 0;
+ color_flag = 0;
+ texcoord_flag = 0;
+ } else {
+ gl.glPushAttrib(GL2.GL_EVAL_BIT);
+ }
+
+ }
+
+ /**
+ * Pops all OpenGL attributes
+ */
+ public void endmap1f() {
+ // DONE
+ if (output_triangles) {
+
+ } else {
+ gl.glPopAttrib();
+ }
+
+ }
+
+ /**
+ * Initializes opengl evaluator
+ * @param type curve type
+ * @param ulo lowest u
+ * @param uhi highest u
+ * @param stride control point coords
+ * @param order curve order
+ * @param ps control points
+ */
+ public void map1f(int type, float ulo, float uhi, int stride, int order,
+ CArrayOfFloats ps) {
+ if (output_triangles) {
+ // TODO code for callback (output_triangles probably indicates callback)
+ // System.out.println("TODO curveevaluator.map1f-output_triangles");
+ } else {
+ gl.glMap1f(type, ulo, uhi, stride, order, ps.getArray(), ps
+ .getPointer());
+
+ // DEBUG - drawing bézier control points
+ // gl.glColor3d(.5,.5,.5);
+ // gl.glPointSize(5);
+ // gl.glBegin(GL2.GL_POINTS);
+ // float[] ctrlpoints=ps.getArray();
+ // for(int i=ps.getPointer();i<ps.getPointer()+order;i++){
+ // gl.glVertex3d(ctrlpoints[i * 4], ctrlpoints[i * 4 + 1],0);
+ // }
+ // gl.glEnd();
+ }
+
+ }
+
+ /**
+ * Calls opengl enable
+ * @param type what to enable
+ */
+ public void enable(int type) {
+ // DONE
+ gl.glEnable(type);
+ }
+
+ /**
+ * Calls glMapGrid1f
+ * @param nu steps
+ * @param u1 low u
+ * @param u2 high u
+ */
+ public void mapgrid1f(int nu, float u1, float u2) {
+ if (output_triangles) {
+ // System.out.println("TODO curveevaluator.mapgrid1f");
+ } else
+ gl.glMapGrid1f(nu, u1, u2);
+ // // System.out.println("upravit NU");
+ // gl.glMapGrid1f(50,u1,u2);
+ }
+
+ /**
+ * Evaluates a curve using glEvalMesh1f
+ * @param style Backend.N_MESHFILL/N_MESHLINE/N_MESHPOINT
+ * @param from lowest param
+ * @param to highest param
+ */
+ public void mapmesh1f(int style, int from, int to) {
+ /* //DEBUG drawing control points
+ this.poradi++;
+ if (poradi % 2 == 0)
+ gl.glColor3f(1, 0, 0);
+ else
+ gl.glColor3f(0, 1, 0);
+ */
+ if (output_triangles) {
+ // TODO code for callback
+ // System.out.println("TODO openglcurveevaluator.mapmesh1f output_triangles");
+ } else {
+ switch (style) {
+ case Backend.N_MESHFILL:
+ case Backend.N_MESHLINE:
+ gl.glEvalMesh1(GL2.GL_LINE, from, to);
+ break;
+ case Backend.N_MESHPOINT:
+ gl.glEvalMesh1(GL2.GL_POINT, from, to);
+ break;
+ }
+ }
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/glu/gl2/nurbs/GL2SurfaceEvaluator.java b/src/classes/com/sun/opengl/impl/glu/gl2/nurbs/GL2SurfaceEvaluator.java
new file mode 100755
index 000000000..c226b7db9
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/glu/gl2/nurbs/GL2SurfaceEvaluator.java
@@ -0,0 +1,217 @@
+package com.sun.opengl.impl.glu.gl2.nurbs;
+import com.sun.opengl.impl.glu.nurbs.*;
+
+/*
+ ** License Applicability. Except to the extent portions of this file are
+ ** made subject to an alternative license as permitted in the SGI Free
+ ** Software License B, Version 1.1 (the "License"), the contents of this
+ ** file are subject only to the provisions of the License. You may not use
+ ** this file except in compliance with the License. You may obtain a copy
+ ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
+ ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
+ **
+ ** http://oss.sgi.com/projects/FreeB
+ **
+ ** Note that, as provided in the License, the Software is distributed on an
+ ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
+ ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
+ ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
+ ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
+ **
+ ** Original Code. The Original Code is: OpenGL Sample Implementation,
+ ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
+ ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
+ ** Copyright in any portions created by third parties is as indicated
+ ** elsewhere herein. All Rights Reserved.
+ **
+ ** Additional Notice Provisions: The application programming interfaces
+ ** established by SGI in conjunction with the Original Code are The
+ ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
+ ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
+ ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
+ ** Window System(R) (Version 1.3), released October 19, 1998. This software
+ ** was created using the OpenGL(R) version 1.2.1 Sample Implementation
+ ** published by SGI, but has not been independently verified as being
+ ** compliant with the OpenGL(R) version 1.2.1 Specification.
+ */
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2;
+import javax.media.opengl.glu.GLU;
+import javax.media.opengl.glu.gl2.GLUgl2;
+
+/**
+ * Class rendering surfaces with OpenGL
+ * @author Tomas Hrasky
+ *
+ */
+class GL2SurfaceEvaluator implements SurfaceEvaluator {
+
+ /**
+ * JOGL OpenGL object
+ */
+ private GL2 gl;
+
+ /**
+ * Output triangles (callback)
+ */
+ private boolean output_triangles;
+
+ /**
+ * Number of patch - used for distinguishing bezier plates forming NURBS surface with different colors
+ */
+ private int poradi;
+
+ /**
+ * Creates new evaluator
+ */
+ public GL2SurfaceEvaluator() {
+ gl = GLUgl2.getCurrentGL2();
+ }
+
+ /**
+ * Pushes eval bit
+ */
+ public void bgnmap2f() {
+
+ if (output_triangles) {
+ // TODO outp triangles surfaceevaluator bgnmap2f
+ // System.out.println("TODO surfaceevaluator.bgnmap2f output triangles");
+ } else {
+ gl.glPushAttrib(GL2.GL_EVAL_BIT);
+ // System.out.println("TODO surfaceevaluator.bgnmap2f glgetintegerv");
+ }
+
+ }
+
+ /**
+ * Sets glPolygonMode
+ * @param style polygon mode (N_MESHFILL/N_MESHLINE/N_MESHPOINT)
+ */
+ public void polymode(int style) {
+ if (!output_triangles) {
+ switch (style) {
+ default:
+ case NurbsConsts.N_MESHFILL:
+ gl.glPolygonMode(GL2.GL_FRONT_AND_BACK, GL2.GL_FILL);
+ break;
+ case NurbsConsts.N_MESHLINE:
+ gl.glPolygonMode(GL2.GL_FRONT_AND_BACK, GL2.GL_LINE);
+ break;
+ case NurbsConsts.N_MESHPOINT:
+ gl.glPolygonMode(GL2.GL_FRONT_AND_BACK, GL2.GL_POINT);
+ break;
+ }
+ }
+
+ }
+
+ /**
+ * Pops all attributes
+ */
+ public void endmap2f() {
+ // TODO Auto-generated method stub
+ if (output_triangles) {
+ // System.out.println("TODO surfaceevaluator.endmap2f output triangles");
+ } else {
+ gl.glPopAttrib();
+ // TODO use LOD
+ }
+ }
+
+ /**
+ * Empty method
+ * @param ulo
+ * @param uhi
+ * @param vlo
+ * @param vhi
+ */
+ public void domain2f(float ulo, float uhi, float vlo, float vhi) {
+ // DONE
+ }
+
+ /**
+ * Defines 2D mesh
+ * @param nu number of steps in u direction
+ * @param u0 lowest u
+ * @param u1 highest u
+ * @param nv number of steps in v direction
+ * @param v0 lowest v
+ * @param v1 highest v
+ */
+ public void mapgrid2f(int nu, float u0, float u1, int nv, float v0, float v1) {
+
+ if (output_triangles) {
+ // System.out.println("TODO openglsurfaceavaluator.mapgrid2f output_triangles");
+ } else {
+ gl.glMapGrid2d(nu, u0, u1, nv, v0, v1);
+ }
+
+ }
+
+ /**
+ * Evaluates surface
+ * @param style surface style
+ * @param umin minimum U
+ * @param umax maximum U
+ * @param vmin minimum V
+ * @param vmax maximum V
+ */
+ public void mapmesh2f(int style, int umin, int umax, int vmin, int vmax) {
+ if (output_triangles) {
+ // System.out.println("TODO openglsurfaceavaluator.mapmesh2f output_triangles");
+ } else {
+ /* //DEBUG - draw control points
+ this.poradi++;
+ if (poradi % 2 == 0)
+ gl.glColor3f(1, 0, 0);
+ else if (poradi % 2 == 1)
+ gl.glColor3f(0, 1, 0);
+ */
+ switch (style) {
+ case NurbsConsts.N_MESHFILL:
+ gl.glEvalMesh2(GL2.GL_FILL, umin, umax, vmin, vmax);
+ break;
+ case NurbsConsts.N_MESHLINE:
+ gl.glEvalMesh2(GL2.GL_LINE, umin, umax, vmin, vmax);
+ break;
+ case NurbsConsts.N_MESHPOINT:
+ gl.glEvalMesh2(GL2.GL_POINT, umin, umax, vmin, vmax);
+ break;
+ }
+ }
+ }
+
+ /**
+ * Initializes evaluator
+ * @param type surface type
+ * @param ulo lowest u
+ * @param uhi highest u
+ * @param ustride number of objects between control points in u direction
+ * @param uorder surface order in u direction
+ * @param vlo lowest v
+ * @param vhi highest v
+ * @param vstride number of control points' coords
+ * @param vorder surface order in v direction
+ * @param pts control points
+ */
+ public void map2f(int type, float ulo, float uhi, int ustride, int uorder,
+ float vlo, float vhi, int vstride, int vorder, CArrayOfFloats pts) {
+ // TODO Auto-generated method stub
+ if (output_triangles) {
+ // System.out.println("TODO openglsurfaceevaluator.map2f output_triangles");
+ } else {
+ gl.glMap2f(type, ulo, uhi, ustride, uorder, vlo, vhi, vstride,
+ vorder, pts.getArray(), pts.getPointer());
+ }
+ }
+
+ /**
+ * Calls opengl enable
+ * @param type what to enable
+ */
+ public void enable(int type) {
+ //DONE
+ gl.glEnable(type);
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/glu/gl2/nurbs/GLUgl2nurbsImpl.java b/src/classes/com/sun/opengl/impl/glu/gl2/nurbs/GLUgl2nurbsImpl.java
new file mode 100755
index 000000000..d6c653a73
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/glu/gl2/nurbs/GLUgl2nurbsImpl.java
@@ -0,0 +1,862 @@
+package com.sun.opengl.impl.glu.gl2.nurbs;
+import com.sun.opengl.impl.glu.nurbs.*;
+
+/*
+ ** License Applicability. Except to the extent portions of this file are
+ ** made subject to an alternative license as permitted in the SGI Free
+ ** Software License B, Version 1.1 (the "License"), the contents of this
+ ** file are subject only to the provisions of the License. You may not use
+ ** this file except in compliance with the License. You may obtain a copy
+ ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
+ ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
+ **
+ ** http://oss.sgi.com/projects/FreeB
+ **
+ ** Note that, as provided in the License, the Software is distributed on an
+ ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
+ ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
+ ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
+ ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
+ **
+ ** Original Code. The Original Code is: OpenGL Sample Implementation,
+ ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
+ ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
+ ** Copyright in any portions created by third parties is as indicated
+ ** elsewhere herein. All Rights Reserved.
+ **
+ ** Additional Notice Provisions: The application programming interfaces
+ ** established by SGI in conjunction with the Original Code are The
+ ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
+ ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
+ ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
+ ** Window System(R) (Version 1.3), released October 19, 1998. This software
+ ** was created using the OpenGL(R) version 1.2.1 Sample Implementation
+ ** published by SGI, but has not been independently verified as being
+ ** compliant with the OpenGL(R) version 1.2.1 Specification.
+ */
+
+import java.lang.reflect.Method;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2;
+import javax.media.opengl.glu.GLUnurbs;
+
+/**
+ * Base object for working with NURBS curves and surfaces
+ *
+ * @author Tomas Hrasky
+ *
+ */
+public class GLUgl2nurbsImpl implements GLUnurbs {
+
+ /**
+ * Curve type - no type
+ */
+ public static final int CT_NONE = 0;
+
+ /**
+ * Curve type - NURBS curve
+ */
+ public static final int CT_NURBSCURVE = 1;
+
+ /**
+ * Curve type - picewise linear curve
+ */
+ public static final int CT_NPWLCURVE = 2;
+
+ /**
+ * Matrixes autoloading
+ */
+ private boolean autoloadmode;
+
+ /**
+ * Using callback
+ */
+ private int callBackFlag;
+
+ /**
+ * Object for error call backs
+ */
+ private Object errorCallback;
+
+ /**
+ * List of map definitions
+ */
+ Maplist maplist;
+
+ /**
+ * Indicates validity of data
+ */
+ private int isDataValid;
+
+ /**
+ * Are we in the middle of curve processing
+ */
+ private int inCurve;
+
+ /**
+ * Current curve
+ */
+ private O_curve currentCurve;
+
+ /**
+ * Are we in trim
+ */
+ private boolean inTrim;
+
+ /**
+ * Are we playbacking curve/surface rendering
+ */
+ private boolean playBack;
+
+ /**
+ * Next curve in linked list
+ */
+ private O_curve nextCurve;
+
+ /**
+ * Is curve modified
+ */
+ private int isCurveModified;
+
+ /**
+ * Object holding rendering settings
+ */
+ private Renderhints renderhints;
+
+ /**
+ * Display list
+ */
+ private DisplayList dl;
+
+ /**
+ * Object for subdividing curves and surfaces
+ */
+ private Subdivider subdivider;
+
+ /**
+ * Object responsible for rendering
+ */
+ private Backend backend;
+
+ /**
+ * Next picewise linear curve in linked list
+ */
+ private O_pwlcurve nextPwlcurve;
+
+ /**
+ * Next trimming NURBS curve in linked list
+ */
+ private O_nurbscurve nextNurbscurve;
+
+ /**
+ * Are we in the middle of surface processing
+ */
+ private int inSurface;
+
+ /**
+ * Are there any changes in trimming
+ */
+ private boolean isTrimModified;
+
+ /**
+ * Are there any changes in surface data
+ */
+ private boolean isDataSurfaceModified;
+
+ /**
+ * Nurber of trmims of processed surface
+ */
+ private int numTrims;
+
+ /**
+ * Current processed surface
+ */
+ private O_surface currentSurface;
+
+ /**
+ * Next trimming curve
+ */
+ private O_trim nextTrim;
+
+ /**
+ * Nextr surface in linked list
+ */
+ private O_nurbssurface nextNurbssurface;
+
+ /**
+ * Are there any changes in surface
+ */
+ private boolean isSurfaceModified;
+
+ /**
+ * Initializes default GLUgl2nurbs object
+ */
+ public GLUgl2nurbsImpl() {
+ // DONE
+ maplist = new Maplist(backend);
+ renderhints = new Renderhints();
+ subdivider = new Subdivider();
+ // original code
+
+ redefineMaps();
+
+ defineMap(GL2.GL_MAP2_NORMAL, 0, 3);
+ defineMap(GL2.GL_MAP1_NORMAL, 0, 3);
+ defineMap(GL2.GL_MAP2_TEXTURE_COORD_1, 0, 1);
+ defineMap(GL2.GL_MAP1_TEXTURE_COORD_1, 0, 1);
+ defineMap(GL2.GL_MAP2_TEXTURE_COORD_2, 0, 2);
+ defineMap(GL2.GL_MAP1_TEXTURE_COORD_2, 0, 2);
+ defineMap(GL2.GL_MAP2_TEXTURE_COORD_3, 0, 3);
+ defineMap(GL2.GL_MAP1_TEXTURE_COORD_3, 0, 3);
+ defineMap(GL2.GL_MAP2_TEXTURE_COORD_4, 1, 4);
+ defineMap(GL2.GL_MAP1_TEXTURE_COORD_4, 1, 4);
+ defineMap(GL2.GL_MAP2_VERTEX_4, 1, 4);
+ defineMap(GL2.GL_MAP1_VERTEX_4, 1, 4);
+ defineMap(GL2.GL_MAP2_VERTEX_3, 0, 3);
+ defineMap(GL2.GL_MAP1_VERTEX_3, 0, 3);
+ defineMap(GL2.GL_MAP2_COLOR_4, 0, 4);
+ defineMap(GL2.GL_MAP1_COLOR_4, 0, 4);
+ defineMap(GL2.GL_MAP2_INDEX, 0, 1);
+ defineMap(GL2.GL_MAP1_INDEX, 0, 1);
+
+ setnurbsproperty(GL2.GL_MAP1_VERTEX_3, NurbsConsts.N_SAMPLINGMETHOD,
+ (float) NurbsConsts.N_PATHLENGTH);
+ setnurbsproperty(GL2.GL_MAP1_VERTEX_4, NurbsConsts.N_SAMPLINGMETHOD,
+ (float) NurbsConsts.N_PATHLENGTH);
+ setnurbsproperty(GL2.GL_MAP2_VERTEX_3, NurbsConsts.N_SAMPLINGMETHOD,
+ (float) NurbsConsts.N_PATHLENGTH);
+ setnurbsproperty(GL2.GL_MAP2_VERTEX_4, NurbsConsts.N_SAMPLINGMETHOD,
+ (float) NurbsConsts.N_PATHLENGTH);
+
+ setnurbsproperty(GL2.GL_MAP1_VERTEX_3, NurbsConsts.N_PIXEL_TOLERANCE,
+ (float) 50.0);
+ setnurbsproperty(GL2.GL_MAP1_VERTEX_4, NurbsConsts.N_PIXEL_TOLERANCE,
+ (float) 50.0);
+ setnurbsproperty(GL2.GL_MAP2_VERTEX_3, NurbsConsts.N_PIXEL_TOLERANCE,
+ (float) 50.0);
+ setnurbsproperty(GL2.GL_MAP2_VERTEX_4, NurbsConsts.N_PIXEL_TOLERANCE,
+ (float) 50.0);
+
+ setnurbsproperty(GL2.GL_MAP1_VERTEX_3, NurbsConsts.N_ERROR_TOLERANCE,
+ (float) 0.50);
+ setnurbsproperty(GL2.GL_MAP1_VERTEX_4, NurbsConsts.N_ERROR_TOLERANCE,
+ (float) 0.50);
+ setnurbsproperty(GL2.GL_MAP2_VERTEX_3, NurbsConsts.N_ERROR_TOLERANCE,
+ (float) 0.50);
+ setnurbsproperty(GL2.GL_MAP2_VERTEX_4, NurbsConsts.N_ERROR_TOLERANCE,
+ (float) 0.50);
+
+ setnurbsproperty(GL2.GL_MAP1_VERTEX_3, NurbsConsts.N_S_STEPS,
+ (float) 100.0);
+ setnurbsproperty(GL2.GL_MAP1_VERTEX_4, NurbsConsts.N_S_STEPS,
+ (float) 100.0);
+ setnurbsproperty(GL2.GL_MAP2_VERTEX_3, NurbsConsts.N_S_STEPS,
+ (float) 100.0);
+ setnurbsproperty(GL2.GL_MAP2_VERTEX_4, NurbsConsts.N_S_STEPS,
+ (float) 100.0);
+
+ setnurbsproperty(GL2.GL_MAP1_VERTEX_3, NurbsConsts.N_SAMPLINGMETHOD,
+ NurbsConsts.N_PATHLENGTH);
+
+ set_domain_distance_u_rate(100.0);
+ set_domain_distance_v_rate(100.0);
+ set_is_domain_distance_sampling(0);
+
+ this.autoloadmode = true;
+
+ this.callBackFlag = 0;
+
+ this.errorCallback = null;
+ }
+
+ /**
+ * Sets domain distance for dom.dist. sampling in u direction
+ *
+ * @param d
+ * distance
+ */
+ private void set_domain_distance_u_rate(double d) {
+ // DONE
+ subdivider.set_domain_distance_u_rate(d);
+ }
+
+ /**
+ * Sets domain distance for dom.dist. sampling in v direction
+ *
+ * @param d
+ * distance
+ */
+ private void set_domain_distance_v_rate(double d) {
+ // DONE
+ subdivider.set_domain_distance_v_rate(d);
+ }
+
+ /**
+ * Begins new NURBS curve
+ */
+ public void bgncurve() {
+ // DONE
+ O_curve o_curve = new O_curve();
+ thread("do_bgncurve", o_curve);
+ }
+
+ /**
+ * Calls a method with given name and passes argumet
+ *
+ * @param name
+ * name of a method to be called
+ * @param arg
+ * parameter to be passed to called method
+ */
+ private void thread(String name, Object arg) {
+ // DONE
+ Class partype[] = new Class[1];
+ partype[0] = arg.getClass();
+ Method m;
+ try {
+ m = this.getClass().getMethod(name, partype);
+ if (dl != null) {
+ dl.append(this, m, arg);
+ } else {
+ m.invoke(this, new Object[] { arg });
+ }
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ /**
+ * Calls a method with given name
+ *
+ * @param name
+ * name of a method to be called
+ */
+ private void thread2(String name) {
+ // DONE
+ try {
+ Method m = this.getClass().getMethod(name, (Class[]) null);
+ if (dl != null) {
+ dl.append(this, m, null);
+ } else {
+ m.invoke(this, (Object[]) null);
+ }
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Begins a NURBS curve
+ *
+ * @param o_curve
+ * curve object
+ */
+ public void do_bgncurve(O_curve o_curve) {
+ if (inCurve > 0) {
+ do_nurbserror(6);
+ endcurve();
+ }
+ inCurve = 1;
+ currentCurve = o_curve;
+
+ currentCurve.curvetype = CT_NONE;
+
+ if (inTrim) {
+ if (!nextCurve.equals(o_curve)) {
+ isCurveModified = 1;
+ nextCurve = o_curve;
+ }
+ } else {
+ if (!playBack)
+ bgnrender();
+ isDataValid = 1;
+ }
+ nextCurve = o_curve.next;
+ // kind of solution of union
+ nextPwlcurve = o_curve.o_pwlcurve;
+ nextNurbscurve = o_curve.o_nurbscurve;
+ }
+
+ /**
+ * Begins new surface
+ *
+ * @param o_surface
+ * surface object
+ */
+ public void do_bgnsurface(O_surface o_surface) {
+ // DONE
+ if (inSurface > 0) {
+ do_nurbserror(27);
+ endsurface();
+ }
+ inSurface = 1;
+ if (!playBack)
+ bgnrender();
+
+ isTrimModified = false;
+ isDataSurfaceModified = false;
+ isDataValid = 1;
+ numTrims = 0;
+ currentSurface = o_surface;
+ nextTrim = o_surface.o_trim;
+ nextNurbssurface = o_surface.o_nurbssurface;
+ }
+
+ /**
+ * End a curve
+ */
+ public void endcurve() {
+ // DONE
+ thread2("do_endcurve");
+ }
+
+ /**
+ * Ends surface
+ */
+ public void do_endsurface() {
+ // DONE
+ if (inTrim) {
+ do_nurbserror(12);
+ endtrim();
+ }
+
+ if (inSurface <= 0) {
+ do_nurbserror(13);
+ return;
+ }
+
+ inSurface = 0;
+
+ nextNurbssurface = null;
+
+ if (isDataValid <= 0) {
+ return;
+ }
+
+ if (nextTrim != null) {
+ isTrimModified = true;
+ nextTrim = null;
+ }
+
+ // TODO errval ??
+ if (numTrims > 0) {
+ // System.out.println("TODO glunurbs.do_endsurface - numtrims > 0");
+ }
+
+ subdivider.beginQuilts(new GL2Backend());
+ for (O_nurbssurface n = currentSurface.o_nurbssurface; n != null; n = n.next) {
+ subdivider.addQuilt(n.bezier_patches);
+ }
+ subdivider.endQuilts();
+ subdivider.drawSurfaces();
+ if (!playBack)
+ endrender();
+
+ }
+
+ /**
+ * Ends a curve
+ */
+ public void do_endcurve() {
+ // DONE
+ // // System.out.println("do_endcurve");
+ if (inCurve <= 0) {
+ do_nurbserror(7);
+ return;
+ }
+ inCurve = 0;
+
+ nextCurve = null;
+
+ if (currentCurve.curvetype == CT_NURBSCURVE) {
+ // nextNurbscurve = null;
+ // currentCurve.o_nurbscurve=null;
+ } else {
+ // nextPwlcurve = null;
+ // currentCurve.o_pwlcurve=null;
+ }
+ if (!inTrim) {
+ if (isDataValid <= 0) {
+ return;
+ }
+ // TODO errval?
+ if (currentCurve.curvetype == CT_NURBSCURVE) {
+ subdivider.beginQuilts(new GL2Backend());
+
+ for (O_nurbscurve n = currentCurve.o_nurbscurve; n != null; n = n.next)
+ subdivider.addQuilt(n.bezier_curves);
+
+ subdivider.endQuilts();
+ subdivider.drawCurves();
+ if (!playBack)
+ endrender();
+ } else {
+ if (!playBack)
+ endrender();
+ do_nurbserror(9);
+ }
+ }
+
+ }
+
+ /**
+ * Method for handling error codes
+ *
+ * @param i
+ * error code
+ */
+ private void do_nurbserror(int i) {
+ // TODO nurberror
+ // System.out.println("TODO nurbserror " + i);
+ }
+
+ /**
+ * Begin rendering
+ */
+ private void bgnrender() {
+ // DONE
+ if (autoloadmode) {
+ loadGLMatrices();
+ }
+ }
+
+ /**
+ * Load matrices from OpenGL state machine
+ */
+ private void loadGLMatrices() {
+ // TODO Auto-generated method stub
+ // System.out.println("TODO glunurbs.loadGLMatrices");
+ }
+
+ /**
+ * End rendering
+ */
+ private void endrender() {
+ // DONE
+ }
+
+ /**
+ * Make a NURBS curve
+ *
+ * @param nknots
+ * number of knots in knot vector
+ * @param knot
+ * knot vector
+ * @param stride
+ * number of control points coordinates
+ * @param ctlarray
+ * control points
+ * @param order
+ * order of the curve
+ * @param realType
+ * type of the curve
+ */
+ public void nurbscurve(int nknots, float[] knot, int stride,
+ float[] ctlarray, int order, int realType) {
+ // DONE
+ Mapdesc mapdesc = maplist.locate(realType);
+ if (mapdesc == null) {
+ do_nurbserror(35);
+ isDataValid = 0;
+ return;
+ }
+ if (ctlarray == null) {
+ do_nurbserror(36);
+ isDataValid = 0;
+ return;
+ }
+ if (stride < 0) {
+ do_nurbserror(34);
+ isDataValid = 0;
+ return;
+ }
+ Knotvector knots = new Knotvector(nknots, stride, order, knot);
+
+ if (!do_check_knots(knots, "curve"))
+ return;
+
+ O_nurbscurve o_nurbscurve = new O_nurbscurve(realType);
+ o_nurbscurve.bezier_curves = new Quilt(mapdesc);
+ CArrayOfFloats ctrlcarr = new CArrayOfFloats(ctlarray);
+ o_nurbscurve.bezier_curves.toBezier(knots, ctrlcarr, mapdesc
+ .getNCoords());
+ thread("do_nurbscurve", o_nurbscurve);
+ }
+
+ /**
+ * Check knot vector specification
+ *
+ * @param knots
+ * knot vector
+ * @param msg
+ * error message
+ * @return knot vector is / is not valid
+ */
+ public boolean do_check_knots(Knotvector knots, String msg) {
+ // DONE
+ int status = knots.validate();
+ if (status > 0) {
+ do_nurbserror(status);
+ if (renderhints.errorchecking != NurbsConsts.N_NOMSG)
+ knots.show(msg);
+ }
+ return (status > 0) ? false : true;
+ }
+
+ /**
+ * Draw a curve
+ *
+ * @param o_nurbscurve
+ * NURBS curve object
+ */
+ public void do_nurbscurve(O_nurbscurve o_nurbscurve) {
+ // DONE
+
+ if (inCurve <= 0) {
+ bgncurve();
+ inCurve = 2;
+ }
+
+ if (o_nurbscurve.used) {
+ do_nurbserror(23);
+ isDataValid = 0;
+ return;
+ } else
+ o_nurbscurve.used = true;
+
+ if (currentCurve.curvetype == CT_NONE) {
+ currentCurve.curvetype = CT_NURBSCURVE;
+ } else if (currentCurve.curvetype != CT_NURBSCURVE) {
+ do_nurbserror(24);
+ isDataValid = 0;
+ return;
+ }
+
+ // it was necessary to overcome problem with pointer to pointer here
+
+ // if(!o_nurbscurve.equals(nextNurbscurve)){
+ if (!o_nurbscurve.equals(currentCurve.o_nurbscurve)) {
+ isCurveModified = 1;
+ currentCurve.o_nurbscurve = o_nurbscurve;
+ // nextNurbscurve=o_nurbscurve;
+
+ }
+
+ nextNurbscurve = o_nurbscurve.next;
+
+ if (!currentCurve.equals(o_nurbscurve.owner)) {
+ isCurveModified = 1;
+ o_nurbscurve.owner = currentCurve;
+ }
+
+ if (o_nurbscurve.owner == null)
+ isCurveModified = 1;
+
+ if (inCurve == 2)
+ endcurve();
+ }
+
+ /**
+ * Draw NURBS surface
+ *
+ * @param o_nurbssurface
+ * NURBS surface object
+ */
+ public void do_nurbssurface(O_nurbssurface o_nurbssurface) {
+ // DONE
+ if (inSurface <= 0) {
+ bgnsurface();
+ inSurface = 2;
+ }
+ if (o_nurbssurface.used) {
+ do_nurbserror(25);
+ isDataValid = 0;
+ return;
+ } else
+ o_nurbssurface.used = true;
+
+ if (!o_nurbssurface.equals(nextNurbscurve)) {
+ isSurfaceModified = true;
+ // nextNurbssurface=o_nurbssurface;
+ currentSurface.o_nurbssurface = o_nurbssurface;
+ }
+
+ if (!currentSurface.equals(o_nurbssurface.owner)) {
+ isSurfaceModified = true;
+ o_nurbssurface.owner = currentSurface;
+ }
+
+ nextNurbssurface = o_nurbssurface.next;
+
+ if (inSurface == 2)
+ endsurface();
+ }
+
+ /**
+ * (Re)Inicialize maps
+ */
+ public void redefineMaps() {
+ // DONE
+ maplist.initialize();
+ }
+
+ /**
+ * Define a map of given properties
+ *
+ * @param type
+ * map type
+ * @param rational
+ * is rational
+ * @param ncoords
+ * number of control point coordinates
+ */
+ public void defineMap(int type, int rational, int ncoords) {
+ // DONE
+ maplist.define(type, rational, ncoords);
+ }
+
+ /**
+ * Set NURBS property
+ *
+ * @param type
+ * property type
+ * @param tag
+ * property tag
+ * @param value
+ * property value
+ */
+ public void setnurbsproperty(int type, int tag, float value) {
+ // DONE
+ Mapdesc mapdesc = maplist.locate(type);
+ if (mapdesc == null) {
+ do_nurbserror(35);
+ return;
+ }
+ if (!mapdesc.isProperty(tag)) {
+ do_nurbserror(26);
+ return;
+ }
+ Property prop = new Property(type, tag, value);
+ thread("do_setnurbsproperty2", prop);
+ }
+
+ /**
+ * Set parameters of existing property
+ *
+ * @param prop
+ * property
+ */
+ public void do_setnurbsproperty2(Property prop) {
+ Mapdesc mapdesc = maplist.find(prop.type);
+ mapdesc.setProperty(prop.tag, prop.value);
+ }
+
+ /**
+ * Set given property to rendering hints
+ *
+ * @param prop
+ * property to be set
+ */
+ public void do_setnurbsproperty(Property prop) {
+ // DONE
+ renderhints.setProperty(prop);
+ // TODO freeproperty?
+ }
+
+ /**
+ * Sets wheteher we use domain distance sampling
+ *
+ * @param i
+ * domain distance sampling flag
+ */
+ public void set_is_domain_distance_sampling(int i) {
+ // DONE
+ subdivider.set_is_domain_distance_sampling(i);
+ }
+
+ /**
+ * Begin new surface
+ */
+ public void bgnsurface() {
+ // DONE
+ O_surface o_surface = new O_surface();
+ // TODO nuid
+ // System.out.println("TODO glunurbs.bgnsurface nuid");
+ thread("do_bgnsurface", o_surface);
+ }
+
+ /**
+ * End current surface
+ */
+ public void endsurface() {
+ // DONE
+ thread2("do_endsurface");
+ }
+
+ /**
+ * End surface trimming
+ */
+ private void endtrim() {
+ // TODO Auto-generated method stub
+ // System.out.println("TODO glunurbs.endtrim");
+ }
+
+ /**
+ * Make NURBS surface
+ *
+ * @param sknot_count
+ * number of knots in s direction
+ * @param sknot
+ * knot vector in s direction
+ * @param tknot_count
+ * number of knots in t direction
+ * @param tknot
+ * knot vector in t direction
+ * @param s_stride
+ * number of coords of control points in s direction
+ * @param t_stride
+ * number of coords of control points in t direction
+ * @param ctlarray
+ * control points
+ * @param sorder
+ * order of curve in s direction
+ * @param torder
+ * order of curve in t direction
+ * @param type
+ * NURBS surface type (rational,...)
+ */
+ public void nurbssurface(int sknot_count, float[] sknot, int tknot_count,
+ float[] tknot, int s_stride, int t_stride, float[] ctlarray,
+ int sorder, int torder, int type) {
+ // DONE
+ Mapdesc mapdesc = maplist.locate(type);
+ if (mapdesc == null) {
+ do_nurbserror(35);
+ isDataValid = 0;
+ return;
+ }
+ if (s_stride < 0 || t_stride < 0) {
+ do_nurbserror(34);
+ isDataValid = 0;
+ return;
+ }
+ Knotvector sknotvector = new Knotvector(sknot_count, s_stride, sorder,
+ sknot);
+ if (!do_check_knots(sknotvector, "surface"))
+ return;
+ Knotvector tknotvector = new Knotvector(tknot_count, t_stride, torder,
+ tknot);
+ if (!do_check_knots(tknotvector, "surface"))
+ return;
+
+ O_nurbssurface o_nurbssurface = new O_nurbssurface(type);
+ o_nurbssurface.bezier_patches = new Quilt(mapdesc);
+
+ CArrayOfFloats ctrlarr = new CArrayOfFloats(ctlarray);
+ o_nurbssurface.bezier_patches.toBezier(sknotvector, tknotvector,
+ ctrlarr, mapdesc.getNCoords());
+ thread("do_nurbssurface", o_nurbssurface);
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/j2d/Java2D.java b/src/classes/com/sun/opengl/impl/j2d/Java2D.java
new file mode 100755
index 000000000..749978467
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/j2d/Java2D.java
@@ -0,0 +1,569 @@
+/*
+ * Copyright (c) 2003-2005 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.j2d;
+
+import com.sun.opengl.impl.*;
+
+import java.awt.*;
+import java.awt.image.*;
+import java.lang.reflect.*;
+import java.security.*;
+
+import javax.media.opengl.*;
+
+/** Defines integration with the Java2D OpenGL pipeline. This
+ integration is only supported in 1.6 and is highly experimental. */
+
+public class Java2D {
+ private static boolean DEBUG = Debug.debug("Java2D");
+ private static boolean VERBOSE = Debug.verbose();
+ private static boolean isHeadless;
+ private static boolean isOGLPipelineActive;
+ private static Method invokeWithOGLContextCurrentMethod;
+ private static Method isQueueFlusherThreadMethod;
+ private static Method getOGLViewportMethod;
+ private static Method getOGLScissorBoxMethod;
+ private static Method getOGLSurfaceIdentifierMethod;
+ // This one is currently optional and is only in very recent Mustang builds
+ private static Method getOGLTextureTypeMethod;
+
+ // The following methods and fields are needed for proper support of
+ // Frame Buffer Objects in the Java2D/OpenGL pipeline
+ // (-Dsun.java2d.opengl.fbobject=true)
+ private static boolean fbObjectSupportInitialized;
+ private static Method invokeWithOGLSharedContextCurrentMethod;
+ private static Method getOGLSurfaceTypeMethod;
+
+ // Publicly-visible constants for OpenGL surface types
+ public static final int UNDEFINED = getOGLUtilitiesIntField("UNDEFINED");
+ public static final int WINDOW = getOGLUtilitiesIntField("WINDOW");
+ public static final int PBUFFER = getOGLUtilitiesIntField("PBUFFER");
+ public static final int TEXTURE = getOGLUtilitiesIntField("TEXTURE");
+ public static final int FLIP_BACKBUFFER = getOGLUtilitiesIntField("FLIP_BACKBUFFER");
+ public static final int FBOBJECT = getOGLUtilitiesIntField("FBOBJECT");
+
+ // If FBOs are enabled in the Java2D/OpenGL pipeline, all contexts
+ // created by JOGL must share textures and display lists with the
+ // Java2D contexts in order to access the frame buffer object for
+ // potential rendering, and to simultaneously support sharing of
+ // textures and display lists with one another. Java2D has the
+ // notion of a single shared context with which all other contexts
+ // (on the same display device?) share textures and display lists;
+ // this is an approximation to that notion which will be refined
+ // later.
+ private static boolean initializedJ2DFBOShareContext;
+ private static GLContext j2dFBOShareContext;
+
+ // Accessors for new methods in sun.java2d.opengl.CGLSurfaceData
+ // class on OS X for enabling bridge
+ // public static long createOGLContextOnSurface(Graphics g, long ctx);
+ // public static boolean makeOGLContextCurrentOnSurface(Graphics g, long ctx);
+ // public static void destroyOGLContext(long ctx);
+ private static Method createOGLContextOnSurfaceMethod;
+ private static Method makeOGLContextCurrentOnSurfaceMethod;
+ private static Method destroyOGLContextMethod;
+
+ static {
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ if (DEBUG && VERBOSE) {
+ System.err.println("Checking for Java2D/OpenGL support");
+ }
+ try {
+ isHeadless = true;
+ // Figure out whether the default graphics configuration is an
+ // OpenGL graphics configuration
+ GraphicsConfiguration cfg =
+ GraphicsEnvironment.getLocalGraphicsEnvironment().
+ getDefaultScreenDevice().
+ getDefaultConfiguration();
+ // If we get here, we aren't running in headless mode
+ isHeadless = false;
+ String name = cfg.getClass().getName();
+ if (DEBUG && VERBOSE) {
+ System.err.println("Java2D support: default GraphicsConfiguration = " + name);
+ }
+ isOGLPipelineActive = (name.startsWith("sun.java2d.opengl"));
+
+ if (isOGLPipelineActive) {
+ try {
+ // Try to get methods we need to integrate
+ Class utils = Class.forName("sun.java2d.opengl.OGLUtilities");
+ invokeWithOGLContextCurrentMethod = utils.getDeclaredMethod("invokeWithOGLContextCurrent",
+ new Class[] {
+ Graphics.class,
+ Runnable.class
+ });
+ invokeWithOGLContextCurrentMethod.setAccessible(true);
+
+ isQueueFlusherThreadMethod = utils.getDeclaredMethod("isQueueFlusherThread",
+ new Class[] {});
+ isQueueFlusherThreadMethod.setAccessible(true);
+
+ getOGLViewportMethod = utils.getDeclaredMethod("getOGLViewport",
+ new Class[] {
+ Graphics.class,
+ Integer.TYPE,
+ Integer.TYPE
+ });
+ getOGLViewportMethod.setAccessible(true);
+
+ getOGLScissorBoxMethod = utils.getDeclaredMethod("getOGLScissorBox",
+ new Class[] {
+ Graphics.class
+ });
+ getOGLScissorBoxMethod.setAccessible(true);
+
+ getOGLSurfaceIdentifierMethod = utils.getDeclaredMethod("getOGLSurfaceIdentifier",
+ new Class[] {
+ Graphics.class
+ });
+ getOGLSurfaceIdentifierMethod.setAccessible(true);
+
+ // Try to get additional methods required for proper FBO support
+ fbObjectSupportInitialized = true;
+ try {
+ invokeWithOGLSharedContextCurrentMethod = utils.getDeclaredMethod("invokeWithOGLSharedContextCurrent",
+ new Class[] {
+ GraphicsConfiguration.class,
+ Runnable.class
+ });
+ invokeWithOGLSharedContextCurrentMethod.setAccessible(true);
+
+ getOGLSurfaceTypeMethod = utils.getDeclaredMethod("getOGLSurfaceType",
+ new Class[] {
+ Graphics.class
+ });
+ getOGLSurfaceTypeMethod.setAccessible(true);
+ } catch (Exception e) {
+ fbObjectSupportInitialized = false;
+ if (DEBUG && VERBOSE) {
+ e.printStackTrace();
+ System.err.println("Disabling Java2D/JOGL FBO support");
+ }
+ }
+
+ // Try to get an additional method for FBO support in recent Mustang builds
+ try {
+ getOGLTextureTypeMethod = utils.getDeclaredMethod("getOGLTextureType",
+ new Class[] {
+ Graphics.class
+ });
+ getOGLTextureTypeMethod.setAccessible(true);
+ } catch (Exception e) {
+ if (DEBUG && VERBOSE) {
+ e.printStackTrace();
+ System.err.println("GL_ARB_texture_rectangle FBO support disabled");
+ }
+ }
+
+ // Try to set up APIs for enabling the bridge on OS X,
+ // where it isn't possible to create generalized
+ // external GLDrawables
+ Class cglSurfaceData = null;
+ try {
+ cglSurfaceData = Class.forName("sun.java2d.opengl.CGLSurfaceData");
+ } catch (Exception e) {
+ if (DEBUG && VERBOSE) {
+ e.printStackTrace();
+ System.err.println("Unable to find class sun.java2d.opengl.CGLSurfaceData for OS X");
+ }
+ }
+ if (cglSurfaceData != null) {
+ // FIXME: for now, assume that FBO support is not enabled on OS X
+ fbObjectSupportInitialized = false;
+
+ // We need to find these methods in order to make the bridge work on OS X
+ createOGLContextOnSurfaceMethod = cglSurfaceData.getDeclaredMethod("createOGLContextOnSurface",
+ new Class[] {
+ Graphics.class,
+ Long.TYPE
+ });
+ createOGLContextOnSurfaceMethod.setAccessible(true);
+
+ makeOGLContextCurrentOnSurfaceMethod = cglSurfaceData.getDeclaredMethod("makeOGLContextCurrentOnSurface",
+ new Class[] {
+ Graphics.class,
+ Long.TYPE
+ });
+ makeOGLContextCurrentOnSurfaceMethod.setAccessible(true);
+
+ destroyOGLContextMethod = cglSurfaceData.getDeclaredMethod("destroyOGLContext",
+ new Class[] {
+ Long.TYPE
+ });
+ destroyOGLContextMethod.setAccessible(true);
+ }
+ } catch (Exception e) {
+ if (DEBUG && VERBOSE) {
+ e.printStackTrace();
+ System.err.println("Disabling Java2D/JOGL integration");
+ }
+ isOGLPipelineActive = false;
+ }
+ }
+ } catch (HeadlessException e) {
+ // The AWT is running in headless mode, so the Java 2D / JOGL bridge is clearly disabled
+ }
+
+ if (DEBUG) {
+ System.err.println("JOGL/Java2D integration " + (isOGLPipelineActive ? "enabled" : "disabled"));
+ }
+ return null;
+ }
+ });
+ }
+
+ public static boolean isOGLPipelineActive() {
+ return isOGLPipelineActive;
+ }
+
+ public static boolean isFBOEnabled() {
+ return fbObjectSupportInitialized;
+ }
+
+ public static boolean isQueueFlusherThread() {
+ checkActive();
+
+ try {
+ return ((Boolean) isQueueFlusherThreadMethod.invoke(null, new Object[] {})).booleanValue();
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (Exception e) {
+ throw (InternalError) new InternalError().initCause(e);
+ }
+ }
+
+ /** Makes current the OpenGL context associated with the passed
+ Graphics object and runs the given Runnable on the Queue
+ Flushing Thread in one atomic action. */
+ public static void invokeWithOGLContextCurrent(Graphics g, Runnable r) throws GLException {
+ checkActive();
+
+ try {
+ // FIXME: this may need adjustment
+ // This seems to be needed in many applications which don't
+ // initialize an OpenGL context before this and which would
+ // otherwise cause initFBOShareContext to be called from the
+ // Queue Flusher Thread, which isn't allowed
+ initFBOShareContext(GraphicsEnvironment.
+ getLocalGraphicsEnvironment().
+ getDefaultScreenDevice().
+ getDefaultConfiguration());
+
+ GLDrawableFactoryImpl.getFactoryImpl(true).lockToolkit();
+ try {
+ invokeWithOGLContextCurrentMethod.invoke(null, new Object[] {g, r});
+ } finally {
+ GLDrawableFactoryImpl.getFactory(true).unlockToolkit();
+ }
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (Exception e) {
+ throw (InternalError) new InternalError().initCause(e);
+ }
+ }
+
+ /** Makes current the "shared" OpenGL context associated with the
+ given GraphicsConfiguration object, allowing JOGL to share
+ server-side OpenGL objects like textures and display lists with
+ this context when necessary. This is needed when Java2D's FBO
+ support is enabled, because in order to render into that FBO,
+ JOGL must share textures and display lists with it. Returns
+ false if the passed GraphicsConfiguration was not an OpenGL
+ GraphicsConfiguration. */
+ public static boolean invokeWithOGLSharedContextCurrent(GraphicsConfiguration g, Runnable r) throws GLException {
+ checkActive();
+
+ try {
+ GLDrawableFactoryImpl.getFactoryImpl(true).lockToolkit();
+ try {
+ return ((Boolean) invokeWithOGLSharedContextCurrentMethod.invoke(null, new Object[] {g, r})).booleanValue();
+ } finally {
+ GLDrawableFactoryImpl.getFactoryImpl(true).unlockToolkit();
+ }
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (Exception e) {
+ throw (InternalError) new InternalError().initCause(e);
+ }
+ }
+
+ /** Returns the OpenGL viewport associated with the given Graphics
+ object, assuming that the Graphics object is associated with a
+ component of the specified width and height. The user should
+ call glViewport() with the returned rectangle's bounds in order
+ to get correct rendering results. Should only be called from the
+ Queue Flusher Thread. */
+ public static Rectangle getOGLViewport(Graphics g,
+ int componentWidth,
+ int componentHeight) {
+ checkActive();
+
+ try {
+ return (Rectangle) getOGLViewportMethod.invoke(null, new Object[] {g,
+ new Integer(componentWidth),
+ new Integer(componentHeight)});
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (Exception e) {
+ throw (InternalError) new InternalError().initCause(e);
+ }
+ }
+
+ /** Returns the OpenGL scissor region associated with the given
+ Graphics object, taking into account all clipping regions, etc.
+ To avoid destroying Java2D's previous rendering results, this
+ method should be called and the resulting rectangle's bounds
+ passed to a call to glScissor(). Should only be called from the
+ Queue Flusher Thread. */
+ public static Rectangle getOGLScissorBox(Graphics g) {
+ checkActive();
+
+ try {
+ return (Rectangle) getOGLScissorBoxMethod.invoke(null, new Object[] {g});
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (Exception e) {
+ throw (InternalError) new InternalError().initCause(e);
+ }
+ }
+
+ /** Returns an opaque "surface identifier" associated with the given
+ Graphics object. If this changes from invocation to invocation,
+ the underlying OpenGL drawable for the Graphics object has
+ changed and a new external GLDrawable and GLContext should be
+ created (and the old ones destroyed). Should only be called from
+ the Queue Flusher Thread.*/
+ public static Object getOGLSurfaceIdentifier(Graphics g) {
+ checkActive();
+
+ try {
+ return getOGLSurfaceIdentifierMethod.invoke(null, new Object[] {g});
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (Exception e) {
+ throw (InternalError) new InternalError().initCause(e);
+ }
+ }
+
+ /** Returns the underlying surface type for the given Graphics
+ object. This indicates, in particular, whether Java2D is
+ currently rendering into a pbuffer or FBO. */
+ public static int getOGLSurfaceType(Graphics g) {
+ checkActive();
+
+ try {
+ // FIXME: fallback path for pre-b73 (?) Mustang builds -- remove
+ // once fbobject support is in OGLUtilities
+ if (!fbObjectSupportInitialized) {
+ return 0;
+ }
+
+ return ((Integer) getOGLSurfaceTypeMethod.invoke(null, new Object[] { g })).intValue();
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (Exception e) {
+ throw (InternalError) new InternalError().initCause(e);
+ }
+ }
+
+ /** Returns the underlying texture target of the given Graphics
+ object assuming it is rendering to an FBO. Returns either
+ GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE_ARB. */
+ public static int getOGLTextureType(Graphics g) {
+ checkActive();
+
+ if (getOGLTextureTypeMethod == null) {
+ return GL.GL_TEXTURE_2D;
+ }
+
+ try {
+ return ((Integer) getOGLTextureTypeMethod.invoke(null, new Object[] { g })).intValue();
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (Exception e) {
+ throw (InternalError) new InternalError().initCause(e);
+ }
+ }
+
+ /** Returns either the given GLContext or a substitute one with
+ which clients should share textures and display lists. Needed
+ when the Java2D/OpenGL pipeline is active and FBOs are being
+ used for rendering. FIXME: may need to alter the API in the
+ future to indicate which GraphicsDevice the source context is
+ associated with. */
+ public static GLContext filterShareContext(GLContext shareContext) {
+ if (isHeadless)
+ return shareContext;
+
+ // FIXME: this may need adjustment
+ initFBOShareContext(GraphicsEnvironment.
+ getLocalGraphicsEnvironment().
+ getDefaultScreenDevice().
+ getDefaultConfiguration());
+ if (j2dFBOShareContext != null) {
+ return j2dFBOShareContext;
+ }
+ return shareContext;
+ }
+
+ /** Returns the GLContext associated with the Java2D "share
+ context", with which all contexts created by JOGL must share
+ textures and display lists when the FBO option is enabled for
+ the Java2D/OpenGL pipeline. */
+ public static GLContext getShareContext(GraphicsConfiguration gc) {
+ initFBOShareContext(gc);
+ // FIXME: for full generality probably need to have multiple of
+ // these, one per GraphicsConfiguration seen?
+ return j2dFBOShareContext;
+ }
+
+ //----------------------------------------------------------------------
+ // Mac OS X-specific methods
+ //
+
+ /** (Mac OS X-specific) Creates a new OpenGL context on the surface
+ associated with the given Graphics object, sharing textures and
+ display lists with the specified (CGLContextObj) share context. */
+ public static long createOGLContextOnSurface(Graphics g, long shareCtx) {
+ checkActive();
+
+ try {
+ return ((Long) createOGLContextOnSurfaceMethod.invoke(null, new Object[] { g, new Long(shareCtx) })).longValue();
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (Exception e) {
+ throw (InternalError) new InternalError().initCause(e);
+ }
+ }
+
+ /** (Mac OS X-specific) Makes the given OpenGL context current on
+ the surface associated with the given Graphics object. */
+ public static boolean makeOGLContextCurrentOnSurface(Graphics g, long ctx) {
+ checkActive();
+
+ try {
+ return ((Boolean) makeOGLContextCurrentOnSurfaceMethod.invoke(null, new Object[] { g, new Long(ctx) })).booleanValue();
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (Exception e) {
+ throw (InternalError) new InternalError().initCause(e);
+ }
+ }
+
+ /** (Mac OS X-specific) Destroys the given OpenGL context. */
+ public static void destroyOGLContext(long ctx) {
+ checkActive();
+
+ try {
+ destroyOGLContextMethod.invoke(null, new Object[] { new Long(ctx) });
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (Exception e) {
+ throw (InternalError) new InternalError().initCause(e);
+ }
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ private static void checkActive() {
+ if (!isOGLPipelineActive()) {
+ throw new GLException("Java2D OpenGL pipeline not active (or necessary support not present)");
+ }
+ }
+
+ private static int getOGLUtilitiesIntField(final String name) {
+ Integer i = (Integer) AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ try {
+ Class utils = Class.forName("sun.java2d.opengl.OGLUtilities");
+ Field f = utils.getField(name);
+ f.setAccessible(true);
+ return f.get(null);
+ } catch (Exception e) {
+ if (DEBUG && VERBOSE) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+ }
+ });
+ if (i == null)
+ return 0;
+ if (DEBUG && VERBOSE) {
+ System.err.println("OGLUtilities." + name + " = " + i.intValue());
+ }
+ return i.intValue();
+ }
+
+ private static void initFBOShareContext(final GraphicsConfiguration gc) {
+ // Note 1: this must not be done in the static initalizer due to
+ // deadlock problems.
+
+ // Note 2: the first execution of this method must not be from the
+ // Java2D Queue Flusher Thread.
+
+ if (isOGLPipelineActive() &&
+ isFBOEnabled() &&
+ !initializedJ2DFBOShareContext) {
+
+ // FIXME: this technique is probably not adequate in multi-head
+ // situations. Ideally we would keep track of a given share
+ // context on a per-GraphicsConfiguration basis or something
+ // similar rather than keeping one share context in a global
+ // variable.
+ initializedJ2DFBOShareContext = true;
+ if (DEBUG) {
+ System.err.println("Starting initialization of J2D FBO share context");
+ }
+ invokeWithOGLSharedContextCurrent(gc, new Runnable() {
+ public void run() {
+ j2dFBOShareContext = GLDrawableFactory.getFactory(true).createExternalGLContext();
+ }
+ });
+ if (DEBUG) {
+ System.err.println("Ending initialization of J2D FBO share context");
+ }
+ }
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/j2d/Java2DGLContext.java b/src/classes/com/sun/opengl/impl/j2d/Java2DGLContext.java
new file mode 100644
index 000000000..ee7d4e586
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/j2d/Java2DGLContext.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.j2d;
+
+import com.sun.opengl.impl.*;
+import java.awt.Graphics;
+
+/** Provides a construct by which the shared GLJPanel code can
+ * interact with a few methods in the Mac OS X-specific Java2D/JOGL
+ * bridge implementation.
+ */
+
+public interface Java2DGLContext {
+ public void setGraphics(Graphics g);
+}
diff --git a/src/classes/com/sun/opengl/impl/macosx/awt/MacOSXJAWTWindow.java b/src/classes/com/sun/opengl/impl/macosx/awt/MacOSXJAWTWindow.java
index 5f676a138..44a34b98d 100644
--- a/src/classes/com/sun/opengl/impl/macosx/awt/MacOSXJAWTWindow.java
+++ b/src/classes/com/sun/opengl/impl/macosx/awt/MacOSXJAWTWindow.java
@@ -41,28 +41,111 @@ package com.sun.opengl.impl.macosx.awt;
import com.sun.opengl.impl.macosx.*;
import com.sun.opengl.impl.awt.*;
+import com.sun.opengl.impl.*;
+
+import java.awt.GraphicsDevice;
+import java.awt.GraphicsEnvironment;
import javax.media.opengl.*;
-import com.sun.opengl.impl.*;
+import java.security.*;
public class MacOSXJAWTWindow extends JAWTWindow {
- // Variables for lockSurface/unlockSurface
- //private JAWT_DrawingSurface ds;
- //private JAWT_DrawingSurfaceInfo dsi;
- //private JAWT_MacOSXDrawingSurfaceInfo x11dsi;
-
public MacOSXJAWTWindow(Object comp) {
super(comp);
}
- public int lockSurface() throws NativeWindowException {
- super.lockSurface();
- return 0;
+ protected void initNative() throws NativeWindowException {
}
- public void unlockSurface() {
+ public int lockSurface() throws NativeWindowException {
+ int ret = super.lockSurface();
+ if(NativeWindow.LOCK_SUCCESS != ret) {
+ return ret;
+ }
+ ds = JAWT.getJAWT().GetDrawingSurface(component);
+ if (ds == null) {
+ // Widget not yet realized
+ return NativeWindow.LOCK_SURFACE_NOT_READY;
+ }
+ int res = ds.Lock();
+ if ((res & JAWTFactory.JAWT_LOCK_ERROR) != 0) {
+ throw new GLException("Unable to lock surface");
+ }
+ // See whether the surface changed and if so destroy the old
+ // OpenGL context so it will be recreated (NOTE: removeNotify
+ // should handle this case, but it may be possible that race
+ // conditions can cause this code to be triggered -- should test
+ // more)
+ if ((res & JAWTFactory.JAWT_LOCK_SURFACE_CHANGED) != 0) {
+ ret = NativeWindow.LOCK_SURFACE_CHANGED;
+ }
+ if (firstLock) {
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ dsi = ds.GetDrawingSurfaceInfo();
+ return null;
+ }
+ });
+ } else {
+ dsi = ds.GetDrawingSurfaceInfo();
+ }
+ if (dsi == null) {
+ // Widget not yet realized
+ ds.Unlock();
+ JAWT.getJAWT().FreeDrawingSurface(ds);
+ ds = null;
+ return NativeWindow.LOCK_SURFACE_NOT_READY;
+ }
+ firstLock = false;
+ macosxdsi = (JAWT_MacOSXDrawingSurfaceInfo) dsi.platformInfo();
+ if (macosxdsi == null) {
+ // Widget not yet realized
+ ds.FreeDrawingSurfaceInfo(dsi);
+ ds.Unlock();
+ JAWT.getJAWT().FreeDrawingSurface(ds);
+ ds = null;
+ dsi = null;
+ return NativeWindow.LOCK_SURFACE_NOT_READY;
+ }
+ drawable = macosxdsi.cocoaViewRef();
+ // FIXME: Are the followup abstractions available ? would it be usefull ?
+ display = 0;
+ visualID = 0;
+ screen= 0;
+ screenIndex = 0;
+
+ if (drawable == 0) {
+ // Widget not yet realized
+ ds.FreeDrawingSurfaceInfo(dsi);
+ ds.Unlock();
+ JAWT.getJAWT().FreeDrawingSurface(ds);
+ ds = null;
+ dsi = null;
+ macosxdsi = null;
+ return NativeWindow.LOCK_SURFACE_NOT_READY;
+ }
+ return ret;
+ }
+
+ public void unlockSurface() throws GLException {
+ if(!isSurfaceLocked()) return;
+ ds.FreeDrawingSurfaceInfo(dsi);
+ ds.Unlock();
+ JAWT.getJAWT().FreeDrawingSurface(ds);
+ ds = null;
+ dsi = null;
+ macosxdsi = null;
super.unlockSurface();
}
+
+ // Variables for lockSurface/unlockSurface
+ private JAWT_DrawingSurface ds;
+ private JAWT_DrawingSurfaceInfo dsi;
+ private JAWT_MacOSXDrawingSurfaceInfo macosxdsi;
+
+ // Workaround for instance of 4796548
+ private boolean firstLock = true;
+
}
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java
new file mode 100644
index 000000000..ad71774b5
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java
@@ -0,0 +1,377 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.macosx.cgl;
+
+import java.nio.*;
+import java.util.*;
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+
+public abstract class MacOSXCGLContext extends GLContextImpl
+{
+ protected MacOSXCGLDrawable drawable;
+ protected long nsContext; // NSOpenGLContext
+ private CGLExt cglExt;
+ // Table that holds the addresses of the native C-language entry points for
+ // CGL extension functions.
+ private CGLExtProcAddressTable cglExtProcAddressTable;
+
+ public MacOSXCGLContext(MacOSXCGLDrawable drawable,
+ GLContext shareWith)
+ {
+ super(shareWith);
+ this.drawable = drawable;
+ }
+
+ public Object getPlatformGLExtensions() {
+ return getCGLExt();
+ }
+
+ public CGLExt getCGLExt() {
+ if (cglExt == null) {
+ cglExt = new CGLExtImpl(this);
+ }
+ return cglExt;
+ }
+
+ public GLDrawable getGLDrawable() {
+ return drawable;
+ }
+
+ protected String mapToRealGLFunctionName(String glFunctionName)
+ {
+ return glFunctionName;
+ }
+
+ protected String mapToRealGLExtensionName(String glExtensionName)
+ {
+ return glExtensionName;
+ }
+
+ protected abstract boolean create();
+
+ /**
+ * Creates and initializes an appropriate OpenGl nsContext. Should only be
+ * called by {@link makeCurrentImpl()}.
+ */
+ protected boolean create(boolean pbuffer, boolean floatingPoint) {
+ MacOSXCGLContext other = (MacOSXCGLContext) GLContextShareSet.getShareContext(this);
+ long share = 0;
+ if (other != null) {
+ share = other.getNSContext();
+ if (share == 0) {
+ throw new GLException("GLContextShareSet returned an invalid OpenGL context");
+ }
+ }
+ int[] viewNotReady = new int[1];
+ GLCapabilities capabilities = drawable.getCapabilities();
+ int[] iattribs = new int[128];
+ int[] ivalues = new int[128];
+ int idx = 0;
+ if (pbuffer) {
+ iattribs[idx] = CGL.NSOpenGLPFAPixelBuffer; ivalues[idx] = 1; idx++;
+ }
+ if (floatingPoint) {
+ iattribs[idx] = CGL.kCGLPFAColorFloat; ivalues[idx] = 1; idx++;
+ }
+ iattribs[idx] = CGL.NSOpenGLPFADoubleBuffer; ivalues[idx] = (capabilities.getDoubleBuffered() ? 1 : 0); idx++;
+ iattribs[idx] = CGL.NSOpenGLPFAStereo; ivalues[idx] = (capabilities.getStereo() ? 1 : 0); idx++;
+ iattribs[idx] = CGL.NSOpenGLPFAColorSize; ivalues[idx] = (capabilities.getRedBits() +
+ capabilities.getGreenBits() +
+ capabilities.getBlueBits()); idx++;
+ iattribs[idx] = CGL.NSOpenGLPFAAlphaSize; ivalues[idx] = capabilities.getAlphaBits(); idx++;
+ iattribs[idx] = CGL.NSOpenGLPFADepthSize; ivalues[idx] = capabilities.getDepthBits(); idx++;
+ iattribs[idx] = CGL.NSOpenGLPFAAccumSize; ivalues[idx] = (capabilities.getAccumRedBits() +
+ capabilities.getAccumGreenBits() +
+ capabilities.getAccumBlueBits() +
+ capabilities.getAccumAlphaBits()); idx++;
+ iattribs[idx] = CGL.NSOpenGLPFAStencilSize; ivalues[idx] = capabilities.getStencilBits(); idx++;
+ if (capabilities.getSampleBuffers()) {
+ iattribs[idx] = CGL.NSOpenGLPFASampleBuffers; ivalues[idx] = 1; idx++;
+ iattribs[idx] = CGL.NSOpenGLPFASamples; ivalues[idx] = capabilities.getNumSamples(); idx++;
+ }
+
+ long pixelFormat = CGL.createPixelFormat(iattribs, 0, idx, ivalues, 0);
+ if (pixelFormat == 0) {
+ throw new GLException("Unable to allocate pixel format with requested GLCapabilities");
+ }
+ try {
+ // Try to allocate a context with this
+ nsContext = CGL.createContext(share,
+ drawable.getNativeWindow().getWindowHandle(),
+ pixelFormat,
+ viewNotReady, 0);
+ if (nsContext == 0) {
+ if (viewNotReady[0] == 1) {
+ if (DEBUG) {
+ System.err.println("!!! View not ready for " + getClass().getName());
+ }
+ // View not ready at the window system level -- this is OK
+ return false;
+ }
+ throw new GLException("Error creating NSOpenGLContext with requested pixel format");
+ }
+
+ // On this platform the pixel format is associated with the
+ // context and not the drawable. However it's a reasonable
+ // approximation to just store the chosen pixel format up in the
+ // drawable since the public API doesn't provide for a different
+ // GLCapabilities per context.
+ if (drawable.getChosenGLCapabilities() == null) {
+ // Figure out what attributes we really got
+ GLCapabilities caps = new GLCapabilities();
+ CGL.queryPixelFormat(pixelFormat, iattribs, 0, idx, ivalues, 0);
+ for (int i = 0; i < idx; i++) {
+ int attr = iattribs[i];
+ switch (attr) {
+ case CGL.kCGLPFAColorFloat:
+ caps.setPbufferFloatingPointBuffers(ivalues[i] != 0);
+ break;
+
+ case CGL.NSOpenGLPFADoubleBuffer:
+ caps.setDoubleBuffered(ivalues[i] != 0);
+ break;
+
+ case CGL.NSOpenGLPFAStereo:
+ caps.setStereo(ivalues[i] != 0);
+ break;
+
+ case CGL.NSOpenGLPFAColorSize:
+ {
+ int bitSize = ivalues[i];
+ if (bitSize == 32)
+ bitSize = 24;
+ bitSize /= 3;
+ caps.setRedBits(bitSize);
+ caps.setGreenBits(bitSize);
+ caps.setBlueBits(bitSize);
+ }
+ break;
+
+ case CGL.NSOpenGLPFAAlphaSize:
+ caps.setAlphaBits(ivalues[i]);
+ break;
+
+ case CGL.NSOpenGLPFADepthSize:
+ caps.setDepthBits(ivalues[i]);
+ break;
+
+ case CGL.NSOpenGLPFAAccumSize:
+ {
+ int bitSize = ivalues[i] / 4;
+ caps.setAccumRedBits(bitSize);
+ caps.setAccumGreenBits(bitSize);
+ caps.setAccumBlueBits(bitSize);
+ caps.setAccumAlphaBits(bitSize);
+ }
+ break;
+
+ case CGL.NSOpenGLPFAStencilSize:
+ caps.setStencilBits(ivalues[i]);
+ break;
+
+ case CGL.NSOpenGLPFASampleBuffers:
+ caps.setSampleBuffers(ivalues[i] != 0);
+ break;
+
+ case CGL.NSOpenGLPFASamples:
+ caps.setNumSamples(ivalues[i]);
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ drawable.setChosenGLCapabilities(caps);
+ }
+
+
+ } finally {
+ CGL.deletePixelFormat(pixelFormat);
+ }
+ GLContextShareSet.contextCreated(this);
+ return true;
+ }
+
+ protected int makeCurrentImpl() throws GLException {
+ if (drawable.getNativeWindow().getWindowHandle() == 0) {
+ if (DEBUG) {
+ System.err.println("drawable not properly initialized");
+ }
+ return CONTEXT_NOT_CURRENT;
+ }
+ boolean created = false;
+ if (nsContext == 0) {
+ if (!create()) {
+ return CONTEXT_NOT_CURRENT;
+ }
+ if (DEBUG) {
+ System.err.println("!!! Created OpenGL context " + toHexString(nsContext) + " for " + getClass().getName());
+ }
+ created = true;
+ }
+
+ if (!CGL.makeCurrentContext(nsContext)) {
+ throw new GLException("Error making nsContext current");
+ }
+
+ if (created) {
+ resetGLFunctionAvailability();
+ return CONTEXT_CURRENT_NEW;
+ }
+ return CONTEXT_CURRENT;
+ }
+
+ protected void releaseImpl() throws GLException {
+ if (!CGL.clearCurrentContext(nsContext)) {
+ throw new GLException("Error freeing OpenGL nsContext");
+ }
+ }
+
+ protected void destroyImpl() throws GLException {
+ if (nsContext != 0) {
+ if (!CGL.deleteContext(nsContext)) {
+ throw new GLException("Unable to delete OpenGL context");
+ }
+ if (DEBUG) {
+ System.err.println("!!! Destroyed OpenGL context " + nsContext);
+ }
+ nsContext = 0;
+ GLContextShareSet.contextDestroyed(this);
+ }
+ }
+
+ public boolean isCreated() {
+ return (nsContext != 0);
+ }
+
+ public void copy(GLContext source, int mask) throws GLException {
+ long dst = getNSContext();
+ long src = ((MacOSXCGLContext) source).getNSContext();
+ if (src == 0) {
+ throw new GLException("Source OpenGL context has not been created");
+ }
+ if (dst == 0) {
+ throw new GLException("Destination OpenGL context has not been created");
+ }
+ CGL.copyContext(dst, src, mask);
+ }
+
+ protected void resetGLFunctionAvailability()
+ {
+ super.resetGLFunctionAvailability();
+ if (DEBUG) {
+ System.err.println("!!! Initializing CGL extension address table");
+ }
+ if (cglExtProcAddressTable == null) {
+ // FIXME: cache ProcAddressTables by capability bits so we can
+ // share them among contexts with the same capabilities
+ cglExtProcAddressTable = new CGLExtProcAddressTable();
+ }
+ resetProcAddressTable(getCGLExtProcAddressTable());
+ }
+
+ public final CGLExtProcAddressTable getCGLExtProcAddressTable() {
+ return cglExtProcAddressTable;
+ }
+
+ public String getPlatformExtensionsString()
+ {
+ return "";
+ }
+
+ public void setSwapInterval(int interval) {
+ if (nsContext == 0) {
+ throw new GLException("OpenGL context not current");
+ }
+ CGL.setSwapInterval(nsContext, interval);
+ }
+
+ public ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) {
+ // FIXME: apparently the Apple extension doesn't require a custom memory allocator
+ throw new GLException("Not yet implemented");
+ }
+
+ public boolean isFunctionAvailable(String glFunctionName)
+ {
+ return super.isFunctionAvailable(glFunctionName);
+ }
+
+ public boolean isExtensionAvailable(String glExtensionName) {
+ if (glExtensionName.equals("GL_ARB_pbuffer") ||
+ glExtensionName.equals("GL_ARB_pixel_format")) {
+ return true;
+ }
+ return super.isExtensionAvailable(glExtensionName);
+ }
+
+ public int getOffscreenContextPixelDataType() {
+ throw new GLException("Should not call this");
+ }
+
+ public int getOffscreenContextReadBuffer() {
+ throw new GLException("Should not call this");
+ }
+
+ public boolean offscreenImageNeedsVerticalFlip() {
+ throw new GLException("Should not call this");
+ }
+
+ public void bindPbufferToTexture() {
+ throw new GLException("Should not call this");
+ }
+
+ public void releasePbufferFromTexture() {
+ throw new GLException("Should not call this");
+ }
+
+ // Support for "mode switching" as described in MacOSXCGLDrawable
+ public abstract void setOpenGLMode(int mode);
+ public abstract int getOpenGLMode();
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ public long getNSContext() {
+ return nsContext;
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawable.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawable.java
new file mode 100644
index 000000000..ccafc6738
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawable.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.macosx.cgl;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+
+public abstract class MacOSXCGLDrawable extends GLDrawableImpl {
+ protected static final boolean DEBUG = Debug.debug("MacOSXCGLDrawable");
+
+ protected GLCapabilitiesChooser chooser;
+
+ // The Java2D/OpenGL pipeline on OS X uses low-level CGLContextObjs
+ // to represent the contexts for e.g. the Java2D back buffer. When
+ // the Java2D/JOGL bridge is active, this means that if we want to
+ // be able to share textures and display lists with the Java2D
+ // contexts, we need to use the CGL APIs rather than the NSOpenGL
+ // APIs on the JOGL side. For example, if we create a pbuffer using
+ // the NSOpenGL APIs and want to share textures and display lists
+ // between it and the Java2D back buffer, there is no way to do so,
+ // because the Java2D context is actually a CGLContextObj and the
+ // NSOpenGLContext's initWithFormat:shareContext: only accepts an
+ // NSOpenGLContext as its second argument. Of course there is no way
+ // to wrap an NSOpenGLContext around an arbitrary CGLContextObj.
+ //
+ // The situation we care most about is allowing a GLPbuffer to share
+ // textures, etc. with a GLJPanel when the Java2D/JOGL bridge is
+ // active; several of the demos rely on this functionality. We aim
+ // to get there by allowing a GLPBuffer to switch its implementation
+ // between using an NSOpenGLPixelBuffer and a CGLPBufferObj. In
+ // order to track whether this has been done we need to have the
+ // notion of a "mode" of both the MacOSXCGLDrawable and the
+ // MacOSXGLContext. Initially the mode is "unspecified", meaning it
+ // leans toward the default (NSOpenGL). If sharing is requested
+ // between either a GLJPanel and a GLPbuffer or a GLCanvas and a
+ // GLPbuffer, the GLPbuffer will be switched into the appropriate
+ // mode: CGL mode for a GLJPanel and NSOpenGL mode for a GLCanvas.
+ // To avoid thrashing we support exactly one such switch during the
+ // lifetime of a given GLPbuffer. This is not a fully general
+ // solution (for example, you can't share textures among a
+ // GLPbuffer, a GLJPanel and a GLCanvas simultaneously) but should
+ // be enough to get things off the ground.
+ public static final int NSOPENGL_MODE = 1;
+ public static final int CGL_MODE = 2;
+
+ public MacOSXCGLDrawable(GLDrawableFactory factory, NativeWindow comp, boolean realized,
+ GLCapabilities capabilities, GLCapabilitiesChooser chooser) {
+ super(factory, comp, realized);
+ setChosenGLCapabilities(capabilities);
+ this.chooser = chooser;
+ }
+
+ public void destroy() {
+ }
+
+ public GLCapabilities getChosenGLCapabilities() {
+ int numFormats = 1;
+ GLCapabilities availableCaps[] = new GLCapabilities[numFormats];
+ availableCaps[0] = super.getChosenGLCapabilities();
+ int pixelFormat = chooser.chooseCapabilities(getCapabilities(), availableCaps, 0);
+ if ((pixelFormat < 0) || (pixelFormat >= numFormats)) {
+ throw new GLException("Invalid result " + pixelFormat +
+ " from GLCapabilitiesChooser (should be between 0 and " +
+ (numFormats - 1) + ")");
+ }
+ if (DEBUG) {
+ System.err.println(getThreadName() + ": Chosen pixel format (" + pixelFormat + "):");
+ System.err.println(availableCaps[pixelFormat]);
+ }
+ return availableCaps[pixelFormat];
+ }
+
+ protected static String getThreadName() {
+ return Thread.currentThread().getName();
+ }
+
+ // Support for "mode switching" as per above
+ public abstract void setOpenGLMode(int mode);
+ public abstract int getOpenGLMode();
+}
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java
new file mode 100644
index 000000000..ae108121c
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java
@@ -0,0 +1,173 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.macosx.cgl;
+
+import java.lang.reflect.InvocationTargetException;
+import java.nio.*;
+import java.util.*;
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+
+public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
+ static {
+ NativeLibLoader.loadCore();
+ }
+
+ public MacOSXCGLDrawableFactory() {
+ super();
+ }
+
+ public AbstractGraphicsConfiguration chooseGraphicsConfiguration(GLCapabilities capabilities,
+ GLCapabilitiesChooser chooser,
+ AbstractGraphicsDevice device) {
+ return null;
+ }
+
+ public GLDrawable createGLDrawable(NativeWindow target,
+ GLCapabilities capabilities,
+ GLCapabilitiesChooser chooser) {
+ if (target == null) {
+ throw new IllegalArgumentException("Null target");
+ }
+ if (capabilities == null) {
+ capabilities = new GLCapabilities();
+ }
+ if (chooser == null) {
+ chooser = new DefaultGLCapabilitiesChooser();
+ }
+ return new MacOSXOnscreenCGLDrawable(this, target, capabilities, chooser);
+ }
+
+ public GLDrawableImpl createOffscreenDrawable(GLCapabilities capabilities,
+ GLCapabilitiesChooser chooser) {
+ return new MacOSXOffscreenCGLDrawable(this, capabilities);
+ }
+
+ public boolean canCreateGLPbuffer() {
+ return true;
+ }
+
+ public GLPbuffer createGLPbuffer(final GLCapabilities capabilities,
+ final GLCapabilitiesChooser chooser,
+ final int initialWidth,
+ final int initialHeight,
+ final GLContext shareWith) {
+ final List returnList = new ArrayList();
+ final GLDrawableFactory factory = this;
+ Runnable r = new Runnable() {
+ public void run() {
+ MacOSXPbufferCGLDrawable pbufferDrawable = new MacOSXPbufferCGLDrawable(factory, capabilities,
+ initialWidth,
+ initialHeight);
+ GLPbufferImpl pbuffer = new GLPbufferImpl(pbufferDrawable, shareWith);
+ returnList.add(pbuffer);
+ }
+ };
+ maybeDoSingleThreadedWorkaround(r);
+ return (GLPbuffer) returnList.get(0);
+ }
+
+ public GLContext createExternalGLContext() {
+ return new MacOSXExternalCGLContext();
+ }
+
+ public boolean canCreateExternalGLDrawable() {
+ return false;
+ }
+
+ public GLDrawable createExternalGLDrawable() {
+ // FIXME
+ throw new GLException("Not yet implemented");
+ }
+
+ public void loadGLULibrary() {
+ // Nothing to do; already loaded by native code; not much point in
+ // making it lazier on this platform
+ }
+
+ public long dynamicLookupFunction(String glFuncName) {
+ return CGL.getProcAddress(glFuncName);
+ }
+
+ private void maybeDoSingleThreadedWorkaround(Runnable action) {
+ if (Threading.isSingleThreaded() &&
+ !Threading.isOpenGLThread()) {
+ Threading.invokeOnOpenGLThread(action);
+ } else {
+ action.run();
+ }
+ }
+
+ public boolean canCreateContextOnJava2DSurface() {
+ return false;
+ }
+
+ public GLContext createContextOnJava2DSurface(Object graphics, GLContext shareWith)
+ throws GLException {
+ throw new GLException("not supported in non AWT enviroment");
+ }
+
+ //------------------------------------------------------
+ // Gamma-related functionality
+ //
+
+ private static final int GAMMA_RAMP_LENGTH = 256;
+
+ /** Returns the length of the computed gamma ramp for this OS and
+ hardware. Returns 0 if gamma changes are not supported. */
+ protected int getGammaRampLength() {
+ return GAMMA_RAMP_LENGTH;
+ }
+
+ protected boolean setGammaRamp(float[] ramp) {
+ return CGL.setGammaRamp(ramp.length,
+ ramp, 0,
+ ramp, 0,
+ ramp, 0);
+ }
+
+ protected Buffer getGammaRamp() {
+ return null;
+ }
+
+ protected void resetGammaRamp(Buffer originalGammaRamp) {
+ CGL.resetGammaRamp();
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXExternalCGLContext.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXExternalCGLContext.java
new file mode 100644
index 000000000..b19e221f0
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXExternalCGLContext.java
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.macosx.cgl;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+
+public class MacOSXExternalCGLContext extends MacOSXCGLContext {
+ private boolean firstMakeCurrent = true;
+ private boolean created = true;
+ private GLContext lastContext;
+
+ public MacOSXExternalCGLContext() {
+ super(null, null);
+
+ // FIXME: we don't have a "current context" primitive implemented
+ // yet on OS X. In the current implementation this would need to
+ // return an NSOpenGLContext*, but "external" toolkits are not
+ // guaranteed to be using the Cocoa OpenGL API. Additionally, if
+ // we switched this implementation to use the low-level CGL APIs,
+ // we would lose the ability to share textures and display lists
+ // between contexts since you need an NSOpenGLContext, not a
+ // CGLContextObj, in order to share textures and display lists
+ // between two NSOpenGLContexts.
+ //
+ // The ramifications here are that it is not currently possible to
+ // share textures and display lists between an OpenGL context
+ // created by JOGL and one created by a third-party library on OS
+ // X.
+
+ // context = CGL.CGLGetCurrentContext();
+
+ GLContextShareSet.contextCreated(this);
+ resetGLFunctionAvailability();
+ }
+
+ protected boolean create() {
+ return true;
+ }
+
+ public int makeCurrent() throws GLException {
+ // Save last context if necessary to allow external GLContexts to
+ // talk to other GLContexts created by this library
+ GLContext cur = getCurrent();
+ if (cur != null && cur != this) {
+ lastContext = cur;
+ setCurrent(null);
+ }
+ return super.makeCurrent();
+ }
+
+ public void release() throws GLException {
+ super.release();
+ setCurrent(lastContext);
+ lastContext = null;
+ }
+
+ protected int makeCurrentImpl() throws GLException {
+ if (firstMakeCurrent) {
+ firstMakeCurrent = false;
+ return CONTEXT_CURRENT_NEW;
+ }
+ return CONTEXT_CURRENT;
+ }
+
+ protected void releaseImpl() throws GLException {
+ }
+
+ protected void destroyImpl() throws GLException {
+ created = false;
+ GLContextShareSet.contextDestroyed(this);
+ }
+
+ public boolean isCreated() {
+ return created;
+ }
+
+ public void setOpenGLMode(int mode) {
+ if (mode != MacOSXCGLDrawable.NSOPENGL_MODE)
+ throw new GLException("OpenGL mode switching not supported for external GLContexts");
+ }
+
+ public int getOpenGLMode() {
+ return MacOSXCGLDrawable.NSOPENGL_MODE;
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOffscreenCGLContext.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOffscreenCGLContext.java
new file mode 100644
index 000000000..b60c48237
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOffscreenCGLContext.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.macosx.cgl;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+
+public class MacOSXOffscreenCGLContext extends MacOSXPbufferCGLContext
+{
+ public MacOSXOffscreenCGLContext(MacOSXPbufferCGLDrawable drawable,
+ GLContext shareWith) {
+ super(drawable, shareWith);
+ }
+
+ public int getOffscreenContextPixelDataType() {
+ GL gl = getGL();
+ return gl.isGL2()?GL2.GL_UNSIGNED_INT_8_8_8_8_REV:GL.GL_UNSIGNED_SHORT_5_5_5_1;
+ }
+
+ public int getOffscreenContextReadBuffer() {
+ return GL.GL_FRONT;
+ }
+
+ public boolean offscreenImageNeedsVerticalFlip() {
+ return true;
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOffscreenCGLDrawable.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOffscreenCGLDrawable.java
new file mode 100644
index 000000000..bf3e402cc
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOffscreenCGLDrawable.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.macosx.cgl;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+
+public class MacOSXOffscreenCGLDrawable extends MacOSXPbufferCGLDrawable {
+
+ public MacOSXOffscreenCGLDrawable(GLDrawableFactory factory, GLCapabilities capabilities) {
+ super(factory, capabilities, 0, 0);
+ }
+
+ public GLContext createContext(GLContext shareWith) {
+ return new MacOSXOffscreenCGLContext(this, shareWith);
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOnscreenCGLContext.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOnscreenCGLContext.java
new file mode 100644
index 000000000..1165e759d
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOnscreenCGLContext.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.macosx.cgl;
+
+import java.util.*;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+
+public class MacOSXOnscreenCGLContext extends MacOSXCGLContext {
+ protected MacOSXOnscreenCGLDrawable drawable;
+
+ public MacOSXOnscreenCGLContext(MacOSXOnscreenCGLDrawable drawable,
+ GLContext shareWith) {
+ super(drawable, shareWith);
+ this.drawable = drawable;
+ }
+
+ protected int makeCurrentImpl() throws GLException {
+ int lockRes = drawable.lockSurface();
+ boolean exceptionOccurred = false;
+ try {
+ if (lockRes == NativeWindow.LOCK_SURFACE_NOT_READY) {
+ return CONTEXT_NOT_CURRENT;
+ }
+ if (lockRes == NativeWindow.LOCK_SURFACE_CHANGED) {
+ destroyImpl();
+ }
+ int ret = super.makeCurrentImpl();
+ if ((ret == CONTEXT_CURRENT) ||
+ (ret == CONTEXT_CURRENT_NEW)) {
+ // Assume the canvas might have been resized or moved and tell the OpenGL
+ // context to update itself. This used to be done only upon receiving a
+ // reshape event but that doesn't appear to be sufficient. An experiment
+ // was also done to add a HierarchyBoundsListener to the GLCanvas and
+ // do this updating only upon reshape of this component or reshape or movement
+ // of an ancestor, but this also wasn't sufficient and left garbage on the
+ // screen in some situations.
+ CGL.updateContext(nsContext);
+ } else {
+ if (!isOptimizable()) {
+ // This can happen if the window currently is zero-sized, for example.
+ // Make sure we don't leave the surface locked in this case.
+ drawable.unlockSurface();
+ }
+ }
+ return ret;
+ } catch (RuntimeException e) {
+ exceptionOccurred = true;
+ throw e;
+ } finally {
+ if (exceptionOccurred ||
+ (isOptimizable() && lockRes != NativeWindow.LOCK_SURFACE_NOT_READY)) {
+ drawable.unlockSurface();
+ }
+ }
+ }
+
+ protected void releaseImpl() throws GLException {
+ try {
+ super.releaseImpl();
+ } finally {
+ if (!isOptimizable()) {
+ drawable.unlockSurface();
+ }
+ }
+ }
+
+ public void swapBuffers() throws GLException {
+ if (!CGL.flushBuffer(nsContext)) {
+ throw new GLException("Error swapping buffers");
+ }
+ }
+
+ protected void update() throws GLException {
+ if (nsContext == 0) {
+ throw new GLException("Context not created");
+ }
+ CGL.updateContext(nsContext);
+ }
+
+ protected boolean create() {
+ return create(false, false);
+ }
+
+ public void setOpenGLMode(int mode) {
+ if (mode != MacOSXCGLDrawable.NSOPENGL_MODE)
+ throw new GLException("OpenGL mode switching not supported for on-screen GLContexts");
+ }
+
+ public int getOpenGLMode() {
+ return MacOSXCGLDrawable.NSOPENGL_MODE;
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOnscreenCGLDrawable.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOnscreenCGLDrawable.java
new file mode 100644
index 000000000..cb2799f5c
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOnscreenCGLDrawable.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.macosx.cgl;
+
+import java.lang.ref.WeakReference;
+import java.security.*;
+import java.util.*;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+
+public class MacOSXOnscreenCGLDrawable extends MacOSXCGLDrawable {
+ private List/*<WeakReference<GLContext>>*/ createdContexts =
+ new ArrayList();
+
+ protected MacOSXOnscreenCGLDrawable(GLDrawableFactory factory, NativeWindow component,
+ GLCapabilities capabilities,
+ GLCapabilitiesChooser chooser) {
+ super(factory, component, false, capabilities, chooser);
+ }
+
+ public GLContext createContext(GLContext shareWith) {
+ MacOSXOnscreenCGLContext context =
+ new MacOSXOnscreenCGLContext(this, shareWith);
+ // NOTE: we need to keep track of the created contexts in order to
+ // implement swapBuffers() because of how Mac OS X implements its
+ // OpenGL window interface
+ synchronized (this) {
+ List newContexts = new ArrayList();
+ newContexts.addAll(createdContexts);
+ newContexts.add(new WeakReference(context));
+ createdContexts = newContexts;
+ }
+ return context;
+ }
+
+ public void setSize(int width, int height) {
+ component.setSize(width, height);
+ }
+
+ public int getWidth() {
+ return component.getWidth();
+ }
+
+ public int getHeight() {
+ return component.getHeight();
+ }
+
+ public void swapBuffers() throws GLException {
+ for (Iterator iter = createdContexts.iterator(); iter.hasNext(); ) {
+ WeakReference ref = (WeakReference) iter.next();
+ MacOSXOnscreenCGLContext ctx = (MacOSXOnscreenCGLContext) ref.get();
+ // FIXME: clear out unreachable contexts
+ if (ctx != null) {
+ ctx.swapBuffers();
+ }
+ }
+ }
+
+ public void setOpenGLMode(int mode) {
+ if (mode != NSOPENGL_MODE)
+ throw new GLException("OpenGL mode switching not supported for on-screen GLDrawables");
+ }
+
+ public int getOpenGLMode() {
+ return NSOPENGL_MODE;
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java
new file mode 100644
index 000000000..7b29dbfb6
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java
@@ -0,0 +1,340 @@
+package com.sun.opengl.impl.macosx.cgl;
+
+import java.security.*;
+import java.util.*;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+
+public class MacOSXPbufferCGLContext extends MacOSXCGLContext {
+ protected MacOSXPbufferCGLDrawable drawable;
+
+ // State for render-to-texture and render-to-texture-rectangle support
+ private int textureTarget; // e.g. GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE_NV
+ private int texture; // actual texture object
+
+ private static boolean isTigerOrLater;
+
+ static {
+ String osVersion =
+ (String) AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ return System.getProperty("os.version");
+ }
+ });
+ StringTokenizer tok = new StringTokenizer(osVersion, ". ");
+ int major = Integer.parseInt(tok.nextToken());
+ int minor = Integer.parseInt(tok.nextToken());
+ isTigerOrLater = ((major > 10) || (minor > 3));
+ }
+
+ public MacOSXPbufferCGLContext(MacOSXPbufferCGLDrawable drawable,
+ GLContext shareWith) {
+ super(drawable, shareWith);
+ this.drawable = drawable;
+ initOpenGLImpl();
+ }
+
+ public void bindPbufferToTexture() {
+ GL gl = getGL();
+ gl.glBindTexture(textureTarget, texture);
+ // FIXME: not clear whether this is really necessary, but since
+ // the API docs seem to imply it is and since it doesn't seem to
+ // impact performance, leaving it in
+ CGL.setContextTextureImageToPBuffer(nsContext, drawable.getPbuffer(), GL.GL_FRONT);
+ }
+
+ public void releasePbufferFromTexture() {
+ }
+
+ protected int makeCurrentImpl() throws GLException {
+ if (drawable.getPbuffer() == 0) {
+ if (DEBUG) {
+ System.err.println("Pbuffer not instantiated yet for " + this);
+ }
+ // pbuffer not instantiated yet
+ return CONTEXT_NOT_CURRENT;
+ }
+
+ if (getOpenGLMode() != drawable.getOpenGLMode()) {
+ setOpenGLMode(drawable.getOpenGLMode());
+ }
+
+ boolean created = false;
+ if (nsContext == 0) {
+ if (!create()) {
+ return CONTEXT_NOT_CURRENT;
+ }
+ if (DEBUG) {
+ System.err.println("!!! Created OpenGL context " + toHexString(nsContext) + " for " + getClass().getName());
+ }
+ created = true;
+ }
+
+ if (!impl.makeCurrent(nsContext)) {
+ throw new GLException("Error making nsContext current");
+ }
+
+ if (created) {
+ resetGLFunctionAvailability();
+
+ // Initialize render-to-texture support if requested
+ GL gl = getGL();
+ boolean rect = gl.isGL2() && drawable.getCapabilities().getPbufferRenderToTextureRectangle();
+ if (rect) {
+ if (!gl.isExtensionAvailable("GL_EXT_texture_rectangle")) {
+ System.err.println("MacOSXPbufferCGLContext: WARNING: GL_EXT_texture_rectangle extension not " +
+ "supported; skipping requested render_to_texture_rectangle support for pbuffer");
+ rect = false;
+ }
+ }
+ textureTarget = (rect ? GL2.GL_TEXTURE_RECTANGLE_EXT : GL.GL_TEXTURE_2D);
+ int[] tmp = new int[1];
+ gl.glGenTextures(1, tmp, 0);
+ texture = tmp[0];
+ gl.glBindTexture(textureTarget, texture);
+ gl.glTexParameteri(textureTarget, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);
+ gl.glTexParameteri(textureTarget, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);
+ gl.glTexParameteri(textureTarget, GL.GL_TEXTURE_WRAP_S, GL.GL_CLAMP_TO_EDGE);
+ gl.glTexParameteri(textureTarget, GL.GL_TEXTURE_WRAP_T, GL.GL_CLAMP_TO_EDGE);
+ gl.glCopyTexImage2D(textureTarget, 0, GL.GL_RGB, 0, 0, drawable.getWidth(), drawable.getHeight(), 0);
+
+ return CONTEXT_CURRENT_NEW;
+ }
+ return CONTEXT_CURRENT;
+ }
+
+ protected void releaseImpl() throws GLException {
+ if (!impl.release(nsContext)) {
+ throw new GLException("Error releasing OpenGL nsContext");
+ }
+ }
+
+ protected void destroyImpl() throws GLException {
+ if (nsContext != 0) {
+ if (!impl.destroy(nsContext)) {
+ throw new GLException("Unable to delete OpenGL context");
+ }
+ if (DEBUG) {
+ System.err.println("!!! Destroyed OpenGL context " + nsContext);
+ }
+ nsContext = 0;
+ GLContextShareSet.contextDestroyed(this);
+ }
+ }
+
+ public void setSwapInterval(int interval) {
+ if (nsContext == 0) {
+ throw new GLException("OpenGL context not current");
+ }
+ impl.setSwapInterval(nsContext, interval);
+ }
+
+ public int getFloatingPointMode() {
+ return GLPbuffer.APPLE_FLOAT;
+ }
+
+ protected boolean create() {
+ GLCapabilities capabilities = drawable.getCapabilities();
+ if (capabilities.getPbufferFloatingPointBuffers() &&
+ !isTigerOrLater) {
+ throw new GLException("Floating-point pbuffers supported only on OS X 10.4 or later");
+ }
+ // Change our OpenGL mode to match that of any share context before we create ourselves
+ MacOSXCGLContext other = (MacOSXCGLContext) GLContextShareSet.getShareContext(this);
+ if (other != null) {
+ setOpenGLMode(other.getOpenGLMode());
+ }
+ // Will throw exception upon error
+ nsContext = impl.create();
+ return true;
+ }
+
+ //---------------------------------------------------------------------------
+ // OpenGL "mode switching" functionality
+ //
+ private boolean haveSetOpenGLMode = false;
+ // FIXME: should consider switching the default mode based on
+ // whether the Java2D/JOGL bridge is active -- need to ask ourselves
+ // whether it's more likely that we will share with a GLCanvas or a
+ // GLJPanel when the bridge is turned on
+ private int openGLMode = MacOSXCGLDrawable.NSOPENGL_MODE;
+ // Implementation object (either NSOpenGL-based or CGL-based)
+ protected Impl impl;
+
+ public void setOpenGLMode(int mode) {
+ if (mode == openGLMode) {
+ return;
+ }
+ if (haveSetOpenGLMode) {
+ throw new GLException("Can't switch between using NSOpenGLPixelBuffer and CGLPBufferObj more than once");
+ }
+ destroyImpl();
+ drawable.setOpenGLMode(mode);
+ openGLMode = mode;
+ haveSetOpenGLMode = true;
+ if (DEBUG) {
+ System.err.println("Switching PBuffer context mode to " +
+ ((mode == MacOSXCGLDrawable.NSOPENGL_MODE) ? "NSOPENGL_MODE" : "CGL_MODE"));
+ }
+ initOpenGLImpl();
+ }
+
+ public int getOpenGLMode() {
+ return openGLMode;
+ }
+
+ private void initOpenGLImpl() {
+ switch (openGLMode) {
+ case MacOSXCGLDrawable.NSOPENGL_MODE:
+ impl = new NSOpenGLImpl();
+ break;
+ case MacOSXCGLDrawable.CGL_MODE:
+ impl = new CGLImpl();
+ break;
+ default:
+ throw new InternalError("Illegal implementation mode " + openGLMode);
+ }
+ }
+
+ // Abstract interface for implementation of this context (either
+ // NSOpenGL-based or CGL-based)
+ interface Impl {
+ public long create();
+ public boolean destroy(long ctx);
+ public boolean makeCurrent(long ctx);
+ public boolean release(long ctx);
+ public void setSwapInterval(long ctx, int interval);
+ }
+
+ // NSOpenGLContext-based implementation
+ class NSOpenGLImpl implements Impl {
+ public long create() {
+ GLCapabilities capabilities = drawable.getCapabilities();
+ if (capabilities.getPbufferFloatingPointBuffers() &&
+ !isTigerOrLater) {
+ throw new GLException("Floating-point pbuffers supported only on OS X 10.4 or later");
+ }
+ if (!MacOSXPbufferCGLContext.this.create(true, capabilities.getPbufferFloatingPointBuffers())) {
+ throw new GLException("Error creating context for pbuffer");
+ }
+ // Must now associate the pbuffer with our newly-created context
+ CGL.setContextPBuffer(nsContext, drawable.getPbuffer());
+ return nsContext;
+ }
+
+ public boolean destroy(long ctx) {
+ return CGL.deleteContext(ctx);
+ }
+
+ public boolean makeCurrent(long ctx) {
+ return CGL.makeCurrentContext(ctx);
+ }
+
+ public boolean release(long ctx) {
+ return CGL.clearCurrentContext(ctx);
+ }
+
+ public void setSwapInterval(long ctx, int interval) {
+ CGL.setSwapInterval(ctx, interval);
+ }
+ }
+
+ class CGLImpl implements Impl {
+ public long create() {
+ // Find and configure share context
+ MacOSXCGLContext other = (MacOSXCGLContext) GLContextShareSet.getShareContext(MacOSXPbufferCGLContext.this);
+ long share = 0;
+ if (other != null) {
+ // Reconfigure pbuffer-based GLContexts
+ if (other instanceof MacOSXPbufferCGLContext) {
+ MacOSXPbufferCGLContext ctx = (MacOSXPbufferCGLContext) other;
+ ctx.setOpenGLMode(MacOSXCGLDrawable.CGL_MODE);
+ } else {
+ if (other.getOpenGLMode() != MacOSXCGLDrawable.CGL_MODE) {
+ throw new GLException("Can't share between NSOpenGLContexts and CGLContextObjs");
+ }
+ }
+ share = other.getNSContext();
+ // Note we don't check for a 0 return value, since switching
+ // the context's mode causes it to be destroyed and not
+ // re-initialized until the next makeCurrent
+ }
+
+ // Set up pixel format attributes
+ int[] attrs = new int[256];
+ int i = 0;
+ attrs[i++] = CGL.kCGLPFAPBuffer;
+ GLCapabilities capabilities = drawable.getCapabilities();
+ if (capabilities.getPbufferFloatingPointBuffers())
+ attrs[i++] = CGL.kCGLPFAColorFloat;
+ if (capabilities.getDoubleBuffered())
+ attrs[i++] = CGL.kCGLPFADoubleBuffer;
+ if (capabilities.getStereo())
+ attrs[i++] = CGL.kCGLPFAStereo;
+ attrs[i++] = CGL.kCGLPFAColorSize;
+ attrs[i++] = (capabilities.getRedBits() +
+ capabilities.getGreenBits() +
+ capabilities.getBlueBits());
+ attrs[i++] = CGL.kCGLPFAAlphaSize;
+ attrs[i++] = capabilities.getAlphaBits();
+ attrs[i++] = CGL.kCGLPFADepthSize;
+ attrs[i++] = capabilities.getDepthBits();
+ // FIXME: should validate stencil size as is done in MacOSXWindowSystemInterface.m
+ attrs[i++] = CGL.kCGLPFAStencilSize;
+ attrs[i++] = capabilities.getStencilBits();
+ attrs[i++] = CGL.kCGLPFAAccumSize;
+ attrs[i++] = (capabilities.getAccumRedBits() +
+ capabilities.getAccumGreenBits() +
+ capabilities.getAccumBlueBits() +
+ capabilities.getAccumAlphaBits());
+ if (capabilities.getSampleBuffers()) {
+ attrs[i++] = CGL.kCGLPFASampleBuffers;
+ attrs[i++] = 1;
+ attrs[i++] = CGL.kCGLPFASamples;
+ attrs[i++] = capabilities.getNumSamples();
+ }
+
+ // Use attribute array to select pixel format
+ long[] fmt = new long[1];
+ long[] numScreens = new long[1];
+ int res = CGL.CGLChoosePixelFormat(attrs, 0, fmt, 0, numScreens, 0);
+ if (res != CGL.kCGLNoError) {
+ throw new GLException("Error code " + res + " while choosing pixel format");
+ }
+
+ // Create new context
+ long[] ctx = new long[1];
+ if (DEBUG) {
+ System.err.println("Share context for CGL-based pbuffer context is " + toHexString(share));
+ }
+ res = CGL.CGLCreateContext(fmt[0], share, ctx, 0);
+ CGL.CGLDestroyPixelFormat(fmt[0]);
+ if (res != CGL.kCGLNoError) {
+ throw new GLException("Error code " + res + " while creating context");
+ }
+ // Attach newly-created context to the pbuffer
+ res = CGL.CGLSetPBuffer(ctx[0], drawable.getPbuffer(), 0, 0, 0);
+ if (res != CGL.kCGLNoError) {
+ throw new GLException("Error code " + res + " while attaching context to pbuffer");
+ }
+ return ctx[0];
+ }
+
+ public boolean destroy(long ctx) {
+ return (CGL.CGLDestroyContext(ctx) == CGL.kCGLNoError);
+ }
+
+ public boolean makeCurrent(long ctx) {
+ return CGL.CGLSetCurrentContext(ctx) == CGL.kCGLNoError;
+ }
+
+ public boolean release(long ctx) {
+ return (CGL.CGLSetCurrentContext(0) == CGL.kCGLNoError);
+ }
+
+ public void setSwapInterval(long ctx, int interval) {
+ // For now not supported (not really relevant for off-screen contexts anyway)
+ }
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java
new file mode 100644
index 000000000..6efe175fe
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java
@@ -0,0 +1,243 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.macosx.cgl;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+
+public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {
+ private static final boolean DEBUG = Debug.debug("MacOSXPbufferCGLDrawable");
+
+ // State for render-to-texture and render-to-texture-rectangle support
+ private int textureTarget; // e.g. GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE_NV
+ private int texture; // actual texture object
+
+ public MacOSXPbufferCGLDrawable(GLDrawableFactory factory, GLCapabilities capabilities, int initialWidth, int initialHeight) {
+ super(factory, new NullWindow(), true, capabilities, null);
+ NullWindow nw = (NullWindow) getNativeWindow();
+ nw.setSize(initialWidth, initialHeight);
+ initOpenGLImpl();
+ createPbuffer();
+ }
+
+ public GLContext createContext(GLContext shareWith) {
+ return new MacOSXPbufferCGLContext(this, shareWith);
+ }
+
+ public void destroy() {
+ getFactory().lockToolkit();
+ try {
+ NullWindow nw = (NullWindow) getNativeWindow();
+
+ if (nw.getWindowHandle() != 0) {
+ impl.destroy(nw.getWindowHandle());
+ nw.setWindowHandle(0);
+
+ if (DEBUG) {
+ System.err.println("Destroyed pbuffer: " + nw);
+ }
+ }
+ } finally {
+ getFactory().unlockToolkit();
+ }
+ }
+
+ public void setSize(int width, int height) {
+ super.setSize(width, height);
+ destroy();
+ createPbuffer();
+ }
+
+ public long getPbuffer() {
+ return getNativeWindow().getWindowHandle();
+ }
+
+ public void swapBuffers() throws GLException {
+ // FIXME: do we need to do anything if the pbuffer is double-buffered?
+ }
+
+ protected void createPbuffer() {
+ NullWindow nw = (NullWindow) getNativeWindow();
+ getFactory().lockToolkit();
+ try {
+ int renderTarget;
+ GLCapabilities capabilities = getCapabilities();
+ if (GLProfile.isGL2() && capabilities.getPbufferRenderToTextureRectangle()) {
+ renderTarget = GL2.GL_TEXTURE_RECTANGLE_EXT;
+ } else {
+ int w = getNextPowerOf2(getWidth());
+ int h = getNextPowerOf2(getHeight());
+ nw.setSize(w, h);
+ renderTarget = GL.GL_TEXTURE_2D;
+ }
+
+ int internalFormat = GL.GL_RGBA;
+ if (capabilities.getPbufferFloatingPointBuffers()) {
+ // FIXME: want to check availability of GL_APPLE_float_pixels
+ // extension, but need valid OpenGL context in order to do so --
+ // in worst case would need to create dummy window / GLCanvas
+ // (undesirable) -- could maybe also do this with pbuffers
+ /*
+ if (!gl.isExtensionAvailable("GL_APPLE_float_pixels")) {
+ throw new GLException("Floating-point support (GL_APPLE_float_pixels) not available");
+ }
+ */
+ if(GLProfile.isGL2()) {
+ switch (capabilities.getRedBits()) {
+ case 16: internalFormat = GL2.GL_RGBA_FLOAT16_APPLE; break;
+ case 32: internalFormat = GL2.GL_RGBA_FLOAT32_APPLE; break;
+ default: throw new GLException("Invalid floating-point bit depth (only 16 and 32 supported)");
+ }
+ } else {
+ internalFormat = GL.GL_RGBA;
+ }
+ }
+
+ long pBuffer = impl.create(renderTarget, internalFormat, getWidth(), getHeight());
+ if (pBuffer == 0) {
+ throw new GLException("pbuffer creation error: CGL.createPBuffer() failed");
+ }
+ nw.setWindowHandle(pBuffer);
+ } finally {
+ getFactory().unlockToolkit();
+ }
+
+ if (DEBUG) {
+ System.err.println("Created pbuffer " + nw + " for " + this);
+ }
+ }
+
+ private int getNextPowerOf2(int number) {
+ if (((number-1) & number) == 0) {
+ //ex: 8 -> 0b1000; 8-1=7 -> 0b0111; 0b1000&0b0111 == 0
+ return number;
+ }
+ int power = 0;
+ while (number > 0) {
+ number = number>>1;
+ power++;
+ }
+ return (1<<power);
+ }
+
+ //---------------------------------------------------------------------------
+ // OpenGL "mode switching" functionality
+ //
+ private boolean haveSetOpenGLMode = false;
+ // FIXME: should consider switching the default mode based on
+ // whether the Java2D/JOGL bridge is active -- need to ask ourselves
+ // whether it's more likely that we will share with a GLCanvas or a
+ // GLJPanel when the bridge is turned on
+ private int openGLMode = NSOPENGL_MODE;
+ // Implementation object (either NSOpenGL-based or CGL-based)
+ protected Impl impl;
+
+ public void setOpenGLMode(int mode) {
+ if (mode == openGLMode) {
+ return;
+ }
+ if (haveSetOpenGLMode) {
+ throw new GLException("Can't switch between using NSOpenGLPixelBuffer and CGLPBufferObj more than once");
+ }
+ destroy();
+ openGLMode = mode;
+ haveSetOpenGLMode = true;
+ if (DEBUG) {
+ System.err.println("Switching PBuffer drawable mode to " +
+ ((mode == MacOSXCGLDrawable.NSOPENGL_MODE) ? "NSOPENGL_MODE" : "CGL_MODE"));
+ }
+ initOpenGLImpl();
+ createPbuffer();
+ }
+
+ public int getOpenGLMode() {
+ return openGLMode;
+ }
+
+ private void initOpenGLImpl() {
+ switch (openGLMode) {
+ case NSOPENGL_MODE:
+ impl = new NSOpenGLImpl();
+ break;
+ case CGL_MODE:
+ impl = new CGLImpl();
+ break;
+ default:
+ throw new InternalError("Illegal implementation mode " + openGLMode);
+ }
+ }
+
+ // Abstract interface for implementation of this drawable (either
+ // NSOpenGL-based or CGL-based)
+ interface Impl {
+ public long create(int renderTarget, int internalFormat, int width, int height);
+ public void destroy(long pbuffer);
+ }
+
+ // NSOpenGLPixelBuffer implementation
+ class NSOpenGLImpl implements Impl {
+ public long create(int renderTarget, int internalFormat, int width, int height) {
+ return CGL.createPBuffer(renderTarget, internalFormat, width, height);
+ }
+
+ public void destroy(long pbuffer) {
+ CGL.destroyPBuffer(0, pbuffer);
+ }
+ }
+
+ // CGL implementation
+ class CGLImpl implements Impl {
+ public long create(int renderTarget, int internalFormat, int width, int height) {
+ long[] pbuffer = new long[1];
+ int res = CGL.CGLCreatePBuffer(width, height, renderTarget, internalFormat, 0, pbuffer, 0);
+ if (res != CGL.kCGLNoError) {
+ throw new GLException("Error creating CGL-based pbuffer: error code " + res);
+ }
+ return pbuffer[0];
+ }
+
+ public void destroy(long pbuffer) {
+ int res = CGL.CGLDestroyPBuffer(pbuffer);
+ if (res != CGL.kCGLNoError) {
+ throw new GLException("Error destroying CGL-based pbuffer: error code " + res);
+ }
+ }
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/awt/MacOSXAWTCGLDrawableFactory.java b/src/classes/com/sun/opengl/impl/macosx/cgl/awt/MacOSXAWTCGLDrawableFactory.java
new file mode 100644
index 000000000..d100ab442
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/awt/MacOSXAWTCGLDrawableFactory.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.macosx.cgl.awt;
+
+import java.lang.reflect.InvocationTargetException;
+import java.nio.*;
+import java.util.*;
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+import com.sun.opengl.impl.awt.*;
+import com.sun.opengl.impl.macosx.cgl.*;
+
+public class MacOSXAWTCGLDrawableFactory extends MacOSXCGLDrawableFactory {
+
+ public MacOSXAWTCGLDrawableFactory() {
+ super();
+ }
+
+ public boolean canCreateContextOnJava2DSurface() {
+ return true;
+ }
+
+ public GLContext createContextOnJava2DSurface(Object graphics, GLContext shareWith)
+ throws GLException {
+ return new MacOSXJava2DCGLContext(shareWith);
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/awt/MacOSXJava2DCGLContext.java b/src/classes/com/sun/opengl/impl/macosx/cgl/awt/MacOSXJava2DCGLContext.java
new file mode 100644
index 000000000..f1ef212cb
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/awt/MacOSXJava2DCGLContext.java
@@ -0,0 +1,160 @@
+/*
+ * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.macosx.cgl.awt;
+
+import com.sun.opengl.impl.macosx.cgl.*;
+
+import java.awt.Graphics;
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+import com.sun.opengl.impl.awt.*;
+import com.sun.opengl.impl.j2d.*;
+import com.sun.opengl.impl.macosx.cgl.*;
+
+/** MacOSXCGLContext implementation supporting the Java2D/JOGL bridge
+ * on Mac OS X. The external GLDrawable mechanism does not work on Mac
+ * OS X due to how drawables and contexts are operated upon on this
+ * platform, so it is necessary to supply an alternative means to
+ * create, make current, and destroy contexts on the Java2D "drawable"
+ * on the Mac platform.
+ */
+
+public class MacOSXJava2DCGLContext extends MacOSXCGLContext implements Java2DGLContext {
+ private Graphics graphics;
+
+ // FIXME: ignoring context sharing for the time being; will need to
+ // rethink this in particular if using FBOs to implement the
+ // Java2D/OpenGL pipeline on Mac OS X
+
+ public MacOSXJava2DCGLContext(GLContext shareWith) {
+ super(null, shareWith);
+ }
+
+ public void setGraphics(Graphics g) {
+ this.graphics = g;
+ }
+
+ protected int makeCurrentImpl() throws GLException {
+ boolean created = false;
+ if (nsContext == 0) {
+ if (!create()) {
+ return CONTEXT_NOT_CURRENT;
+ }
+ if (DEBUG) {
+ System.err.println("!!! Created GL nsContext for " + getClass().getName());
+ }
+ created = true;
+ }
+
+ if (!Java2D.makeOGLContextCurrentOnSurface(graphics, nsContext)) {
+ throw new GLException("Error making context current");
+ }
+
+ if (created) {
+ resetGLFunctionAvailability();
+ return CONTEXT_CURRENT_NEW;
+ }
+ return CONTEXT_CURRENT;
+ }
+
+ protected boolean create() {
+ // Find and configure share context
+ MacOSXCGLContext other = (MacOSXCGLContext) GLContextShareSet.getShareContext(this);
+ long share = 0;
+ if (other != null) {
+ // Reconfigure pbuffer-based GLContexts
+ if (other instanceof MacOSXPbufferCGLContext) {
+ MacOSXPbufferCGLContext ctx = (MacOSXPbufferCGLContext) other;
+ ctx.setOpenGLMode(MacOSXCGLDrawable.CGL_MODE);
+ } else {
+ if (other.getOpenGLMode() != MacOSXCGLDrawable.CGL_MODE) {
+ throw new GLException("Can't share between NSOpenGLContexts and CGLContextObjs");
+ }
+ }
+ share = other.getNSContext();
+ // Note we don't check for a 0 return value, since switching
+ // the context's mode causes it to be destroyed and not
+ // re-initialized until the next makeCurrent
+ }
+
+ if (DEBUG) {
+ System.err.println("!!! Share context is " + toHexString(share) + " for " + getClass().getName());
+ }
+
+ long ctx = Java2D.createOGLContextOnSurface(graphics, share);
+ if (ctx == 0) {
+ return false;
+ }
+ // FIXME: think about GLContext sharing
+ nsContext = ctx;
+ return true;
+ }
+
+ protected void releaseImpl() throws GLException {
+ // FIXME: would need another primitive in the Java2D class in
+ // order to implement this; hopefully should not matter for
+ // correctness
+ }
+
+ protected void destroyImpl() throws GLException {
+ if (nsContext != 0) {
+ Java2D.destroyOGLContext(nsContext);
+ if (DEBUG) {
+ System.err.println("!!! Destroyed OpenGL context " + nsContext);
+ }
+ nsContext = 0;
+ // FIXME
+ // GLContextShareSet.contextDestroyed(this);
+ }
+ }
+
+ public void setSwapInterval(int interval) {
+ // Not supported in this context implementation
+ }
+
+ public void setOpenGLMode(int mode) {
+ if (mode != MacOSXCGLDrawable.CGL_MODE)
+ throw new GLException("OpenGL mode switching not supported for Java2D GLContexts");
+ }
+
+ public int getOpenGLMode() {
+ return MacOSXCGLDrawable.CGL_MODE;
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/windows/awt/WindowsJAWTWindow.java b/src/classes/com/sun/opengl/impl/windows/awt/WindowsJAWTWindow.java
index 68ef2702b..bebd1e4dc 100644
--- a/src/classes/com/sun/opengl/impl/windows/awt/WindowsJAWTWindow.java
+++ b/src/classes/com/sun/opengl/impl/windows/awt/WindowsJAWTWindow.java
@@ -47,22 +47,116 @@ import com.sun.opengl.impl.*;
public class WindowsJAWTWindow extends JAWTWindow {
- // Variables for lockSurface/unlockSurface
- //private JAWT_DrawingSurface ds;
- //private JAWT_DrawingSurfaceInfo dsi;
- //private JAWT_WindowsDrawingSurfaceInfo x11dsi;
-
+ public static final boolean PROFILING = false; // FIXME
+ public static final int PROFILING_TICKS = 600; // FIXME
+
public WindowsJAWTWindow(Object comp) {
super(comp);
}
+ protected void initNative() throws NativeWindowException {
+ }
+
public int lockSurface() throws NativeWindowException {
- super.lockSurface();
- return 0;
+ int ret = super.lockSurface();
+ if(LOCK_SUCCESS != ret) {
+ return ret;
+ }
+
+ long startTime;
+ if (PROFILING) {
+ startTime = System.currentTimeMillis();
+ }
+ ds = JAWT.getJAWT().GetDrawingSurface(component);
+ if (ds == null) {
+ // Widget not yet realized
+ return LOCK_SURFACE_NOT_READY;
+ }
+ int res = ds.Lock();
+ if ((res & JAWTFactory.JAWT_LOCK_ERROR) != 0) {
+ throw new GLException("Unable to lock surface");
+ }
+ // See whether the surface changed and if so destroy the old
+ // OpenGL context so it will be recreated (NOTE: removeNotify
+ // should handle this case, but it may be possible that race
+ // conditions can cause this code to be triggered -- should test
+ // more)
+ if ((res & JAWTFactory.JAWT_LOCK_SURFACE_CHANGED) != 0) {
+ ret = LOCK_SURFACE_CHANGED;
+ }
+ dsi = ds.GetDrawingSurfaceInfo();
+ if (dsi == null) {
+ // Widget not yet realized
+ ds.Unlock();
+ JAWT.getJAWT().FreeDrawingSurface(ds);
+ ds = null;
+ return LOCK_SURFACE_NOT_READY;
+ }
+ win32dsi = (JAWT_Win32DrawingSurfaceInfo) dsi.platformInfo();
+ drawable = win32dsi.hdc();
+ // FIXME: Are the followup abstractions available ? would it be usefull ?
+ display = 0;
+ visualID = 0;
+ screen= 0;
+ screenIndex = 0;
+
+ if (drawable == 0) {
+ // Widget not yet realized
+ ds.FreeDrawingSurfaceInfo(dsi);
+ ds.Unlock();
+ JAWT.getJAWT().FreeDrawingSurface(ds);
+ ds = null;
+ dsi = null;
+ win32dsi = null;
+ return LOCK_SURFACE_NOT_READY;
+ }
+ if (PROFILING) {
+ long endTime = System.currentTimeMillis();
+ profilingLockSurfaceTime += (endTime - startTime);
+ if (++profilingLockSurfaceTicks == PROFILING_TICKS) {
+ System.err.println("LockSurface calls: " + profilingLockSurfaceTime + " ms / " + PROFILING_TICKS + " calls (" +
+ ((float) profilingLockSurfaceTime / (float) PROFILING_TICKS) + " ms/call)");
+ profilingLockSurfaceTime = 0;
+ profilingLockSurfaceTicks = 0;
+ }
+ }
+ return ret;
}
public void unlockSurface() {
+ if(!isSurfaceLocked()) return;
+ long startTime = 0;
+ if (PROFILING) {
+ startTime = System.currentTimeMillis();
+ }
+ ds.FreeDrawingSurfaceInfo(dsi);
+ ds.Unlock();
+ JAWT.getJAWT().FreeDrawingSurface(ds);
+ ds = null;
+ dsi = null;
+ win32dsi = null;
+ drawable = 0;
super.unlockSurface();
+ if (PROFILING) {
+ long endTime = System.currentTimeMillis();
+ profilingUnlockSurfaceTime += (endTime - startTime);
+ if (++profilingUnlockSurfaceTicks == PROFILING_TICKS) {
+ System.err.println("UnlockSurface calls: " + profilingUnlockSurfaceTime + " ms / " + PROFILING_TICKS + " calls (" +
+ ((float) profilingUnlockSurfaceTime / (float) PROFILING_TICKS) + " ms/call)");
+ profilingUnlockSurfaceTime = 0;
+ profilingUnlockSurfaceTicks = 0;
+ }
+ }
}
+
+ // Variables for lockSurface/unlockSurface
+ private JAWT_DrawingSurface ds;
+ private JAWT_DrawingSurfaceInfo dsi;
+ private JAWT_Win32DrawingSurfaceInfo win32dsi;
+ private long profilingLockSurfaceTime = 0;
+ private int profilingLockSurfaceTicks = 0;
+ private long profilingUnlockSurfaceTime = 0;
+ private int profilingUnlockSurfaceTicks = 0;
+
}
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsDummyWGLDrawable.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsDummyWGLDrawable.java
new file mode 100644
index 000000000..5324a0c55
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsDummyWGLDrawable.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.windows.wgl;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+
+public class WindowsDummyWGLDrawable extends WindowsWGLDrawable {
+ private long hwnd, hdc;
+
+ public WindowsDummyWGLDrawable(GLDrawableFactory factory) {
+ super(factory, new NullWindow(), true, new GLCapabilities(), null);
+ // All entries to CreateDummyWindow must synchronize on one object
+ // to avoid accidentally registering the dummy window class twice
+ synchronized (WindowsDummyWGLDrawable.class) {
+ hwnd = WGL.CreateDummyWindow(0, 0, 1, 1);
+ }
+ hdc = WGL.GetDC(hwnd);
+ NullWindow nw = (NullWindow) getNativeWindow();
+ nw.setWindowHandle(hdc);
+ // Choose a (hopefully hardware-accelerated) OpenGL pixel format for this device context
+ GLCapabilities caps = new GLCapabilities();
+ caps.setDepthBits(16);
+ PIXELFORMATDESCRIPTOR pfd = glCapabilities2PFD(caps, true);
+ int pixelFormat = WGL.ChoosePixelFormat(hdc, pfd);
+ if ((pixelFormat == 0) ||
+ (!WGL.SetPixelFormat(hdc, pixelFormat, pfd))) {
+ destroy();
+ }
+ }
+
+ public void setSize(int width, int height) {
+ }
+
+ public int getWidth() {
+ return 1;
+ }
+
+ public int getHeight() {
+ return 1;
+ }
+
+ public GLContext createContext(GLContext shareWith) {
+ if (hdc == 0) {
+ // Construction failed
+ return null;
+ }
+ // FIXME: figure out how to hook back in the Java 2D / JOGL bridge
+ return new WindowsWGLContext(this, shareWith);
+ }
+
+ public void destroy() {
+ if (hdc != 0) {
+ WGL.ReleaseDC(hwnd, hdc);
+ hdc = 0;
+ }
+ if (hwnd != 0) {
+ WGL.ShowWindow(hwnd, WGL.SW_HIDE);
+ WGL.DestroyWindow(hwnd);
+ hwnd = 0;
+ }
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsExternalWGLContext.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsExternalWGLContext.java
new file mode 100755
index 000000000..493b38061
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsExternalWGLContext.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.windows.wgl;
+
+import java.nio.*;
+import java.util.*;
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+
+public class WindowsExternalWGLContext extends WindowsWGLContext {
+ private boolean firstMakeCurrent = true;
+ private boolean created = true;
+ private GLContext lastContext;
+
+ public WindowsExternalWGLContext() {
+ // FIXME: figure out how to hook back in the Java 2D / JOGL bridge
+ super(null, null);
+ hglrc = WGL.wglGetCurrentContext();
+ if (hglrc == 0) {
+ throw new GLException("Error: attempted to make an external GLContext without a drawable/context current");
+ }
+ if (DEBUG) {
+ System.err.println(getThreadName() + ": !!! Created external OpenGL context " + toHexString(hglrc) + " for " + this);
+ }
+ GLContextShareSet.contextCreated(this);
+ resetGLFunctionAvailability();
+ }
+
+ public int makeCurrent() throws GLException {
+ // Save last context if necessary to allow external GLContexts to
+ // talk to other GLContexts created by this library
+ GLContext cur = getCurrent();
+ if (cur != null && cur != this) {
+ lastContext = cur;
+ setCurrent(null);
+ }
+ return super.makeCurrent();
+ }
+
+ public void release() throws GLException {
+ super.release();
+ setCurrent(lastContext);
+ lastContext = null;
+ }
+
+ protected int makeCurrentImpl() throws GLException {
+ if (firstMakeCurrent) {
+ firstMakeCurrent = false;
+ return CONTEXT_CURRENT_NEW;
+ }
+ return CONTEXT_CURRENT;
+ }
+
+ protected void releaseImpl() throws GLException {
+ }
+
+ protected void destroyImpl() throws GLException {
+ created = false;
+ GLContextShareSet.contextDestroyed(this);
+ }
+
+ public boolean isCreated() {
+ return created;
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsExternalWGLDrawable.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsExternalWGLDrawable.java
new file mode 100755
index 000000000..2c89e1dd0
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsExternalWGLDrawable.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.windows.wgl;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+
+public class WindowsExternalWGLDrawable extends WindowsWGLDrawable {
+
+ public WindowsExternalWGLDrawable(GLDrawableFactory factory, NativeWindow component) {
+ super(factory, component, true, new GLCapabilities(), null);
+ }
+
+ public static WindowsExternalWGLDrawable create(GLDrawableFactory factory) {
+ long hdc = WGL.wglGetCurrentDC();
+ NullWindow nw = new NullWindow();
+ nw.setWindowHandle(hdc);
+ if (nw.getWindowHandle() == 0) {
+ throw new GLException("Error: attempted to make an external GLDrawable without a drawable/context current");
+ }
+ return new WindowsExternalWGLDrawable(factory, nw);
+ }
+
+ public GLContext createContext(GLContext shareWith) {
+ return new WindowsWGLContext(this, shareWith);
+ }
+
+ public void setSize(int newWidth, int newHeight) {
+ throw new GLException("Should not call this");
+ }
+
+ public int getWidth() {
+ throw new GLException("Should not call this");
+ }
+
+ public int getHeight() {
+ throw new GLException("Should not call this");
+ }
+
+ public void destroy() {
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOffscreenWGLContext.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOffscreenWGLContext.java
new file mode 100644
index 000000000..9f0a5d2a6
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOffscreenWGLContext.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.windows.wgl;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+
+public class WindowsOffscreenWGLContext extends WindowsWGLContext {
+ public WindowsOffscreenWGLContext(WindowsOffscreenWGLDrawable drawable,
+ GLContext shareWith) {
+ super(drawable, shareWith);
+ }
+
+ public int getOffscreenContextPixelDataType() {
+ return GL.GL_UNSIGNED_BYTE;
+ }
+
+ public int getOffscreenContextReadBuffer() {
+ // On Windows these contexts are always single-buffered
+ return GL.GL_FRONT;
+ }
+
+ public boolean offscreenImageNeedsVerticalFlip() {
+ // We can take care of this in the DIB creation (see below)
+ return false;
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOffscreenWGLDrawable.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOffscreenWGLDrawable.java
new file mode 100644
index 000000000..84928ae6c
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOffscreenWGLDrawable.java
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.windows.wgl;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+
+public class WindowsOffscreenWGLDrawable extends WindowsWGLDrawable {
+ private long origbitmap;
+ private long hbitmap;
+
+ public WindowsOffscreenWGLDrawable(GLDrawableFactory factory,
+ GLCapabilities capabilities,
+ GLCapabilitiesChooser chooser) {
+ super(factory, new NullWindow(), true, capabilities, chooser);
+ }
+
+ public GLContext createContext(GLContext shareWith) {
+ return new WindowsOffscreenWGLContext(this, shareWith);
+ }
+
+ public void setSize(int newWidth, int newHeight) {
+ super.setSize(newWidth, newHeight);
+ destroy();
+ create();
+ }
+
+ private void create() {
+ getFactory().lockToolkit();
+ try {
+ NullWindow nw = (NullWindow) getNativeWindow();
+ GLCapabilities capabilities = getCapabilities();
+ int width = getWidth();
+ int height = getHeight();
+ BITMAPINFO info = BITMAPINFO.create();
+ BITMAPINFOHEADER header = info.bmiHeader();
+ int bitsPerPixel = (capabilities.getRedBits() +
+ capabilities.getGreenBits() +
+ capabilities.getBlueBits());
+ header.biSize(header.size());
+ header.biWidth(width);
+ // NOTE: negating the height causes the DIB to be in top-down row
+ // order rather than bottom-up; ends up being correct during pixel
+ // readback
+ header.biHeight(-1 * height);
+ header.biPlanes((short) 1);
+ header.biBitCount((short) bitsPerPixel);
+ header.biXPelsPerMeter(0);
+ header.biYPelsPerMeter(0);
+ header.biClrUsed(0);
+ header.biClrImportant(0);
+ header.biCompression(WGL.BI_RGB);
+ header.biSizeImage(width * height * bitsPerPixel / 8);
+
+ long hdc = WGL.CreateCompatibleDC(0);
+ if (hdc == 0) {
+ System.out.println("LastError: " + WGL.GetLastError());
+ throw new GLException("Error creating device context for offscreen OpenGL context");
+ }
+ nw.setWindowHandle(hdc);
+
+ hbitmap = WGL.CreateDIBSection(hdc, info, WGL.DIB_RGB_COLORS, 0, 0, 0);
+ if (hbitmap == 0) {
+ WGL.DeleteDC(hdc);
+ hdc = 0;
+ throw new GLException("Error creating offscreen bitmap of width " + width +
+ ", height " + height);
+ }
+ if ((origbitmap = WGL.SelectObject(hdc, hbitmap)) == 0) {
+ WGL.DeleteObject(hbitmap);
+ hbitmap = 0;
+ WGL.DeleteDC(hdc);
+ hdc = 0;
+ throw new GLException("Error selecting bitmap into new device context");
+ }
+
+ choosePixelFormat(false);
+ } finally {
+ getFactory().unlockToolkit();
+ }
+ }
+
+ public void destroy() {
+ getFactory().lockToolkit();
+ try {
+ NullWindow nw = (NullWindow) getNativeWindow();
+ if (nw.getWindowHandle() != 0) {
+ // Must destroy bitmap and device context
+ WGL.SelectObject(nw.getWindowHandle(), origbitmap);
+ WGL.DeleteObject(hbitmap);
+ WGL.DeleteDC(nw.getWindowHandle());
+ origbitmap = 0;
+ hbitmap = 0;
+ nw.setWindowHandle(0);
+ setChosenGLCapabilities(null);
+ }
+ } finally {
+ getFactory().unlockToolkit();
+ }
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOnscreenWGLContext.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOnscreenWGLContext.java
new file mode 100644
index 000000000..02459f590
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOnscreenWGLContext.java
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.windows.wgl;
+
+import java.util.*;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+
+public class WindowsOnscreenWGLContext extends WindowsWGLContext {
+ protected WindowsOnscreenWGLDrawable drawable;
+
+ public WindowsOnscreenWGLContext(WindowsOnscreenWGLDrawable drawable,
+ GLContext shareWith) {
+ super(drawable, shareWith);
+ this.drawable = drawable;
+ }
+
+ protected int makeCurrentImpl() throws GLException {
+ int lockRes = drawable.lockSurface();
+ boolean exceptionOccurred = false;
+ try {
+ if (lockRes == NativeWindow.LOCK_SURFACE_NOT_READY) {
+ return CONTEXT_NOT_CURRENT;
+ }
+ if (lockRes == NativeWindow.LOCK_SURFACE_CHANGED) {
+ destroyImpl();
+ }
+ int ret = super.makeCurrentImpl();
+ return ret;
+ } catch (RuntimeException e) {
+ exceptionOccurred = true;
+ throw e;
+ } finally {
+ if (exceptionOccurred ||
+ (isOptimizable() && lockRes != NativeWindow.LOCK_SURFACE_NOT_READY)) {
+ drawable.unlockSurface();
+ }
+ }
+ }
+
+ protected void releaseImpl() throws GLException {
+ try {
+ super.releaseImpl();
+ } finally {
+ if (!isOptimizable()) {
+ drawable.unlockSurface();
+ }
+ }
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOnscreenWGLDrawable.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOnscreenWGLDrawable.java
new file mode 100644
index 000000000..767928f16
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOnscreenWGLDrawable.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.windows.wgl;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+
+public class WindowsOnscreenWGLDrawable extends WindowsWGLDrawable {
+ private static final boolean PROFILING = Debug.debug("WindowsOnscreenWGLDrawable.profiling");
+ private static final int PROFILING_TICKS = 200;
+ private int profilingLockSurfaceTicks;
+ private long profilingLockSurfaceTime;
+ private int profilingUnlockSurfaceTicks;
+ private long profilingUnlockSurfaceTime;
+ private int profilingSwapBuffersTicks;
+ private long profilingSwapBuffersTime;
+
+ protected WindowsOnscreenWGLDrawable(GLDrawableFactory factory, NativeWindow component,
+ GLCapabilities capabilities,
+ GLCapabilitiesChooser chooser) {
+ super(factory, component, false, capabilities, chooser);
+ }
+
+ public GLContext createContext(GLContext shareWith) {
+ return new WindowsOnscreenWGLContext(this, shareWith);
+ }
+
+ public void setSize(int width, int height) {
+ component.setSize(width, height);
+ }
+
+ public int getWidth() {
+ return component.getWidth();
+ }
+
+ public int getHeight() {
+ return component.getHeight();
+ }
+
+ public void swapBuffers() throws GLException {
+ boolean didLock = false;
+
+ if (getNativeWindow().getWindowHandle() == 0) {
+ if (lockSurface() == NativeWindow.LOCK_SURFACE_NOT_READY) {
+ return;
+ }
+ didLock = true;
+ }
+
+ long startTime = 0;
+ if (PROFILING) {
+ startTime = System.currentTimeMillis();
+ }
+
+ if (!WGL.SwapBuffers(getNativeWindow().getWindowHandle()) && (WGL.GetLastError() != 0)) {
+ throw new GLException("Error swapping buffers");
+ }
+
+ if (PROFILING) {
+ long endTime = System.currentTimeMillis();
+ profilingSwapBuffersTime += (endTime - startTime);
+ int ticks = PROFILING_TICKS;
+ if (++profilingSwapBuffersTicks == ticks) {
+ System.err.println("SwapBuffers calls: " + profilingSwapBuffersTime + " ms / " + ticks + " calls (" +
+ ((float) profilingSwapBuffersTime / (float) ticks) + " ms/call)");
+ profilingSwapBuffersTime = 0;
+ profilingSwapBuffersTicks = 0;
+ }
+ }
+
+ if (didLock) {
+ unlockSurface();
+ }
+ }
+
+}
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLContext.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLContext.java
new file mode 100644
index 000000000..7af3cbfc9
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLContext.java
@@ -0,0 +1,155 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.windows.wgl;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+
+public class WindowsPbufferWGLContext extends WindowsWGLContext {
+ private static final boolean DEBUG = Debug.debug("WindowsPbufferWGLContext");
+
+ // State for render-to-texture and render-to-texture-rectangle support
+ private WindowsPbufferWGLDrawable drawable;
+ private boolean rtt; // render-to-texture?
+ private boolean hasRTT; // render-to-texture extension available?
+ private boolean rect; // render-to-texture-rectangle?
+ private int textureTarget; // e.g. GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE_NV
+ private int texture; // actual texture object
+
+ public WindowsPbufferWGLContext(WindowsPbufferWGLDrawable drawable,
+ GLContext shareWith) {
+ super(drawable, shareWith);
+ this.drawable = drawable;
+ }
+
+ public void bindPbufferToTexture() {
+ if (!rtt) {
+ throw new GLException("Shouldn't try to bind a pbuffer to a texture if render-to-texture hasn't been " +
+ "specified in its GLCapabilities");
+ }
+ GL gl = getGL();
+ WGLExt wglExt = getWGLExt();
+ gl.glBindTexture(textureTarget, texture);
+ if (rtt && hasRTT) {
+ if (!wglExt.wglBindTexImageARB(drawable.getPbuffer(), WGLExt.WGL_FRONT_LEFT_ARB)) {
+ throw new GLException("Binding of pbuffer to texture failed: " + wglGetLastError());
+ }
+ }
+ // FIXME: comment is wrong now
+ // Note that if the render-to-texture extension is not supported,
+ // we perform a glCopyTexImage2D in swapBuffers().
+ }
+
+ public void releasePbufferFromTexture() {
+ if (!rtt) {
+ throw new GLException("Shouldn't try to bind a pbuffer to a texture if render-to-texture hasn't been " +
+ "specified in its GLCapabilities");
+ }
+ if (rtt && hasRTT) {
+ WGLExt wglExt = getWGLExt();
+ if (!wglExt.wglReleaseTexImageARB(drawable.getPbuffer(), WGLExt.WGL_FRONT_LEFT_ARB)) {
+ throw new GLException("Releasing of pbuffer from texture failed: " + wglGetLastError());
+ }
+ }
+ }
+
+ protected int makeCurrentImpl() throws GLException {
+ int res = super.makeCurrentImpl();
+ if (DEBUG && VERBOSE) {
+ System.err.println("WindowsPbufferWGLContext: super.makeCurrentImpl() = " + res);
+ }
+ if (res == CONTEXT_CURRENT_NEW) {
+ GLCapabilities capabilities = drawable.getCapabilities();
+
+ // Initialize render-to-texture support if requested
+ GL gl = getGL();
+ rtt = capabilities.getPbufferRenderToTexture();
+ rect = gl.isGL2() && capabilities.getPbufferRenderToTextureRectangle();
+
+ if (rtt) {
+ if (DEBUG) {
+ System.err.println("Initializing render-to-texture support");
+ }
+
+ if (!gl.isExtensionAvailable("WGL_ARB_render_texture")) {
+ System.err.println("WindowsPbufferWGLContext: WARNING: WGL_ARB_render_texture extension not " +
+ "supported; implementing render_to_texture support using slow texture readback");
+ } else {
+ hasRTT = true;
+
+ if (rect && !gl.isExtensionAvailable("GL_NV_texture_rectangle")) {
+ System.err.println("WindowsPbufferWGLContext: WARNING: GL_NV_texture_rectangle extension not " +
+ "supported; skipping requested render_to_texture_rectangle support for pbuffer");
+ rect = false;
+ }
+ if (rect) {
+ if (DEBUG) {
+ System.err.println(" Using render-to-texture-rectangle");
+ }
+ textureTarget = GL2.GL_TEXTURE_RECTANGLE_EXT;
+ } else {
+ if (DEBUG) {
+ System.err.println(" Using vanilla render-to-texture");
+ }
+ textureTarget = GL.GL_TEXTURE_2D;
+ }
+ int[] tmp = new int[1];
+ gl.glGenTextures(1, tmp, 0);
+ texture = tmp[0];
+ gl.glBindTexture(textureTarget, texture);
+ gl.glTexParameteri(textureTarget, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);
+ gl.glTexParameteri(textureTarget, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);
+ gl.glTexParameteri(textureTarget, GL.GL_TEXTURE_WRAP_S, GL.GL_CLAMP_TO_EDGE);
+ gl.glTexParameteri(textureTarget, GL.GL_TEXTURE_WRAP_T, GL.GL_CLAMP_TO_EDGE);
+ gl.glCopyTexImage2D(textureTarget, 0, GL.GL_RGB, 0, 0, drawable.getWidth(), drawable.getHeight(), 0);
+ }
+ }
+ }
+ return res;
+ }
+
+ public int getFloatingPointMode() {
+ return drawable.getFloatingPointMode();
+ }
+
+ private static String wglGetLastError() {
+ return WindowsWGLDrawableFactory.wglGetLastError();
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java
new file mode 100644
index 000000000..a7af86001
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java
@@ -0,0 +1,343 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.windows.wgl;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+
+public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
+ private long cachedParentHdc;
+ private WGLExt cachedWGLExt; // cached WGLExt instance from parent GLCanvas,
+ // needed to destroy pbuffer
+ private long buffer; // pbuffer handle
+
+ private int floatMode;
+
+ public WindowsPbufferWGLDrawable(GLDrawableFactory factory,
+ GLCapabilities capabilities,
+ int initialWidth,
+ int initialHeight,
+ WindowsWGLDrawable dummyDrawable,
+ WGLExt wglExt) {
+ super(factory, new NullWindow(), true, capabilities, null);
+ if (initialWidth <= 0 || initialHeight <= 0) {
+ throw new GLException("Initial width and height of pbuffer must be positive (were (" +
+ initialWidth + ", " + initialHeight + "))");
+ }
+ NullWindow nw = (NullWindow) getNativeWindow();
+ nw.setSize(initialWidth, initialHeight);
+
+ if (DEBUG) {
+ System.out.println("Pbuffer caps on init: " + capabilities +
+ (capabilities.getPbufferRenderToTexture() ? " [rtt]" : "") +
+ (capabilities.getPbufferRenderToTextureRectangle() ? " [rect]" : "") +
+ (capabilities.getPbufferFloatingPointBuffers() ? " [float]" : ""));
+ }
+
+ createPbuffer(dummyDrawable.getNativeWindow().getWindowHandle(), wglExt);
+ }
+
+ public GLContext createContext(GLContext shareWith) {
+ return new WindowsPbufferWGLContext(this, shareWith);
+ }
+
+ public void destroy() {
+ getFactory().lockToolkit();
+ try {
+ NullWindow nw = (NullWindow) getNativeWindow();
+ if (nw.getWindowHandle() != 0) {
+ // Must release DC and pbuffer
+ // NOTE that since the context is not current, glGetError() can
+ // not be called here, so we skip the use of any composable
+ // pipelines (see WindowsOnscreenWGLContext.makeCurrentImpl)
+ WGLExt wglExt = cachedWGLExt;
+ if (wglExt.wglReleasePbufferDCARB(buffer, nw.getWindowHandle()) == 0) {
+ throw new GLException("Error releasing pbuffer device context: error code " + WGL.GetLastError());
+ }
+ nw.setWindowHandle(0);
+ if (!wglExt.wglDestroyPbufferARB(buffer)) {
+ throw new GLException("Error destroying pbuffer: error code " + WGL.GetLastError());
+ }
+ buffer = 0;
+ setChosenGLCapabilities(null);
+ }
+ } finally {
+ getFactory().unlockToolkit();
+ }
+ }
+
+ public void setSize(int newWidth, int newHeight) {
+ super.setSize(newWidth, newHeight);
+ destroy();
+ if(cachedParentHdc!=0 && cachedWGLExt!=null) {
+ createPbuffer(cachedParentHdc, cachedWGLExt);
+ }
+ }
+
+ public long getPbuffer() {
+ return buffer;
+ }
+
+ public int getFloatingPointMode() {
+ return floatMode;
+ }
+
+ public void swapBuffers() throws GLException {
+ // FIXME: this doesn't make sense any more because we don't have
+ // access to our OpenGL context here
+ /*
+ // FIXME: do we need to do anything if the pbuffer is double-buffered?
+ // For now, just grab the pixels for the render-to-texture support.
+ if (rtt && !hasRTT) {
+ if (DEBUG) {
+ System.err.println("Copying pbuffer data to GL_TEXTURE_2D state");
+ }
+
+ GL gl = getGL();
+ gl.glCopyTexSubImage2D(textureTarget, 0, 0, 0, 0, 0, width, height);
+ }
+ */
+ }
+
+ private void createPbuffer(long parentHdc, WGLExt wglExt) {
+ int[] iattributes = new int [2*MAX_ATTRIBS];
+ float[] fattributes = new float[1];
+ int[] floatModeTmp = new int[1];
+ int niattribs = 0;
+ int width, height;
+
+ GLCapabilities capabilities = getCapabilities();
+
+ if (DEBUG) {
+ System.out.println("Pbuffer parentHdc = " + toHexString(parentHdc));
+ System.out.println("Pbuffer caps: " + capabilities +
+ (capabilities.getPbufferRenderToTexture() ? " [rtt]" : "") +
+ (capabilities.getPbufferRenderToTextureRectangle() ? " [rect]" : "") +
+ (capabilities.getPbufferFloatingPointBuffers() ? " [float]" : ""));
+ }
+
+ getFactory().lockToolkit();
+ try {
+ if (!glCapabilities2iattributes(capabilities,
+ iattributes,
+ wglExt,
+ true,
+ floatModeTmp)) {
+ throw new GLException("Pbuffer-related extensions not supported");
+ }
+
+ floatMode = floatModeTmp[0];
+ boolean rtt = capabilities.getPbufferRenderToTexture();
+ boolean rect = capabilities.getPbufferRenderToTextureRectangle();
+ boolean useFloat = capabilities.getPbufferFloatingPointBuffers();
+ boolean ati = false;
+
+ if (useFloat) {
+ ati = (floatMode == GLPbuffer.ATI_FLOAT);
+ }
+
+ int[] pformats = new int[MAX_PFORMATS];
+ int nformats;
+ int[] nformatsTmp = new int[1];
+ if (!wglExt.wglChoosePixelFormatARB(parentHdc,
+ iattributes, 0,
+ fattributes, 0,
+ MAX_PFORMATS,
+ pformats, 0,
+ nformatsTmp, 0)) {
+ throw new GLException("pbuffer creation error: wglChoosePixelFormatARB() failed");
+ }
+ nformats = nformatsTmp[0];
+ if (nformats <= 0) {
+ throw new GLException("pbuffer creation error: Couldn't find a suitable pixel format");
+ }
+
+ boolean haveMultisample = wglExt.isExtensionAvailable("WGL_ARB_multisample");
+
+ if (DEBUG) {
+ System.err.println("" + nformats + " suitable pixel formats found");
+ // query pixel format
+ iattributes[0] = WGLExt.WGL_RED_BITS_ARB;
+ iattributes[1] = WGLExt.WGL_GREEN_BITS_ARB;
+ iattributes[2] = WGLExt.WGL_BLUE_BITS_ARB;
+ iattributes[3] = WGLExt.WGL_ALPHA_BITS_ARB;
+ iattributes[4] = WGLExt.WGL_DEPTH_BITS_ARB;
+ iattributes[5] = (useFloat ? (ati ? WGLExt.WGL_PIXEL_TYPE_ARB : WGLExt.WGL_FLOAT_COMPONENTS_NV) : WGLExt.WGL_RED_BITS_ARB);
+ iattributes[6] = (haveMultisample ? WGLExt.WGL_SAMPLE_BUFFERS_ARB : WGLExt.WGL_RED_BITS_ARB);
+ iattributes[7] = (haveMultisample ? WGLExt.WGL_SAMPLES_ARB : WGLExt.WGL_RED_BITS_ARB);
+ iattributes[8] = WGLExt.WGL_DRAW_TO_PBUFFER_ARB;
+ int[] ivalues = new int[9];
+ for (int i = 0; i < nformats; i++) {
+ if (!wglExt.wglGetPixelFormatAttribivARB(parentHdc, pformats[i], 0, 9, iattributes, 0, ivalues, 0)) {
+ throw new GLException("Error while querying pixel format " + pformats[i] +
+ "'s (index " + i + "'s) capabilities for debugging");
+ }
+ System.err.print("pixel format " + pformats[i] + " (index " + i + "): ");
+ System.err.print( "r: " + ivalues[0]);
+ System.err.print(" g: " + ivalues[1]);
+ System.err.print(" b: " + ivalues[2]);
+ System.err.print(" a: " + ivalues[3]);
+ System.err.print(" depth: " + ivalues[4]);
+ if (haveMultisample) {
+ System.err.print(" multisample: " + ivalues[6]);
+ }
+ System.err.print(" samples: " + ivalues[7]);
+ if (useFloat) {
+ if (ati) {
+ if (ivalues[5] == WGLExt.WGL_TYPE_RGBA_FLOAT_ATI) {
+ System.err.print(" [ati float]");
+ } else if (ivalues[5] != WGLExt.WGL_TYPE_RGBA_ARB) {
+ System.err.print(" [unknown pixel type " + ivalues[5] + "]");
+ }
+ } else {
+ if (ivalues[5] != 0) {
+ System.err.print(" [float]");
+ }
+ }
+ }
+
+ if (ivalues[8] != 0) {
+ System.err.print(" [pbuffer]");
+ }
+ System.err.println();
+ }
+ }
+
+ long tmpBuffer = 0;
+ int whichFormat = -1;
+ // Loop is a workaround for bugs in NVidia's recent drivers
+ for (whichFormat = 0; whichFormat < nformats; whichFormat++) {
+ int format = pformats[whichFormat];
+
+ // Create the p-buffer.
+ niattribs = 0;
+
+ if (rtt) {
+ iattributes[niattribs++] = WGLExt.WGL_TEXTURE_FORMAT_ARB;
+ if (useFloat) {
+ iattributes[niattribs++] = WGLExt.WGL_TEXTURE_FLOAT_RGB_NV;
+ } else {
+ iattributes[niattribs++] = WGLExt.WGL_TEXTURE_RGBA_ARB;
+ }
+
+ iattributes[niattribs++] = WGLExt.WGL_TEXTURE_TARGET_ARB;
+ iattributes[niattribs++] = rect ? WGLExt.WGL_TEXTURE_RECTANGLE_NV : WGLExt.WGL_TEXTURE_2D_ARB;
+
+ iattributes[niattribs++] = WGLExt.WGL_MIPMAP_TEXTURE_ARB;
+ iattributes[niattribs++] = GL.GL_FALSE;
+
+ iattributes[niattribs++] = WGLExt.WGL_PBUFFER_LARGEST_ARB;
+ iattributes[niattribs++] = GL.GL_FALSE;
+ }
+
+ iattributes[niattribs++] = 0;
+
+ tmpBuffer = wglExt.wglCreatePbufferARB(parentHdc, format, getWidth(), getHeight(), iattributes, 0);
+ if (tmpBuffer != 0) {
+ // Done
+ break;
+ }
+ }
+
+ if (tmpBuffer == 0) {
+ throw new GLException("pbuffer creation error: wglCreatePbufferARB() failed: tried " + nformats +
+ " pixel formats, last error was: " + wglGetLastError());
+ }
+
+ // Get the device context.
+ long tmpHdc = wglExt.wglGetPbufferDCARB(tmpBuffer);
+ if (tmpHdc == 0) {
+ throw new GLException("pbuffer creation error: wglGetPbufferDCARB() failed");
+ }
+
+ NullWindow nw = (NullWindow) getNativeWindow();
+ // Set up instance variables
+ buffer = tmpBuffer;
+ nw.setWindowHandle(tmpHdc);
+ cachedWGLExt = wglExt;
+ cachedParentHdc = parentHdc;
+
+ // Re-query chosen pixel format
+ {
+ niattribs = 0;
+ iattributes[niattribs++] = WGLExt.WGL_ACCELERATION_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_RED_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_GREEN_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_BLUE_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_ALPHA_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_DEPTH_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_STENCIL_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_DOUBLE_BUFFER_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_STEREO_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_RED_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_GREEN_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_BLUE_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_ALPHA_BITS_ARB;
+ iattributes[niattribs++] = (useFloat ? (ati ? WGLExt.WGL_PIXEL_TYPE_ARB : WGLExt.WGL_FLOAT_COMPONENTS_NV) : WGLExt.WGL_RED_BITS_ARB);
+ iattributes[niattribs++] = (haveMultisample ? WGLExt.WGL_SAMPLE_BUFFERS_ARB : WGLExt.WGL_RED_BITS_ARB);
+ iattributes[niattribs++] = (haveMultisample ? WGLExt.WGL_SAMPLES_ARB : WGLExt.WGL_RED_BITS_ARB);
+ iattributes[niattribs++] = WGLExt.WGL_DRAW_TO_PBUFFER_ARB;
+ int[] ivalues = new int[niattribs];
+ // FIXME: usually prefer to throw exceptions, but failure here is not critical
+ if (wglExt.wglGetPixelFormatAttribivARB(parentHdc, pformats[whichFormat], 0, niattribs, iattributes, 0, ivalues, 0)) {
+ setChosenGLCapabilities(iattributes2GLCapabilities(iattributes, niattribs, ivalues, false));
+ }
+ }
+
+ // Determine the actual width and height we were able to create.
+ int[] tmp = new int[1];
+ wglExt.wglQueryPbufferARB( buffer, WGLExt.WGL_PBUFFER_WIDTH_ARB, tmp, 0 );
+ width = tmp[0];
+ wglExt.wglQueryPbufferARB( buffer, WGLExt.WGL_PBUFFER_HEIGHT_ARB, tmp, 0 );
+ height = tmp[0];
+ nw.setSize(width, height);
+ } finally {
+ getFactory().unlockToolkit();
+ }
+
+ if (DEBUG) {
+ System.err.println("Created pbuffer " + width + " x " + height);
+ }
+ }
+
+ private static String wglGetLastError() {
+ return WindowsWGLDrawableFactory.wglGetLastError();
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java
new file mode 100644
index 000000000..c6676d36d
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java
@@ -0,0 +1,300 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.windows.wgl;
+
+import java.nio.*;
+import java.util.*;
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+
+public class WindowsWGLContext extends GLContextImpl {
+ protected WindowsWGLDrawable drawable;
+ protected long hglrc;
+ private boolean wglGetExtensionsStringEXTInitialized;
+ private boolean wglGetExtensionsStringEXTAvailable;
+ private static final Map/*<String, String>*/ functionNameMap;
+ private static final Map/*<String, String>*/ extensionNameMap;
+ private WGLExt wglExt;
+ // Table that holds the addresses of the native C-language entry points for
+ // WGL extension functions.
+ private WGLExtProcAddressTable wglExtProcAddressTable;
+
+ static {
+ functionNameMap = new HashMap();
+ functionNameMap.put("glAllocateMemoryNV", "wglAllocateMemoryNV");
+ functionNameMap.put("glFreeMemoryNV", "wglFreeMemoryNV");
+
+ extensionNameMap = new HashMap();
+ extensionNameMap.put("GL_ARB_pbuffer", "WGL_ARB_pbuffer");
+ extensionNameMap.put("GL_ARB_pixel_format", "WGL_ARB_pixel_format");
+ }
+
+ // FIXME: figure out how to hook back in the Java 2D / JOGL bridge
+ public WindowsWGLContext(WindowsWGLDrawable drawable,
+ GLContext shareWith) {
+ super(shareWith);
+ }
+
+ public Object getPlatformGLExtensions() {
+ return getWGLExt();
+ }
+
+ public WGLExt getWGLExt() {
+ if (wglExt == null) {
+ wglExt = new WGLExtImpl(this);
+ }
+ return wglExt;
+ }
+
+ public GLDrawable getGLDrawable() {
+ return drawable;
+ }
+
+ protected String mapToRealGLFunctionName(String glFunctionName) {
+ String lookup = (String) functionNameMap.get(glFunctionName);
+ if (lookup != null) {
+ return lookup;
+ }
+ return glFunctionName;
+ }
+
+ protected String mapToRealGLExtensionName(String glExtensionName) {
+ String lookup = (String) extensionNameMap.get(glExtensionName);
+ if (lookup != null) {
+ return lookup;
+ }
+ return glExtensionName;
+ }
+
+ /**
+ * Creates and initializes an appropriate OpenGL context. Should only be
+ * called by {@link #makeCurrentImpl()}.
+ */
+ protected void create() {
+ if (drawable.getNativeWindow().getWindowHandle() == 0) {
+ throw new GLException("Internal error: attempted to create OpenGL context without an associated drawable");
+ }
+ hglrc = WGL.wglCreateContext(drawable.getNativeWindow().getWindowHandle());
+ if (hglrc == 0) {
+ throw new GLException("Unable to create OpenGL context for device context " + toHexString(drawable.getNativeWindow().getWindowHandle()));
+ }
+ if (DEBUG) {
+ System.err.println(getThreadName() + ": !!! Created OpenGL context " + toHexString(hglrc) + " for " + this + ", device context " + toHexString(drawable.getNativeWindow().getWindowHandle()) + ", not yet sharing");
+ }
+ // Windows can set up sharing of display lists after creation time
+ WindowsWGLContext other = (WindowsWGLContext) GLContextShareSet.getShareContext(this);
+ long hglrc2 = 0;
+ if (other != null) {
+ hglrc2 = other.getHGLRC();
+ if (hglrc2 == 0) {
+ throw new GLException("GLContextShareSet returned an invalid OpenGL context");
+ }
+ if (!WGL.wglShareLists(hglrc2, hglrc)) {
+ throw new GLException("wglShareLists(" + toHexString(hglrc2) +
+ ", " + toHexString(hglrc) + ") failed: error code " +
+ WGL.GetLastError());
+ }
+ }
+ GLContextShareSet.contextCreated(this);
+ if (DEBUG) {
+ System.err.println(getThreadName() + ": !!! Created OpenGL context " + toHexString(hglrc) + " for " + this + ", device context " + toHexString(drawable.getNativeWindow().getWindowHandle()) + ", sharing with " + toHexString(hglrc2));
+ }
+ }
+
+ protected int makeCurrentImpl() throws GLException {
+ if (drawable.getNativeWindow().getWindowHandle() == 0) {
+ if (DEBUG) {
+ System.err.println("drawable not properly initialized");
+ }
+ return CONTEXT_NOT_CURRENT;
+ }
+ boolean created = false;
+ if (hglrc == 0) {
+ create();
+ if (DEBUG) {
+ System.err.println(getThreadName() + ": !!! Created GL context for " + getClass().getName());
+ }
+ created = true;
+ }
+
+ if (WGL.wglGetCurrentContext() != hglrc) {
+ if (!WGL.wglMakeCurrent(drawable.getNativeWindow().getWindowHandle(), hglrc)) {
+ throw new GLException("Error making context current: " + WGL.GetLastError());
+ } else {
+ if (DEBUG && VERBOSE) {
+ System.err.println(getThreadName() + ": wglMakeCurrent(hdc " + toHexString(drawable.getNativeWindow().getWindowHandle()) +
+ ", hglrc " + toHexString(hglrc) + ") succeeded");
+ }
+ }
+ }
+
+ if (created) {
+ resetGLFunctionAvailability();
+ return CONTEXT_CURRENT_NEW;
+ }
+ return CONTEXT_CURRENT;
+ }
+
+ protected void releaseImpl() throws GLException {
+ if (!NO_FREE) {
+ if (!WGL.wglMakeCurrent(0, 0)) {
+ throw new GLException("Error freeing OpenGL context: " + WGL.GetLastError());
+ }
+ }
+ }
+
+ protected void destroyImpl() throws GLException {
+ if (hglrc != 0) {
+ if (!WGL.wglDeleteContext(hglrc)) {
+ throw new GLException("Unable to delete OpenGL context");
+ }
+ if (DEBUG) {
+ System.err.println(getThreadName() + ": !!! Destroyed OpenGL context " + toHexString(hglrc));
+ }
+ hglrc = 0;
+ GLContextShareSet.contextDestroyed(this);
+ }
+ }
+
+ public boolean isCreated() {
+ return (hglrc != 0);
+ }
+
+ public void copy(GLContext source, int mask) throws GLException {
+ long dst = getHGLRC();
+ long src = ((WindowsWGLContext) source).getHGLRC();
+ if (src == 0) {
+ throw new GLException("Source OpenGL context has not been created");
+ }
+ if (dst == 0) {
+ throw new GLException("Destination OpenGL context has not been created");
+ }
+ if (!WGL.wglCopyContext(src, dst, mask)) {
+ throw new GLException("wglCopyContext failed");
+ }
+ }
+
+ protected void resetGLFunctionAvailability() {
+ super.resetGLFunctionAvailability();
+ if (DEBUG) {
+ System.err.println(getThreadName() + ": !!! Initializing WGL extension address table for " + this);
+ }
+ if (wglExtProcAddressTable == null) {
+ // FIXME: cache ProcAddressTables by capability bits so we can
+ // share them among contexts with the same capabilities
+ wglExtProcAddressTable = new WGLExtProcAddressTable();
+ }
+ resetProcAddressTable(getWGLExtProcAddressTable());
+ }
+
+ public final WGLExtProcAddressTable getWGLExtProcAddressTable() {
+ return wglExtProcAddressTable;
+ }
+
+ public String getPlatformExtensionsString() {
+ if (!wglGetExtensionsStringEXTInitialized) {
+ wglGetExtensionsStringEXTAvailable = (WGL.wglGetProcAddress("wglGetExtensionsStringEXT") != 0);
+ wglGetExtensionsStringEXTInitialized = true;
+ }
+ if (wglGetExtensionsStringEXTAvailable) {
+ return getWGLExt().wglGetExtensionsStringEXT();
+ } else {
+ return "";
+ }
+ }
+
+ public boolean isFunctionAvailable(String glFunctionName)
+ {
+ boolean available = super.isFunctionAvailable(glFunctionName);
+
+ // Sanity check for implementations that use proc addresses for run-time
+ // linking: if the function IS available, then make sure there's a proc
+ // address for it if it's an extension or not part of the OpenGL 1.1 core
+ // (post GL 1.1 functions are run-time linked on windows).
+ /* FIXME:
+ assert(!available ||
+ (getGLProcAddressTable().getAddressFor(mapToRealGLFunctionName(glFunctionName)) != 0 ||
+ FunctionAvailabilityCache.isPartOfGLCore("1.1", mapToRealGLFunctionName(glFunctionName)))
+ ); */
+
+ return available;
+ }
+
+ public void setSwapInterval(int interval) {
+ // FIXME: make the context current first? Currently assumes that
+ // will not be necessary. Make the caller do this?
+ WGLExt wglExt = getWGLExt();
+ if (wglExt.isExtensionAvailable("WGL_EXT_swap_control")) {
+ wglExt.wglSwapIntervalEXT(interval);
+ }
+ }
+
+ public ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) {
+ return getWGLExt().wglAllocateMemoryNV(arg0, arg1, arg2, arg3);
+ }
+
+ public int getOffscreenContextPixelDataType() {
+ throw new GLException("Should not call this");
+ }
+
+ public int getOffscreenContextReadBuffer() {
+ throw new GLException("Should not call this");
+ }
+
+ public boolean offscreenImageNeedsVerticalFlip() {
+ throw new GLException("Should not call this");
+ }
+
+ public void bindPbufferToTexture() {
+ throw new GLException("Should not call this");
+ }
+
+ public void releasePbufferFromTexture() {
+ throw new GLException("Should not call this");
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ public long getHGLRC() {
+ return hglrc;
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java
new file mode 100644
index 000000000..1b1805e91
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java
@@ -0,0 +1,662 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.windows.wgl;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+
+public abstract class WindowsWGLDrawable extends GLDrawableImpl {
+ protected static final boolean DEBUG = Debug.debug("WindowsWGLDrawable");
+
+ protected GLCapabilitiesChooser chooser;
+ protected boolean pixelFormatChosen;
+
+ // Workaround for problems on Intel 82855 cards
+ private int setPixelFormatFailCount;
+ private static final int MAX_SET_PIXEL_FORMAT_FAIL_COUNT = 5;
+
+ protected static final int MAX_PFORMATS = 256;
+ protected static final int MAX_ATTRIBS = 256;
+
+ public WindowsWGLDrawable(GLDrawableFactory factory, NativeWindow comp, boolean realized,
+ GLCapabilities capabilities,
+ GLCapabilitiesChooser chooser) {
+ super(factory, comp, realized);
+ setChosenGLCapabilities(capabilities);
+ this.chooser = chooser;
+ }
+
+ public int lockSurface() throws GLException {
+ int ret = super.lockSurface();
+ if(NativeWindow.LOCK_SURFACE_NOT_READY == ret) {
+ return ret;
+ }
+ if (!pixelFormatChosen) {
+ try {
+ choosePixelFormat(true);
+ setPixelFormatFailCount = 0;
+ } catch (RuntimeException e) {
+ // Workaround for problems seen on Intel 82855 cards in particular
+ // Make it look like the lockSurface() call didn't succeed
+ unlockSurface();
+ if (e instanceof GLException) {
+ if (++setPixelFormatFailCount == MAX_SET_PIXEL_FORMAT_FAIL_COUNT) {
+ setPixelFormatFailCount = 0;
+ throw e;
+ }
+ return NativeWindow.LOCK_SURFACE_NOT_READY;
+ } else {
+ // Probably a user error in the GLCapabilitiesChooser or similar.
+ // Don't propagate non-GLExceptions out because calling code
+ // expects to catch only that exception type
+ throw new GLException(e);
+ }
+ }
+ }
+ return ret;
+ }
+
+
+ protected void choosePixelFormat(boolean onscreen) {
+ PIXELFORMATDESCRIPTOR pfd = null;
+ int pixelFormat = 0;
+ GLCapabilities chosenCaps = null;
+ GLCapabilities capabilities = getCapabilities();
+ long hdc = getNativeWindow().getWindowHandle();
+ if (onscreen) {
+ if ((pixelFormat = WGL.GetPixelFormat(hdc)) != 0) {
+ // The Java2D/OpenGL pipeline probably already set a pixel
+ // format for this canvas.
+ if (DEBUG) {
+ System.err.println("NOTE: pixel format already chosen (by Java2D/OpenGL pipeline?) for window: " +
+ WGL.GetPixelFormat(hdc));
+ }
+ pfd = newPixelFormatDescriptor();
+ if (WGL.DescribePixelFormat(hdc, pixelFormat, pfd.size(), pfd) == 0) {
+ // FIXME: should this just be a warning? Not really critical...
+ throw new GLException("Unable to describe pixel format " + pixelFormat +
+ " of window set by Java2D/OpenGL pipeline");
+ }
+ setChosenGLCapabilities(pfd2GLCapabilities(pfd));
+ pixelFormatChosen = true;
+ return;
+ }
+
+ GLCapabilities[] availableCaps = null;
+ int numFormats = 0;
+ pfd = newPixelFormatDescriptor();
+ // Produce a recommended pixel format selection for the GLCapabilitiesChooser.
+ // Use wglChoosePixelFormatARB if user requested multisampling and if we have it available
+ WindowsWGLDrawable dummyDrawable = null;
+ GLContextImpl dummyContext = null;
+ WGLExt dummyWGLExt = null;
+ if (capabilities.getSampleBuffers()) {
+ dummyDrawable = new WindowsDummyWGLDrawable(getFactory());
+ dummyContext = (GLContextImpl) dummyDrawable.createContext(null);
+ if (dummyContext != null) {
+ dummyContext.makeCurrent();
+ dummyWGLExt = (WGLExt) dummyContext.getPlatformGLExtensions();
+ }
+ }
+ int recommendedPixelFormat = -1;
+ boolean haveWGLChoosePixelFormatARB = false;
+ boolean haveWGLARBMultisample = false;
+ boolean gotAvailableCaps = false;
+ if (dummyWGLExt != null) {
+ try {
+ haveWGLChoosePixelFormatARB = dummyWGLExt.isExtensionAvailable("WGL_ARB_pixel_format");
+ if (haveWGLChoosePixelFormatARB) {
+ haveWGLARBMultisample = dummyWGLExt.isExtensionAvailable("WGL_ARB_multisample");
+
+ int[] iattributes = new int [2 * MAX_ATTRIBS];
+ int[] iresults = new int [2 * MAX_ATTRIBS];
+ float[] fattributes = new float[1];
+
+ if (glCapabilities2iattributes(capabilities,
+ iattributes,
+ dummyWGLExt,
+ false,
+ null)) {
+ int[] pformats = new int[MAX_PFORMATS];
+ int[] numFormatsTmp = new int[1];
+ if (dummyWGLExt.wglChoosePixelFormatARB(hdc,
+ iattributes, 0,
+ fattributes, 0,
+ MAX_PFORMATS,
+ pformats, 0,
+ numFormatsTmp, 0)) {
+ numFormats = numFormatsTmp[0];
+ if (numFormats > 0) {
+ // Remove one-basing of pixel format (added on later)
+ recommendedPixelFormat = pformats[0] - 1;
+ if (DEBUG) {
+ System.err.println(getThreadName() + ": Used wglChoosePixelFormatARB to recommend pixel format " + recommendedPixelFormat);
+ }
+ }
+ } else {
+ if (DEBUG) {
+ System.err.println(getThreadName() + ": wglChoosePixelFormatARB failed: " + WGL.GetLastError() );
+ Thread.dumpStack();
+ }
+ }
+ if (DEBUG) {
+ if (recommendedPixelFormat < 0) {
+ System.err.print(getThreadName() + ": wglChoosePixelFormatARB didn't recommend a pixel format");
+ if (capabilities.getSampleBuffers()) {
+ System.err.print(" for multisampled GLCapabilities");
+ }
+ System.err.println();
+ }
+ }
+
+ // Produce a list of GLCapabilities to give to the
+ // GLCapabilitiesChooser.
+ // Use wglGetPixelFormatAttribivARB instead of
+ // DescribePixelFormat to get higher-precision information
+ // about the pixel format (should make the GLCapabilities
+ // more precise as well...i.e., remove the
+ // "HardwareAccelerated" bit, which is basically
+ // meaningless, and put in whether it can render to a
+ // window, to a pbuffer, or to a pixmap)
+ int niattribs = 0;
+ iattributes[0] = WGLExt.WGL_NUMBER_PIXEL_FORMATS_ARB;
+ if (dummyWGLExt.wglGetPixelFormatAttribivARB(hdc, 0, 0, 1, iattributes, 0, iresults, 0)) {
+ numFormats = iresults[0];
+
+ if (DEBUG) {
+ System.err.println("wglGetPixelFormatAttribivARB reported WGL_NUMBER_PIXEL_FORMATS_ARB = " + numFormats);
+ }
+
+ // Should we be filtering out the pixel formats which aren't
+ // applicable, as we are doing here?
+ // We don't have enough information in the GLCapabilities to
+ // represent those that aren't...
+ iattributes[niattribs++] = WGLExt.WGL_DRAW_TO_WINDOW_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_ACCELERATION_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_SUPPORT_OPENGL_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_DEPTH_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_STENCIL_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_DOUBLE_BUFFER_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_STEREO_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_PIXEL_TYPE_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_RED_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_GREEN_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_BLUE_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_ALPHA_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_RED_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_GREEN_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_BLUE_BITS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_ALPHA_BITS_ARB;
+ if (haveWGLARBMultisample) {
+ iattributes[niattribs++] = WGLExt.WGL_SAMPLE_BUFFERS_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_SAMPLES_ARB;
+ }
+
+ availableCaps = new GLCapabilities[numFormats];
+ for (int i = 0; i < numFormats; i++) {
+ if (!dummyWGLExt.wglGetPixelFormatAttribivARB(hdc, i+1, 0, niattribs, iattributes, 0, iresults, 0)) {
+ throw new GLException("Error getting pixel format attributes for pixel format " + (i + 1) + " of device context");
+ }
+ availableCaps[i] = iattributes2GLCapabilities(iattributes, niattribs, iresults, true);
+ }
+ gotAvailableCaps = true;
+ } else {
+ long lastErr = WGL.GetLastError();
+ // Intel Extreme graphics fails with a zero error code
+ if (lastErr != 0) {
+ throw new GLException("Unable to enumerate pixel formats of window using wglGetPixelFormatAttribivARB: error code " + WGL.GetLastError());
+ }
+ }
+ }
+ }
+ } finally {
+ dummyContext.release();
+ dummyContext.destroy();
+ dummyDrawable.destroy();
+ }
+ }
+
+ // Fallback path for older cards, in particular Intel Extreme motherboard graphics
+ if (!gotAvailableCaps) {
+ if (DEBUG) {
+ if (!capabilities.getSampleBuffers()) {
+ System.err.println(getThreadName() + ": Using ChoosePixelFormat because multisampling not requested");
+ } else {
+ System.err.println(getThreadName() + ": Using ChoosePixelFormat because no wglChoosePixelFormatARB");
+ }
+ }
+ pfd = glCapabilities2PFD(capabilities, onscreen);
+ // Remove one-basing of pixel format (added on later)
+ recommendedPixelFormat = WGL.ChoosePixelFormat(hdc, pfd) - 1;
+
+ numFormats = WGL.DescribePixelFormat(hdc, 1, 0, null);
+ if (numFormats == 0) {
+ throw new GLException("Unable to enumerate pixel formats of window for GLCapabilitiesChooser");
+ }
+ availableCaps = new GLCapabilities[numFormats];
+ for (int i = 0; i < numFormats; i++) {
+ if (WGL.DescribePixelFormat(hdc, 1 + i, pfd.size(), pfd) == 0) {
+ throw new GLException("Error describing pixel format " + (1 + i) + " of device context");
+ }
+ availableCaps[i] = pfd2GLCapabilities(pfd);
+ }
+ }
+
+ // NOTE: officially, should make a copy of all of these
+ // GLCapabilities to avoid mutation by the end user during the
+ // chooseCapabilities call, but for the time being, assume they
+ // won't be changed
+
+ // Supply information to chooser
+ pixelFormat = chooser.chooseCapabilities(capabilities, availableCaps, recommendedPixelFormat);
+ if ((pixelFormat < 0) || (pixelFormat >= numFormats)) {
+ throw new GLException("Invalid result " + pixelFormat +
+ " from GLCapabilitiesChooser (should be between 0 and " +
+ (numFormats - 1) + ")");
+ }
+ if (DEBUG) {
+ System.err.println(getThreadName() + ": Chosen pixel format (" + pixelFormat + "):");
+ System.err.println(availableCaps[pixelFormat]);
+ }
+ chosenCaps = availableCaps[pixelFormat];
+ pixelFormat += 1; // one-base the index
+ if (WGL.DescribePixelFormat(hdc, pixelFormat, pfd.size(), pfd) == 0) {
+ throw new GLException("Error re-describing the chosen pixel format: " + WGL.GetLastError());
+ }
+ } else {
+ // For now, use ChoosePixelFormat for offscreen surfaces until
+ // we figure out how to properly choose an offscreen-
+ // compatible pixel format
+ pfd = glCapabilities2PFD(capabilities, onscreen);
+ pixelFormat = WGL.ChoosePixelFormat(hdc, pfd);
+ }
+ if (!WGL.SetPixelFormat(hdc, pixelFormat, pfd)) {
+ long lastError = WGL.GetLastError();
+ if (DEBUG) {
+ System.err.println(getThreadName() + ": SetPixelFormat failed: current context = " + WGL.wglGetCurrentContext() +
+ ", current DC = " + WGL.wglGetCurrentDC());
+ System.err.println(getThreadName() + ": GetPixelFormat(hdc " + toHexString(hdc) + ") returns " + WGL.GetPixelFormat(hdc));
+ }
+ throw new GLException("Unable to set pixel format " + pixelFormat + " for device context " + toHexString(hdc) + ": error code " + lastError);
+ }
+ // Reuse the previously-constructed GLCapabilities because it
+ // turns out that using DescribePixelFormat on some pixel formats
+ // (which, for example, support full-scene antialiasing) for some
+ // reason return that they are not OpenGL-capable
+ if (chosenCaps != null) {
+ setChosenGLCapabilities(chosenCaps);
+ } else {
+ setChosenGLCapabilities(pfd2GLCapabilities(pfd));
+ }
+ pixelFormatChosen = true;
+ }
+
+ protected static PIXELFORMATDESCRIPTOR glCapabilities2PFD(GLCapabilities caps, boolean onscreen) {
+ int colorDepth = (caps.getRedBits() +
+ caps.getGreenBits() +
+ caps.getBlueBits());
+ if (colorDepth < 15) {
+ throw new GLException("Bit depths < 15 (i.e., non-true-color) not supported");
+ }
+ PIXELFORMATDESCRIPTOR pfd = newPixelFormatDescriptor();
+ int pfdFlags = (WGL.PFD_SUPPORT_OPENGL |
+ WGL.PFD_GENERIC_ACCELERATED);
+ if (caps.getDoubleBuffered()) {
+ pfdFlags |= WGL.PFD_DOUBLEBUFFER;
+ }
+ if (onscreen) {
+ pfdFlags |= WGL.PFD_DRAW_TO_WINDOW;
+ } else {
+ pfdFlags |= WGL.PFD_DRAW_TO_BITMAP;
+ }
+ if (caps.getStereo()) {
+ pfdFlags |= WGL.PFD_STEREO;
+ }
+ pfd.dwFlags(pfdFlags);
+ pfd.iPixelType((byte) WGL.PFD_TYPE_RGBA);
+ pfd.cColorBits((byte) colorDepth);
+ pfd.cRedBits ((byte) caps.getRedBits());
+ pfd.cGreenBits((byte) caps.getGreenBits());
+ pfd.cBlueBits ((byte) caps.getBlueBits());
+ pfd.cAlphaBits((byte) caps.getAlphaBits());
+ int accumDepth = (caps.getAccumRedBits() +
+ caps.getAccumGreenBits() +
+ caps.getAccumBlueBits());
+ pfd.cAccumBits ((byte) accumDepth);
+ pfd.cAccumRedBits ((byte) caps.getAccumRedBits());
+ pfd.cAccumGreenBits((byte) caps.getAccumGreenBits());
+ pfd.cAccumBlueBits ((byte) caps.getAccumBlueBits());
+ pfd.cAccumAlphaBits((byte) caps.getAccumAlphaBits());
+ pfd.cDepthBits((byte) caps.getDepthBits());
+ pfd.cStencilBits((byte) caps.getStencilBits());
+ pfd.iLayerType((byte) WGL.PFD_MAIN_PLANE);
+ return pfd;
+ }
+
+ protected static PIXELFORMATDESCRIPTOR newPixelFormatDescriptor() {
+ PIXELFORMATDESCRIPTOR pfd = PIXELFORMATDESCRIPTOR.create();
+ pfd.nSize((short) pfd.size());
+ pfd.nVersion((short) 1);
+ return pfd;
+ }
+
+ protected static GLCapabilities pfd2GLCapabilities(PIXELFORMATDESCRIPTOR pfd) {
+ if ((pfd.dwFlags() & WGL.PFD_SUPPORT_OPENGL) == 0) {
+ return null;
+ }
+ GLCapabilities res = new GLCapabilities();
+ res.setRedBits (pfd.cRedBits());
+ res.setGreenBits (pfd.cGreenBits());
+ res.setBlueBits (pfd.cBlueBits());
+ res.setAlphaBits (pfd.cAlphaBits());
+ res.setAccumRedBits (pfd.cAccumRedBits());
+ res.setAccumGreenBits(pfd.cAccumGreenBits());
+ res.setAccumBlueBits (pfd.cAccumBlueBits());
+ res.setAccumAlphaBits(pfd.cAccumAlphaBits());
+ res.setDepthBits (pfd.cDepthBits());
+ res.setStencilBits (pfd.cStencilBits());
+ res.setDoubleBuffered((pfd.dwFlags() & WGL.PFD_DOUBLEBUFFER) != 0);
+ res.setStereo ((pfd.dwFlags() & WGL.PFD_STEREO) != 0);
+ res.setHardwareAccelerated(((pfd.dwFlags() & WGL.PFD_GENERIC_FORMAT) == 0) ||
+ ((pfd.dwFlags() & WGL.PFD_GENERIC_ACCELERATED) != 0));
+ return res;
+ }
+
+ protected static boolean glCapabilities2iattributes(GLCapabilities capabilities,
+ int[] iattributes,
+ WGLExt wglExt,
+ boolean pbuffer,
+ int[] floatMode) throws GLException {
+ if (!wglExt.isExtensionAvailable("WGL_ARB_pixel_format")) {
+ return false;
+ }
+
+ int niattribs = 0;
+
+ iattributes[niattribs++] = WGLExt.WGL_SUPPORT_OPENGL_ARB;
+ iattributes[niattribs++] = GL.GL_TRUE;
+ if (pbuffer) {
+ iattributes[niattribs++] = WGLExt.WGL_DRAW_TO_PBUFFER_ARB;
+ iattributes[niattribs++] = GL.GL_TRUE;
+ } else {
+ iattributes[niattribs++] = WGLExt.WGL_DRAW_TO_WINDOW_ARB;
+ iattributes[niattribs++] = GL.GL_TRUE;
+ }
+
+ iattributes[niattribs++] = WGLExt.WGL_DOUBLE_BUFFER_ARB;
+ if (capabilities.getDoubleBuffered()) {
+ iattributes[niattribs++] = GL.GL_TRUE;
+ } else {
+ iattributes[niattribs++] = GL.GL_FALSE;
+ }
+
+ iattributes[niattribs++] = WGLExt.WGL_STEREO_ARB;
+ if (capabilities.getStereo()) {
+ iattributes[niattribs++] = GL.GL_TRUE;
+ } else {
+ iattributes[niattribs++] = GL.GL_FALSE;
+ }
+
+ iattributes[niattribs++] = WGLExt.WGL_DEPTH_BITS_ARB;
+ iattributes[niattribs++] = capabilities.getDepthBits();
+ iattributes[niattribs++] = WGLExt.WGL_RED_BITS_ARB;
+ iattributes[niattribs++] = capabilities.getRedBits();
+ iattributes[niattribs++] = WGLExt.WGL_GREEN_BITS_ARB;
+ iattributes[niattribs++] = capabilities.getGreenBits();
+ iattributes[niattribs++] = WGLExt.WGL_BLUE_BITS_ARB;
+ iattributes[niattribs++] = capabilities.getBlueBits();
+ iattributes[niattribs++] = WGLExt.WGL_ALPHA_BITS_ARB;
+ iattributes[niattribs++] = capabilities.getAlphaBits();
+ iattributes[niattribs++] = WGLExt.WGL_STENCIL_BITS_ARB;
+ iattributes[niattribs++] = capabilities.getStencilBits();
+ if (capabilities.getAccumRedBits() > 0 ||
+ capabilities.getAccumGreenBits() > 0 ||
+ capabilities.getAccumBlueBits() > 0 ||
+ capabilities.getAccumAlphaBits() > 0) {
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_BITS_ARB;
+ iattributes[niattribs++] = (capabilities.getAccumRedBits() +
+ capabilities.getAccumGreenBits() +
+ capabilities.getAccumBlueBits() +
+ capabilities.getAccumAlphaBits());
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_RED_BITS_ARB;
+ iattributes[niattribs++] = capabilities.getAccumRedBits();
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_GREEN_BITS_ARB;
+ iattributes[niattribs++] = capabilities.getAccumGreenBits();
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_BLUE_BITS_ARB;
+ iattributes[niattribs++] = capabilities.getAccumBlueBits();
+ iattributes[niattribs++] = WGLExt.WGL_ACCUM_ALPHA_BITS_ARB;
+ iattributes[niattribs++] = capabilities.getAccumAlphaBits();
+ }
+
+ if (wglExt.isExtensionAvailable("WGL_ARB_multisample")) {
+ if (capabilities.getSampleBuffers()) {
+ iattributes[niattribs++] = WGLExt.WGL_SAMPLE_BUFFERS_ARB;
+ iattributes[niattribs++] = GL.GL_TRUE;
+ iattributes[niattribs++] = WGLExt.WGL_SAMPLES_ARB;
+ iattributes[niattribs++] = capabilities.getNumSamples();
+ }
+ }
+
+ boolean rtt = capabilities.getPbufferRenderToTexture();
+ boolean rect = capabilities.getPbufferRenderToTextureRectangle();
+ boolean useFloat = capabilities.getPbufferFloatingPointBuffers();
+ boolean ati = false;
+ if (pbuffer) {
+ // Check some invariants and set up some state
+ if (rect && !rtt) {
+ throw new GLException("Render-to-texture-rectangle requires render-to-texture to be specified");
+ }
+
+ if (rect) {
+ if (!wglExt.isExtensionAvailable("GL_NV_texture_rectangle")) {
+ throw new GLException("Render-to-texture-rectangle requires GL_NV_texture_rectangle extension");
+ }
+ }
+
+ if (useFloat) {
+ if (!wglExt.isExtensionAvailable("WGL_ATI_pixel_format_float") &&
+ !wglExt.isExtensionAvailable("WGL_NV_float_buffer")) {
+ throw new GLException("Floating-point pbuffers not supported by this hardware");
+ }
+
+ // Prefer NVidia extension over ATI
+ if (wglExt.isExtensionAvailable("WGL_NV_float_buffer")) {
+ ati = false;
+ floatMode[0] = GLPbuffer.NV_FLOAT;
+ } else {
+ ati = true;
+ floatMode[0] = GLPbuffer.ATI_FLOAT;
+ }
+ if (DEBUG) {
+ System.err.println("Using " + (ati ? "ATI" : "NVidia") + " floating-point extension");
+ }
+ }
+
+ // See whether we need to change the pixel type to support ATI's
+ // floating-point pbuffers
+ if (useFloat && ati) {
+ if (rtt) {
+ throw new GLException("Render-to-floating-point-texture not supported on ATI hardware");
+ } else {
+ iattributes[niattribs++] = WGLExt.WGL_PIXEL_TYPE_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_TYPE_RGBA_FLOAT_ATI;
+ }
+ } else {
+ if (!rtt) {
+ // Currently we don't support non-truecolor visuals in the
+ // GLCapabilities, so we don't offer the option of making
+ // color-index pbuffers.
+ iattributes[niattribs++] = WGLExt.WGL_PIXEL_TYPE_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_TYPE_RGBA_ARB;
+ }
+ }
+
+ if (useFloat && !ati) {
+ iattributes[niattribs++] = WGLExt.WGL_FLOAT_COMPONENTS_NV;
+ iattributes[niattribs++] = GL.GL_TRUE;
+ }
+
+ if (rtt) {
+ if (useFloat) {
+ assert(!ati);
+ if (!rect) {
+ throw new GLException("Render-to-floating-point-texture only supported on NVidia hardware with render-to-texture-rectangle");
+ }
+ iattributes[niattribs++] = WGLExt.WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV;
+ iattributes[niattribs++] = GL.GL_TRUE;
+ } else {
+ iattributes[niattribs++] = rect ? WGLExt.WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV : WGLExt.WGL_BIND_TO_TEXTURE_RGB_ARB;
+ iattributes[niattribs++] = GL.GL_TRUE;
+ }
+ }
+ } else {
+ iattributes[niattribs++] = WGLExt.WGL_PIXEL_TYPE_ARB;
+ iattributes[niattribs++] = WGLExt.WGL_TYPE_RGBA_ARB;
+ }
+
+ return true;
+ }
+
+ protected static GLCapabilities iattributes2GLCapabilities(int[] iattribs,
+ int niattribs,
+ int[] iresults,
+ boolean requireRenderToWindow) {
+ GLCapabilities res = new GLCapabilities();
+ for (int i = 0; i < niattribs; i++) {
+ int attr = iattribs[i];
+ switch (attr) {
+ case WGLExt.WGL_DRAW_TO_WINDOW_ARB:
+ if (requireRenderToWindow && iresults[i] != GL.GL_TRUE)
+ return null;
+ break;
+
+ case WGLExt.WGL_DRAW_TO_PBUFFER_ARB:
+ break;
+
+ case WGLExt.WGL_ACCELERATION_ARB:
+ res.setHardwareAccelerated(iresults[i] == WGLExt.WGL_FULL_ACCELERATION_ARB);
+ break;
+
+ case WGLExt.WGL_SUPPORT_OPENGL_ARB:
+ if (iresults[i] != GL.GL_TRUE)
+ return null;
+ break;
+
+ case WGLExt.WGL_DEPTH_BITS_ARB:
+ res.setDepthBits(iresults[i]);
+ break;
+
+ case WGLExt.WGL_STENCIL_BITS_ARB:
+ res.setStencilBits(iresults[i]);
+ break;
+
+ case WGLExt.WGL_DOUBLE_BUFFER_ARB:
+ res.setDoubleBuffered(iresults[i] == GL.GL_TRUE);
+ break;
+
+ case WGLExt.WGL_STEREO_ARB:
+ res.setStereo(iresults[i] == GL.GL_TRUE);
+ break;
+
+ case WGLExt.WGL_PIXEL_TYPE_ARB:
+ // Fail softly with unknown results here
+ if (iresults[i] == WGLExt.WGL_TYPE_RGBA_ARB ||
+ iresults[i] == WGLExt.WGL_TYPE_RGBA_FLOAT_ATI) {
+ res.setPbufferFloatingPointBuffers(true);
+ }
+ break;
+
+ case WGLExt.WGL_FLOAT_COMPONENTS_NV:
+ if (iresults[i] != 0) {
+ res.setPbufferFloatingPointBuffers(true);
+ }
+ break;
+
+ case WGLExt.WGL_RED_BITS_ARB:
+ res.setRedBits(iresults[i]);
+ break;
+
+ case WGLExt.WGL_GREEN_BITS_ARB:
+ res.setGreenBits(iresults[i]);
+ break;
+
+ case WGLExt.WGL_BLUE_BITS_ARB:
+ res.setBlueBits(iresults[i]);
+ break;
+
+ case WGLExt.WGL_ALPHA_BITS_ARB:
+ res.setAlphaBits(iresults[i]);
+ break;
+
+ case WGLExt.WGL_ACCUM_RED_BITS_ARB:
+ res.setAccumRedBits(iresults[i]);
+ break;
+
+ case WGLExt.WGL_ACCUM_GREEN_BITS_ARB:
+ res.setAccumGreenBits(iresults[i]);
+ break;
+
+ case WGLExt.WGL_ACCUM_BLUE_BITS_ARB:
+ res.setAccumBlueBits(iresults[i]);
+ break;
+
+ case WGLExt.WGL_ACCUM_ALPHA_BITS_ARB:
+ res.setAccumAlphaBits(iresults[i]);
+ break;
+
+ case WGLExt.WGL_SAMPLE_BUFFERS_ARB:
+ res.setSampleBuffers(iresults[i] != 0);
+ break;
+
+ case WGLExt.WGL_SAMPLES_ARB:
+ res.setNumSamples(iresults[i]);
+ break;
+
+ default:
+ throw new GLException("Unknown pixel format attribute " + iattribs[i]);
+ }
+ }
+ return res;
+ }
+
+ protected static String getThreadName() {
+ return Thread.currentThread().getName();
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
new file mode 100644
index 000000000..fd4e5620c
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
@@ -0,0 +1,276 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.windows.wgl;
+
+import java.nio.*;
+import java.util.*;
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+import javax.media.opengl.util.BufferUtil;
+
+public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
+ private static final boolean DEBUG = Debug.debug("WindowsWGLDrawableFactory");
+ private static final boolean VERBOSE = Debug.verbose();
+
+ // Handle to GLU32.dll
+ // FIXME: this should go away once we delete support for the C GLU library
+ private long hglu32;
+
+ static {
+ NativeLibLoader.loadCore();
+ }
+
+ public WindowsWGLDrawableFactory() {
+ super();
+ }
+
+ public AbstractGraphicsConfiguration chooseGraphicsConfiguration(GLCapabilities capabilities,
+ GLCapabilitiesChooser chooser,
+ AbstractGraphicsDevice device) {
+ return null;
+ }
+
+ public GLDrawable createGLDrawable(NativeWindow target,
+ GLCapabilities capabilities,
+ GLCapabilitiesChooser chooser) {
+ if (target == null) {
+ throw new IllegalArgumentException("Null target");
+ }
+ if (capabilities == null) {
+ capabilities = new GLCapabilities();
+ }
+ if (chooser == null) {
+ chooser = new DefaultGLCapabilitiesChooser();
+ }
+ return new WindowsOnscreenWGLDrawable(this, target, capabilities, chooser);
+ }
+
+ public GLDrawableImpl createOffscreenDrawable(GLCapabilities capabilities,
+ GLCapabilitiesChooser chooser) {
+ return new WindowsOffscreenWGLDrawable(this, capabilities, chooser);
+ }
+
+ private boolean pbufferSupportInitialized = false;
+ private boolean canCreateGLPbuffer = false;
+ public boolean canCreateGLPbuffer() {
+ if (!pbufferSupportInitialized) {
+ final GLDrawableFactory factory = this;
+ Runnable r = new Runnable() {
+ public void run() {
+ WindowsDummyWGLDrawable dummyDrawable = new WindowsDummyWGLDrawable(factory);
+ GLContext dummyContext = dummyDrawable.createContext(null);
+ if (dummyContext != null) {
+ GLContext lastContext = GLContext.getCurrent();
+ if (lastContext != null) {
+ lastContext.release();
+ }
+ dummyContext.makeCurrent();
+ GL dummyGL = dummyContext.getGL();
+ canCreateGLPbuffer = dummyGL.isExtensionAvailable("GL_ARB_pbuffer");
+ pbufferSupportInitialized = true;
+ dummyContext.release();
+ dummyContext.destroy();
+ dummyDrawable.destroy();
+ if (lastContext != null) {
+ lastContext.makeCurrent();
+ }
+ }
+ }
+ };
+ maybeDoSingleThreadedWorkaround(r);
+ }
+ if (DEBUG) {
+ System.err.println("WindowsWGLDrawableFactory.canCreateGLPbuffer() = " + canCreateGLPbuffer);
+ }
+ return canCreateGLPbuffer;
+ }
+
+ public GLPbuffer createGLPbuffer(final GLCapabilities capabilities,
+ final GLCapabilitiesChooser chooser,
+ final int initialWidth,
+ final int initialHeight,
+ final GLContext shareWith) {
+ if (!canCreateGLPbuffer()) {
+ throw new GLException("Pbuffer support not available with current graphics card");
+ }
+ final List returnList = new ArrayList();
+ final GLDrawableFactory factory = this;
+ Runnable r = new Runnable() {
+ public void run() {
+ WindowsDummyWGLDrawable dummyDrawable = new WindowsDummyWGLDrawable(factory);
+ WindowsWGLContext dummyContext = (WindowsWGLContext) dummyDrawable.createContext(null);
+ GLContext lastContext = GLContext.getCurrent();
+ if (lastContext != null) {
+ lastContext.release();
+ }
+ dummyContext.makeCurrent();
+ WGLExt dummyWGLExt = dummyContext.getWGLExt();
+ try {
+ WindowsPbufferWGLDrawable pbufferDrawable = new WindowsPbufferWGLDrawable(factory, capabilities,
+ initialWidth,
+ initialHeight,
+ dummyDrawable,
+ dummyWGLExt);
+ GLPbufferImpl pbuffer = new GLPbufferImpl(pbufferDrawable, shareWith);
+ returnList.add(pbuffer);
+ dummyContext.release();
+ dummyContext.destroy();
+ dummyDrawable.destroy();
+ } finally {
+ if (lastContext != null) {
+ lastContext.makeCurrent();
+ }
+ }
+ }
+ };
+ maybeDoSingleThreadedWorkaround(r);
+ return (GLPbuffer) returnList.get(0);
+ }
+
+ public GLContext createExternalGLContext() {
+ return new WindowsExternalWGLContext();
+ }
+
+ public boolean canCreateExternalGLDrawable() {
+ return true;
+ }
+
+ public GLDrawable createExternalGLDrawable() {
+ return WindowsExternalWGLDrawable.create(this);
+ }
+
+ public void loadGLULibrary() {
+ if (hglu32 == 0) {
+ hglu32 = WGL.LoadLibraryA("GLU32");
+ if (hglu32 == 0) {
+ throw new GLException("Error loading GLU32.DLL");
+ }
+ }
+ }
+
+ public long dynamicLookupFunction(String glFuncName) {
+ long res = WGL.wglGetProcAddress(glFuncName);
+ if (res == 0) {
+ // GLU routines aren't known to the OpenGL function lookup
+ if (hglu32 != 0) {
+ res = WGL.GetProcAddress(hglu32, glFuncName);
+ }
+ }
+ return res;
+ }
+
+ static String wglGetLastError() {
+ long err = WGL.GetLastError();
+ String detail = null;
+ switch ((int) err) {
+ case WGL.ERROR_INVALID_PIXEL_FORMAT: detail = "ERROR_INVALID_PIXEL_FORMAT"; break;
+ case WGL.ERROR_NO_SYSTEM_RESOURCES: detail = "ERROR_NO_SYSTEM_RESOURCES"; break;
+ case WGL.ERROR_INVALID_DATA: detail = "ERROR_INVALID_DATA"; break;
+ case WGL.ERROR_PROC_NOT_FOUND: detail = "ERROR_PROC_NOT_FOUND"; break;
+ case WGL.ERROR_INVALID_WINDOW_HANDLE:detail = "ERROR_INVALID_WINDOW_HANDLE"; break;
+ default: detail = "(Unknown error code " + err + ")"; break;
+ }
+ return detail;
+ }
+
+ private void maybeDoSingleThreadedWorkaround(Runnable action) {
+ if (Threading.isSingleThreaded() &&
+ !Threading.isOpenGLThread()) {
+ Threading.invokeOnOpenGLThread(action);
+ } else {
+ action.run();
+ }
+ }
+
+ public boolean canCreateContextOnJava2DSurface() {
+ return false;
+ }
+
+ public GLContext createContextOnJava2DSurface(Object graphics, GLContext shareWith)
+ throws GLException {
+ throw new GLException("Unimplemented on this platform");
+ }
+
+ //------------------------------------------------------
+ // Gamma-related functionality
+ //
+
+ private static final int GAMMA_RAMP_LENGTH = 256;
+
+ protected int getGammaRampLength() {
+ return GAMMA_RAMP_LENGTH;
+ }
+
+ protected boolean setGammaRamp(float[] ramp) {
+ short[] rampData = new short[3 * GAMMA_RAMP_LENGTH];
+ for (int i = 0; i < GAMMA_RAMP_LENGTH; i++) {
+ short scaledValue = (short) (ramp[i] * 65535);
+ rampData[i] = scaledValue;
+ rampData[i + GAMMA_RAMP_LENGTH] = scaledValue;
+ rampData[i + 2 * GAMMA_RAMP_LENGTH] = scaledValue;
+ }
+
+ long screenDC = WGL.GetDC(0);
+ boolean res = WGL.SetDeviceGammaRamp(screenDC, ShortBuffer.wrap(rampData));
+ WGL.ReleaseDC(0, screenDC);
+ return res;
+ }
+
+ protected Buffer getGammaRamp() {
+ ShortBuffer rampData = ShortBuffer.allocate(3 * GAMMA_RAMP_LENGTH);
+ long screenDC = WGL.GetDC(0);
+ boolean res = WGL.GetDeviceGammaRamp(screenDC, rampData);
+ WGL.ReleaseDC(0, screenDC);
+ if (!res) {
+ return null;
+ }
+ return rampData;
+ }
+
+ protected void resetGammaRamp(Buffer originalGammaRamp) {
+ if (originalGammaRamp == null) {
+ // getGammaRamp failed earlier
+ return;
+ }
+ long screenDC = WGL.GetDC(0);
+ WGL.SetDeviceGammaRamp(screenDC, originalGammaRamp);
+ WGL.ReleaseDC(0, screenDC);
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/x11/awt/X11JAWTWindow.java b/src/classes/com/sun/opengl/impl/x11/awt/X11JAWTWindow.java
index 2115f383d..4c166e68d 100644
--- a/src/classes/com/sun/opengl/impl/x11/awt/X11JAWTWindow.java
+++ b/src/classes/com/sun/opengl/impl/x11/awt/X11JAWTWindow.java
@@ -32,49 +32,33 @@
* You acknowledge that this software is not designed or intended for use
* in the design, construction, operation or maintenance of any nuclear
* facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
*/
package com.sun.opengl.impl.x11.awt;
import com.sun.opengl.impl.x11.*;
import com.sun.opengl.impl.awt.*;
-
-import javax.media.opengl.*;
import com.sun.opengl.impl.*;
-public class X11JAWTWindow extends JAWTWindow {
+import javax.media.opengl.*;
- // Variables for lockSurface/unlockSurface
- private JAWT_DrawingSurface ds;
- private JAWT_DrawingSurfaceInfo dsi;
- private JAWT_X11DrawingSurfaceInfo x11dsi;
-
- //---------------------------------------------------------------------------
- // Xinerama-related functionality
- //
+import java.awt.GraphicsDevice;
+import java.awt.GraphicsEnvironment;
- private boolean checkedXinerama;
- private boolean xineramaEnabled;
- protected synchronized boolean isXineramaEnabled() {
- if (!checkedXinerama) {
- checkedXinerama = true;
- lockToolkit();
- long display = getDisplayConnection();
- xineramaEnabled = GLX.XineramaEnabled(display);
- unlockToolkit();
- }
- return xineramaEnabled;
- }
+public class X11JAWTWindow extends JAWTWindow {
public X11JAWTWindow(Object comp) {
super(comp);
}
+ protected void initNative() throws NativeWindowException {
+ }
+
public int lockSurface() throws NativeWindowException {
- super.lockSurface();
+ int ret = super.lockSurface();
+ if(LOCK_SUCCESS != ret) {
+ return ret;
+ }
ds = JAWT.getJAWT().GetDrawingSurface(component);
if (ds == null) {
// Widget not yet realized
@@ -89,7 +73,6 @@ public class X11JAWTWindow extends JAWTWindow {
// should handle this case, but it may be possible that race
// conditions can cause this code to be triggered -- should test
// more)
- int ret = LOCK_SUCCESS;
if ((res & JAWTFactory.JAWT_LOCK_SURFACE_CHANGED) != 0) {
ret = LOCK_SURFACE_CHANGED;
}
@@ -105,11 +88,12 @@ public class X11JAWTWindow extends JAWTWindow {
display = x11dsi.display();
drawable = x11dsi.drawable();
visualID = x11dsi.visualID();
- screen= null;
- if (isXineramaEnabled()) {
+ screen= 0;
+ if (X11Lib.XineramaEnabled(display)) {
screenIndex = 0;
} else {
- screenIndex = X11SunJDKReflection.graphicsDeviceGetScreen(config.getDevice());
+ GraphicsDevice device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
+ screenIndex = X11SunJDKReflection.graphicsDeviceGetScreen(device);
}
if (display == 0 || drawable == 0) {
// Widget not yet realized
@@ -122,7 +106,7 @@ public class X11JAWTWindow extends JAWTWindow {
display = 0;
drawable = 0;
visualID = 0;
- screen= null;
+ screen= 0;
screenIndex = -1;
return LOCK_SURFACE_NOT_READY;
}
@@ -130,12 +114,19 @@ public class X11JAWTWindow extends JAWTWindow {
}
public void unlockSurface() {
- super.unlockSurface();
+ if(!isSurfaceLocked()) return;
ds.FreeDrawingSurfaceInfo(dsi);
ds.Unlock();
JAWT.getJAWT().FreeDrawingSurface(ds);
ds = null;
dsi = null;
x11dsi = null;
+ super.unlockSurface();
}
+
+ // Variables for lockSurface/unlockSurface
+ private JAWT_DrawingSurface ds;
+ private JAWT_DrawingSurfaceInfo dsi;
+ private JAWT_X11DrawingSurfaceInfo x11dsi;
+
}
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/DRIHack.java b/src/classes/com/sun/opengl/impl/x11/glx/DRIHack.java
new file mode 100644
index 000000000..120d93942
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/x11/glx/DRIHack.java
@@ -0,0 +1,129 @@
+/*
+ * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.x11.glx;
+
+import java.io.*;
+import java.security.*;
+import com.sun.gluegen.runtime.*;
+import com.sun.opengl.impl.*;
+import com.sun.opengl.impl.x11.*;
+
+/**
+ * Helper class for working around problems with open-source DRI
+ * drivers. In the current DRI implementation it is required that the
+ * symbols in libGL.so.1.2 be globally visible to be accessible from
+ * other libraries that are dynamically loaded by the implementation.
+ * Applications may typically satisfy this need either by linking
+ * against libGL.so on the command line (-lGL) or by dlopen'ing
+ * libGL.so.1.2 with the RTLD_GLOBAL flag. The JOGL implementation
+ * links against libGL on all platforms rather than forcing all OpenGL
+ * entry points to be called through a function pointer. This allows
+ * the JOGL library to link directly to core 1.1 OpenGL entry points
+ * like glVertex3f, while calling through function pointers for entry
+ * points from later OpenGL versions as well as from
+ * extensions. However, because libjogl.so (which links against
+ * libGL.so) is loaded by the JVM, and because the JVM implicitly uses
+ * RTLD_LOCAL in the implementation of System.loadLibrary(), this
+ * means via transitivity that the symbols for libGL.so have only
+ * RTLD_LOCAL visibility to the rest of the application, so the DRI
+ * drivers can not find the symbols required. <P>
+ *
+ * There are at least two possible solutions. One would be to change
+ * the JOGL implementation to call through function pointers uniformly
+ * so that it does not need to link against libGL.so. This is
+ * possible, but requires changes to GlueGen and also is not really
+ * necessary in any other situation than with the DRI drivers. Another
+ * solution is to force the first load of libGL.so.1.2 to be done
+ * dynamically with RTLD_GLOBAL before libjogl.so is loaded and causes
+ * libGL.so.1.2 to be loaded again. The NativeLibrary class in the
+ * GlueGen runtime has this property, and we use it to implement this
+ * workaround.
+ */
+
+public class DRIHack {
+ private static final boolean DEBUG = Debug.debug("DRIHack");
+ private static boolean driHackNeeded;
+ private static NativeLibrary oglLib;
+
+ public static void begin() {
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ String os = System.getProperty("os.name").toLowerCase();
+ // Do DRI hack on all Linux distributions for best robustness
+ driHackNeeded =
+ (os.startsWith("linux") ||
+ new File("/usr/lib/dri").exists() ||
+ new File("/usr/X11R6/lib/modules/dri").exists());
+ // Allow manual overriding for now as a workaround for
+ // problems seen in some situations -- needs more investigation
+ if (System.getProperty("jogl.drihack.disable") != null) {
+ driHackNeeded = false;
+ }
+ return null;
+ }
+ });
+
+ if (driHackNeeded) {
+ if (DEBUG) {
+ System.err.println("Beginning DRI hack");
+ }
+
+ // Try a few different variants for best robustness
+ // In theory probably only the first is necessary
+ oglLib = NativeLibrary.open("libGL.so.1", null);
+ if (DEBUG && oglLib != null) System.err.println(" Found libGL.so.1");
+ if (oglLib == null) {
+ oglLib = NativeLibrary.open("/usr/lib/libGL.so.1", null);
+ if (DEBUG && oglLib != null) System.err.println(" Found /usr/lib/libGL.so.1");
+ }
+ }
+ }
+
+ public static void end() {
+ if (oglLib != null) {
+ if (DEBUG) {
+ System.err.println("Ending DRI hack");
+ }
+
+ oglLib.close();
+ oglLib = null;
+ }
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXContext.java b/src/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXContext.java
new file mode 100755
index 000000000..3e9cab1d8
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXContext.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.x11.glx;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+import com.sun.opengl.impl.x11.*;
+
+public class X11ExternalGLXContext extends X11GLXContext {
+ private boolean firstMakeCurrent = true;
+ private boolean created = true;
+ private GLContext lastContext;
+
+ public X11ExternalGLXContext() {
+ super(null, null);
+ getGLDrawable().getFactory().lockToolkit();
+ try {
+ context = GLX.glXGetCurrentContext();
+ if (context == 0) {
+ throw new GLException("Error: attempted to make an external GLContext without a drawable/context current");
+ }
+ NullWindow nw = new NullWindow();
+ nw.setDisplayHandle(GLX.glXGetCurrentDisplay());
+ drawable = new Drawable(getGLDrawable().getFactory(), nw);
+ } finally {
+ getGLDrawable().getFactory().unlockToolkit();
+ }
+ GLContextShareSet.contextCreated(this);
+ resetGLFunctionAvailability();
+ }
+
+ protected void create() {
+ }
+
+ public int makeCurrent() throws GLException {
+ // Save last context if necessary to allow external GLContexts to
+ // talk to other GLContexts created by this library
+ GLContext cur = getCurrent();
+ if (cur != null && cur != this) {
+ lastContext = cur;
+ setCurrent(null);
+ }
+ return super.makeCurrent();
+ }
+
+ public void release() throws GLException {
+ super.release();
+ setCurrent(lastContext);
+ lastContext = null;
+ }
+
+ protected int makeCurrentImpl() throws GLException {
+ if (firstMakeCurrent) {
+ firstMakeCurrent = false;
+ return CONTEXT_CURRENT_NEW;
+ }
+ return CONTEXT_CURRENT;
+ }
+
+ protected void releaseImpl() throws GLException {
+ }
+
+ protected void destroyImpl() throws GLException {
+ created = false;
+ GLContextShareSet.contextDestroyed(this);
+ }
+
+ public boolean isCreated() {
+ return created;
+ }
+
+ // Need to provide the display connection to extension querying APIs
+ class Drawable extends X11GLXDrawable {
+ Drawable(GLDrawableFactory factory, NativeWindow comp) {
+ super(factory, comp, true, null, null);
+ }
+
+ public GLContext createContext(GLContext shareWith) {
+ throw new GLException("Should not call this");
+ }
+
+ public int getWidth() {
+ throw new GLException("Should not call this");
+ }
+
+ public int getHeight() {
+ throw new GLException("Should not call this");
+ }
+
+ public void setSize(int width, int height) {
+ throw new GLException("Should not call this");
+ }
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java b/src/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java
new file mode 100755
index 000000000..a982a4605
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java
@@ -0,0 +1,229 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.x11.glx;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+import com.sun.opengl.impl.x11.*;
+
+import java.nio.LongBuffer;
+
+public class X11ExternalGLXDrawable extends X11GLXDrawable {
+ private int fbConfigID;
+ private int renderType;
+ private long readDrawable;
+
+ private X11ExternalGLXDrawable(GLDrawableFactory factory, NativeWindow component) {
+ super(factory, component, true, null, null);
+
+ readDrawable = GLX.glXGetCurrentReadDrawable();
+
+ // Need GLXFBConfig ID in order to properly create new contexts
+ // on this drawable
+ long display = getNativeWindow().getDisplayHandle();
+ long context = GLX.glXGetCurrentContext();
+ int[] val = new int[1];
+ GLX.glXQueryContext(display, context, GLX.GLX_FBCONFIG_ID, val, 0);
+ fbConfigID = val[0];
+ renderType = GLX.GLX_RGBA_TYPE;
+ GLX.glXQueryContext(display, context, GLX.GLX_RENDER_TYPE, val, 0);
+ if ((val[0] & GLX.GLX_RGBA_BIT) == 0) {
+ if (DEBUG) {
+ System.err.println("X11ExternalGLXDrawable: WARNING: forcing GLX_RGBA_TYPE for newly created contexts");
+ }
+ }
+ }
+
+ protected static X11ExternalGLXDrawable create(GLDrawableFactory factory) {
+ factory.lockToolkit();
+ try {
+ long display = GLX.glXGetCurrentDisplay();
+ long drawable = GLX.glXGetCurrentDrawable();
+ if (drawable == 0) {
+ throw new GLException("Error: attempted to make an external GLDrawable without a drawable/context current");
+ }
+
+ long context = GLX.glXGetCurrentContext();
+ int[] val = new int[1];
+ GLX.glXQueryContext(display, context, GLX.GLX_SCREEN, val, 0);
+ int screen = val[0];
+ NullWindow nw = new NullWindow();
+ nw.setWindowHandle(drawable);
+ nw.setScreenIndex(screen);
+ return new X11ExternalGLXDrawable(factory, nw);
+ } finally {
+ factory.unlockToolkit();
+ }
+ }
+
+ public GLContext createContext(GLContext shareWith) {
+ return new Context(this, shareWith);
+ }
+
+ public void setSize(int newWidth, int newHeight) {
+ throw new GLException("Should not call this");
+ }
+
+ public int getWidth() {
+ throw new GLException("Should not call this");
+ }
+
+ public int getHeight() {
+ throw new GLException("Should not call this");
+ }
+
+ public void destroy() {
+ }
+
+ class Context extends X11GLXContext {
+ Context(X11GLXDrawable drawable, GLContext shareWith) {
+ super(drawable, shareWith);
+ }
+
+ protected int makeCurrentImpl() throws GLException {
+ if (drawable.getNativeWindow().getWindowHandle() == 0) {
+ // parent drawable not properly initialized
+ // FIXME: signal error?
+ if (DEBUG) {
+ System.err.println("parent drawable not properly initialized");
+ }
+ return CONTEXT_NOT_CURRENT;
+ }
+
+ // Note that we have to completely override makeCurrentImpl
+ // because the underlying makeCurrent call differs from the norm
+ getFactory().lockToolkit();
+ try {
+ boolean created = false;
+ if (context == 0) {
+ create();
+ if (DEBUG) {
+ System.err.println(getThreadName() + ": !!! Created GL context for " + getClass().getName());
+ }
+ created = true;
+ }
+
+ if (!GLX.glXMakeContextCurrent(drawable.getNativeWindow().getDisplayHandle(),
+ drawable.getNativeWindow().getWindowHandle(),
+ readDrawable,
+ context)) {
+ throw new GLException("Error making context current");
+ } else {
+ if (DEBUG && VERBOSE) {
+ System.err.println(getThreadName() + ": glXMakeCurrent(display " + toHexString(drawable.getNativeWindow().getDisplayHandle()) +
+ ", drawable " + toHexString(drawable.getNativeWindow().getWindowHandle()) +
+ ", context " + toHexString(context) + ") succeeded");
+ }
+ }
+
+ if (created) {
+ resetGLFunctionAvailability();
+ return CONTEXT_CURRENT_NEW;
+ }
+ return CONTEXT_CURRENT;
+ } finally {
+ getFactory().unlockToolkit();
+ }
+ }
+
+ protected void releaseImpl() throws GLException {
+ getFactory().lockToolkit();
+ try {
+ if (!GLX.glXMakeContextCurrent(drawable.getNativeWindow().getDisplayHandle(), 0, 0, 0)) {
+ throw new GLException("Error freeing OpenGL context");
+ }
+ } finally {
+ getFactory().unlockToolkit();
+ }
+ }
+
+ protected void create() {
+ long display = getNativeWindow().getDisplayHandle();
+ int screen = getNativeWindow().getScreenIndex();
+ // We already have the GLXFBConfig ID for the context. All we
+ // need to do is use it to choose the GLXFBConfig and then
+ // create a context with it.
+ int[] iattributes = new int[] {
+ GLX.GLX_FBCONFIG_ID,
+ fbConfigID,
+ 0,
+ 0
+ };
+ float[] fattributes = new float[0];
+ int[] nelementsTmp = new int[1];
+ LongBuffer fbConfigs = GLX.glXChooseFBConfig(display, screen, iattributes, 0, nelementsTmp, 0);
+ int nelements = nelementsTmp[0];
+ if (nelements <= 0) {
+ throw new GLException("context creation error: couldn't find a suitable frame buffer configuration");
+ }
+ if (nelements != 1) {
+ throw new GLException("context creation error: shouldn't get more than one GLXFBConfig");
+ }
+ // Note that we currently don't allow selection of anything but
+ // the first GLXFBConfig in the returned list (there should be only one)
+ long fbConfig = fbConfigs.get(0);
+ // Create a gl context for the drawable
+ X11GLXContext other = (X11GLXContext) GLContextShareSet.getShareContext(this);
+ long share = 0;
+ if (other != null) {
+ share = other.getContext();
+ if (share == 0) {
+ throw new GLException("GLContextShareSet returned an invalid OpenGL context");
+ }
+ }
+ // FIXME: how to determine "direct" bit?
+ context = GLX.glXCreateNewContext(display, fbConfig, renderType, share, true);
+ if (context == 0) {
+ String detail = " display=" + toHexString(display) +
+ " fbconfig=" + fbConfig +
+ " fbconfigID=" + toHexString(fbConfigID) +
+ " renderType=" + toHexString(renderType) +
+ " share=" + toHexString(share);
+ throw new GLException("context creation error: glXCreateNewContext() failed: " + detail);
+ }
+ GLContextShareSet.contextCreated(this);
+
+ if (DEBUG) {
+ System.err.println("Created context " + toHexString(context) +
+ " for GLXDrawable " + toHexString(drawable.getNativeWindow().getWindowHandle()));
+ }
+ }
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java
new file mode 100644
index 000000000..2821a3049
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java
@@ -0,0 +1,339 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.x11.glx;
+
+import java.nio.*;
+import java.util.*;
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+import com.sun.opengl.impl.x11.*;
+
+public abstract class X11GLXContext extends GLContextImpl {
+ protected X11GLXDrawable drawable;
+ protected long context;
+ private boolean glXQueryExtensionsStringInitialized;
+ private boolean glXQueryExtensionsStringAvailable;
+ private static final Map/*<String, String>*/ functionNameMap;
+ private GLXExt glXExt;
+ // Table that holds the addresses of the native C-language entry points for
+ // GLX extension functions.
+ private GLXExtProcAddressTable glXExtProcAddressTable;
+
+ static {
+ functionNameMap = new HashMap();
+ functionNameMap.put("glAllocateMemoryNV", "glXAllocateMemoryNV");
+ functionNameMap.put("glFreeMemoryNV", "glXFreeMemoryNV");
+ }
+
+ public X11GLXContext(X11GLXDrawable drawable,
+ GLContext shareWith) {
+ super(shareWith);
+ this.drawable = drawable;
+ }
+
+ public Object getPlatformGLExtensions() {
+ return getGLXExt();
+ }
+
+ public GLXExt getGLXExt() {
+ if (glXExt == null) {
+ glXExt = new GLXExtImpl(this);
+ }
+ return glXExt;
+ }
+
+ public GLDrawable getGLDrawable() {
+ return drawable;
+ }
+
+ protected String mapToRealGLFunctionName(String glFunctionName) {
+ String lookup = (String) functionNameMap.get(glFunctionName);
+ if (lookup != null) {
+ return lookup;
+ }
+ return glFunctionName;
+ }
+
+ protected String mapToRealGLExtensionName(String glExtensionName) {
+ return glExtensionName;
+ }
+
+ /** Helper routine which usually just turns around and calls
+ * createContext (except for pbuffers, which use a different context
+ * creation mechanism). Should only be called by {@link
+ * makeCurrentImpl()}.
+ */
+ protected abstract void create();
+
+ /**
+ * Creates and initializes an appropriate OpenGL context. Should only be
+ * called by {@link create()}.
+ */
+ protected void createContext(boolean onscreen) {
+ XVisualInfo vis = drawable.chooseVisual(onscreen);
+ X11GLXContext other = (X11GLXContext) GLContextShareSet.getShareContext(this);
+ long share = 0;
+ if (other != null) {
+ share = other.getContext();
+ if (share == 0) {
+ throw new GLException("GLContextShareSet returned an invalid OpenGL context");
+ }
+ }
+ context = GLX.glXCreateContext(drawable.getNativeWindow().getDisplayHandle(), vis, share, onscreen);
+ if (context == 0) {
+ throw new GLException("Unable to create OpenGL context");
+ }
+ GLContextShareSet.contextCreated(this);
+ }
+
+ protected int makeCurrentImpl() throws GLException {
+ if (drawable.getNativeWindow().getWindowHandle() == 0) {
+ if (DEBUG) {
+ System.err.println("drawable not properly initialized");
+ }
+ return CONTEXT_NOT_CURRENT;
+ }
+ boolean created = false;
+ if (context == 0) {
+ create();
+ if (DEBUG) {
+ System.err.println(getThreadName() + ": !!! Created GL context for " + getClass().getName());
+ }
+ created = true;
+ }
+
+ if (GLX.glXGetCurrentContext() != context) {
+ if (!GLX.glXMakeContextCurrent(drawable.getNativeWindow().getDisplayHandle(),
+ drawable.getNativeWindow().getWindowHandle(),
+ drawable.getNativeWindow().getWindowHandle(),
+ context)) {
+ throw new GLException("Error making context current");
+ } else {
+ if (DEBUG && (VERBOSE || created)) {
+ System.err.println(getThreadName() + ": glXMakeCurrent(display " +
+ toHexString(drawable.getNativeWindow().getDisplayHandle()) +
+ ", drawable " + toHexString(drawable.getNativeWindow().getWindowHandle()) +
+ ", context " + toHexString(context) + ") succeeded");
+ }
+ }
+ }
+
+ if (created) {
+ resetGLFunctionAvailability();
+ return CONTEXT_CURRENT_NEW;
+ }
+ return CONTEXT_CURRENT;
+ }
+
+ protected void releaseImpl() throws GLException {
+ getGLDrawable().getFactory().lockToolkit();
+ try {
+ if (!GLX.glXMakeContextCurrent(drawable.getNativeWindow().getDisplayHandle(), 0, 0, 0)) {
+ throw new GLException("Error freeing OpenGL context");
+ }
+ } finally {
+ getGLDrawable().getFactory().unlockToolkit();
+ }
+ }
+
+ protected void destroyImpl() throws GLException {
+ getGLDrawable().getFactory().lockToolkit();
+ try {
+ if (context != 0) {
+ if (DEBUG) {
+ System.err.println("glXDestroyContext(0x" +
+ Long.toHexString(drawable.getNativeWindow().getDisplayHandle()) +
+ ", 0x" +
+ Long.toHexString(context) + ")");
+ }
+ GLX.glXDestroyContext(drawable.getNativeWindow().getDisplayHandle(), context);
+ if (DEBUG) {
+ System.err.println("!!! Destroyed OpenGL context " + context);
+ }
+ context = 0;
+ GLContextShareSet.contextDestroyed(this);
+ }
+ } finally {
+ getGLDrawable().getFactory().unlockToolkit();
+ }
+ }
+
+ public boolean isCreated() {
+ return (context != 0);
+ }
+
+ public void copy(GLContext source, int mask) throws GLException {
+ long dst = getContext();
+ long src = ((X11GLXContext) source).getContext();
+ if (src == 0) {
+ throw new GLException("Source OpenGL context has not been created");
+ }
+ if (dst == 0) {
+ throw new GLException("Destination OpenGL context has not been created");
+ }
+ if (drawable.getNativeWindow().getDisplayHandle() == 0) {
+ throw new GLException("Connection to X display not yet set up");
+ }
+ getGLDrawable().getFactory().lockToolkit();
+ try {
+ GLX.glXCopyContext(drawable.getNativeWindow().getDisplayHandle(), src, dst, mask);
+ // Should check for X errors and raise GLException
+ } finally {
+ getGLDrawable().getFactory().unlockToolkit();
+ }
+ }
+
+ protected void resetGLFunctionAvailability() {
+ super.resetGLFunctionAvailability();
+ if (DEBUG) {
+ System.err.println(getThreadName() + ": !!! Initializing GLX extension address table");
+ }
+ if (glXExtProcAddressTable == null) {
+ // FIXME: cache ProcAddressTables by capability bits so we can
+ // share them among contexts with the same capabilities
+ glXExtProcAddressTable = new GLXExtProcAddressTable();
+ }
+ resetProcAddressTable(getGLXExtProcAddressTable());
+ }
+
+ public final GLXExtProcAddressTable getGLXExtProcAddressTable() {
+ return glXExtProcAddressTable;
+ }
+
+ public synchronized String getPlatformExtensionsString() {
+ if (!glXQueryExtensionsStringInitialized) {
+ glXQueryExtensionsStringAvailable =
+ ((GLDrawableFactoryImpl)getGLDrawable().getFactory()).dynamicLookupFunction("glXQueryExtensionsString") != 0;
+ glXQueryExtensionsStringInitialized = true;
+ }
+ if (glXQueryExtensionsStringAvailable) {
+ getGLDrawable().getFactory().lockToolkit();
+ try {
+ String ret = GLX.glXQueryExtensionsString(drawable.getNativeWindow().getDisplayHandle(),
+ drawable.getNativeWindow().getScreenIndex());
+ if (DEBUG) {
+ System.err.println("!!! GLX extensions: " + ret);
+ }
+ return ret;
+ } finally {
+ getGLDrawable().getFactory().unlockToolkit();
+ }
+ } else {
+ return "";
+ }
+ }
+
+ public boolean isFunctionAvailable(String glFunctionName)
+ {
+ boolean available = super.isFunctionAvailable(glFunctionName);
+
+ // Sanity check for implementations that use proc addresses for run-time
+ // linking: if the function IS available, then make sure there's a proc
+ // address for it if it's an extension or not part of the OpenGL 1.1 core
+ // (post GL 1.1 functions are run-time linked on windows).
+ assert(!available ||
+ (getGLProcAddressTable().getAddressFor(mapToRealGLFunctionName(glFunctionName)) != 0 ||
+ FunctionAvailabilityCache.isPartOfGLCore("1.1", mapToRealGLFunctionName(glFunctionName)))
+ );
+
+ return available;
+ }
+
+ public boolean isExtensionAvailable(String glExtensionName) {
+ if (glExtensionName.equals("GL_ARB_pbuffer") ||
+ glExtensionName.equals("GL_ARB_pixel_format")) {
+ return ((GLDrawableFactory)getGLDrawable().getFactory()).canCreateGLPbuffer();
+ }
+ return super.isExtensionAvailable(glExtensionName);
+ }
+
+
+ public void setSwapInterval(int interval) {
+ getGLDrawable().getFactory().lockToolkit();
+ try {
+ // FIXME: make the context current first? Currently assumes that
+ // will not be necessary. Make the caller do this?
+ GLXExt glXExt = getGLXExt();
+ if (glXExt.isExtensionAvailable("GLX_SGI_swap_control")) {
+ glXExt.glXSwapIntervalSGI(interval);
+ }
+ } finally {
+ getGLDrawable().getFactory().unlockToolkit();
+ }
+ }
+
+ public ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) {
+ return getGLXExt().glXAllocateMemoryNV(arg0, arg1, arg2, arg3);
+ }
+
+ public int getOffscreenContextPixelDataType() {
+ throw new GLException("Should not call this");
+ }
+
+ public int getOffscreenContextReadBuffer() {
+ throw new GLException("Should not call this");
+ }
+
+ public boolean offscreenImageNeedsVerticalFlip() {
+ throw new GLException("Should not call this");
+ }
+
+ public void bindPbufferToTexture() {
+ throw new GLException("Should not call this");
+ }
+
+ public void releasePbufferFromTexture() {
+ throw new GLException("Should not call this");
+ }
+
+ public boolean isOptimizable() {
+ return (super.isOptimizable() &&
+ !X11GLXDrawableFactory.getX11Factory().isVendorATI());
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ public long getContext() {
+ return context;
+ }
+
+}
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawable.java b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawable.java
new file mode 100644
index 000000000..b898f69e9
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawable.java
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.x11.glx;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+import com.sun.opengl.impl.x11.*;
+
+public abstract class X11GLXDrawable extends GLDrawableImpl {
+ protected static final boolean DEBUG = Debug.debug("X11GLXDrawable");
+
+ protected GLCapabilitiesChooser chooser;
+
+ protected X11GLXDrawable(GLDrawableFactory factory, NativeWindow comp, boolean realized,
+ GLCapabilities capabilities,
+ GLCapabilitiesChooser chooser) {
+ super(factory, comp, realized);
+ setChosenGLCapabilities(capabilities);
+ this.chooser = chooser;
+ }
+
+ //---------------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ protected XVisualInfo chooseVisual(boolean onscreen) {
+ long display = getNativeWindow().getDisplayHandle();
+ long visualID = getNativeWindow().getVisualID();
+ if (display == 0) {
+ throw new GLException("null display");
+ }
+
+ // FIXME
+ if (onscreen) {
+ // The visual has already been chosen by the time we get here;
+ // it's specified by the GraphicsConfiguration of the
+ // GLCanvas. Fortunately, the JAWT supplies the visual ID for
+ // the component in a portable fashion, so all we have to do is
+ // use XGetVisualInfo with a VisualIDMask to get the
+ // corresponding XVisualInfo to pass into glXChooseVisual.
+ int[] count = new int[1];
+ XVisualInfo template = XVisualInfo.create();
+ // FIXME: probably not 64-bit clean
+ template.visualid((int) visualID);
+ getFactory().lockToolkit();
+ XVisualInfo[] infos = X11Lib.XGetVisualInfo(display, X11Lib.VisualIDMask, template, count, 0);
+ getFactory().unlockToolkit();
+ if (infos == null || infos.length == 0) {
+ throw new GLException("Error while getting XVisualInfo for visual ID " + visualID);
+ }
+ if (DEBUG) {
+ System.err.println("!!! Fetched XVisualInfo for visual ID 0x" + Long.toHexString(visualID));
+ System.err.println("!!! Resulting XVisualInfo: visualid = 0x" + Long.toHexString(infos[0].visualid()));
+ }
+
+ // FIXME: the storage for the infos array is leaked (should
+ // clean it up somehow when we're done with the visual we're
+ // returning)
+ return infos[0];
+ } else {
+ // It isn't clear to me whether we need this much code to handle
+ // the offscreen case, where we're creating a pixmap into which
+ // to render...this is what we (incorrectly) used to do for the
+ // onscreen case
+
+ int screen = 0; // FIXME: provide way to specify this?
+ XVisualInfo vis = null;
+ int[] count = new int[1];
+ XVisualInfo template = XVisualInfo.create();
+ template.screen(screen);
+ XVisualInfo[] infos = null;
+ GLCapabilities[] caps = null;
+ getFactory().lockToolkit();
+ try {
+ infos = X11Lib.XGetVisualInfo(display, X11Lib.VisualScreenMask, template, count, 0);
+ if (infos == null) {
+ throw new GLException("Error while enumerating available XVisualInfos");
+ }
+ caps = new GLCapabilities[infos.length];
+ for (int i = 0; i < infos.length; i++) {
+ caps[i] = ((X11GLXDrawableFactory)getFactory()).xvi2GLCapabilities(display, infos[i]);
+ }
+ } finally {
+ getFactory().unlockToolkit();
+ }
+ GLCapabilities capabilities = getCapabilities();
+ int chosen = chooser.chooseCapabilities(capabilities, caps, -1);
+ if (chosen < 0 || chosen >= caps.length) {
+ throw new GLException("GLCapabilitiesChooser specified invalid index (expected 0.." + (caps.length - 1) + ")");
+ }
+ if (DEBUG) {
+ System.err.println("Chosen visual (" + chosen + "):");
+ System.err.println(caps[chosen]);
+ }
+ vis = infos[chosen];
+ if (vis == null) {
+ throw new GLException("GLCapabilitiesChooser chose an invalid visual");
+ }
+ // FIXME: the storage for the infos array is leaked (should
+ // clean it up somehow when we're done with the visual we're
+ // returning)
+
+ return vis;
+ }
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java
new file mode 100644
index 000000000..ed48f9186
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java
@@ -0,0 +1,636 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ */
+
+package com.sun.opengl.impl.x11.glx;
+
+import java.nio.*;
+import java.security.*;
+import java.util.*;
+import javax.media.opengl.*;
+import com.sun.gluegen.runtime.*;
+import com.sun.opengl.impl.*;
+import com.sun.opengl.impl.x11.*;
+
+public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
+ protected static final boolean DEBUG = Debug.debug("X11GLXDrawableFactory");
+
+ // ATI's proprietary drivers apparently send GLX tokens even for
+ // direct contexts, so we need to disable the context optimizations
+ // in this case
+ private static boolean isVendorATI;
+
+ // Map for rediscovering the GLCapabilities associated with a
+ // particular screen and visualID after the fact
+ protected static Map visualToGLCapsMap = Collections.synchronizedMap(new HashMap());
+
+ public static class ScreenAndVisualIDKey {
+ private int screen;
+ private long visualID;
+
+ public ScreenAndVisualIDKey(int screen,
+ long visualID) {
+ this.screen = screen;
+ this.visualID = visualID;
+ }
+
+ public int hashCode() {
+ return (int) (screen + 13 * visualID);
+ }
+
+ public boolean equals(Object obj) {
+ if ((obj == null) || (!(obj instanceof ScreenAndVisualIDKey))) {
+ return false;
+ }
+
+ ScreenAndVisualIDKey key = (ScreenAndVisualIDKey) obj;
+ return (screen == key.screen &&
+ visualID == key.visualID);
+ }
+
+ int screen() { return screen; }
+ long visualID() { return visualID; }
+ }
+
+ static {
+ // See DRIHack.java for an explanation of why this is necessary
+ DRIHack.begin();
+
+ com.sun.opengl.impl.NativeLibLoader.loadCore();
+
+ DRIHack.end();
+ }
+
+ public X11GLXDrawableFactory() {
+ super();
+ // Must initialize GLX support eagerly in case a pbuffer is the
+ // first thing instantiated
+ ProcAddressHelper.resetProcAddressTable(GLX.getGLXProcAddressTable(), this);
+ }
+
+ private static final int MAX_ATTRIBS = 128;
+
+ public AbstractGraphicsConfiguration chooseGraphicsConfiguration(GLCapabilities capabilities,
+ GLCapabilitiesChooser chooser,
+ AbstractGraphicsDevice absDevice) {
+ return null;
+ }
+
+ public GLDrawable createGLDrawable(NativeWindow target,
+ GLCapabilities capabilities,
+ GLCapabilitiesChooser chooser) {
+ if (target == null) {
+ throw new IllegalArgumentException("Null target");
+ }
+ X11OnscreenGLXDrawable drawable = new X11OnscreenGLXDrawable(this, target);
+ long visualID = target.getVisualID();
+ int screen = target.getScreenIndex();
+ drawable.setChosenGLCapabilities((GLCapabilities) visualToGLCapsMap.get(new ScreenAndVisualIDKey(screen, visualID)));
+ return drawable;
+ }
+
+ public GLDrawableImpl createOffscreenDrawable(GLCapabilities capabilities,
+ GLCapabilitiesChooser chooser) {
+ return new X11OffscreenGLXDrawable(this, capabilities, chooser);
+ }
+
+ private boolean pbufferSupportInitialized = false;
+ private boolean canCreateGLPbuffer = false;
+ public boolean canCreateGLPbuffer() {
+ if (!pbufferSupportInitialized) {
+ Runnable r = new Runnable() {
+ public void run() {
+ long display = getDisplayConnection();
+ lockToolkit();
+ try {
+ int[] major = new int[1];
+ int[] minor = new int[1];
+ int screen = 0; // FIXME: provide way to specify this?
+
+ if (!GLX.glXQueryVersion(display, major, 0, minor, 0)) {
+ throw new GLException("glXQueryVersion failed");
+ }
+ if (DEBUG) {
+ System.err.println("!!! GLX version: major " + major[0] +
+ ", minor " + minor[0]);
+ }
+
+ // Work around bugs in ATI's Linux drivers where they report they
+ // only implement GLX version 1.2 on the server side
+ if (major[0] == 1 && minor[0] == 2) {
+ String str = GLX.glXGetClientString(display, GLX.GLX_VERSION);
+ if (str != null && str.startsWith("1.") &&
+ (str.charAt(2) >= '3')) {
+ canCreateGLPbuffer = true;
+ }
+ } else {
+ canCreateGLPbuffer = ((major[0] > 1) || (minor[0] > 2));
+ }
+
+ pbufferSupportInitialized = true;
+ } finally {
+ unlockToolkit();
+ }
+ }
+ };
+ maybeDoSingleThreadedWorkaround(r);
+ }
+ return canCreateGLPbuffer;
+ }
+
+ public GLPbuffer createGLPbuffer(final GLCapabilities capabilities,
+ final GLCapabilitiesChooser chooser,
+ final int initialWidth,
+ final int initialHeight,
+ final GLContext shareWith) {
+ if (!canCreateGLPbuffer()) {
+ throw new GLException("Pbuffer support not available with current graphics card");
+ }
+ final List returnList = new ArrayList();
+ final GLDrawableFactory factory = this;
+ Runnable r = new Runnable() {
+ public void run() {
+ X11PbufferGLXDrawable pbufferDrawable = new X11PbufferGLXDrawable(factory, capabilities,
+ initialWidth,
+ initialHeight);
+ GLPbufferImpl pbuffer = new GLPbufferImpl(pbufferDrawable, shareWith);
+ returnList.add(pbuffer);
+ }
+ };
+ maybeDoSingleThreadedWorkaround(r);
+ return (GLPbuffer) returnList.get(0);
+ }
+
+ public GLContext createExternalGLContext() {
+ return new X11ExternalGLXContext();
+ }
+
+ public boolean canCreateExternalGLDrawable() {
+ return canCreateGLPbuffer();
+ }
+
+ public GLDrawable createExternalGLDrawable() {
+ return X11ExternalGLXDrawable.create(this);
+ }
+
+ public void loadGLULibrary() {
+ X11Lib.dlopen("/usr/lib/libGLU.so");
+ }
+
+ public long dynamicLookupFunction(String glFuncName) {
+ long res = 0;
+ res = GLX.glXGetProcAddressARB(glFuncName);
+ if (res == 0) {
+ // GLU routines aren't known to the OpenGL function lookup
+ res = X11Lib.dlsym(glFuncName);
+ }
+ return res;
+ }
+
+ public GLCapabilities xvi2GLCapabilities(long display, XVisualInfo info) {
+ int[] tmp = new int[1];
+ int val = glXGetConfig(display, info, GLX.GLX_USE_GL, tmp, 0);
+ if (val == 0) {
+ // Visual does not support OpenGL
+ return null;
+ }
+ val = glXGetConfig(display, info, GLX.GLX_RGBA, tmp, 0);
+ if (val == 0) {
+ // Visual does not support RGBA
+ return null;
+ }
+ GLCapabilities res = new GLCapabilities();
+ res.setDoubleBuffered(glXGetConfig(display, info, GLX.GLX_DOUBLEBUFFER, tmp, 0) != 0);
+ res.setStereo (glXGetConfig(display, info, GLX.GLX_STEREO, tmp, 0) != 0);
+ // Note: use of hardware acceleration is determined by
+ // glXCreateContext, not by the XVisualInfo. Optimistically claim
+ // that all GLCapabilities have the capability to be hardware
+ // accelerated.
+ res.setHardwareAccelerated(true);
+ res.setDepthBits (glXGetConfig(display, info, GLX.GLX_DEPTH_SIZE, tmp, 0));
+ res.setStencilBits (glXGetConfig(display, info, GLX.GLX_STENCIL_SIZE, tmp, 0));
+ res.setRedBits (glXGetConfig(display, info, GLX.GLX_RED_SIZE, tmp, 0));
+ res.setGreenBits (glXGetConfig(display, info, GLX.GLX_GREEN_SIZE, tmp, 0));
+ res.setBlueBits (glXGetConfig(display, info, GLX.GLX_BLUE_SIZE, tmp, 0));
+ res.setAlphaBits (glXGetConfig(display, info, GLX.GLX_ALPHA_SIZE, tmp, 0));
+ res.setAccumRedBits (glXGetConfig(display, info, GLX.GLX_ACCUM_RED_SIZE, tmp, 0));
+ res.setAccumGreenBits(glXGetConfig(display, info, GLX.GLX_ACCUM_GREEN_SIZE, tmp, 0));
+ res.setAccumBlueBits (glXGetConfig(display, info, GLX.GLX_ACCUM_BLUE_SIZE, tmp, 0));
+ res.setAccumAlphaBits(glXGetConfig(display, info, GLX.GLX_ACCUM_ALPHA_SIZE, tmp, 0));
+ if (isMultisampleAvailable()) {
+ res.setSampleBuffers(glXGetConfig(display, info, GLX.GLX_SAMPLE_BUFFERS_ARB, tmp, 0) != 0);
+ res.setNumSamples (glXGetConfig(display, info, GLX.GLX_SAMPLES_ARB, tmp, 0));
+ }
+ return res;
+ }
+
+ public static int[] glCapabilities2AttribList(GLCapabilities caps,
+ boolean isMultisampleAvailable,
+ boolean pbuffer,
+ long display,
+ int screen) {
+ int colorDepth = (caps.getRedBits() +
+ caps.getGreenBits() +
+ caps.getBlueBits());
+ if (colorDepth < 15) {
+ throw new GLException("Bit depths < 15 (i.e., non-true-color) not supported");
+ }
+ int[] res = new int[MAX_ATTRIBS];
+ int idx = 0;
+ if (pbuffer) {
+ res[idx++] = GLXExt.GLX_DRAWABLE_TYPE;
+ res[idx++] = GLXExt.GLX_PBUFFER_BIT;
+
+ res[idx++] = GLXExt.GLX_RENDER_TYPE;
+ res[idx++] = GLXExt.GLX_RGBA_BIT;
+ } else {
+ res[idx++] = GLX.GLX_RGBA;
+ }
+ if (caps.getDoubleBuffered()) {
+ res[idx++] = GLX.GLX_DOUBLEBUFFER;
+ if (pbuffer) {
+ res[idx++] = GL.GL_TRUE;
+ }
+ } else {
+ if (pbuffer) {
+ res[idx++] = GLX.GLX_DOUBLEBUFFER;
+ res[idx++] = GL.GL_FALSE;
+ }
+ }
+ if (caps.getStereo()) {
+ res[idx++] = GLX.GLX_STEREO;
+ if (pbuffer) {
+ res[idx++] = GL.GL_TRUE;
+ }
+ }
+ // NOTE: don't set (GLX_STEREO, GL_FALSE) in "else" branch for
+ // pbuffer case to work around Mesa bug
+
+ res[idx++] = GLX.GLX_RED_SIZE;
+ res[idx++] = caps.getRedBits();
+ res[idx++] = GLX.GLX_GREEN_SIZE;
+ res[idx++] = caps.getGreenBits();
+ res[idx++] = GLX.GLX_BLUE_SIZE;
+ res[idx++] = caps.getBlueBits();
+ res[idx++] = GLX.GLX_ALPHA_SIZE;
+ res[idx++] = caps.getAlphaBits();
+ res[idx++] = GLX.GLX_DEPTH_SIZE;
+ res[idx++] = caps.getDepthBits();
+ if (caps.getStencilBits() > 0) {
+ res[idx++] = GLX.GLX_STENCIL_SIZE;
+ res[idx++] = caps.getStencilBits();
+ }
+ if (caps.getAccumRedBits() > 0 ||
+ caps.getAccumGreenBits() > 0 ||
+ caps.getAccumBlueBits() > 0 ||
+ caps.getAccumAlphaBits() > 0) {
+ res[idx++] = GLX.GLX_ACCUM_RED_SIZE;
+ res[idx++] = caps.getAccumRedBits();
+ res[idx++] = GLX.GLX_ACCUM_GREEN_SIZE;
+ res[idx++] = caps.getAccumGreenBits();
+ res[idx++] = GLX.GLX_ACCUM_BLUE_SIZE;
+ res[idx++] = caps.getAccumBlueBits();
+ res[idx++] = GLX.GLX_ACCUM_ALPHA_SIZE;
+ res[idx++] = caps.getAccumAlphaBits();
+ }
+ if (isMultisampleAvailable && caps.getSampleBuffers()) {
+ res[idx++] = GLXExt.GLX_SAMPLE_BUFFERS_ARB;
+ res[idx++] = GL.GL_TRUE;
+ res[idx++] = GLXExt.GLX_SAMPLES_ARB;
+ res[idx++] = caps.getNumSamples();
+ }
+ if (pbuffer) {
+ if (caps.getPbufferFloatingPointBuffers()) {
+ String glXExtensions = GLX.glXQueryExtensionsString(display, screen);
+ if (glXExtensions == null ||
+ glXExtensions.indexOf("GLX_NV_float_buffer") < 0) {
+ throw new GLException("Floating-point pbuffers on X11 currently require NVidia hardware");
+ }
+ res[idx++] = GLX.GLX_FLOAT_COMPONENTS_NV;
+ res[idx++] = GL.GL_TRUE;
+ }
+ }
+ res[idx++] = 0;
+ return res;
+ }
+
+ public static GLCapabilities attribList2GLCapabilities(int[] iattribs,
+ int niattribs,
+ int[] ivalues,
+ boolean pbuffer) {
+ GLCapabilities caps = new GLCapabilities();
+
+ for (int i = 0; i < niattribs; i++) {
+ int attr = iattribs[i];
+ switch (attr) {
+ case GLX.GLX_DOUBLEBUFFER:
+ caps.setDoubleBuffered(ivalues[i] != GL.GL_FALSE);
+ break;
+
+ case GLX.GLX_STEREO:
+ caps.setStereo(ivalues[i] != GL.GL_FALSE);
+ break;
+
+ case GLX.GLX_RED_SIZE:
+ caps.setRedBits(ivalues[i]);
+ break;
+
+ case GLX.GLX_GREEN_SIZE:
+ caps.setGreenBits(ivalues[i]);
+ break;
+
+ case GLX.GLX_BLUE_SIZE:
+ caps.setBlueBits(ivalues[i]);
+ break;
+
+ case GLX.GLX_ALPHA_SIZE:
+ caps.setAlphaBits(ivalues[i]);
+ break;
+
+ case GLX.GLX_DEPTH_SIZE:
+ caps.setDepthBits(ivalues[i]);
+ break;
+
+ case GLX.GLX_STENCIL_SIZE:
+ caps.setStencilBits(ivalues[i]);
+ break;
+
+ case GLX.GLX_ACCUM_RED_SIZE:
+ caps.setAccumRedBits(ivalues[i]);
+ break;
+
+ case GLX.GLX_ACCUM_GREEN_SIZE:
+ caps.setAccumGreenBits(ivalues[i]);
+ break;
+
+ case GLX.GLX_ACCUM_BLUE_SIZE:
+ caps.setAccumBlueBits(ivalues[i]);
+ break;
+
+ case GLX.GLX_ACCUM_ALPHA_SIZE:
+ caps.setAccumAlphaBits(ivalues[i]);
+ break;
+
+ case GLXExt.GLX_SAMPLE_BUFFERS_ARB:
+ caps.setSampleBuffers(ivalues[i] != GL.GL_FALSE);
+ break;
+
+ case GLXExt.GLX_SAMPLES_ARB:
+ caps.setNumSamples(ivalues[i]);
+ break;
+
+ case GLX.GLX_FLOAT_COMPONENTS_NV:
+ caps.setPbufferFloatingPointBuffers(ivalues[i] != GL.GL_FALSE);
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ return caps;
+ }
+
+ public void lockToolkit() {
+ }
+
+ public void unlockToolkit() {
+ }
+
+ // Display connection for use by visual selection algorithm and by all offscreen surfaces
+ private static long staticDisplay=0;
+ private static boolean xineramaEnabled=false;
+ private static boolean multisampleAvailable=false;
+ public static long getDisplayConnection() {
+ if (staticDisplay == 0) {
+ // FIXME: lockToolkit();
+ try {
+ staticDisplay = X11Lib.XOpenDisplay(null);
+ if (DEBUG && (staticDisplay != 0)) {
+ long display = staticDisplay;
+ int screen = X11Lib.DefaultScreen(display);
+ System.err.println("!!! GLX server vendor : " +
+ GLX.glXQueryServerString(display, screen, GLX.GLX_VENDOR));
+ System.err.println("!!! GLX server version: " +
+ GLX.glXQueryServerString(display, screen, GLX.GLX_VERSION));
+ System.err.println("!!! GLX client vendor : " +
+ GLX.glXGetClientString(display, GLX.GLX_VENDOR));
+ System.err.println("!!! GLX client version: " +
+ GLX.glXGetClientString(display, GLX.GLX_VERSION));
+ }
+
+ if (staticDisplay != 0) {
+ String vendor = GLX.glXGetClientString(staticDisplay, GLX.GLX_VENDOR);
+ if (vendor != null && vendor.startsWith("ATI")) {
+ isVendorATI = true;
+ }
+ xineramaEnabled = X11Lib.XineramaEnabled(staticDisplay);
+ String exts = GLX.glXGetClientString(staticDisplay, GLX.GLX_EXTENSIONS);
+ if (exts != null) {
+ multisampleAvailable = (exts.indexOf("GLX_ARB_multisample") >= 0);
+ }
+ }
+ } finally {
+ // FIXME: unlockToolkit();
+ }
+ if (staticDisplay == 0) {
+ throw new GLException("Unable to open default display, needed for visual selection and offscreen surface handling");
+ }
+ }
+ return staticDisplay;
+ }
+
+ public boolean isXineramaEnabled() {
+ if (staticDisplay == 0) {
+ getDisplayConnection(); // will set xineramaEnabled
+ }
+ return xineramaEnabled;
+ }
+
+ public boolean isMultisampleAvailable() {
+ if (staticDisplay == 0) {
+ getDisplayConnection(); // will set multisampleAvailable
+ }
+ return multisampleAvailable;
+ }
+
+ private static String glXGetConfigErrorCode(int err) {
+ switch (err) {
+ case GLX.GLX_NO_EXTENSION: return "GLX_NO_EXTENSION";
+ case GLX.GLX_BAD_SCREEN: return "GLX_BAD_SCREEN";
+ case GLX.GLX_BAD_ATTRIBUTE: return "GLX_BAD_ATTRIBUTE";
+ case GLX.GLX_BAD_VISUAL: return "GLX_BAD_VISUAL";
+ default: return "Unknown error code " + err;
+ }
+ }
+
+ public static int glXGetConfig(long display, XVisualInfo info, int attrib, int[] tmp, int tmp_offset) {
+ if (display == 0) {
+ throw new GLException("No display connection");
+ }
+ int res = GLX.glXGetConfig(display, info, attrib, tmp, tmp_offset);
+ if (res != 0) {
+ throw new GLException("glXGetConfig failed: error code " + glXGetConfigErrorCode(res));
+ }
+ return tmp[tmp_offset];
+ }
+
+ public static X11GLXDrawableFactory getX11Factory() {
+ return (X11GLXDrawableFactory) getFactory(false);
+ }
+
+ /** Workaround for apparent issue with ATI's proprietary drivers
+ where direct contexts still send GLX tokens for GL calls */
+ public static boolean isVendorATI() {
+ return isVendorATI;
+ }
+
+ private void maybeDoSingleThreadedWorkaround(Runnable action) {
+ if (Threading.isSingleThreaded() &&
+ !Threading.isOpenGLThread()) {
+ Threading.invokeOnOpenGLThread(action);
+ } else {
+ action.run();
+ }
+ }
+
+ public boolean canCreateContextOnJava2DSurface() {
+ return false;
+ }
+
+ public GLContext createContextOnJava2DSurface(Object graphics, GLContext shareWith)
+ throws GLException {
+ throw new GLException("Unimplemented on this platform");
+ }
+
+ //----------------------------------------------------------------------
+ // Gamma-related functionality
+ //
+
+ private boolean gotGammaRampLength;
+ private int gammaRampLength;
+ protected synchronized int getGammaRampLength() {
+ if (gotGammaRampLength) {
+ return gammaRampLength;
+ }
+
+ int[] size = new int[1];
+ lockToolkit();
+ long display = getDisplayConnection();
+ boolean res = X11Lib.XF86VidModeGetGammaRampSize(display,
+ X11Lib.DefaultScreen(display),
+ size, 0);
+ unlockToolkit();
+ if (!res)
+ return 0;
+ gotGammaRampLength = true;
+ gammaRampLength = size[0];
+ return gammaRampLength;
+ }
+
+ protected boolean setGammaRamp(float[] ramp) {
+ int len = ramp.length;
+ short[] rampData = new short[len];
+ for (int i = 0; i < len; i++) {
+ rampData[i] = (short) (ramp[i] * 65535);
+ }
+
+ lockToolkit();
+ long display = getDisplayConnection();
+ boolean res = X11Lib.XF86VidModeSetGammaRamp(display,
+ X11Lib.DefaultScreen(display),
+ rampData.length,
+ rampData, 0,
+ rampData, 0,
+ rampData, 0);
+ unlockToolkit();
+ return res;
+ }
+
+ protected Buffer getGammaRamp() {
+ int size = getGammaRampLength();
+ ShortBuffer rampData = ShortBuffer.allocate(3 * size);
+ rampData.position(0);
+ rampData.limit(size);
+ ShortBuffer redRampData = rampData.slice();
+ rampData.position(size);
+ rampData.limit(2 * size);
+ ShortBuffer greenRampData = rampData.slice();
+ rampData.position(2 * size);
+ rampData.limit(3 * size);
+ ShortBuffer blueRampData = rampData.slice();
+ lockToolkit();
+ long display = getDisplayConnection();
+ boolean res = X11Lib.XF86VidModeGetGammaRamp(display,
+ X11Lib.DefaultScreen(display),
+ size,
+ redRampData,
+ greenRampData,
+ blueRampData);
+ unlockToolkit();
+ if (!res)
+ return null;
+ return rampData;
+ }
+
+ protected void resetGammaRamp(Buffer originalGammaRamp) {
+ if (originalGammaRamp == null)
+ return; // getGammaRamp failed originally
+ ShortBuffer rampData = (ShortBuffer) originalGammaRamp;
+ int capacity = rampData.capacity();
+ if ((capacity % 3) != 0) {
+ throw new IllegalArgumentException("Must not be the original gamma ramp");
+ }
+ int size = capacity / 3;
+ rampData.position(0);
+ rampData.limit(size);
+ ShortBuffer redRampData = rampData.slice();
+ rampData.position(size);
+ rampData.limit(2 * size);
+ ShortBuffer greenRampData = rampData.slice();
+ rampData.position(2 * size);
+ rampData.limit(3 * size);
+ ShortBuffer blueRampData = rampData.slice();
+ lockToolkit();
+ long display = getDisplayConnection();
+ X11Lib.XF86VidModeSetGammaRamp(display,
+ X11Lib.DefaultScreen(display),
+ size,
+ redRampData,
+ greenRampData,
+ blueRampData);
+ unlockToolkit();
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXContext.java b/src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXContext.java
new file mode 100644
index 000000000..63232374c
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXContext.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.x11.glx;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+import com.sun.opengl.impl.x11.*;
+
+public class X11OffscreenGLXContext extends X11GLXContext {
+ private X11OffscreenGLXDrawable drawable;
+
+ public X11OffscreenGLXContext(X11OffscreenGLXDrawable drawable,
+ GLContext shareWith) {
+ super(drawable, shareWith);
+ this.drawable = drawable;
+ }
+
+ public int getOffscreenContextPixelDataType() {
+ GL gl = getGL();
+ return gl.isGL2()?GL2.GL_UNSIGNED_INT_8_8_8_8_REV:GL.GL_UNSIGNED_SHORT_5_5_5_1;
+ }
+
+ public int getOffscreenContextReadBuffer() {
+ if (drawable.isDoubleBuffered()) {
+ return GL.GL_BACK;
+ }
+ return GL.GL_FRONT;
+ }
+
+ public boolean offscreenImageNeedsVerticalFlip() {
+ // There doesn't seem to be a way to do this in the construction
+ // of the Pixmap or GLXPixmap
+ return true;
+ }
+
+ protected int makeCurrentImpl() throws GLException {
+ getGLDrawable().getFactory().lockToolkit();
+ try {
+ return super.makeCurrentImpl();
+ } finally {
+ getGLDrawable().getFactory().unlockToolkit();
+ }
+ }
+
+ protected void create() {
+ createContext(false);
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java b/src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java
new file mode 100644
index 000000000..9d5e7ac16
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java
@@ -0,0 +1,144 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.x11.glx;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+import com.sun.opengl.impl.x11.*;
+
+public class X11OffscreenGLXDrawable extends X11GLXDrawable {
+ private long pixmap;
+ private boolean isDoubleBuffered;
+
+ protected X11OffscreenGLXDrawable(GLDrawableFactory factory,
+ GLCapabilities capabilities,
+ GLCapabilitiesChooser chooser) {
+ super(factory, new NullWindow(), true, capabilities, chooser);
+ }
+
+ public GLContext createContext(GLContext shareWith) {
+ return new X11OffscreenGLXContext(this, shareWith);
+ }
+
+ public void setSize(int newWidth, int newHeight) {
+ super.setSize(newWidth, newHeight);
+ destroy();
+ create();
+ }
+
+ private void create() {
+ NullWindow nw = (NullWindow) getNativeWindow();
+ long dpy = X11GLXDrawableFactory.getDisplayConnection();
+ nw.setDisplayHandle(dpy);
+ XVisualInfo vis = chooseVisual(false);
+ int bitsPerPixel = vis.depth();
+
+ getFactory().lockToolkit();
+ try {
+ int screen = X11Lib.DefaultScreen(dpy);
+ nw.setScreenIndex(screen);
+ pixmap = X11Lib.XCreatePixmap(dpy, (int) X11Lib.RootWindow(dpy, screen),
+ component.getWidth(), component.getHeight(), bitsPerPixel);
+ if (pixmap == 0) {
+ throw new GLException("XCreatePixmap failed");
+ }
+ long drawable = GLX.glXCreateGLXPixmap(dpy, vis, pixmap);
+ if (drawable == 0) {
+ X11Lib.XFreePixmap(dpy, pixmap);
+ pixmap = 0;
+ throw new GLException("glXCreateGLXPixmap failed");
+ }
+ nw.setWindowHandle(drawable);
+ isDoubleBuffered = (X11GLXDrawableFactory.glXGetConfig(dpy, vis, GLX.GLX_DOUBLEBUFFER, new int[1], 0) != 0);
+ if (DEBUG) {
+ System.err.println("Created pixmap " + toHexString(pixmap) +
+ ", GLXPixmap " + toHexString(drawable) +
+ ", display " + toHexString(dpy));
+ }
+ setChosenGLCapabilities(((X11GLXDrawableFactory)getFactory()).xvi2GLCapabilities(dpy, vis));
+ } finally {
+ getFactory().unlockToolkit();
+ }
+ }
+
+ public void destroy() {
+ if (pixmap == 0) return;
+ try {
+ NativeWindow nw = getNativeWindow();
+ long display = nw.getDisplayHandle();
+ long drawable = nw.getWindowHandle();
+ if (DEBUG) {
+ System.err.println("Destroying pixmap " + toHexString(pixmap) +
+ ", GLXPixmap " + toHexString(drawable) +
+ ", display " + toHexString(display));
+ }
+
+ // Must destroy pixmap and GLXPixmap
+ getFactory().lockToolkit();
+
+ if (DEBUG) {
+ long cur = GLX.glXGetCurrentContext();
+ if (cur != 0) {
+ System.err.println("WARNING: found context " + toHexString(cur) + " current during pixmap destruction");
+ }
+ }
+
+ // FIXME: workaround for crashes on NVidia hardware when
+ // destroying pixmap (no context is current at the point of the
+ // crash, at least from the point of view of
+ // glXGetCurrentContext)
+ GLX.glXMakeCurrent(display, 0, 0);
+
+ GLX.glXDestroyGLXPixmap(display, drawable);
+ X11Lib.XFreePixmap(display, pixmap);
+ drawable = 0;
+ pixmap = 0;
+ display = 0;
+ nw.invalidate();
+ setChosenGLCapabilities(null);
+ } finally {
+ getFactory().unlockToolkit();
+ }
+ }
+
+ public boolean isDoubleBuffered() {
+ return isDoubleBuffered;
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11OnscreenGLXContext.java b/src/classes/com/sun/opengl/impl/x11/glx/X11OnscreenGLXContext.java
new file mode 100644
index 000000000..7152a6238
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11OnscreenGLXContext.java
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.x11.glx;
+
+import java.util.*;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+import com.sun.opengl.impl.x11.*;
+
+public class X11OnscreenGLXContext extends X11GLXContext {
+ protected X11OnscreenGLXDrawable drawable;
+ // This indicates whether the context we have created is indirect
+ // and therefore requires the toolkit to be locked around all GL
+ // calls rather than just all GLX calls
+ protected boolean isIndirect;
+
+ public X11OnscreenGLXContext(X11OnscreenGLXDrawable drawable,
+ GLContext shareWith) {
+ super(drawable, shareWith);
+ this.drawable = drawable;
+ }
+
+ protected int makeCurrentImpl() throws GLException {
+ int lockRes = drawable.lockSurface();
+ boolean exceptionOccurred = false;
+ try {
+ if (lockRes == NativeWindow.LOCK_SURFACE_NOT_READY) {
+ return CONTEXT_NOT_CURRENT;
+ }
+ if (lockRes == NativeWindow.LOCK_SURFACE_CHANGED) {
+ destroyImpl();
+ }
+ return super.makeCurrentImpl();
+ } catch (RuntimeException e) {
+ exceptionOccurred = true;
+ throw e;
+ } finally {
+ if (exceptionOccurred ||
+ (isOptimizable() && lockRes != NativeWindow.LOCK_SURFACE_NOT_READY)) {
+ drawable.unlockSurface();
+ }
+ }
+ }
+
+ protected void releaseImpl() throws GLException {
+ try {
+ super.releaseImpl();
+ } finally {
+ if (!isOptimizable()) {
+ drawable.unlockSurface();
+ }
+ }
+ }
+
+ public boolean isOptimizable() {
+ return super.isOptimizable() && !isIndirect;
+ }
+
+ protected void create() {
+ createContext(true);
+ isIndirect = !GLX.glXIsDirect(drawable.getNativeWindow().getDisplayHandle(), context);
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java b/src/classes/com/sun/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java
new file mode 100644
index 000000000..b9a886ec6
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.x11.glx;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+import com.sun.opengl.impl.x11.*;
+
+public class X11OnscreenGLXDrawable extends X11GLXDrawable {
+ protected NativeWindow component;
+
+ protected X11OnscreenGLXDrawable(GLDrawableFactory factory, NativeWindow component) {
+ super(factory, component, false, null, null);
+ }
+
+ public GLContext createContext(GLContext shareWith) {
+ return new X11OnscreenGLXContext(this, shareWith);
+ }
+
+ public void setSize(int width, int height) {
+ component.setSize(width, height);
+ }
+
+ public int getWidth() {
+ return component.getWidth();
+ }
+
+ public int getHeight() {
+ return component.getHeight();
+ }
+
+ public void swapBuffers() throws GLException {
+ getFactory().lockToolkit();
+ try {
+ boolean didLock = false;
+
+ if (component.getWindowHandle() == 0) {
+ if (lockSurface() == NativeWindow.LOCK_SURFACE_NOT_READY) {
+ return;
+ }
+
+ didLock = true;
+ }
+
+ GLX.glXSwapBuffers(component.getDisplayHandle(), component.getWindowHandle());
+
+ if (didLock) {
+ unlockSurface();
+ }
+ } finally {
+ getFactory().unlockToolkit();
+ }
+ }
+
+}
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXContext.java b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXContext.java
new file mode 100644
index 000000000..746b7bd26
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXContext.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.x11.glx;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+import com.sun.opengl.impl.x11.*;
+
+public class X11PbufferGLXContext extends X11GLXContext {
+ private X11PbufferGLXDrawable drawable;
+
+ public X11PbufferGLXContext(X11PbufferGLXDrawable drawable,
+ GLContext shareWith) {
+ super(drawable, shareWith);
+ this.drawable = drawable;
+ }
+
+ public void bindPbufferToTexture() {
+ // FIXME: figure out how to implement this
+ throw new GLException("Not yet implemented");
+ }
+
+ public void releasePbufferFromTexture() {
+ // FIXME: figure out how to implement this
+ throw new GLException("Not yet implemented");
+ }
+
+
+ public int getFloatingPointMode() {
+ return drawable.getFloatingPointMode();
+ }
+
+ protected void create() {
+ if (DEBUG) {
+ System.err.println("Creating context for pbuffer " + drawable.getWidth() +
+ " x " + drawable.getHeight());
+ }
+
+ // Create a gl context for the p-buffer.
+ X11GLXContext other = (X11GLXContext) GLContextShareSet.getShareContext(this);
+ long share = 0;
+ if (other != null) {
+ share = other.getContext();
+ if (share == 0) {
+ throw new GLException("GLContextShareSet returned an invalid OpenGL context");
+ }
+ }
+ context = GLX.glXCreateNewContext(drawable.getNativeWindow().getDisplayHandle(),
+ drawable.getFBConfig(), GLXExt.GLX_RGBA_TYPE, share, true);
+ if (context == 0) {
+ throw new GLException("pbuffer creation error: glXCreateNewContext() failed");
+ }
+ GLContextShareSet.contextCreated(this);
+
+ if (DEBUG) {
+ System.err.println("Created context for pbuffer " + drawable.getWidth() +
+ " x " + drawable.getHeight());
+ }
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java
new file mode 100644
index 000000000..0d09f6600
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java
@@ -0,0 +1,240 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.impl.x11.glx;
+
+import javax.media.opengl.*;
+import com.sun.opengl.impl.*;
+import com.sun.opengl.impl.x11.*;
+
+import java.nio.LongBuffer;
+
+public class X11PbufferGLXDrawable extends X11GLXDrawable {
+ // drawable in superclass is a GLXPbuffer
+ private long fbConfig;
+
+ protected static final int MAX_PFORMATS = 256;
+ protected static final int MAX_ATTRIBS = 256;
+
+ protected X11PbufferGLXDrawable(GLDrawableFactory factory, GLCapabilities capabilities,
+ int initialWidth, int initialHeight) {
+ super(factory, new NullWindow(), true, capabilities, null);
+ if (initialWidth <= 0 || initialHeight <= 0) {
+ throw new GLException("Initial width and height of pbuffer must be positive (were (" +
+ initialWidth + ", " + initialHeight + "))");
+ }
+ NullWindow nw = (NullWindow) getNativeWindow();
+ nw.setSize(initialWidth, initialHeight);
+
+ if (DEBUG) {
+ System.out.println("Pbuffer caps on init: " + capabilities +
+ (capabilities.getPbufferRenderToTexture() ? " [rtt]" : "") +
+ (capabilities.getPbufferRenderToTextureRectangle() ? " [rect]" : "") +
+ (capabilities.getPbufferFloatingPointBuffers() ? " [float]" : ""));
+ }
+
+ nw.setDisplayHandle(X11GLXDrawableFactory.getDisplayConnection());
+ createPbuffer();
+ }
+
+ public GLContext createContext(GLContext shareWith) {
+ return new X11PbufferGLXContext(this, shareWith);
+ }
+
+ public void destroy() {
+ getFactory().lockToolkit();
+ try {
+ NullWindow nw = (NullWindow) getNativeWindow();
+ if (nw.getWindowHandle() != 0) {
+ GLX.glXDestroyPbuffer(nw.getDisplayHandle(), nw.getWindowHandle());
+ nw.setWindowHandle(0);
+ }
+ nw.setDisplayHandle(0);
+ } finally {
+ getFactory().unlockToolkit();
+ }
+ }
+
+ public void setSize(int width, int height) {
+ super.setSize(width, height);
+ destroy();
+ ((NullWindow)getNativeWindow()).setDisplayHandle(X11GLXDrawableFactory.getDisplayConnection());
+ createPbuffer();
+ }
+
+ public void createPbuffer() {
+ getFactory().lockToolkit();
+ try {
+ NullWindow nw = (NullWindow) getNativeWindow();
+ long display = nw.getDisplayHandle();
+ if (nw.getDisplayHandle()== 0) {
+ throw new GLException("Null display");
+ }
+ int screen = X11Lib.DefaultScreen(display);
+ nw.setScreenIndex(screen);
+
+ if (getCapabilities().getPbufferRenderToTexture()) {
+ throw new GLException("Render-to-texture pbuffers not supported yet on X11");
+ }
+
+ if (getCapabilities().getPbufferRenderToTextureRectangle()) {
+ throw new GLException("Render-to-texture-rectangle pbuffers not supported yet on X11");
+ }
+
+ int[] iattributes = X11GLXDrawableFactory.glCapabilities2AttribList(getCapabilities(),
+ ((X11GLXDrawableFactory)getFactory()).isMultisampleAvailable(),
+ true, display, screen);
+
+ int[] nelementsTmp = new int[1];
+ LongBuffer fbConfigs = GLX.glXChooseFBConfig(display, screen, iattributes, 0, nelementsTmp, 0);
+ if (fbConfigs == null || fbConfigs.limit() == 0 || fbConfigs.get(0) == 0) {
+ throw new GLException("pbuffer creation error: glXChooseFBConfig() failed");
+ }
+ int nelements = nelementsTmp[0];
+ if (nelements <= 0) {
+ throw new GLException("pbuffer creation error: couldn't find a suitable frame buffer configuration");
+ }
+ // Note that we currently don't allow selection of anything but
+ // the first GLXFBConfig in the returned list
+ long fbConfig = fbConfigs.get(0);
+
+ if (DEBUG) {
+ System.err.println("Found " + fbConfigs.limit() + " matching GLXFBConfigs");
+ System.err.println("Parameters of default one:");
+ System.err.println("render type: 0x" + Integer.toHexString(queryFBConfig(display, fbConfig, GLX.GLX_RENDER_TYPE)));
+ System.err.println("rgba: " + ((queryFBConfig(display, fbConfig, GLX.GLX_RENDER_TYPE) & GLX.GLX_RGBA_BIT) != 0));
+ System.err.println("r: " + queryFBConfig(display, fbConfig, GLX.GLX_RED_SIZE));
+ System.err.println("g: " + queryFBConfig(display, fbConfig, GLX.GLX_GREEN_SIZE));
+ System.err.println("b: " + queryFBConfig(display, fbConfig, GLX.GLX_BLUE_SIZE));
+ System.err.println("a: " + queryFBConfig(display, fbConfig, GLX.GLX_ALPHA_SIZE));
+ System.err.println("depth: " + queryFBConfig(display, fbConfig, GLX.GLX_DEPTH_SIZE));
+ System.err.println("double buffered: " + queryFBConfig(display, fbConfig, GLX.GLX_DOUBLEBUFFER));
+ }
+
+ // Create the p-buffer.
+ int niattribs = 0;
+
+ iattributes[niattribs++] = GLXExt.GLX_PBUFFER_WIDTH;
+ iattributes[niattribs++] = nw.getWidth();
+ iattributes[niattribs++] = GLXExt.GLX_PBUFFER_HEIGHT;
+ iattributes[niattribs++] = nw.getHeight();
+
+ iattributes[niattribs++] = 0;
+
+ long drawable = GLX.glXCreatePbuffer(display, fbConfig, iattributes, 0);
+ if (drawable == 0) {
+ // FIXME: query X error code for detail error message
+ throw new GLException("pbuffer creation error: glXCreatePbuffer() failed");
+ }
+
+ // Set up instance variables
+ nw.setWindowHandle(drawable);
+ this.fbConfig = fbConfig;
+
+ // Pick innocent query values if multisampling or floating point buffers not available
+ int sbAttrib = ((X11GLXDrawableFactory)getFactory()).isMultisampleAvailable() ? GLXExt.GLX_SAMPLE_BUFFERS_ARB : GLX.GLX_RED_SIZE;
+ int samplesAttrib = ((X11GLXDrawableFactory)getFactory()).isMultisampleAvailable() ? GLXExt.GLX_SAMPLES_ARB : GLX.GLX_RED_SIZE;
+ int floatNV = getCapabilities().getPbufferFloatingPointBuffers() ? GLX.GLX_FLOAT_COMPONENTS_NV : GLX.GLX_RED_SIZE;
+
+ // Query the fbconfig to determine its GLCapabilities
+ int[] iattribs = {
+ GLX.GLX_DOUBLEBUFFER,
+ GLX.GLX_STEREO,
+ GLX.GLX_RED_SIZE,
+ GLX.GLX_GREEN_SIZE,
+ GLX.GLX_BLUE_SIZE,
+ GLX.GLX_ALPHA_SIZE,
+ GLX.GLX_DEPTH_SIZE,
+ GLX.GLX_STENCIL_SIZE,
+ GLX.GLX_ACCUM_RED_SIZE,
+ GLX.GLX_ACCUM_GREEN_SIZE,
+ GLX.GLX_ACCUM_BLUE_SIZE,
+ GLX.GLX_ACCUM_ALPHA_SIZE,
+ sbAttrib,
+ samplesAttrib,
+ floatNV
+ };
+
+ int[] ivalues = new int[iattribs.length];
+ queryFBConfig(display, fbConfig, iattribs, iattribs.length, ivalues);
+ setChosenGLCapabilities(X11GLXDrawableFactory.attribList2GLCapabilities(iattribs, iattribs.length, ivalues, true));
+
+ // Determine the actual width and height we were able to create.
+ int[] tmp = new int[1];
+ GLX.glXQueryDrawable(display, drawable, GLXExt.GLX_WIDTH, tmp, 0);
+ int width = tmp[0];
+ GLX.glXQueryDrawable(display, drawable, GLXExt.GLX_HEIGHT, tmp, 0);
+ int height = tmp[0];
+ nw.setSize(width, height);
+
+ if (DEBUG) {
+ System.err.println("Created pbuffer " + width + " x " + height);
+ }
+ } finally {
+ getFactory().unlockToolkit();
+ }
+ }
+
+ public int getFloatingPointMode() {
+ // Floating-point pbuffers currently require NVidia hardware on X11
+ return GLPbuffer.NV_FLOAT;
+ }
+
+ public long getFBConfig() {
+ return fbConfig;
+ }
+
+ private int queryFBConfig(long display, long fbConfig, int attrib) {
+ int[] tmp = new int[1];
+ if (GLX.glXGetFBConfigAttrib(display, fbConfig, attrib, tmp, 0) != 0) {
+ throw new GLException("glXGetFBConfigAttrib failed");
+ }
+ return tmp[0];
+ }
+
+ private void queryFBConfig(long display, long fbConfig, int[] attribs, int nattribs, int[] values) {
+ int[] tmp = new int[1];
+ for (int i = 0; i < nattribs; i++) {
+ if (GLX.glXGetFBConfigAttrib(display, fbConfig, attribs[i], tmp, 0) != 0) {
+ throw new GLException("glXGetFBConfigAttrib failed");
+ }
+ values[i] = tmp[0];
+ }
+ }
+}
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/awt/X11AWTGLXDrawableFactory.java b/src/classes/com/sun/opengl/impl/x11/glx/awt/X11AWTGLXDrawableFactory.java
new file mode 100644
index 000000000..1b82e67ec
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/x11/glx/awt/X11AWTGLXDrawableFactory.java
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ */
+
+package com.sun.opengl.impl.x11.glx.awt;
+
+import com.sun.opengl.impl.*;
+import com.sun.opengl.impl.x11.*;
+import com.sun.opengl.impl.x11.awt.*;
+import com.sun.opengl.impl.x11.glx.*;
+import com.sun.opengl.impl.awt.*;
+import java.awt.Graphics;
+import java.awt.GraphicsConfiguration;
+import java.awt.GraphicsDevice;
+import java.awt.GraphicsEnvironment;
+import java.nio.*;
+import java.security.*;
+import java.util.*;
+import javax.media.opengl.*;
+import javax.media.opengl.awt.*;
+import com.sun.gluegen.runtime.*;
+
+public class X11AWTGLXDrawableFactory extends X11GLXDrawableFactory {
+
+ static {
+ // See DRIHack.java for an explanation of why this is necessary
+ DRIHack.begin();
+
+ com.sun.opengl.impl.NativeLibLoader.loadCore();
+
+ DRIHack.end();
+ }
+
+ public AbstractGraphicsConfiguration chooseGraphicsConfiguration(GLCapabilities capabilities,
+ GLCapabilitiesChooser chooser,
+ AbstractGraphicsDevice absDevice) {
+ if (capabilities == null) {
+ capabilities = new GLCapabilities();
+ }
+ if (chooser == null) {
+ chooser = new DefaultGLCapabilitiesChooser();
+ }
+ GraphicsDevice device = null;
+ if (absDevice != null &&
+ !(absDevice instanceof AWTGraphicsDevice)) {
+ throw new IllegalArgumentException("This GLDrawableFactory accepts only AWTGraphicsDevice objects");
+ }
+
+ if ((absDevice == null) ||
+ (((AWTGraphicsDevice) absDevice).getGraphicsDevice() == null)) {
+ device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
+ } else {
+ device = ((AWTGraphicsDevice) absDevice).getGraphicsDevice();
+ }
+
+ int screen;
+ if (isXineramaEnabled()) {
+ screen = 0;
+ } else {
+ screen = X11SunJDKReflection.graphicsDeviceGetScreen(device);
+ }
+
+ // Until we have a rock-solid visual selection algorithm written
+ // in pure Java, we're going to provide the underlying window
+ // system's selection to the chooser as a hint
+
+ int[] attribs = glCapabilities2AttribList(capabilities, isMultisampleAvailable(), false, 0, 0);
+ XVisualInfo[] infos = null;
+ GLCapabilities[] caps = null;
+ int recommendedIndex = -1;
+ lockToolkit();
+ try {
+ long display = getDisplayConnection();
+ XVisualInfo recommendedVis = GLX.glXChooseVisual(display, screen, attribs, 0);
+ if (DEBUG) {
+ System.err.print("!!! glXChooseVisual recommended ");
+ if (recommendedVis == null) {
+ System.err.println("null visual");
+ } else {
+ System.err.println("visual id 0x" + Long.toHexString(recommendedVis.visualid()));
+ }
+ }
+ int[] count = new int[1];
+ XVisualInfo template = XVisualInfo.create();
+ template.screen(screen);
+ infos = X11Lib.XGetVisualInfo(display, X11Lib.VisualScreenMask, template, count, 0);
+ if (infos == null) {
+ throw new GLException("Error while enumerating available XVisualInfos");
+ }
+ caps = new GLCapabilities[infos.length];
+ for (int i = 0; i < infos.length; i++) {
+ caps[i] = xvi2GLCapabilities(display, infos[i]);
+ // Attempt to find the visual chosen by glXChooseVisual
+ if (recommendedVis != null && recommendedVis.visualid() == infos[i].visualid()) {
+ recommendedIndex = i;
+ }
+ }
+ } finally {
+ unlockToolkit();
+ }
+ // Store these away for later
+ for (int i = 0; i < infos.length; i++) {
+ if (caps[i] != null) {
+ visualToGLCapsMap.put(new ScreenAndVisualIDKey(screen, infos[i].visualid()),
+ caps[i].clone());
+ }
+ }
+ int chosen = chooser.chooseCapabilities(capabilities, caps, recommendedIndex);
+ if (chosen < 0 || chosen >= caps.length) {
+ throw new GLException("GLCapabilitiesChooser specified invalid index (expected 0.." + (caps.length - 1) + ")");
+ }
+ XVisualInfo vis = infos[chosen];
+ if (vis == null) {
+ throw new GLException("GLCapabilitiesChooser chose an invalid visual");
+ }
+ // FIXME: need to look at glue code and see type of this field
+ long visualID = vis.visualid();
+ // FIXME: the storage for the infos array, as well as that for the
+ // recommended visual, is leaked; should free them here with XFree()
+
+ // Now figure out which GraphicsConfiguration corresponds to this
+ // visual by matching the visual ID
+ GraphicsConfiguration[] configs = device.getConfigurations();
+ for (int i = 0; i < configs.length; i++) {
+ GraphicsConfiguration config = configs[i];
+ if (config != null) {
+ if (X11SunJDKReflection.graphicsConfigurationGetVisualID(config) == visualID) {
+ return new AWTGraphicsConfiguration(config);
+ }
+ }
+ }
+
+ // Either we weren't able to reflectively introspect on the
+ // X11GraphicsConfig or something went wrong in the steps above;
+ // we're going to return null without signaling an error condition
+ // in this case (although we should distinguish between the two
+ // and possibly report more of an error in the latter case)
+ return null;
+ }
+
+ public void lockToolkit() {
+ AWTUtil.lockToolkit();
+ }
+
+ public void unlockToolkit() {
+ AWTUtil.unlockToolkit();
+ }
+
+}
diff --git a/src/classes/com/sun/opengl/util/awt/ImageUtil.java b/src/classes/com/sun/opengl/util/awt/ImageUtil.java
new file mode 100755
index 000000000..534ab444d
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/awt/ImageUtil.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.awt;
+
+import java.awt.*;
+import java.awt.image.*;
+
+/** Utilities for dealing with images. */
+
+public class ImageUtil {
+ private ImageUtil() {}
+
+ /** Flips the supplied BufferedImage vertically. This is often a
+ necessary conversion step to display a Java2D image correctly
+ with OpenGL and vice versa. */
+ public static void flipImageVertically(BufferedImage image) {
+ WritableRaster raster = image.getRaster();
+ Object scanline1 = null;
+ Object scanline2 = null;
+
+ for (int i = 0; i < image.getHeight() / 2; i++) {
+ scanline1 = raster.getDataElements(0, i, image.getWidth(), 1, scanline1);
+ scanline2 = raster.getDataElements(0, image.getHeight() - i - 1, image.getWidth(), 1, scanline2);
+ raster.setDataElements(0, i, image.getWidth(), 1, scanline2);
+ raster.setDataElements(0, image.getHeight() - i - 1, image.getWidth(), 1, scanline1);
+ }
+ }
+
+ /**
+ * Creates a <code>BufferedImage</code> with a pixel format compatible with the graphics
+ * environment. The returned image can thus benefit from hardware accelerated operations
+ * in Java2D API.
+ *
+ * @param width The width of the image to be created
+ * @param height The height of the image to be created
+ *
+ * @return A instance of <code>BufferedImage</code> with a type compatible with the graphics card.
+ */
+ public static BufferedImage createCompatibleImage(int width, int height) {
+ GraphicsConfiguration configuration =
+ GraphicsEnvironment.getLocalGraphicsEnvironment().
+ getDefaultScreenDevice().getDefaultConfiguration();
+ return configuration.createCompatibleImage(width, height);
+ }
+
+ /**
+ * Creates a thumbnail from an image. A thumbnail is a scaled down version of the original picture.
+ * This method will retain the width to height ratio of the original picture and return a new
+ * instance of <code>BufferedImage</code>. The original picture is not modified.
+ *
+ * @param image The original image to sample down
+ * @param thumbWidth The width of the thumbnail to be created
+ *
+ * @throws IllegalArgumentException If thumbWidth is greater than image.getWidth()
+ *
+ * @return A thumbnail with the requested width or the original picture if thumbWidth = image.getWidth()
+ */
+ public static BufferedImage createThumbnail(BufferedImage image, int thumbWidth) {
+ // Thanks to Romain Guy for this utility
+ if (thumbWidth > image.getWidth()) {
+ throw new IllegalArgumentException("Thumbnail width must be greater than image width");
+ }
+
+ if (thumbWidth == image.getWidth()) {
+ return image;
+ }
+
+ float ratio = (float) image.getWidth() / (float) image.getHeight();
+ int width = image.getWidth();
+ BufferedImage thumb = image;
+
+ do {
+ width /= 2;
+ if (width < thumbWidth) {
+ width = thumbWidth;
+ }
+
+ BufferedImage temp = createCompatibleImage(width, (int) (width / ratio));
+ Graphics2D g2 = temp.createGraphics();
+ g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
+ RenderingHints.VALUE_INTERPOLATION_BILINEAR);
+ g2.drawImage(thumb, 0, 0, temp.getWidth(), temp.getHeight(), null);
+ g2.dispose();
+ thumb = temp;
+ } while (width != thumbWidth);
+
+ return thumb;
+ }
+
+}
diff --git a/src/classes/com/sun/opengl/util/awt/gl2/GL2Screenshot.java b/src/classes/com/sun/opengl/util/awt/gl2/GL2Screenshot.java
new file mode 100755
index 000000000..03313e2e5
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/awt/gl2/GL2Screenshot.java
@@ -0,0 +1,433 @@
+/*
+ * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ */
+
+package com.sun.opengl.util.awt.gl2;
+
+import java.awt.image.*;
+import java.io.*;
+import java.nio.*;
+import java.nio.channels.*;
+import javax.imageio.*;
+
+import javax.media.opengl.*;
+import javax.media.opengl.glu.*;
+import javax.media.opengl.glu.gl2.*;
+
+import com.sun.opengl.util.io.*;
+import com.sun.opengl.util.awt.*;
+
+/** Utilities for taking screenshots of OpenGL applications. */
+
+public class GL2Screenshot {
+ private GL2Screenshot() {}
+
+ /**
+ * Takes a fast screenshot of the current OpenGL drawable to a Targa
+ * file. Requires the OpenGL context for the desired drawable to be
+ * current. Takes the screenshot from the last assigned read buffer,
+ * or the OpenGL default read buffer if none has been specified by
+ * the user (GL_FRONT for single-buffered configurations and GL_BACK
+ * for double-buffered configurations). This is the fastest
+ * mechanism for taking a screenshot of an application. Contributed
+ * by Carsten Weisse of Bytonic Software (http://bytonic.de/). <p>
+ *
+ * No alpha channel is written with this variant.
+ *
+ * @param file the file to write containing the screenshot
+ * @param width the width of the current drawable
+ * @param height the height of the current drawable
+ *
+ * @throws GLException if an OpenGL context was not current or
+ * another OpenGL-related error occurred
+ * @throws IOException if an I/O error occurred while writing the
+ * file
+ */
+ public static void writeToTargaFile(File file,
+ int width,
+ int height) throws GLException, IOException {
+ writeToTargaFile(file, width, height, false);
+ }
+
+ /**
+ * Takes a fast screenshot of the current OpenGL drawable to a Targa
+ * file. Requires the OpenGL context for the desired drawable to be
+ * current. Takes the screenshot from the last assigned read buffer,
+ * or the OpenGL default read buffer if none has been specified by
+ * the user (GL_FRONT for single-buffered configurations and GL_BACK
+ * for double-buffered configurations). This is the fastest
+ * mechanism for taking a screenshot of an application. Contributed
+ * by Carsten Weisse of Bytonic Software (http://bytonic.de/).
+ *
+ * @param file the file to write containing the screenshot
+ * @param width the width of the current drawable
+ * @param height the height of the current drawable
+ * @param alpha whether the alpha channel should be saved. If true,
+ * requires GL_EXT_abgr extension to be present.
+ *
+ * @throws GLException if an OpenGL context was not current or
+ * another OpenGL-related error occurred
+ * @throws IOException if an I/O error occurred while writing the
+ * file
+ */
+ public static void writeToTargaFile(File file,
+ int width,
+ int height,
+ boolean alpha) throws GLException, IOException {
+ writeToTargaFile(file, 0, 0, width, height, alpha);
+ }
+
+ /**
+ * Takes a fast screenshot of the current OpenGL drawable to a Targa
+ * file. Requires the OpenGL context for the desired drawable to be
+ * current. Takes the screenshot from the last assigned read buffer,
+ * or the OpenGL default read buffer if none has been specified by
+ * the user (GL_FRONT for single-buffered configurations and GL_BACK
+ * for double-buffered configurations). This is the fastest
+ * mechanism for taking a screenshot of an application. Contributed
+ * by Carsten Weisse of Bytonic Software (http://bytonic.de/).
+ *
+ * @param file the file to write containing the screenshot
+ * @param x the starting x coordinate of the screenshot, measured from the lower-left
+ * @param y the starting y coordinate of the screenshot, measured from the lower-left
+ * @param width the width of the desired screenshot area
+ * @param height the height of the desired screenshot area
+ * @param alpha whether the alpha channel should be saved. If true,
+ * requires GL_EXT_abgr extension to be present.
+ *
+ * @throws GLException if an OpenGL context was not current or
+ * another OpenGL-related error occurred
+ * @throws IOException if an I/O error occurred while writing the
+ * file
+ */
+ public static void writeToTargaFile(File file,
+ int x,
+ int y,
+ int width,
+ int height,
+ boolean alpha) throws GLException, IOException {
+ if (alpha) {
+ checkExtABGR();
+ }
+
+ TGAWriter writer = new TGAWriter();
+ writer.open(file, width, height, alpha);
+ ByteBuffer bgr = writer.getImageData();
+
+ GL2 gl = GLUgl2.getCurrentGL2();
+
+ // Set up pixel storage modes
+ PixelStorageModes psm = new PixelStorageModes();
+ psm.save(gl);
+
+ int readbackType = (alpha ? GL2.GL_ABGR_EXT : GL2.GL_BGR);
+
+ // read the BGR values into the image buffer
+ gl.glReadPixels(x, y, width, height, readbackType,
+ GL2.GL_UNSIGNED_BYTE, bgr);
+
+ // Restore pixel storage modes
+ psm.restore(gl);
+
+ // close the file
+ writer.close();
+ }
+
+ /**
+ * Takes a screenshot of the current OpenGL drawable to a
+ * BufferedImage. Requires the OpenGL context for the desired
+ * drawable to be current. Takes the screenshot from the last
+ * assigned read buffer, or the OpenGL default read buffer if none
+ * has been specified by the user (GL_FRONT for single-buffered
+ * configurations and GL_BACK for double-buffered configurations).
+ * Note that the scanlines of the resulting image are flipped
+ * vertically in order to correctly match the OpenGL contents, which
+ * takes time and is therefore not as fast as the Targa screenshot
+ * function. <P>
+ *
+ * No alpha channel is read back with this variant.
+ *
+ * @param width the width of the current drawable
+ * @param height the height of the current drawable
+ *
+ * @throws GLException if an OpenGL context was not current or
+ * another OpenGL-related error occurred
+ */
+ public static BufferedImage readToBufferedImage(int width,
+ int height) throws GLException {
+ return readToBufferedImage(width, height, false);
+ }
+
+ /**
+ * Takes a screenshot of the current OpenGL drawable to a
+ * BufferedImage. Requires the OpenGL context for the desired
+ * drawable to be current. Takes the screenshot from the last
+ * assigned read buffer, or the OpenGL default read buffer if none
+ * has been specified by the user (GL_FRONT for single-buffered
+ * configurations and GL_BACK for double-buffered configurations).
+ * Note that the scanlines of the resulting image are flipped
+ * vertically in order to correctly match the OpenGL contents, which
+ * takes time and is therefore not as fast as the Targa screenshot
+ * function.
+ *
+ * @param width the width of the current drawable
+ * @param height the height of the current drawable
+ * @param alpha whether the alpha channel should be read back. If
+ * true, requires GL_EXT_abgr extension to be present.
+ *
+ * @throws GLException if an OpenGL context was not current or
+ * another OpenGL-related error occurred
+ */
+ public static BufferedImage readToBufferedImage(int width,
+ int height,
+ boolean alpha) throws GLException {
+ return readToBufferedImage(0, 0, width, height, alpha);
+ }
+
+ /**
+ * Takes a screenshot of the current OpenGL drawable to a
+ * BufferedImage. Requires the OpenGL context for the desired
+ * drawable to be current. Takes the screenshot from the last
+ * assigned read buffer, or the OpenGL default read buffer if none
+ * has been specified by the user (GL_FRONT for single-buffered
+ * configurations and GL_BACK for double-buffered configurations).
+ * Note that the scanlines of the resulting image are flipped
+ * vertically in order to correctly match the OpenGL contents, which
+ * takes time and is therefore not as fast as the Targa screenshot
+ * function.
+ *
+ * @param x the starting x coordinate of the screenshot, measured from the lower-left
+ * @param y the starting y coordinate of the screenshot, measured from the lower-left
+ * @param width the width of the desired screenshot area
+ * @param height the height of the desired screenshot area
+ * @param alpha whether the alpha channel should be read back. If
+ * true, requires GL_EXT_abgr extension to be present.
+ *
+ * @throws GLException if an OpenGL context was not current or
+ * another OpenGL-related error occurred
+ */
+ public static BufferedImage readToBufferedImage(int x,
+ int y,
+ int width,
+ int height,
+ boolean alpha) throws GLException {
+ int bufImgType = (alpha ? BufferedImage.TYPE_4BYTE_ABGR : BufferedImage.TYPE_3BYTE_BGR);
+ int readbackType = (alpha ? GL2.GL_ABGR_EXT : GL2.GL_BGR);
+
+ if (alpha) {
+ checkExtABGR();
+ }
+
+ // Allocate necessary storage
+ BufferedImage image = new BufferedImage(width, height, bufImgType);
+
+ GL2 gl = GLUgl2.getCurrentGL2();
+
+ // Set up pixel storage modes
+ PixelStorageModes psm = new PixelStorageModes();
+ psm.save(gl);
+
+ // read the BGR values into the image
+ gl.glReadPixels(x, y, width, height, readbackType,
+ GL2.GL_UNSIGNED_BYTE,
+ ByteBuffer.wrap(((DataBufferByte) image.getRaster().getDataBuffer()).getData()));
+
+ // Restore pixel storage modes
+ psm.restore(gl);
+
+ // Must flip BufferedImage vertically for correct results
+ ImageUtil.flipImageVertically(image);
+ return image;
+ }
+
+ /**
+ * Takes a screenshot of the current OpenGL drawable to the
+ * specified file on disk using the ImageIO package. Requires the
+ * OpenGL context for the desired drawable to be current. Takes the
+ * screenshot from the last assigned read buffer, or the OpenGL
+ * default read buffer if none has been specified by the user
+ * (GL_FRONT for single-buffered configurations and GL_BACK for
+ * double-buffered configurations). This is not the fastest
+ * mechanism for taking a screenshot but may be more convenient than
+ * others for getting images for consumption by other packages. The
+ * file format is inferred from the suffix of the given file. <P>
+ *
+ * No alpha channel is saved with this variant.
+ *
+ * @param file the file to write containing the screenshot
+ * @param width the width of the current drawable
+ * @param height the height of the current drawable
+ *
+ * @throws GLException if an OpenGL context was not current or
+ * another OpenGL-related error occurred
+ *
+ * @throws IOException if an I/O error occurred or if the file could
+ * not be written to disk due to the requested file format being
+ * unsupported by ImageIO
+ */
+ public static void writeToFile(File file,
+ int width,
+ int height) throws IOException, GLException {
+ writeToFile(file, width, height, false);
+ }
+
+ /**
+ * Takes a screenshot of the current OpenGL drawable to the
+ * specified file on disk using the ImageIO package. Requires the
+ * OpenGL context for the desired drawable to be current. Takes the
+ * screenshot from the last assigned read buffer, or the OpenGL
+ * default read buffer if none has been specified by the user
+ * (GL_FRONT for single-buffered configurations and GL_BACK for
+ * double-buffered configurations). This is not the fastest
+ * mechanism for taking a screenshot but may be more convenient than
+ * others for getting images for consumption by other packages. The
+ * file format is inferred from the suffix of the given file. <P>
+ *
+ * Note that some file formats, in particular JPEG, can not handle
+ * an alpha channel properly. If the "alpha" argument is specified
+ * as true for such a file format it will be silently ignored.
+ *
+ * @param file the file to write containing the screenshot
+ * @param width the width of the current drawable
+ * @param height the height of the current drawable
+ * @param alpha whether an alpha channel should be saved. If true,
+ * requires GL_EXT_abgr extension to be present.
+ *
+ * @throws GLException if an OpenGL context was not current or
+ * another OpenGL-related error occurred
+ *
+ * @throws IOException if an I/O error occurred or if the file could
+ * not be written to disk due to the requested file format being
+ * unsupported by ImageIO
+ */
+ public static void writeToFile(File file,
+ int width,
+ int height,
+ boolean alpha) throws IOException, GLException {
+ writeToFile(file, 0, 0, width, height, alpha);
+ }
+
+ /**
+ * Takes a screenshot of the current OpenGL drawable to the
+ * specified file on disk using the ImageIO package. Requires the
+ * OpenGL context for the desired drawable to be current. Takes the
+ * screenshot from the last assigned read buffer, or the OpenGL
+ * default read buffer if none has been specified by the user
+ * (GL_FRONT for single-buffered configurations and GL_BACK for
+ * double-buffered configurations). This is not the fastest
+ * mechanism for taking a screenshot but may be more convenient than
+ * others for getting images for consumption by other packages. The
+ * file format is inferred from the suffix of the given file. <P>
+ *
+ * Note that some file formats, in particular JPEG, can not handle
+ * an alpha channel properly. If the "alpha" argument is specified
+ * as true for such a file format it will be silently ignored.
+ *
+ * @param file the file to write containing the screenshot
+ * @param x the starting x coordinate of the screenshot, measured from the lower-left
+ * @param y the starting y coordinate of the screenshot, measured from the lower-left
+ * @param width the width of the current drawable
+ * @param height the height of the current drawable
+ * @param alpha whether an alpha channel should be saved. If true,
+ * requires GL_EXT_abgr extension to be present.
+ *
+ * @throws GLException if an OpenGL context was not current or
+ * another OpenGL-related error occurred
+ *
+ * @throws IOException if an I/O error occurred or if the file could
+ * not be written to disk due to the requested file format being
+ * unsupported by ImageIO
+ */
+ public static void writeToFile(File file,
+ int x,
+ int y,
+ int width,
+ int height,
+ boolean alpha) throws IOException, GLException {
+ String fileSuffix = FileUtil.getFileSuffix(file);
+ if (alpha && (fileSuffix.equals("jpg") || fileSuffix.equals("jpeg"))) {
+ // JPEGs can't deal properly with alpha channels
+ alpha = false;
+ }
+
+ BufferedImage image = readToBufferedImage(x, y, width, height, alpha);
+ if (!ImageIO.write(image, fileSuffix, file)) {
+ throw new IOException("Unsupported file format " + fileSuffix);
+ }
+ }
+
+ private static int glGetInteger(GL2 gl, int pname, int[] tmp) {
+ gl.glGetIntegerv(pname, tmp, 0);
+ return tmp[0];
+ }
+
+ private static void checkExtABGR() {
+ GL2 gl = GLUgl2.getCurrentGL2();
+ if (!gl.isExtensionAvailable("GL_EXT_abgr")) {
+ throw new IllegalArgumentException("Saving alpha channel requires GL_EXT_abgr");
+ }
+ }
+
+ static class PixelStorageModes {
+ int packAlignment;
+ int packRowLength;
+ int packSkipRows;
+ int packSkipPixels;
+ int packSwapBytes;
+ int[] tmp = new int[1];
+
+ void save(GL2 gl) {
+ packAlignment = glGetInteger(gl, GL2.GL_PACK_ALIGNMENT, tmp);
+ packRowLength = glGetInteger(gl, GL2.GL_PACK_ROW_LENGTH, tmp);
+ packSkipRows = glGetInteger(gl, GL2.GL_PACK_SKIP_ROWS, tmp);
+ packSkipPixels = glGetInteger(gl, GL2.GL_PACK_SKIP_PIXELS, tmp);
+ packSwapBytes = glGetInteger(gl, GL2.GL_PACK_SWAP_BYTES, tmp);
+
+ gl.glPixelStorei(GL2.GL_PACK_ALIGNMENT, 1);
+ gl.glPixelStorei(GL2.GL_PACK_ROW_LENGTH, 0);
+ gl.glPixelStorei(GL2.GL_PACK_SKIP_ROWS, 0);
+ gl.glPixelStorei(GL2.GL_PACK_SKIP_PIXELS, 0);
+ gl.glPixelStorei(GL2.GL_PACK_SWAP_BYTES, 0);
+ }
+
+ void restore(GL2 gl) {
+ gl.glPixelStorei(GL2.GL_PACK_ALIGNMENT, packAlignment);
+ gl.glPixelStorei(GL2.GL_PACK_ROW_LENGTH, packRowLength);
+ gl.glPixelStorei(GL2.GL_PACK_SKIP_ROWS, packSkipRows);
+ gl.glPixelStorei(GL2.GL_PACK_SKIP_PIXELS, packSkipPixels);
+ gl.glPixelStorei(GL2.GL_PACK_SWAP_BYTES, packSwapBytes);
+ }
+ }
+}
diff --git a/src/classes/com/sun/opengl/util/gl2/GL2TileRenderer.java b/src/classes/com/sun/opengl/util/gl2/GL2TileRenderer.java
new file mode 100755
index 000000000..d36940103
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/gl2/GL2TileRenderer.java
@@ -0,0 +1,601 @@
+package com.sun.opengl.util.gl2;
+
+import java.awt.Dimension;
+import java.nio.Buffer;
+
+import javax.media.opengl.*;
+import javax.media.opengl.glu.*;
+import javax.media.opengl.glu.gl2.*;
+
+/**
+ * A fairly direct port of Brian Paul's tile rendering library, found
+ * at <a href = "http://www.mesa3d.org/brianp/TR.html">
+ * http://www.mesa3d.org/brianp/TR.html </a> . I've java-fied it, but
+ * the functionality is the same.
+ *
+ * Original code Copyright (C) 1997-2005 Brian Paul. Licensed under
+ * BSD-compatible terms with permission of the author. See LICENSE.txt
+ * for license information.
+ *
+ * @author ryanm
+ */
+public class GL2TileRenderer
+{
+ private static final int DEFAULT_TILE_WIDTH = 256;
+
+ private static final int DEFAULT_TILE_HEIGHT = 256;
+
+ private static final int DEFAULT_TILE_BORDER = 0;
+
+ //
+ // Enumeration flags for accessing variables
+ //
+ // @author ryanm
+ //
+
+ /**
+ * The width of a tile
+ */
+ public static final int TR_TILE_WIDTH = 0;
+ /**
+ * The height of a tile
+ */
+ public static final int TR_TILE_HEIGHT = 1;
+ /**
+ * The width of the border around the tiles
+ */
+ public static final int TR_TILE_BORDER = 2;
+ /**
+ * The width of the final image
+ */
+ public static final int TR_IMAGE_WIDTH = 3;
+ /**
+ * The height of the final image
+ */
+ public static final int TR_IMAGE_HEIGHT = 4;
+ /**
+ * The number of rows of tiles
+ */
+ public static final int TR_ROWS = 5;
+ /**
+ * The number of columns of tiles
+ */
+ public static final int TR_COLUMNS = 6;
+ /**
+ * The current row number
+ */
+ public static final int TR_CURRENT_ROW = 7;
+ /**
+ * The current column number
+ */
+ public static final int TR_CURRENT_COLUMN = 8;
+ /**
+ * The width of the current tile
+ */
+ public static final int TR_CURRENT_TILE_WIDTH = 9;
+ /**
+ * The height of the current tile
+ */
+ public static final int TR_CURRENT_TILE_HEIGHT = 10;
+ /**
+ * The order that the rows are traversed
+ */
+ public static final int TR_ROW_ORDER = 11;
+
+
+ /**
+ * Indicates we are traversing rows from the top to the bottom
+ */
+ public static final int TR_TOP_TO_BOTTOM = 1;
+
+ /**
+ * Indicates we are traversing rows from the bottom to the top
+ */
+ public static final int TR_BOTTOM_TO_TOP = 2;
+
+ /* Final image parameters */
+ private Dimension imageSize = new Dimension();
+
+ private int imageFormat, imageType;
+
+ private Buffer imageBuffer;
+
+ /* Tile parameters */
+ private Dimension tileSize = new Dimension();
+
+ private Dimension tileSizeNB = new Dimension();
+
+ private int tileBorder;
+
+ private int tileFormat, tileType;
+
+ private Buffer tileBuffer;
+
+ /* Projection parameters */
+ private boolean perspective;
+
+ private double left;
+
+ private double right;
+
+ private double bottom;
+
+ private double top;
+
+ private double near;
+
+ private double far;
+
+ /* Misc */
+ private int rowOrder;
+
+ private int rows, columns;
+
+ private int currentTile;
+
+ private int currentTileWidth, currentTileHeight;
+
+ private int currentRow, currentColumn;
+
+ private int[] viewportSave = new int[ 4 ];
+
+ /**
+ * Creates a new TileRenderer object
+ */
+ public GL2TileRenderer()
+ {
+ tileSize.width = DEFAULT_TILE_WIDTH;
+ tileSize.height = DEFAULT_TILE_HEIGHT;
+ tileBorder = DEFAULT_TILE_BORDER;
+ rowOrder = TR_BOTTOM_TO_TOP;
+ currentTile = -1;
+ }
+
+ /**
+ * Sets up the number of rows and columns needed
+ */
+ private void setup()
+ {
+ columns = ( imageSize.width + tileSizeNB.width - 1 ) / tileSizeNB.width;
+ rows = ( imageSize.height + tileSizeNB.height - 1 ) / tileSizeNB.height;
+ currentTile = 0;
+
+ assert columns >= 0;
+ assert rows >= 0;
+ }
+
+ /**
+ * Sets the size of the tiles to use in rendering. The actual
+ * effective size of the tile depends on the border size, ie (
+ * width - 2*border ) * ( height - 2 * border )
+ *
+ * @param width
+ * The width of the tiles. Must not be larger than the GL
+ * context
+ * @param height
+ * The height of the tiles. Must not be larger than the
+ * GL context
+ * @param border
+ * The width of the borders on each tile. This is needed
+ * to avoid artifacts when rendering lines or points with
+ * thickness > 1.
+ */
+ public void setTileSize( int width, int height, int border )
+ {
+ assert ( border >= 0 );
+ assert ( width >= 1 );
+ assert ( height >= 1 );
+ assert ( width >= 2 * border );
+ assert ( height >= 2 * border );
+
+ tileBorder = border;
+ tileSize.width = width;
+ tileSize.height = height;
+ tileSizeNB.width = width - 2 * border;
+ tileSizeNB.height = height - 2 * border;
+ setup();
+ }
+
+ /**
+ * Specify a buffer the tiles to be copied to. This is not
+ * necessary for the creation of the final image, but useful if you
+ * want to inspect each tile in turn.
+ *
+ * @param format
+ * Interpreted as in glReadPixels
+ * @param type
+ * Interpreted as in glReadPixels
+ * @param image
+ * The buffer itself. Must be large enough to contain a
+ * tile, minus any borders
+ */
+ public void setTileBuffer( int format, int type, Buffer image )
+ {
+ tileFormat = format;
+ tileType = type;
+ tileBuffer = image;
+ }
+
+ /**
+ * Sets the desired size of the final image
+ *
+ * @param width
+ * The width of the final image
+ * @param height
+ * The height of the final image
+ */
+ public void setImageSize( int width, int height )
+ {
+ imageSize.width = width;
+ imageSize.height = height;
+ setup();
+ }
+
+ /**
+ * Sets the buffer in which to store the final image
+ *
+ * @param format
+ * Interpreted as in glReadPixels
+ * @param type
+ * Interpreted as in glReadPixels
+ * @param image
+ * the buffer itself, must be large enough to hold the
+ * final image
+ */
+ public void setImageBuffer( int format, int type, Buffer image )
+ {
+ imageFormat = format;
+ imageType = type;
+ imageBuffer = image;
+ }
+
+ /**
+ * Gets the parameters of this TileRenderer object
+ *
+ * @param param
+ * The parameter that is to be retrieved
+ * @return the value of the parameter
+ */
+ public int getParam( int param )
+ {
+ switch (param) {
+ case TR_TILE_WIDTH:
+ return tileSize.width;
+ case TR_TILE_HEIGHT:
+ return tileSize.height;
+ case TR_TILE_BORDER:
+ return tileBorder;
+ case TR_IMAGE_WIDTH:
+ return imageSize.width;
+ case TR_IMAGE_HEIGHT:
+ return imageSize.height;
+ case TR_ROWS:
+ return rows;
+ case TR_COLUMNS:
+ return columns;
+ case TR_CURRENT_ROW:
+ if( currentTile < 0 )
+ return -1;
+ else
+ return currentRow;
+ case TR_CURRENT_COLUMN:
+ if( currentTile < 0 )
+ return -1;
+ else
+ return currentColumn;
+ case TR_CURRENT_TILE_WIDTH:
+ return currentTileWidth;
+ case TR_CURRENT_TILE_HEIGHT:
+ return currentTileHeight;
+ case TR_ROW_ORDER:
+ return rowOrder;
+ default:
+ throw new IllegalArgumentException("Invalid enumerant as argument");
+ }
+ }
+
+ /**
+ * Sets the order of row traversal
+ *
+ * @param order
+ * The row traversal order, must be
+ * eitherTR_TOP_TO_BOTTOM or TR_BOTTOM_TO_TOP
+ */
+ public void setRowOrder( int order )
+ {
+ if (order == TR_TOP_TO_BOTTOM || order == TR_BOTTOM_TO_TOP) {
+ rowOrder = order;
+ } else {
+ throw new IllegalArgumentException("Must pass TR_TOP_TO_BOTTOM or TR_BOTTOM_TO_TOP");
+ }
+ }
+
+ /**
+ * Sets the context to use an orthographic projection. Must be
+ * called before rendering the first tile
+ *
+ * @param left
+ * As in glOrtho
+ * @param right
+ * As in glOrtho
+ * @param bottom
+ * As in glOrtho
+ * @param top
+ * As in glOrtho
+ * @param zNear
+ * As in glOrtho
+ * @param zFar
+ * As in glOrtho
+ */
+ public void trOrtho( double left, double right, double bottom, double top, double zNear,
+ double zFar )
+ {
+ this.perspective = false;
+ this.left = left;
+ this.right = right;
+ this.bottom = bottom;
+ this.top = top;
+ this.near = zNear;
+ this.far = zFar;
+ }
+
+ /**
+ * Sets the perspective projection frustrum. Must be called before
+ * rendering the first tile
+ *
+ * @param left
+ * As in glFrustrum
+ * @param right
+ * As in glFrustrum
+ * @param bottom
+ * As in glFrustrum
+ * @param top
+ * As in glFrustrum
+ * @param zNear
+ * As in glFrustrum
+ * @param zFar
+ * As in glFrustrum
+ */
+ public void trFrustum( double left, double right, double bottom, double top, double zNear,
+ double zFar )
+ {
+ this.perspective = true;
+ this.left = left;
+ this.right = right;
+ this.bottom = bottom;
+ this.top = top;
+ this.near = zNear;
+ this.far = zFar;
+ }
+
+ /**
+ * Convenient way to specify a perspective projection
+ *
+ * @param fovy
+ * As in gluPerspective
+ * @param aspect
+ * As in gluPerspective
+ * @param zNear
+ * As in gluPerspective
+ * @param zFar
+ * As in gluPerspective
+ */
+ public void trPerspective( double fovy, double aspect, double zNear, double zFar )
+ {
+ double xmin, xmax, ymin, ymax;
+ ymax = zNear * Math.tan( fovy * 3.14159265 / 360.0 );
+ ymin = -ymax;
+ xmin = ymin * aspect;
+ xmax = ymax * aspect;
+ trFrustum( xmin, xmax, ymin, ymax, zNear, zFar );
+ }
+
+ /**
+ * Begins rendering a tile. The projection matrix stack should be
+ * left alone after calling this
+ *
+ * @param gl
+ * The gl context
+ */
+ public void beginTile( GL2 gl )
+ {
+ if (currentTile <= 0) {
+ setup();
+ /*
+ * Save user's viewport, will be restored after last tile
+ * rendered
+ */
+ gl.glGetIntegerv( GL2.GL_VIEWPORT, viewportSave, 0 );
+ }
+
+ /* which tile (by row and column) we're about to render */
+ if (rowOrder == TR_BOTTOM_TO_TOP) {
+ currentRow = currentTile / columns;
+ currentColumn = currentTile % columns;
+ } else {
+ currentRow = rows - ( currentTile / columns ) - 1;
+ currentColumn = currentTile % columns;
+ }
+ assert ( currentRow < rows );
+ assert ( currentColumn < columns );
+
+ int border = tileBorder;
+
+ int th, tw;
+
+ /* Compute actual size of this tile with border */
+ if (currentRow < rows - 1) {
+ th = tileSize.height;
+ } else {
+ th = imageSize.height - ( rows - 1 ) * ( tileSizeNB.height ) + 2 * border;
+ }
+
+ if (currentColumn < columns - 1) {
+ tw = tileSize.width;
+ } else {
+ tw = imageSize.width - ( columns - 1 ) * ( tileSizeNB.width ) + 2 * border;
+ }
+
+ /* Save tile size, with border */
+ currentTileWidth = tw;
+ currentTileHeight = th;
+
+ gl.glViewport( 0, 0, tw, th );
+
+ /* save current matrix mode */
+ int[] matrixMode = new int[ 1 ];
+ gl.glGetIntegerv( GL2.GL_MATRIX_MODE, matrixMode, 0 );
+ gl.glMatrixMode( GL2.GL_PROJECTION );
+ gl.glLoadIdentity();
+
+ /* compute projection parameters */
+ double l =
+ left + ( right - left ) * ( currentColumn * tileSizeNB.width - border )
+ / imageSize.width;
+ double r = l + ( right - left ) * tw / imageSize.width;
+ double b =
+ bottom + ( top - bottom ) * ( currentRow * tileSizeNB.height - border )
+ / imageSize.height;
+ double t = b + ( top - bottom ) * th / imageSize.height;
+
+ if( perspective ) {
+ gl.glFrustum( l, r, b, t, near, far );
+ } else {
+ gl.glOrtho( l, r, b, t, near, far );
+ }
+
+ /* restore user's matrix mode */
+ gl.glMatrixMode( matrixMode[ 0 ] );
+ }
+
+ /**
+ * Must be called after rendering the scene
+ *
+ * @param gl
+ * the gl context
+ * @return true if there are more tiles to be rendered, false if
+ * the final image is complete
+ */
+ public boolean endTile( GL2 gl )
+ {
+ int[] prevRowLength = new int[ 1 ], prevSkipRows = new int[ 1 ], prevSkipPixels = new int[ 1 ], prevAlignment =
+ new int[ 1 ];
+
+ assert ( currentTile >= 0 );
+
+ // be sure OpenGL rendering is finished
+ gl.glFlush();
+
+ // save current glPixelStore values
+ gl.glGetIntegerv( GL2.GL_PACK_ROW_LENGTH, prevRowLength, 0 );
+ gl.glGetIntegerv( GL2.GL_PACK_SKIP_ROWS, prevSkipRows, 0 );
+ gl.glGetIntegerv( GL2.GL_PACK_SKIP_PIXELS, prevSkipPixels, 0 );
+ gl.glGetIntegerv( GL2.GL_PACK_ALIGNMENT, prevAlignment, 0 );
+
+ if( tileBuffer != null ) {
+ int srcX = tileBorder;
+ int srcY = tileBorder;
+ int srcWidth = tileSizeNB.width;
+ int srcHeight = tileSizeNB.height;
+ gl.glReadPixels( srcX, srcY, srcWidth, srcHeight, tileFormat, tileType, tileBuffer );
+ }
+
+ if( imageBuffer != null ) {
+ int srcX = tileBorder;
+ int srcY = tileBorder;
+ int srcWidth = currentTileWidth - 2 * tileBorder;
+ int srcHeight = currentTileHeight - 2 * tileBorder;
+ int destX = tileSizeNB.width * currentColumn;
+ int destY = tileSizeNB.height * currentRow;
+
+ /* setup pixel store for glReadPixels */
+ gl.glPixelStorei( GL2.GL_PACK_ROW_LENGTH, imageSize.width );
+ gl.glPixelStorei( GL2.GL_PACK_SKIP_ROWS, destY );
+ gl.glPixelStorei( GL2.GL_PACK_SKIP_PIXELS, destX );
+ gl.glPixelStorei( GL2.GL_PACK_ALIGNMENT, 1 );
+
+ /* read the tile into the final image */
+ gl.glReadPixels( srcX, srcY, srcWidth, srcHeight, imageFormat, imageType, imageBuffer );
+ }
+
+ /* restore previous glPixelStore values */
+ gl.glPixelStorei( GL2.GL_PACK_ROW_LENGTH, prevRowLength[ 0 ] );
+ gl.glPixelStorei( GL2.GL_PACK_SKIP_ROWS, prevSkipRows[ 0 ] );
+ gl.glPixelStorei( GL2.GL_PACK_SKIP_PIXELS, prevSkipPixels[ 0 ] );
+ gl.glPixelStorei( GL2.GL_PACK_ALIGNMENT, prevAlignment[ 0 ] );
+
+ /* increment tile counter, return 1 if more tiles left to render */
+ currentTile++;
+ if( currentTile >= rows * columns ) {
+ /* restore user's viewport */
+ gl.glViewport( viewportSave[ 0 ], viewportSave[ 1 ], viewportSave[ 2 ], viewportSave[ 3 ] );
+ currentTile = -1; /* all done */
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ /**
+ * Tile rendering causes problems with using glRasterPos3f, so you
+ * should use this replacement instead
+ *
+ * @param x
+ * As in glRasterPos3f
+ * @param y
+ * As in glRasterPos3f
+ * @param z
+ * As in glRasterPos3f
+ * @param gl
+ * The gl context
+ * @param glu
+ * A GLUgl2 object
+ */
+ public void trRasterPos3f( float x, float y, float z, GL2 gl, GLUgl2 glu )
+ {
+ if (currentTile < 0) {
+ /* not doing tile rendering right now. Let OpenGL do this. */
+ gl.glRasterPos3f( x, y, z );
+ } else {
+ double[] modelview = new double[ 16 ], proj = new double[ 16 ];
+ int[] viewport = new int[ 4 ];
+ double[] win = new double[3];
+
+ /* Get modelview, projection and viewport */
+ gl.glGetDoublev( GL2.GL_MODELVIEW_MATRIX, modelview, 0 );
+ gl.glGetDoublev( GL2.GL_PROJECTION_MATRIX, proj, 0 );
+ viewport[ 0 ] = 0;
+ viewport[ 1 ] = 0;
+ viewport[ 2 ] = currentTileWidth;
+ viewport[ 3 ] = currentTileHeight;
+
+ /* Project object coord to window coordinate */
+ if( glu.gluProject( x, y, z, modelview, 0, proj, 0, viewport, 0, win, 0 ) ) {
+
+ /* set raster pos to window coord (0,0) */
+ gl.glMatrixMode( GL2.GL_MODELVIEW );
+ gl.glPushMatrix();
+ gl.glLoadIdentity();
+ gl.glMatrixMode( GL2.GL_PROJECTION );
+ gl.glPushMatrix();
+ gl.glLoadIdentity();
+ gl.glOrtho( 0.0, currentTileWidth, 0.0, currentTileHeight, 0.0, 1.0 );
+ gl.glRasterPos3d( 0.0, 0.0, -win[ 2 ] );
+
+ /*
+ * Now use empty bitmap to adjust raster position to
+ * (winX,winY)
+ */
+ {
+ byte[] bitmap = { 0 };
+ gl.glBitmap( 1, 1, 0.0f, 0.0f, ( float ) win[ 0 ], ( float ) win[ 1 ], bitmap , 0 );
+ }
+
+ /* restore original matrices */
+ gl.glPopMatrix(); /* proj */
+ gl.glMatrixMode( GL2.GL_MODELVIEW );
+ gl.glPopMatrix();
+ }
+ }
+ }
+}
diff --git a/src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmap8x13.java b/src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmap8x13.java
new file mode 100644
index 000000000..166e8e6b0
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmap8x13.java
@@ -0,0 +1,2080 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.glut.fonts;
+
+import com.sun.opengl.util.glut.rec.*;
+
+public class GLUTBitmap8x13 {
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+
+static final BitmapCharRec ch0 = new BitmapCharRec(0,0,0,0,8,null);
+
+static final BitmapCharRec ch32 = new BitmapCharRec(0,0,0,0,8,null);
+
+static final BitmapCharRec ch127 = new BitmapCharRec(0,0,0,0,8,null);
+
+static final BitmapCharRec ch160 = new BitmapCharRec(0,0,0,0,8,null);
+
+/* char: 0xff */
+
+static final byte[] ch255data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x48,
+};
+
+static final BitmapCharRec ch255 = new BitmapCharRec(6,12,-1,2,8,ch255data);
+
+/* char: 0xfe */
+
+static final byte[] ch254data = {
+(byte) 0x80,(byte) 0x80,(byte) 0xb8,(byte) 0xc4,(byte) 0x84,(byte) 0x84,(byte) 0xc4,(byte) 0xb8,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch254 = new BitmapCharRec(6,10,-1,2,8,ch254data);
+
+/* char: 0xfd */
+
+static final byte[] ch253data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch253 = new BitmapCharRec(6,12,-1,2,8,ch253data);
+
+/* char: 0xfc */
+
+static final byte[] ch252data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x48,
+};
+
+static final BitmapCharRec ch252 = new BitmapCharRec(6,10,-1,0,8,ch252data);
+
+/* char: 0xfb */
+
+static final byte[] ch251data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch251 = new BitmapCharRec(6,10,-1,0,8,ch251data);
+
+/* char: 0xfa */
+
+static final byte[] ch250data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch250 = new BitmapCharRec(6,10,-1,0,8,ch250data);
+
+/* char: 0xf9 */
+
+static final byte[] ch249data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch249 = new BitmapCharRec(6,10,-1,0,8,ch249data);
+
+/* char: 0xf8 */
+
+static final byte[] ch248data = {
+(byte) 0x80,(byte) 0x78,(byte) 0xc4,(byte) 0xa4,(byte) 0x94,(byte) 0x8c,(byte) 0x78,(byte) 0x4,
+};
+
+static final BitmapCharRec ch248 = new BitmapCharRec(6,8,-1,1,8,ch248data);
+
+/* char: 0xf7 */
+
+static final byte[] ch247data = {
+(byte) 0x20,(byte) 0x20,(byte) 0x0,(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch247 = new BitmapCharRec(5,7,-1,-1,8,ch247data);
+
+/* char: 0xf6 */
+
+static final byte[] ch246data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x48,
+};
+
+static final BitmapCharRec ch246 = new BitmapCharRec(6,10,-1,0,8,ch246data);
+
+/* char: 0xf5 */
+
+static final byte[] ch245data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch245 = new BitmapCharRec(6,10,-1,0,8,ch245data);
+
+/* char: 0xf4 */
+
+static final byte[] ch244data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch244 = new BitmapCharRec(6,10,-1,0,8,ch244data);
+
+/* char: 0xf3 */
+
+static final byte[] ch243data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch243 = new BitmapCharRec(6,10,-1,0,8,ch243data);
+
+/* char: 0xf2 */
+
+static final byte[] ch242data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch242 = new BitmapCharRec(6,10,-1,0,8,ch242data);
+
+/* char: 0xf1 */
+
+static final byte[] ch241data = {
+(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xc4,(byte) 0xb8,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch241 = new BitmapCharRec(6,10,-1,0,8,ch241data);
+
+/* char: 0xf0 */
+
+static final byte[] ch240data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x8,(byte) 0x50,(byte) 0x30,(byte) 0x48,
+};
+
+static final BitmapCharRec ch240 = new BitmapCharRec(6,10,-1,0,8,ch240data);
+
+/* char: 0xef */
+
+static final byte[] ch239data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x50,
+};
+
+static final BitmapCharRec ch239 = new BitmapCharRec(5,10,-1,0,8,ch239data);
+
+/* char: 0xee */
+
+static final byte[] ch238data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch238 = new BitmapCharRec(5,10,-1,0,8,ch238data);
+
+/* char: 0xed */
+
+static final byte[] ch237data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch237 = new BitmapCharRec(5,10,-1,0,8,ch237data);
+
+/* char: 0xec */
+
+static final byte[] ch236data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch236 = new BitmapCharRec(5,10,-1,0,8,ch236data);
+
+/* char: 0xeb */
+
+static final byte[] ch235data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0xfc,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x48,
+};
+
+static final BitmapCharRec ch235 = new BitmapCharRec(6,10,-1,0,8,ch235data);
+
+/* char: 0xea */
+
+static final byte[] ch234data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0xfc,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch234 = new BitmapCharRec(6,10,-1,0,8,ch234data);
+
+/* char: 0xe9 */
+
+static final byte[] ch233data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0xfc,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch233 = new BitmapCharRec(6,10,-1,0,8,ch233data);
+
+/* char: 0xe8 */
+
+static final byte[] ch232data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0xfc,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch232 = new BitmapCharRec(6,10,-1,0,8,ch232data);
+
+/* char: 0xe7 */
+
+static final byte[] ch231data = {
+(byte) 0x20,(byte) 0x10,(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch231 = new BitmapCharRec(6,8,-1,2,8,ch231data);
+
+/* char: 0xe6 */
+
+static final byte[] ch230data = {
+(byte) 0x6c,(byte) 0x92,(byte) 0x90,(byte) 0x7c,(byte) 0x12,(byte) 0x6c,
+};
+
+static final BitmapCharRec ch230 = new BitmapCharRec(7,6,0,0,8,ch230data);
+
+/* char: 0xe5 */
+
+static final byte[] ch229data = {
+(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x7c,(byte) 0x4,(byte) 0x78,(byte) 0x0,(byte) 0x30,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch229 = new BitmapCharRec(6,10,-1,0,8,ch229data);
+
+/* char: 0xe4 */
+
+static final byte[] ch228data = {
+(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x7c,(byte) 0x4,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x48,
+};
+
+static final BitmapCharRec ch228 = new BitmapCharRec(6,10,-1,0,8,ch228data);
+
+/* char: 0xe3 */
+
+static final byte[] ch227data = {
+(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x7c,(byte) 0x4,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch227 = new BitmapCharRec(6,10,-1,0,8,ch227data);
+
+/* char: 0xe2 */
+
+static final byte[] ch226data = {
+(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x7c,(byte) 0x4,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch226 = new BitmapCharRec(6,10,-1,0,8,ch226data);
+
+/* char: 0xe1 */
+
+static final byte[] ch225data = {
+(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x7c,(byte) 0x4,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch225 = new BitmapCharRec(6,10,-1,0,8,ch225data);
+
+/* char: 0xe0 */
+
+static final byte[] ch224data = {
+(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x7c,(byte) 0x4,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch224 = new BitmapCharRec(6,10,-1,0,8,ch224data);
+
+/* char: 0xdf */
+
+static final byte[] ch223data = {
+(byte) 0x80,(byte) 0xb8,(byte) 0xc4,(byte) 0x84,(byte) 0x84,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch223 = new BitmapCharRec(6,9,-1,1,8,ch223data);
+
+/* char: 0xde */
+
+static final byte[] ch222data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,(byte) 0x80,
+};
+
+static final BitmapCharRec ch222 = new BitmapCharRec(6,9,-1,0,8,ch222data);
+
+/* char: 0xdd */
+
+static final byte[] ch221data = {
+(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x50,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch221 = new BitmapCharRec(5,10,-1,0,8,ch221data);
+
+/* char: 0xdc */
+
+static final byte[] ch220data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x48,(byte) 0x48,
+};
+
+static final BitmapCharRec ch220 = new BitmapCharRec(6,10,-1,0,8,ch220data);
+
+/* char: 0xdb */
+
+static final byte[] ch219data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch219 = new BitmapCharRec(6,10,-1,0,8,ch219data);
+
+/* char: 0xda */
+
+static final byte[] ch218data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch218 = new BitmapCharRec(6,10,-1,0,8,ch218data);
+
+/* char: 0xd9 */
+
+static final byte[] ch217data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch217 = new BitmapCharRec(6,10,-1,0,8,ch217data);
+
+/* char: 0xd8 */
+
+static final byte[] ch216data = {
+(byte) 0x80,(byte) 0x78,(byte) 0xc4,(byte) 0xa4,(byte) 0xa4,(byte) 0xa4,(byte) 0x94,(byte) 0x94,(byte) 0x8c,(byte) 0x78,(byte) 0x4,
+};
+
+static final BitmapCharRec ch216 = new BitmapCharRec(6,11,-1,1,8,ch216data);
+
+/* char: 0xd7 */
+
+static final byte[] ch215data = {
+(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x30,(byte) 0x48,(byte) 0x84,
+};
+
+static final BitmapCharRec ch215 = new BitmapCharRec(6,6,-1,-1,8,ch215data);
+
+/* char: 0xd6 */
+
+static final byte[] ch214data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch214 = new BitmapCharRec(7,10,0,0,8,ch214data);
+
+/* char: 0xd5 */
+
+static final byte[] ch213data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x28,(byte) 0x14,
+};
+
+static final BitmapCharRec ch213 = new BitmapCharRec(7,10,0,0,8,ch213data);
+
+/* char: 0xd4 */
+
+static final byte[] ch212data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x24,(byte) 0x18,
+};
+
+static final BitmapCharRec ch212 = new BitmapCharRec(7,10,0,0,8,ch212data);
+
+/* char: 0xd3 */
+
+static final byte[] ch211data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch211 = new BitmapCharRec(7,10,0,0,8,ch211data);
+
+/* char: 0xd2 */
+
+static final byte[] ch210data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x8,(byte) 0x10,
+};
+
+static final BitmapCharRec ch210 = new BitmapCharRec(7,10,0,0,8,ch210data);
+
+/* char: 0xd1 */
+
+static final byte[] ch209data = {
+(byte) 0x82,(byte) 0x86,(byte) 0x8a,(byte) 0x92,(byte) 0xa2,(byte) 0xc2,(byte) 0x82,(byte) 0x0,(byte) 0x28,(byte) 0x14,
+};
+
+static final BitmapCharRec ch209 = new BitmapCharRec(7,10,0,0,8,ch209data);
+
+/* char: 0xd0 */
+
+static final byte[] ch208data = {
+(byte) 0xfc,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xe2,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch208 = new BitmapCharRec(7,9,0,0,8,ch208data);
+
+/* char: 0xcf */
+
+static final byte[] ch207data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x50,(byte) 0x50,
+};
+
+static final BitmapCharRec ch207 = new BitmapCharRec(5,10,-1,0,8,ch207data);
+
+/* char: 0xce */
+
+static final byte[] ch206data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch206 = new BitmapCharRec(5,10,-1,0,8,ch206data);
+
+/* char: 0xcd */
+
+static final byte[] ch205data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch205 = new BitmapCharRec(5,10,-1,0,8,ch205data);
+
+/* char: 0xcc */
+
+static final byte[] ch204data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch204 = new BitmapCharRec(5,10,-1,0,8,ch204data);
+
+/* char: 0xcb */
+
+static final byte[] ch203data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x48,(byte) 0x48,
+};
+
+static final BitmapCharRec ch203 = new BitmapCharRec(6,10,-1,0,8,ch203data);
+
+/* char: 0xca */
+
+static final byte[] ch202data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch202 = new BitmapCharRec(6,10,-1,0,8,ch202data);
+
+/* char: 0xc9 */
+
+static final byte[] ch201data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch201 = new BitmapCharRec(6,10,-1,0,8,ch201data);
+
+/* char: 0xc8 */
+
+static final byte[] ch200data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch200 = new BitmapCharRec(6,10,-1,0,8,ch200data);
+
+/* char: 0xc7 */
+
+static final byte[] ch199data = {
+(byte) 0x20,(byte) 0x10,(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch199 = new BitmapCharRec(6,11,-1,2,8,ch199data);
+
+/* char: 0xc6 */
+
+static final byte[] ch198data = {
+(byte) 0x9e,(byte) 0x90,(byte) 0x90,(byte) 0xf0,(byte) 0x9c,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x6e,
+};
+
+static final BitmapCharRec ch198 = new BitmapCharRec(7,9,0,0,8,ch198data);
+
+/* char: 0xc5 */
+
+static final byte[] ch197data = {
+(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x30,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch197 = new BitmapCharRec(6,10,-1,0,8,ch197data);
+
+/* char: 0xc4 */
+
+static final byte[] ch196data = {
+(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x0,(byte) 0x48,(byte) 0x48,
+};
+
+static final BitmapCharRec ch196 = new BitmapCharRec(6,10,-1,0,8,ch196data);
+
+/* char: 0xc3 */
+
+static final byte[] ch195data = {
+(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch195 = new BitmapCharRec(6,10,-1,0,8,ch195data);
+
+/* char: 0xc2 */
+
+static final byte[] ch194data = {
+(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x0,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch194 = new BitmapCharRec(6,10,-1,0,8,ch194data);
+
+/* char: 0xc1 */
+
+static final byte[] ch193data = {
+(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch193 = new BitmapCharRec(6,10,-1,0,8,ch193data);
+
+/* char: 0xc0 */
+
+static final byte[] ch192data = {
+(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch192 = new BitmapCharRec(6,10,-1,0,8,ch192data);
+
+/* char: 0xbf */
+
+static final byte[] ch191data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x0,(byte) 0x20,
+};
+
+static final BitmapCharRec ch191 = new BitmapCharRec(6,9,-1,0,8,ch191data);
+
+/* char: 0xbe */
+
+static final byte[] ch190data = {
+(byte) 0x6,(byte) 0x1a,(byte) 0x12,(byte) 0xa,(byte) 0x66,(byte) 0x92,(byte) 0x10,(byte) 0x20,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch190 = new BitmapCharRec(7,10,0,0,8,ch190data);
+
+/* char: 0xbd */
+
+static final byte[] ch189data = {
+(byte) 0x1e,(byte) 0x10,(byte) 0xc,(byte) 0x2,(byte) 0xf2,(byte) 0x4c,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch189 = new BitmapCharRec(7,10,0,0,8,ch189data);
+
+/* char: 0xbc */
+
+static final byte[] ch188data = {
+(byte) 0x6,(byte) 0x1a,(byte) 0x12,(byte) 0xa,(byte) 0xe6,(byte) 0x42,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch188 = new BitmapCharRec(7,10,0,0,8,ch188data);
+
+/* char: 0xbb */
+
+static final byte[] ch187data = {
+(byte) 0x90,(byte) 0x48,(byte) 0x24,(byte) 0x12,(byte) 0x24,(byte) 0x48,(byte) 0x90,
+};
+
+static final BitmapCharRec ch187 = new BitmapCharRec(7,7,0,-1,8,ch187data);
+
+/* char: 0xba */
+
+static final byte[] ch186data = {
+(byte) 0xf0,(byte) 0x0,(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch186 = new BitmapCharRec(4,6,-1,-3,8,ch186data);
+
+/* char: 0xb9 */
+
+static final byte[] ch185data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch185 = new BitmapCharRec(3,6,-1,-4,8,ch185data);
+
+/* char: 0xb8 */
+
+static final byte[] ch184data = {
+(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch184 = new BitmapCharRec(2,2,-3,2,8,ch184data);
+
+/* char: 0xb7 */
+
+static final byte[] ch183data = {
+(byte) 0xc0,
+};
+
+static final BitmapCharRec ch183 = new BitmapCharRec(2,1,-3,-4,8,ch183data);
+
+/* char: 0xb6 */
+
+static final byte[] ch182data = {
+(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x68,(byte) 0xe8,(byte) 0xe8,(byte) 0xe8,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch182 = new BitmapCharRec(6,9,-1,0,8,ch182data);
+
+/* char: 0xb5 */
+
+static final byte[] ch181data = {
+(byte) 0x80,(byte) 0xb4,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,
+};
+
+static final BitmapCharRec ch181 = new BitmapCharRec(6,7,-1,1,8,ch181data);
+
+/* char: 0xb4 */
+
+static final byte[] ch180data = {
+(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch180 = new BitmapCharRec(2,2,-3,-8,8,ch180data);
+
+/* char: 0xb3 */
+
+static final byte[] ch179data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x10,(byte) 0x20,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch179 = new BitmapCharRec(4,6,-1,-4,8,ch179data);
+
+/* char: 0xb2 */
+
+static final byte[] ch178data = {
+(byte) 0xf0,(byte) 0x80,(byte) 0x60,(byte) 0x10,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch178 = new BitmapCharRec(4,6,-1,-4,8,ch178data);
+
+/* char: 0xb1 */
+
+static final byte[] ch177data = {
+(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch177 = new BitmapCharRec(5,7,-1,-1,8,ch177data);
+
+/* char: 0xb0 */
+
+static final byte[] ch176data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch176 = new BitmapCharRec(4,4,-2,-5,8,ch176data);
+
+/* char: 0xaf */
+
+static final byte[] ch175data = {
+(byte) 0xfc,
+};
+
+static final BitmapCharRec ch175 = new BitmapCharRec(6,1,-1,-8,8,ch175data);
+
+/* char: 0xae */
+
+static final byte[] ch174data = {
+(byte) 0x38,(byte) 0x44,(byte) 0xaa,(byte) 0xb2,(byte) 0xaa,(byte) 0xaa,(byte) 0x92,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch174 = new BitmapCharRec(7,9,0,-1,8,ch174data);
+
+/* char: 0xad */
+
+static final byte[] ch173data = {
+(byte) 0xfc,
+};
+
+static final BitmapCharRec ch173 = new BitmapCharRec(6,1,-1,-4,8,ch173data);
+
+/* char: 0xac */
+
+static final byte[] ch172data = {
+(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch172 = new BitmapCharRec(6,4,-1,-1,8,ch172data);
+
+/* char: 0xab */
+
+static final byte[] ch171data = {
+(byte) 0x12,(byte) 0x24,(byte) 0x48,(byte) 0x90,(byte) 0x48,(byte) 0x24,(byte) 0x12,
+};
+
+static final BitmapCharRec ch171 = new BitmapCharRec(7,7,0,-1,8,ch171data);
+
+/* char: 0xaa */
+
+static final byte[] ch170data = {
+(byte) 0xf8,(byte) 0x0,(byte) 0x78,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x70,
+};
+
+static final BitmapCharRec ch170 = new BitmapCharRec(5,7,-1,-2,8,ch170data);
+
+/* char: 0xa9 */
+
+static final byte[] ch169data = {
+(byte) 0x38,(byte) 0x44,(byte) 0x92,(byte) 0xaa,(byte) 0xa2,(byte) 0xaa,(byte) 0x92,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch169 = new BitmapCharRec(7,9,0,-1,8,ch169data);
+
+/* char: 0xa8 */
+
+static final byte[] ch168data = {
+(byte) 0xd8,
+};
+
+static final BitmapCharRec ch168 = new BitmapCharRec(5,1,-1,-8,8,ch168data);
+
+/* char: 0xa7 */
+
+static final byte[] ch167data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x10,(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x80,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch167 = new BitmapCharRec(4,10,-2,0,8,ch167data);
+
+/* char: 0xa6 */
+
+static final byte[] ch166data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch166 = new BitmapCharRec(1,9,-3,0,8,ch166data);
+
+/* char: 0xa5 */
+
+static final byte[] ch165data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x7c,(byte) 0x10,(byte) 0x7c,(byte) 0x28,(byte) 0x44,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch165 = new BitmapCharRec(7,9,0,0,8,ch165data);
+
+/* char: 0xa4 */
+
+static final byte[] ch164data = {
+(byte) 0x84,(byte) 0x78,(byte) 0x48,(byte) 0x48,(byte) 0x78,(byte) 0x84,
+};
+
+static final BitmapCharRec ch164 = new BitmapCharRec(6,6,-1,-1,8,ch164data);
+
+/* char: 0xa3 */
+
+static final byte[] ch163data = {
+(byte) 0xdc,(byte) 0x62,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x70,(byte) 0x20,(byte) 0x22,(byte) 0x1c,
+};
+
+static final BitmapCharRec ch163 = new BitmapCharRec(7,9,0,0,8,ch163data);
+
+/* char: 0xa2 */
+
+static final byte[] ch162data = {
+(byte) 0x20,(byte) 0x70,(byte) 0xa8,(byte) 0xa0,(byte) 0xa0,(byte) 0xa8,(byte) 0x70,(byte) 0x20,
+};
+
+static final BitmapCharRec ch162 = new BitmapCharRec(5,8,-1,-1,8,ch162data);
+
+/* char: 0xa1 */
+
+static final byte[] ch161data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch161 = new BitmapCharRec(1,9,-3,0,8,ch161data);
+
+/* char: 0x7e '~' */
+
+static final byte[] ch126data = {
+(byte) 0x90,(byte) 0xa8,(byte) 0x48,
+};
+
+static final BitmapCharRec ch126 = new BitmapCharRec(5,3,-1,-6,8,ch126data);
+
+/* char: 0x7d '}' */
+
+static final byte[] ch125data = {
+(byte) 0xe0,(byte) 0x10,(byte) 0x10,(byte) 0x20,(byte) 0x18,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch125 = new BitmapCharRec(5,9,-1,0,8,ch125data);
+
+/* char: 0x7c '|' */
+
+static final byte[] ch124data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch124 = new BitmapCharRec(1,9,-3,0,8,ch124data);
+
+/* char: 0x7b '{' */
+
+static final byte[] ch123data = {
+(byte) 0x38,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x38,
+};
+
+static final BitmapCharRec ch123 = new BitmapCharRec(5,9,-2,0,8,ch123data);
+
+/* char: 0x7a 'z' */
+
+static final byte[] ch122data = {
+(byte) 0xfc,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch122 = new BitmapCharRec(6,6,-1,0,8,ch122data);
+
+/* char: 0x79 'y' */
+
+static final byte[] ch121data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x84,
+};
+
+static final BitmapCharRec ch121 = new BitmapCharRec(6,8,-1,2,8,ch121data);
+
+/* char: 0x78 'x' */
+
+static final byte[] ch120data = {
+(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x30,(byte) 0x48,(byte) 0x84,
+};
+
+static final BitmapCharRec ch120 = new BitmapCharRec(6,6,-1,0,8,ch120data);
+
+/* char: 0x77 'w' */
+
+static final byte[] ch119data = {
+(byte) 0x44,(byte) 0xaa,(byte) 0x92,(byte) 0x92,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch119 = new BitmapCharRec(7,6,0,0,8,ch119data);
+
+/* char: 0x76 'v' */
+
+static final byte[] ch118data = {
+(byte) 0x20,(byte) 0x50,(byte) 0x50,(byte) 0x88,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch118 = new BitmapCharRec(5,6,-1,0,8,ch118data);
+
+/* char: 0x75 'u' */
+
+static final byte[] ch117data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch117 = new BitmapCharRec(6,6,-1,0,8,ch117data);
+
+/* char: 0x74 't' */
+
+static final byte[] ch116data = {
+(byte) 0x38,(byte) 0x44,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xf8,(byte) 0x40,(byte) 0x40,
+};
+
+static final BitmapCharRec ch116 = new BitmapCharRec(6,8,-1,0,8,ch116data);
+
+/* char: 0x73 's' */
+
+static final byte[] ch115data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x18,(byte) 0x60,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch115 = new BitmapCharRec(6,6,-1,0,8,ch115data);
+
+/* char: 0x72 'r' */
+
+static final byte[] ch114data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x44,(byte) 0xb8,
+};
+
+static final BitmapCharRec ch114 = new BitmapCharRec(6,6,-1,0,8,ch114data);
+
+/* char: 0x71 'q' */
+
+static final byte[] ch113data = {
+(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x8c,(byte) 0x74,
+};
+
+static final BitmapCharRec ch113 = new BitmapCharRec(6,8,-1,2,8,ch113data);
+
+/* char: 0x70 'p' */
+
+static final byte[] ch112data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xb8,(byte) 0xc4,(byte) 0x84,(byte) 0xc4,(byte) 0xb8,
+};
+
+static final BitmapCharRec ch112 = new BitmapCharRec(6,8,-1,2,8,ch112data);
+
+/* char: 0x6f 'o' */
+
+static final byte[] ch111data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch111 = new BitmapCharRec(6,6,-1,0,8,ch111data);
+
+/* char: 0x6e 'n' */
+
+static final byte[] ch110data = {
+(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xc4,(byte) 0xb8,
+};
+
+static final BitmapCharRec ch110 = new BitmapCharRec(6,6,-1,0,8,ch110data);
+
+/* char: 0x6d 'm' */
+
+static final byte[] ch109data = {
+(byte) 0x82,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0xec,
+};
+
+static final BitmapCharRec ch109 = new BitmapCharRec(7,6,0,0,8,ch109data);
+
+/* char: 0x6c 'l' */
+
+static final byte[] ch108data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x60,
+};
+
+static final BitmapCharRec ch108 = new BitmapCharRec(5,9,-1,0,8,ch108data);
+
+/* char: 0x6b 'k' */
+
+static final byte[] ch107data = {
+(byte) 0x84,(byte) 0x88,(byte) 0x90,(byte) 0xe0,(byte) 0x90,(byte) 0x88,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch107 = new BitmapCharRec(6,9,-1,0,8,ch107data);
+
+/* char: 0x6a 'j' */
+
+static final byte[] ch106data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x18,(byte) 0x0,(byte) 0x8,
+};
+
+static final BitmapCharRec ch106 = new BitmapCharRec(5,10,-1,2,8,ch106data);
+
+/* char: 0x69 'i' */
+
+static final byte[] ch105data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x60,(byte) 0x0,(byte) 0x20,
+};
+
+static final BitmapCharRec ch105 = new BitmapCharRec(5,8,-1,0,8,ch105data);
+
+/* char: 0x68 'h' */
+
+static final byte[] ch104data = {
+(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xc4,(byte) 0xb8,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch104 = new BitmapCharRec(6,9,-1,0,8,ch104data);
+
+/* char: 0x67 'g' */
+
+static final byte[] ch103data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x78,(byte) 0x80,(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x74,
+};
+
+static final BitmapCharRec ch103 = new BitmapCharRec(6,8,-1,2,8,ch103data);
+
+/* char: 0x66 'f' */
+
+static final byte[] ch102data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xf8,(byte) 0x40,(byte) 0x40,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch102 = new BitmapCharRec(6,9,-1,0,8,ch102data);
+
+/* char: 0x65 'e' */
+
+static final byte[] ch101data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0xfc,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch101 = new BitmapCharRec(6,6,-1,0,8,ch101data);
+
+/* char: 0x64 'd' */
+
+static final byte[] ch100data = {
+(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x8c,(byte) 0x74,(byte) 0x4,(byte) 0x4,(byte) 0x4,
+};
+
+static final BitmapCharRec ch100 = new BitmapCharRec(6,9,-1,0,8,ch100data);
+
+/* char: 0x63 'c' */
+
+static final byte[] ch99data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch99 = new BitmapCharRec(6,6,-1,0,8,ch99data);
+
+/* char: 0x62 'b' */
+
+static final byte[] ch98data = {
+(byte) 0xb8,(byte) 0xc4,(byte) 0x84,(byte) 0x84,(byte) 0xc4,(byte) 0xb8,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch98 = new BitmapCharRec(6,9,-1,0,8,ch98data);
+
+/* char: 0x61 'a' */
+
+static final byte[] ch97data = {
+(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x7c,(byte) 0x4,(byte) 0x78,
+};
+
+static final BitmapCharRec ch97 = new BitmapCharRec(6,6,-1,0,8,ch97data);
+
+/* char: 0x60 '`' */
+
+static final byte[] ch96data = {
+(byte) 0x10,(byte) 0x60,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch96 = new BitmapCharRec(4,3,-2,-6,8,ch96data);
+
+/* char: 0x5f '_' */
+
+static final byte[] ch95data = {
+(byte) 0xfe,
+};
+
+static final BitmapCharRec ch95 = new BitmapCharRec(7,1,0,1,8,ch95data);
+
+/* char: 0x5e '^' */
+
+static final byte[] ch94data = {
+(byte) 0x88,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch94 = new BitmapCharRec(5,3,-1,-6,8,ch94data);
+
+/* char: 0x5d ']' */
+
+static final byte[] ch93data = {
+(byte) 0xf0,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch93 = new BitmapCharRec(4,9,-1,0,8,ch93data);
+
+/* char: 0x5c '\' */
+
+static final byte[] ch92data = {
+(byte) 0x2,(byte) 0x2,(byte) 0x4,(byte) 0x8,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch92 = new BitmapCharRec(7,9,0,0,8,ch92data);
+
+/* char: 0x5b '[' */
+
+static final byte[] ch91data = {
+(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch91 = new BitmapCharRec(4,9,-2,0,8,ch91data);
+
+/* char: 0x5a 'Z' */
+
+static final byte[] ch90data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch90 = new BitmapCharRec(6,9,-1,0,8,ch90data);
+
+/* char: 0x59 'Y' */
+
+static final byte[] ch89data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch89 = new BitmapCharRec(7,9,0,0,8,ch89data);
+
+/* char: 0x58 'X' */
+
+static final byte[] ch88data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch88 = new BitmapCharRec(7,9,0,0,8,ch88data);
+
+/* char: 0x57 'W' */
+
+static final byte[] ch87data = {
+(byte) 0x44,(byte) 0xaa,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch87 = new BitmapCharRec(7,9,0,0,8,ch87data);
+
+/* char: 0x56 'V' */
+
+static final byte[] ch86data = {
+(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch86 = new BitmapCharRec(7,9,0,0,8,ch86data);
+
+/* char: 0x55 'U' */
+
+static final byte[] ch85data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,
+};
+
+static final BitmapCharRec ch85 = new BitmapCharRec(6,9,-1,0,8,ch85data);
+
+/* char: 0x54 'T' */
+
+static final byte[] ch84data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch84 = new BitmapCharRec(7,9,0,0,8,ch84data);
+
+/* char: 0x53 'S' */
+
+static final byte[] ch83data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x4,(byte) 0x78,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch83 = new BitmapCharRec(6,9,-1,0,8,ch83data);
+
+/* char: 0x52 'R' */
+
+static final byte[] ch82data = {
+(byte) 0x84,(byte) 0x88,(byte) 0x90,(byte) 0xa0,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch82 = new BitmapCharRec(6,9,-1,0,8,ch82data);
+
+/* char: 0x51 'Q' */
+
+static final byte[] ch81data = {
+(byte) 0x4,(byte) 0x78,(byte) 0x94,(byte) 0xa4,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch81 = new BitmapCharRec(6,10,-1,1,8,ch81data);
+
+/* char: 0x50 'P' */
+
+static final byte[] ch80data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch80 = new BitmapCharRec(6,9,-1,0,8,ch80data);
+
+/* char: 0x4f 'O' */
+
+static final byte[] ch79data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch79 = new BitmapCharRec(6,9,-1,0,8,ch79data);
+
+/* char: 0x4e 'N' */
+
+static final byte[] ch78data = {
+(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x8c,(byte) 0x94,(byte) 0xa4,(byte) 0xc4,(byte) 0x84,(byte) 0x84,
+};
+
+static final BitmapCharRec ch78 = new BitmapCharRec(6,9,-1,0,8,ch78data);
+
+/* char: 0x4d 'M' */
+
+static final byte[] ch77data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x92,(byte) 0x92,(byte) 0xaa,(byte) 0xc6,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch77 = new BitmapCharRec(7,9,0,0,8,ch77data);
+
+/* char: 0x4c 'L' */
+
+static final byte[] ch76data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch76 = new BitmapCharRec(6,9,-1,0,8,ch76data);
+
+/* char: 0x4b 'K' */
+
+static final byte[] ch75data = {
+(byte) 0x84,(byte) 0x88,(byte) 0x90,(byte) 0xa0,(byte) 0xc0,(byte) 0xa0,(byte) 0x90,(byte) 0x88,(byte) 0x84,
+};
+
+static final BitmapCharRec ch75 = new BitmapCharRec(6,9,-1,0,8,ch75data);
+
+/* char: 0x4a 'J' */
+
+static final byte[] ch74data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch74 = new BitmapCharRec(6,9,-1,0,8,ch74data);
+
+/* char: 0x49 'I' */
+
+static final byte[] ch73data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch73 = new BitmapCharRec(5,9,-1,0,8,ch73data);
+
+/* char: 0x48 'H' */
+
+static final byte[] ch72data = {
+(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,
+};
+
+static final BitmapCharRec ch72 = new BitmapCharRec(6,9,-1,0,8,ch72data);
+
+/* char: 0x47 'G' */
+
+static final byte[] ch71data = {
+(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x9c,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch71 = new BitmapCharRec(6,9,-1,0,8,ch71data);
+
+/* char: 0x46 'F' */
+
+static final byte[] ch70data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch70 = new BitmapCharRec(6,9,-1,0,8,ch70data);
+
+/* char: 0x45 'E' */
+
+static final byte[] ch69data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch69 = new BitmapCharRec(6,9,-1,0,8,ch69data);
+
+/* char: 0x44 'D' */
+
+static final byte[] ch68data = {
+(byte) 0xfc,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch68 = new BitmapCharRec(7,9,0,0,8,ch68data);
+
+/* char: 0x43 'C' */
+
+static final byte[] ch67data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch67 = new BitmapCharRec(6,9,-1,0,8,ch67data);
+
+/* char: 0x42 'B' */
+
+static final byte[] ch66data = {
+(byte) 0xfc,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x7c,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch66 = new BitmapCharRec(7,9,0,0,8,ch66data);
+
+/* char: 0x41 'A' */
+
+static final byte[] ch65data = {
+(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch65 = new BitmapCharRec(6,9,-1,0,8,ch65data);
+
+/* char: 0x40 '@' */
+
+static final byte[] ch64data = {
+(byte) 0x78,(byte) 0x80,(byte) 0x94,(byte) 0xac,(byte) 0xa4,(byte) 0x9c,(byte) 0x84,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch64 = new BitmapCharRec(6,9,-1,0,8,ch64data);
+
+/* char: 0x3f '?' */
+
+static final byte[] ch63data = {
+(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0x84,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch63 = new BitmapCharRec(6,9,-1,0,8,ch63data);
+
+/* char: 0x3e '>' */
+
+static final byte[] ch62data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch62 = new BitmapCharRec(5,9,-1,0,8,ch62data);
+
+/* char: 0x3d '=' */
+
+static final byte[] ch61data = {
+(byte) 0xfc,(byte) 0x0,(byte) 0x0,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch61 = new BitmapCharRec(6,4,-1,-2,8,ch61data);
+
+/* char: 0x3c '<' */
+
+static final byte[] ch60data = {
+(byte) 0x8,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch60 = new BitmapCharRec(5,9,-2,0,8,ch60data);
+
+/* char: 0x3b ';' */
+
+static final byte[] ch59data = {
+(byte) 0x80,(byte) 0x60,(byte) 0x70,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x70,(byte) 0x20,
+};
+
+static final BitmapCharRec ch59 = new BitmapCharRec(4,8,-1,1,8,ch59data);
+
+/* char: 0x3a ':' */
+
+static final byte[] ch58data = {
+(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x0,(byte) 0x0,(byte) 0x40,(byte) 0xe0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch58 = new BitmapCharRec(3,8,-2,1,8,ch58data);
+
+/* char: 0x39 '9' */
+
+static final byte[] ch57data = {
+(byte) 0x70,(byte) 0x8,(byte) 0x4,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch57 = new BitmapCharRec(6,9,-1,0,8,ch57data);
+
+/* char: 0x38 '8' */
+
+static final byte[] ch56data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch56 = new BitmapCharRec(6,9,-1,0,8,ch56data);
+
+/* char: 0x37 '7' */
+
+static final byte[] ch55data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch55 = new BitmapCharRec(6,9,-1,0,8,ch55data);
+
+/* char: 0x36 '6' */
+
+static final byte[] ch54data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0xc4,(byte) 0xb8,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x38,
+};
+
+static final BitmapCharRec ch54 = new BitmapCharRec(6,9,-1,0,8,ch54data);
+
+/* char: 0x35 '5' */
+
+static final byte[] ch53data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x4,(byte) 0xc4,(byte) 0xb8,(byte) 0x80,(byte) 0x80,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch53 = new BitmapCharRec(6,9,-1,0,8,ch53data);
+
+/* char: 0x34 '4' */
+
+static final byte[] ch52data = {
+(byte) 0x8,(byte) 0x8,(byte) 0xfc,(byte) 0x88,(byte) 0x88,(byte) 0x48,(byte) 0x28,(byte) 0x18,(byte) 0x8,
+};
+
+static final BitmapCharRec ch52 = new BitmapCharRec(6,9,-1,0,8,ch52data);
+
+/* char: 0x33 '3' */
+
+static final byte[] ch51data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x4,(byte) 0x38,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch51 = new BitmapCharRec(6,9,-1,0,8,ch51data);
+
+/* char: 0x32 '2' */
+
+static final byte[] ch50data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x40,(byte) 0x30,(byte) 0x8,(byte) 0x4,(byte) 0x84,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch50 = new BitmapCharRec(6,9,-1,0,8,ch50data);
+
+/* char: 0x31 '1' */
+
+static final byte[] ch49data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xa0,(byte) 0x60,(byte) 0x20,
+};
+
+static final BitmapCharRec ch49 = new BitmapCharRec(5,9,-1,0,8,ch49data);
+
+/* char: 0x30 '0' */
+
+static final byte[] ch48data = {
+(byte) 0x30,(byte) 0x48,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch48 = new BitmapCharRec(6,9,-1,0,8,ch48data);
+
+/* char: 0x2f '/' */
+
+static final byte[] ch47data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0x2,(byte) 0x2,
+};
+
+static final BitmapCharRec ch47 = new BitmapCharRec(7,9,0,0,8,ch47data);
+
+/* char: 0x2e '.' */
+
+static final byte[] ch46data = {
+(byte) 0x40,(byte) 0xe0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch46 = new BitmapCharRec(3,3,-2,1,8,ch46data);
+
+/* char: 0x2d '-' */
+
+static final byte[] ch45data = {
+(byte) 0xfc,
+};
+
+static final BitmapCharRec ch45 = new BitmapCharRec(6,1,-1,-4,8,ch45data);
+
+/* char: 0x2c ',' */
+
+static final byte[] ch44data = {
+(byte) 0x80,(byte) 0x60,(byte) 0x70,
+};
+
+static final BitmapCharRec ch44 = new BitmapCharRec(4,3,-1,1,8,ch44data);
+
+/* char: 0x2b '+' */
+
+static final byte[] ch43data = {
+(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch43 = new BitmapCharRec(5,5,-1,-2,8,ch43data);
+
+/* char: 0x2a '*' */
+
+static final byte[] ch42data = {
+(byte) 0x48,(byte) 0x30,(byte) 0xfc,(byte) 0x30,(byte) 0x48,
+};
+
+static final BitmapCharRec ch42 = new BitmapCharRec(6,5,-1,-2,8,ch42data);
+
+/* char: 0x29 ')' */
+
+static final byte[] ch41data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch41 = new BitmapCharRec(3,9,-2,0,8,ch41data);
+
+/* char: 0x28 '(' */
+
+static final byte[] ch40data = {
+(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch40 = new BitmapCharRec(3,9,-3,0,8,ch40data);
+
+/* char: 0x27 ''' */
+
+static final byte[] ch39data = {
+(byte) 0x80,(byte) 0x60,(byte) 0x70,
+};
+
+static final BitmapCharRec ch39 = new BitmapCharRec(4,3,-1,-6,8,ch39data);
+
+/* char: 0x26 '&' */
+
+static final byte[] ch38data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x94,(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch38 = new BitmapCharRec(6,7,-1,0,8,ch38data);
+
+/* char: 0x25 '%' */
+
+static final byte[] ch37data = {
+(byte) 0x88,(byte) 0x54,(byte) 0x48,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x48,(byte) 0xa4,(byte) 0x44,
+};
+
+static final BitmapCharRec ch37 = new BitmapCharRec(6,9,-1,0,8,ch37data);
+
+/* char: 0x24 '$' */
+
+static final byte[] ch36data = {
+(byte) 0x20,(byte) 0xf0,(byte) 0x28,(byte) 0x70,(byte) 0xa0,(byte) 0x78,(byte) 0x20,
+};
+
+static final BitmapCharRec ch36 = new BitmapCharRec(5,7,-1,-1,8,ch36data);
+
+/* char: 0x23 '#' */
+
+static final byte[] ch35data = {
+(byte) 0x48,(byte) 0x48,(byte) 0xfc,(byte) 0x48,(byte) 0xfc,(byte) 0x48,(byte) 0x48,
+};
+
+static final BitmapCharRec ch35 = new BitmapCharRec(6,7,-1,-1,8,ch35data);
+
+/* char: 0x22 '"' */
+
+static final byte[] ch34data = {
+(byte) 0x90,(byte) 0x90,(byte) 0x90,
+};
+
+static final BitmapCharRec ch34 = new BitmapCharRec(4,3,-2,-6,8,ch34data);
+
+/* char: 0x21 '!' */
+
+static final byte[] ch33data = {
+(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch33 = new BitmapCharRec(1,9,-3,0,8,ch33data);
+
+/* char: 0x1f */
+
+static final byte[] ch31data = {
+(byte) 0x80,
+};
+
+static final BitmapCharRec ch31 = new BitmapCharRec(1,1,-3,-3,8,ch31data);
+
+/* char: 0x1e */
+
+static final byte[] ch30data = {
+(byte) 0xdc,(byte) 0x62,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x70,(byte) 0x20,(byte) 0x22,(byte) 0x1c,
+};
+
+static final BitmapCharRec ch30 = new BitmapCharRec(7,9,0,0,8,ch30data);
+
+/* char: 0x1d */
+
+static final byte[] ch29data = {
+(byte) 0x80,(byte) 0x40,(byte) 0xfe,(byte) 0x10,(byte) 0xfe,(byte) 0x4,(byte) 0x2,
+};
+
+static final BitmapCharRec ch29 = new BitmapCharRec(7,7,0,0,8,ch29data);
+
+/* char: 0x1c */
+
+static final byte[] ch28data = {
+(byte) 0x88,(byte) 0x48,(byte) 0x48,(byte) 0x48,(byte) 0x48,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch28 = new BitmapCharRec(6,6,-1,0,8,ch28data);
+
+/* char: 0x1b */
+
+static final byte[] ch27data = {
+(byte) 0xfe,(byte) 0x80,(byte) 0x20,(byte) 0x8,(byte) 0x2,(byte) 0x8,(byte) 0x20,(byte) 0x80,
+};
+
+static final BitmapCharRec ch27 = new BitmapCharRec(7,8,0,0,8,ch27data);
+
+/* char: 0x1a */
+
+static final byte[] ch26data = {
+(byte) 0xfe,(byte) 0x2,(byte) 0x8,(byte) 0x20,(byte) 0x80,(byte) 0x20,(byte) 0x8,(byte) 0x2,
+};
+
+static final BitmapCharRec ch26 = new BitmapCharRec(7,8,0,0,8,ch26data);
+
+/* char: 0x19 */
+
+static final byte[] ch25data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch25 = new BitmapCharRec(1,13,-3,2,8,ch25data);
+
+/* char: 0x18 */
+
+static final byte[] ch24data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xff,
+};
+
+static final BitmapCharRec ch24 = new BitmapCharRec(8,6,0,2,8,ch24data);
+
+/* char: 0x17 */
+
+static final byte[] ch23data = {
+(byte) 0xff,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,
+};
+
+static final BitmapCharRec ch23 = new BitmapCharRec(8,8,0,-3,8,ch23data);
+
+/* char: 0x16 */
+
+static final byte[] ch22data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xf0,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,
+};
+
+static final BitmapCharRec ch22 = new BitmapCharRec(4,13,0,2,8,ch22data);
+
+/* char: 0x15 */
+
+static final byte[] ch21data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch21 = new BitmapCharRec(5,13,-3,2,8,ch21data);
+
+/* char: 0x14 */
+
+static final byte[] ch20data = {
+(byte) 0xff,
+};
+
+static final BitmapCharRec ch20 = new BitmapCharRec(8,1,0,1,8,ch20data);
+
+/* char: 0x13 */
+
+static final byte[] ch19data = {
+(byte) 0xff,
+};
+
+static final BitmapCharRec ch19 = new BitmapCharRec(8,1,0,-1,8,ch19data);
+
+/* char: 0x12 */
+
+static final byte[] ch18data = {
+(byte) 0xff,
+};
+
+static final BitmapCharRec ch18 = new BitmapCharRec(8,1,0,-3,8,ch18data);
+
+/* char: 0x11 */
+
+static final byte[] ch17data = {
+(byte) 0xff,
+};
+
+static final BitmapCharRec ch17 = new BitmapCharRec(8,1,0,-5,8,ch17data);
+
+/* char: 0x10 */
+
+static final byte[] ch16data = {
+(byte) 0xff,
+};
+
+static final BitmapCharRec ch16 = new BitmapCharRec(8,1,0,-7,8,ch16data);
+
+/* char: 0xf */
+
+static final byte[] ch15data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xff,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,
+};
+
+static final BitmapCharRec ch15 = new BitmapCharRec(8,13,0,2,8,ch15data);
+
+/* char: 0xe */
+
+static final byte[] ch14data = {
+(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch14 = new BitmapCharRec(5,8,-3,-3,8,ch14data);
+
+/* char: 0xd */
+
+static final byte[] ch13data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch13 = new BitmapCharRec(5,6,-3,2,8,ch13data);
+
+/* char: 0xc */
+
+static final byte[] ch12data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch12 = new BitmapCharRec(4,6,0,2,8,ch12data);
+
+/* char: 0xb */
+
+static final byte[] ch11data = {
+(byte) 0xf0,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,
+};
+
+static final BitmapCharRec ch11 = new BitmapCharRec(4,8,0,-3,8,ch11data);
+
+/* char: 0xa */
+
+static final byte[] ch10data = {
+(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x3e,(byte) 0x20,(byte) 0x50,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch10 = new BitmapCharRec(7,9,0,2,8,ch10data);
+
+/* char: 0x9 */
+
+static final byte[] ch9data = {
+(byte) 0x3e,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x88,(byte) 0x98,(byte) 0xa8,(byte) 0xc8,(byte) 0x88,
+};
+
+static final BitmapCharRec ch9 = new BitmapCharRec(7,9,0,2,8,ch9data);
+
+/* char: 0x8 */
+
+static final byte[] ch8data = {
+(byte) 0xfe,(byte) 0x10,(byte) 0x10,(byte) 0xfe,(byte) 0x10,(byte) 0x10,
+};
+
+static final BitmapCharRec ch8 = new BitmapCharRec(7,6,0,0,8,ch8data);
+
+/* char: 0x7 */
+
+static final byte[] ch7data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch7 = new BitmapCharRec(5,4,-1,-5,8,ch7data);
+
+/* char: 0x6 */
+
+static final byte[] ch6data = {
+(byte) 0x20,(byte) 0x20,(byte) 0x3c,(byte) 0x20,(byte) 0x3e,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch6 = new BitmapCharRec(7,9,0,2,8,ch6data);
+
+/* char: 0x5 */
+
+static final byte[] ch5data = {
+(byte) 0x22,(byte) 0x22,(byte) 0x3c,(byte) 0x22,(byte) 0x3c,(byte) 0x78,(byte) 0x80,(byte) 0x80,(byte) 0x78,
+};
+
+static final BitmapCharRec ch5 = new BitmapCharRec(7,9,0,2,8,ch5data);
+
+/* char: 0x4 */
+
+static final byte[] ch4data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x1c,(byte) 0x10,(byte) 0x9e,(byte) 0x80,(byte) 0xe0,(byte) 0x80,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch4 = new BitmapCharRec(7,9,0,2,8,ch4data);
+
+/* char: 0x3 */
+
+static final byte[] ch3data = {
+(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x3e,(byte) 0x88,(byte) 0x88,(byte) 0xf8,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch3 = new BitmapCharRec(7,9,0,2,8,ch3data);
+
+/* char: 0x2 */
+
+static final byte[] ch2data = {
+(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,
+};
+
+static final BitmapCharRec ch2 = new BitmapCharRec(8,12,0,2,8,ch2data);
+
+/* char: 0x1 */
+
+static final byte[] ch1data = {
+(byte) 0x10,(byte) 0x38,(byte) 0x7c,(byte) 0xfe,(byte) 0x7c,(byte) 0x38,(byte) 0x10,
+};
+
+static final BitmapCharRec ch1 = new BitmapCharRec(7,7,0,-1,8,ch1data);
+
+static final BitmapCharRec[] chars = {
+ch0,
+ch1,
+ch2,
+ch3,
+ch4,
+ch5,
+ch6,
+ch7,
+ch8,
+ch9,
+ch10,
+ch11,
+ch12,
+ch13,
+ch14,
+ch15,
+ch16,
+ch17,
+ch18,
+ch19,
+ch20,
+ch21,
+ch22,
+ch23,
+ch24,
+ch25,
+ch26,
+ch27,
+ch28,
+ch29,
+ch30,
+ch31,
+ch32,
+ch33,
+ch34,
+ch35,
+ch36,
+ch37,
+ch38,
+ch39,
+ch40,
+ch41,
+ch42,
+ch43,
+ch44,
+ch45,
+ch46,
+ch47,
+ch48,
+ch49,
+ch50,
+ch51,
+ch52,
+ch53,
+ch54,
+ch55,
+ch56,
+ch57,
+ch58,
+ch59,
+ch60,
+ch61,
+ch62,
+ch63,
+ch64,
+ch65,
+ch66,
+ch67,
+ch68,
+ch69,
+ch70,
+ch71,
+ch72,
+ch73,
+ch74,
+ch75,
+ch76,
+ch77,
+ch78,
+ch79,
+ch80,
+ch81,
+ch82,
+ch83,
+ch84,
+ch85,
+ch86,
+ch87,
+ch88,
+ch89,
+ch90,
+ch91,
+ch92,
+ch93,
+ch94,
+ch95,
+ch96,
+ch97,
+ch98,
+ch99,
+ch100,
+ch101,
+ch102,
+ch103,
+ch104,
+ch105,
+ch106,
+ch107,
+ch108,
+ch109,
+ch110,
+ch111,
+ch112,
+ch113,
+ch114,
+ch115,
+ch116,
+ch117,
+ch118,
+ch119,
+ch120,
+ch121,
+ch122,
+ch123,
+ch124,
+ch125,
+ch126,
+ch127,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+ch160,
+ch161,
+ch162,
+ch163,
+ch164,
+ch165,
+ch166,
+ch167,
+ch168,
+ch169,
+ch170,
+ch171,
+ch172,
+ch173,
+ch174,
+ch175,
+ch176,
+ch177,
+ch178,
+ch179,
+ch180,
+ch181,
+ch182,
+ch183,
+ch184,
+ch185,
+ch186,
+ch187,
+ch188,
+ch189,
+ch190,
+ch191,
+ch192,
+ch193,
+ch194,
+ch195,
+ch196,
+ch197,
+ch198,
+ch199,
+ch200,
+ch201,
+ch202,
+ch203,
+ch204,
+ch205,
+ch206,
+ch207,
+ch208,
+ch209,
+ch210,
+ch211,
+ch212,
+ch213,
+ch214,
+ch215,
+ch216,
+ch217,
+ch218,
+ch219,
+ch220,
+ch221,
+ch222,
+ch223,
+ch224,
+ch225,
+ch226,
+ch227,
+ch228,
+ch229,
+ch230,
+ch231,
+ch232,
+ch233,
+ch234,
+ch235,
+ch236,
+ch237,
+ch238,
+ch239,
+ch240,
+ch241,
+ch242,
+ch243,
+ch244,
+ch245,
+ch246,
+ch247,
+ch248,
+ch249,
+ch250,
+ch251,
+ch252,
+ch253,
+ch254,
+ch255,
+};
+
+ public static final BitmapFontRec glutBitmap8By13 = new BitmapFontRec("-misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1",
+ 256,
+ 0,
+ chars);
+}
diff --git a/src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmap9x15.java b/src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmap9x15.java
new file mode 100644
index 000000000..e883d0bfb
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmap9x15.java
@@ -0,0 +1,2081 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.glut.fonts;
+
+import com.sun.opengl.util.glut.rec.*;
+
+public class GLUTBitmap9x15 {
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+static final BitmapCharRec ch0 = new BitmapCharRec(0,0,0,0,9,null);
+
+static final BitmapCharRec ch32 = new BitmapCharRec(0,0,0,0,9,null);
+
+static final BitmapCharRec ch127 = new BitmapCharRec(0,0,0,0,9,null);
+
+static final BitmapCharRec ch160 = new BitmapCharRec(0,0,0,0,9,null);
+
+/* char: 0xff */
+
+static final byte[] ch255data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch255 = new BitmapCharRec(6,14,-1,3,9,ch255data);
+
+/* char: 0xfe */
+
+static final byte[] ch254data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xbc,(byte) 0xc2,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xc2,(byte) 0xbc,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch254 = new BitmapCharRec(7,12,-1,3,9,ch254data);
+
+/* char: 0xfd */
+
+static final byte[] ch253data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x8,
+};
+
+static final BitmapCharRec ch253 = new BitmapCharRec(6,14,-1,3,9,ch253data);
+
+/* char: 0xfc */
+
+static final byte[] ch252data = {
+(byte) 0x7a,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch252 = new BitmapCharRec(7,11,-1,0,9,ch252data);
+
+/* char: 0xfb */
+
+static final byte[] ch251data = {
+(byte) 0x7a,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch251 = new BitmapCharRec(7,11,-1,0,9,ch251data);
+
+/* char: 0xfa */
+
+static final byte[] ch250data = {
+(byte) 0x7a,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x8,
+};
+
+static final BitmapCharRec ch250 = new BitmapCharRec(7,11,-1,0,9,ch250data);
+
+/* char: 0xf9 */
+
+static final byte[] ch249data = {
+(byte) 0x7a,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x18,(byte) 0x20,
+};
+
+static final BitmapCharRec ch249 = new BitmapCharRec(7,11,-1,0,9,ch249data);
+
+/* char: 0xf8 */
+
+static final byte[] ch248data = {
+(byte) 0x80,(byte) 0x7c,(byte) 0xa2,(byte) 0xa2,(byte) 0x92,(byte) 0x8a,(byte) 0x8a,(byte) 0x7c,(byte) 0x2,
+};
+
+static final BitmapCharRec ch248 = new BitmapCharRec(7,9,-1,1,9,ch248data);
+
+/* char: 0xf7 */
+
+static final byte[] ch247data = {
+(byte) 0x10,(byte) 0x38,(byte) 0x10,(byte) 0x0,(byte) 0xfe,(byte) 0x0,(byte) 0x10,(byte) 0x38,(byte) 0x10,
+};
+
+static final BitmapCharRec ch247 = new BitmapCharRec(7,9,-1,0,9,ch247data);
+
+/* char: 0xf6 */
+
+static final byte[] ch246data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch246 = new BitmapCharRec(7,11,-1,0,9,ch246data);
+
+/* char: 0xf5 */
+
+static final byte[] ch245data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch245 = new BitmapCharRec(7,11,-1,0,9,ch245data);
+
+/* char: 0xf4 */
+
+static final byte[] ch244data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch244 = new BitmapCharRec(7,11,-1,0,9,ch244data);
+
+/* char: 0xf3 */
+
+static final byte[] ch243data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x8,
+};
+
+static final BitmapCharRec ch243 = new BitmapCharRec(7,11,-1,0,9,ch243data);
+
+/* char: 0xf2 */
+
+static final byte[] ch242data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x18,(byte) 0x20,
+};
+
+static final BitmapCharRec ch242 = new BitmapCharRec(7,11,-1,0,9,ch242data);
+
+/* char: 0xf1 */
+
+static final byte[] ch241data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xc2,(byte) 0xbc,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch241 = new BitmapCharRec(7,11,-1,0,9,ch241data);
+
+/* char: 0xf0 */
+
+static final byte[] ch240data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x8,(byte) 0x50,(byte) 0x30,(byte) 0x48,
+};
+
+static final BitmapCharRec ch240 = new BitmapCharRec(7,11,-1,0,9,ch240data);
+
+/* char: 0xef */
+
+static final byte[] ch239data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x50,
+};
+
+static final BitmapCharRec ch239 = new BitmapCharRec(5,11,-2,0,9,ch239data);
+
+/* char: 0xee */
+
+static final byte[] ch238data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch238 = new BitmapCharRec(5,11,-2,0,9,ch238data);
+
+/* char: 0xed */
+
+static final byte[] ch237data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x60,(byte) 0x10,
+};
+
+static final BitmapCharRec ch237 = new BitmapCharRec(5,11,-2,0,9,ch237data);
+
+/* char: 0xec */
+
+static final byte[] ch236data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x40,
+};
+
+static final BitmapCharRec ch236 = new BitmapCharRec(5,11,-2,0,9,ch236data);
+
+/* char: 0xeb */
+
+static final byte[] ch235data = {
+(byte) 0x7c,(byte) 0x80,(byte) 0x80,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch235 = new BitmapCharRec(7,11,-1,0,9,ch235data);
+
+/* char: 0xea */
+
+static final byte[] ch234data = {
+(byte) 0x7c,(byte) 0x80,(byte) 0x80,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch234 = new BitmapCharRec(7,11,-1,0,9,ch234data);
+
+/* char: 0xe9 */
+
+static final byte[] ch233data = {
+(byte) 0x7c,(byte) 0x80,(byte) 0x80,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x8,
+};
+
+static final BitmapCharRec ch233 = new BitmapCharRec(7,11,-1,0,9,ch233data);
+
+/* char: 0xe8 */
+
+static final byte[] ch232data = {
+(byte) 0x7c,(byte) 0x80,(byte) 0x80,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x18,(byte) 0x20,
+};
+
+static final BitmapCharRec ch232 = new BitmapCharRec(7,11,-1,0,9,ch232data);
+
+/* char: 0xe7 */
+
+static final byte[] ch231data = {
+(byte) 0x30,(byte) 0x48,(byte) 0x18,(byte) 0x7c,(byte) 0x82,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch231 = new BitmapCharRec(7,10,-1,3,9,ch231data);
+
+/* char: 0xe6 */
+
+static final byte[] ch230data = {
+(byte) 0x6e,(byte) 0x92,(byte) 0x90,(byte) 0x7c,(byte) 0x12,(byte) 0x92,(byte) 0x6c,
+};
+
+static final BitmapCharRec ch230 = new BitmapCharRec(7,7,-1,0,9,ch230data);
+
+/* char: 0xe5 */
+
+static final byte[] ch229data = {
+(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x7e,(byte) 0x2,(byte) 0x2,(byte) 0x7c,(byte) 0x0,(byte) 0x18,(byte) 0x24,(byte) 0x18,
+};
+
+static final BitmapCharRec ch229 = new BitmapCharRec(7,11,-1,0,9,ch229data);
+
+/* char: 0xe4 */
+
+static final byte[] ch228data = {
+(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x7e,(byte) 0x2,(byte) 0x2,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch228 = new BitmapCharRec(7,11,-1,0,9,ch228data);
+
+/* char: 0xe3 */
+
+static final byte[] ch227data = {
+(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x7e,(byte) 0x2,(byte) 0x2,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch227 = new BitmapCharRec(7,11,-1,0,9,ch227data);
+
+/* char: 0xe2 */
+
+static final byte[] ch226data = {
+(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x7e,(byte) 0x2,(byte) 0x2,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch226 = new BitmapCharRec(7,11,-1,0,9,ch226data);
+
+/* char: 0xe1 */
+
+static final byte[] ch225data = {
+(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x7e,(byte) 0x2,(byte) 0x2,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x8,
+};
+
+static final BitmapCharRec ch225 = new BitmapCharRec(7,11,-1,0,9,ch225data);
+
+/* char: 0xe0 */
+
+static final byte[] ch224data = {
+(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x7e,(byte) 0x2,(byte) 0x2,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x18,(byte) 0x20,
+};
+
+static final BitmapCharRec ch224 = new BitmapCharRec(7,11,-1,0,9,ch224data);
+
+/* char: 0xdf */
+
+static final byte[] ch223data = {
+(byte) 0x80,(byte) 0xbc,(byte) 0xc2,(byte) 0x82,(byte) 0x82,(byte) 0xfc,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch223 = new BitmapCharRec(7,9,-1,1,9,ch223data);
+
+/* char: 0xde */
+
+static final byte[] ch222data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfc,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch222 = new BitmapCharRec(7,10,-1,0,9,ch222data);
+
+/* char: 0xdd */
+
+static final byte[] ch221data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x82,(byte) 0x82,(byte) 0x0,(byte) 0x30,(byte) 0x8,
+};
+
+static final BitmapCharRec ch221 = new BitmapCharRec(7,11,-1,0,9,ch221data);
+
+/* char: 0xdc */
+
+static final byte[] ch220data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x0,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch220 = new BitmapCharRec(7,11,-1,0,9,ch220data);
+
+/* char: 0xdb */
+
+static final byte[] ch219data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x0,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch219 = new BitmapCharRec(7,11,-1,0,9,ch219data);
+
+/* char: 0xda */
+
+static final byte[] ch218data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x0,(byte) 0x30,(byte) 0x8,
+};
+
+static final BitmapCharRec ch218 = new BitmapCharRec(7,11,-1,0,9,ch218data);
+
+/* char: 0xd9 */
+
+static final byte[] ch217data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x0,(byte) 0x18,(byte) 0x20,
+};
+
+static final BitmapCharRec ch217 = new BitmapCharRec(7,11,-1,0,9,ch217data);
+
+/* char: 0xd8 */
+
+static final byte[] ch216data = {
+(byte) 0x80,(byte) 0x7c,(byte) 0xc2,(byte) 0xa2,(byte) 0xa2,(byte) 0x92,(byte) 0x92,(byte) 0x8a,(byte) 0x8a,(byte) 0x86,(byte) 0x7c,(byte) 0x2,
+};
+
+static final BitmapCharRec ch216 = new BitmapCharRec(7,12,-1,1,9,ch216data);
+
+/* char: 0xd7 */
+
+static final byte[] ch215data = {
+(byte) 0x82,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x82,
+};
+
+static final BitmapCharRec ch215 = new BitmapCharRec(7,7,-1,-1,9,ch215data);
+
+/* char: 0xd6 */
+
+static final byte[] ch214data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch214 = new BitmapCharRec(7,11,-1,0,9,ch214data);
+
+/* char: 0xd5 */
+
+static final byte[] ch213data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch213 = new BitmapCharRec(7,11,-1,0,9,ch213data);
+
+/* char: 0xd4 */
+
+static final byte[] ch212data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch212 = new BitmapCharRec(7,11,-1,0,9,ch212data);
+
+/* char: 0xd3 */
+
+static final byte[] ch211data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x30,(byte) 0x8,
+};
+
+static final BitmapCharRec ch211 = new BitmapCharRec(7,11,-1,0,9,ch211data);
+
+/* char: 0xd2 */
+
+static final byte[] ch210data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x18,(byte) 0x20,
+};
+
+static final BitmapCharRec ch210 = new BitmapCharRec(7,11,-1,0,9,ch210data);
+
+/* char: 0xd1 */
+
+static final byte[] ch209data = {
+(byte) 0x82,(byte) 0x86,(byte) 0x8a,(byte) 0x92,(byte) 0x92,(byte) 0xa2,(byte) 0xc2,(byte) 0x82,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch209 = new BitmapCharRec(7,11,-1,0,9,ch209data);
+
+/* char: 0xd0 */
+
+static final byte[] ch208data = {
+(byte) 0xfc,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xf2,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch208 = new BitmapCharRec(7,10,-1,0,9,ch208data);
+
+/* char: 0xcf */
+
+static final byte[] ch207data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x50,(byte) 0x50,
+};
+
+static final BitmapCharRec ch207 = new BitmapCharRec(5,11,-2,0,9,ch207data);
+
+/* char: 0xce */
+
+static final byte[] ch206data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch206 = new BitmapCharRec(5,11,-2,0,9,ch206data);
+
+/* char: 0xcd */
+
+static final byte[] ch205data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x60,(byte) 0x10,
+};
+
+static final BitmapCharRec ch205 = new BitmapCharRec(5,11,-2,0,9,ch205data);
+
+/* char: 0xcc */
+
+static final byte[] ch204data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x30,(byte) 0x40,
+};
+
+static final BitmapCharRec ch204 = new BitmapCharRec(5,11,-2,0,9,ch204data);
+
+/* char: 0xcb */
+
+static final byte[] ch203data = {
+(byte) 0xfe,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x78,(byte) 0x40,(byte) 0x40,(byte) 0xfe,(byte) 0x0,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch203 = new BitmapCharRec(7,11,-1,0,9,ch203data);
+
+/* char: 0xca */
+
+static final byte[] ch202data = {
+(byte) 0xfe,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x78,(byte) 0x40,(byte) 0x40,(byte) 0xfe,(byte) 0x0,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch202 = new BitmapCharRec(7,11,-1,0,9,ch202data);
+
+/* char: 0xc9 */
+
+static final byte[] ch201data = {
+(byte) 0xfe,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x78,(byte) 0x40,(byte) 0x40,(byte) 0xfe,(byte) 0x0,(byte) 0x30,(byte) 0x8,
+};
+
+static final BitmapCharRec ch201 = new BitmapCharRec(7,11,-1,0,9,ch201data);
+
+/* char: 0xc8 */
+
+static final byte[] ch200data = {
+(byte) 0xfe,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x78,(byte) 0x40,(byte) 0x40,(byte) 0xfe,(byte) 0x0,(byte) 0x18,(byte) 0x20,
+};
+
+static final BitmapCharRec ch200 = new BitmapCharRec(7,11,-1,0,9,ch200data);
+
+/* char: 0xc7 */
+
+static final byte[] ch199data = {
+(byte) 0x30,(byte) 0x48,(byte) 0x18,(byte) 0x7c,(byte) 0x82,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch199 = new BitmapCharRec(7,13,-1,3,9,ch199data);
+
+/* char: 0xc6 */
+
+static final byte[] ch198data = {
+(byte) 0x9e,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xfc,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x6e,
+};
+
+static final BitmapCharRec ch198 = new BitmapCharRec(7,10,-1,0,9,ch198data);
+
+/* char: 0xc5 */
+
+static final byte[] ch197data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,(byte) 0x10,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch197 = new BitmapCharRec(7,11,-1,0,9,ch197data);
+
+/* char: 0xc4 */
+
+static final byte[] ch196data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,(byte) 0x0,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch196 = new BitmapCharRec(7,11,-1,0,9,ch196data);
+
+/* char: 0xc3 */
+
+static final byte[] ch195data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch195 = new BitmapCharRec(7,11,-1,0,9,ch195data);
+
+/* char: 0xc2 */
+
+static final byte[] ch194data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,(byte) 0x0,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch194 = new BitmapCharRec(7,11,-1,0,9,ch194data);
+
+/* char: 0xc1 */
+
+static final byte[] ch193data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,(byte) 0x0,(byte) 0x30,(byte) 0x8,
+};
+
+static final BitmapCharRec ch193 = new BitmapCharRec(7,11,-1,0,9,ch193data);
+
+/* char: 0xc0 */
+
+static final byte[] ch192data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,(byte) 0x0,(byte) 0x18,(byte) 0x20,
+};
+
+static final BitmapCharRec ch192 = new BitmapCharRec(7,11,-1,0,9,ch192data);
+
+/* char: 0xbf */
+
+static final byte[] ch191data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x10,
+};
+
+static final BitmapCharRec ch191 = new BitmapCharRec(7,10,-1,0,9,ch191data);
+
+/* char: 0xbe */
+
+static final byte[] ch190data = {
+(byte) 0x6,(byte) 0x1a,(byte) 0x12,(byte) 0xa,(byte) 0x66,(byte) 0x92,(byte) 0x10,(byte) 0x20,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch190 = new BitmapCharRec(7,10,-1,0,9,ch190data);
+
+/* char: 0xbd */
+
+static final byte[] ch189data = {
+(byte) 0x1e,(byte) 0x10,(byte) 0xc,(byte) 0x2,(byte) 0xf2,(byte) 0x4c,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch189 = new BitmapCharRec(7,10,-1,0,9,ch189data);
+
+/* char: 0xbc */
+
+static final byte[] ch188data = {
+(byte) 0x6,(byte) 0x1a,(byte) 0x12,(byte) 0xa,(byte) 0xe6,(byte) 0x42,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch188 = new BitmapCharRec(7,10,-1,0,9,ch188data);
+
+/* char: 0xbb */
+
+static final byte[] ch187data = {
+(byte) 0x90,(byte) 0x48,(byte) 0x24,(byte) 0x12,(byte) 0x12,(byte) 0x24,(byte) 0x48,(byte) 0x90,
+};
+
+static final BitmapCharRec ch187 = new BitmapCharRec(7,8,-1,-1,9,ch187data);
+
+/* char: 0xba */
+
+static final byte[] ch186data = {
+(byte) 0xf8,(byte) 0x0,(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch186 = new BitmapCharRec(5,6,-1,-5,9,ch186data);
+
+/* char: 0xb9 */
+
+static final byte[] ch185data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch185 = new BitmapCharRec(3,6,-1,-4,9,ch185data);
+
+/* char: 0xb8 */
+
+static final byte[] ch184data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x30,
+};
+
+static final BitmapCharRec ch184 = new BitmapCharRec(4,3,-2,3,9,ch184data);
+
+/* char: 0xb7 */
+
+static final byte[] ch183data = {
+(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch183 = new BitmapCharRec(2,2,-4,-4,9,ch183data);
+
+/* char: 0xb6 */
+
+static final byte[] ch182data = {
+(byte) 0xa,(byte) 0xa,(byte) 0xa,(byte) 0xa,(byte) 0xa,(byte) 0x7a,(byte) 0x8a,(byte) 0x8a,(byte) 0x8a,(byte) 0x7e,
+};
+
+static final BitmapCharRec ch182 = new BitmapCharRec(7,10,-1,0,9,ch182data);
+
+/* char: 0xb5 */
+
+static final byte[] ch181data = {
+(byte) 0x80,(byte) 0x80,(byte) 0xba,(byte) 0xc6,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch181 = new BitmapCharRec(7,9,-1,2,9,ch181data);
+
+/* char: 0xb4 */
+
+static final byte[] ch180data = {
+(byte) 0xc0,(byte) 0x20,
+};
+
+static final BitmapCharRec ch180 = new BitmapCharRec(3,2,-3,-9,9,ch180data);
+
+/* char: 0xb3 */
+
+static final byte[] ch179data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x10,(byte) 0x20,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch179 = new BitmapCharRec(4,6,-1,-4,9,ch179data);
+
+/* char: 0xb2 */
+
+static final byte[] ch178data = {
+(byte) 0xf0,(byte) 0x80,(byte) 0x60,(byte) 0x10,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch178 = new BitmapCharRec(4,6,-1,-4,9,ch178data);
+
+/* char: 0xb1 */
+
+static final byte[] ch177data = {
+(byte) 0xfe,(byte) 0x0,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xfe,(byte) 0x10,(byte) 0x10,(byte) 0x10,
+};
+
+static final BitmapCharRec ch177 = new BitmapCharRec(7,9,-1,-1,9,ch177data);
+
+/* char: 0xb0 */
+
+static final byte[] ch176data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch176 = new BitmapCharRec(4,4,-3,-6,9,ch176data);
+
+/* char: 0xaf */
+
+static final byte[] ch175data = {
+(byte) 0xfc,
+};
+
+static final BitmapCharRec ch175 = new BitmapCharRec(6,1,-1,-9,9,ch175data);
+
+/* char: 0xae */
+
+static final byte[] ch174data = {
+(byte) 0x3c,(byte) 0x42,(byte) 0xa5,(byte) 0xa9,(byte) 0xbd,(byte) 0xa5,(byte) 0xb9,(byte) 0x42,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch174 = new BitmapCharRec(8,9,0,-1,9,ch174data);
+
+/* char: 0xad */
+
+static final byte[] ch173data = {
+(byte) 0xfc,
+};
+
+static final BitmapCharRec ch173 = new BitmapCharRec(6,1,-1,-4,9,ch173data);
+
+/* char: 0xac */
+
+static final byte[] ch172data = {
+(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch172 = new BitmapCharRec(6,4,-1,-2,9,ch172data);
+
+/* char: 0xab */
+
+static final byte[] ch171data = {
+(byte) 0x12,(byte) 0x24,(byte) 0x48,(byte) 0x90,(byte) 0x90,(byte) 0x48,(byte) 0x24,(byte) 0x12,
+};
+
+static final BitmapCharRec ch171 = new BitmapCharRec(7,8,-1,-1,9,ch171data);
+
+/* char: 0xaa */
+
+static final byte[] ch170data = {
+(byte) 0xf8,(byte) 0x0,(byte) 0x78,(byte) 0x90,(byte) 0x70,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch170 = new BitmapCharRec(5,7,-3,-3,9,ch170data);
+
+/* char: 0xa9 */
+
+static final byte[] ch169data = {
+(byte) 0x3c,(byte) 0x42,(byte) 0x99,(byte) 0xa5,(byte) 0xa1,(byte) 0xa5,(byte) 0x99,(byte) 0x42,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch169 = new BitmapCharRec(8,9,0,-1,9,ch169data);
+
+/* char: 0xa8 */
+
+static final byte[] ch168data = {
+(byte) 0xa0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch168 = new BitmapCharRec(3,2,-3,-9,9,ch168data);
+
+/* char: 0xa7 */
+
+static final byte[] ch167data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x80,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch167 = new BitmapCharRec(5,11,-2,1,9,ch167data);
+
+/* char: 0xa6 */
+
+static final byte[] ch166data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch166 = new BitmapCharRec(1,11,-4,1,9,ch166data);
+
+/* char: 0xa5 */
+
+static final byte[] ch165data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x7c,(byte) 0x10,(byte) 0x7c,(byte) 0x28,(byte) 0x44,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch165 = new BitmapCharRec(7,10,-1,0,9,ch165data);
+
+/* char: 0xa4 */
+
+static final byte[] ch164data = {
+(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x7c,(byte) 0x82,
+};
+
+static final BitmapCharRec ch164 = new BitmapCharRec(7,6,-1,-3,9,ch164data);
+
+/* char: 0xa3 */
+
+static final byte[] ch163data = {
+(byte) 0x5c,(byte) 0xa2,(byte) 0x60,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x22,(byte) 0x1c,
+};
+
+static final BitmapCharRec ch163 = new BitmapCharRec(7,10,-1,0,9,ch163data);
+
+/* char: 0xa2 */
+
+static final byte[] ch162data = {
+(byte) 0x40,(byte) 0x78,(byte) 0xa4,(byte) 0xa0,(byte) 0x90,(byte) 0x94,(byte) 0x78,(byte) 0x8,
+};
+
+static final BitmapCharRec ch162 = new BitmapCharRec(6,8,-1,0,9,ch162data);
+
+/* char: 0xa1 */
+
+static final byte[] ch161data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch161 = new BitmapCharRec(1,11,-4,0,9,ch161data);
+
+/* char: 0x7e '~' */
+
+static final byte[] ch126data = {
+(byte) 0x8c,(byte) 0x92,(byte) 0x62,
+};
+
+static final BitmapCharRec ch126 = new BitmapCharRec(7,3,-1,-7,9,ch126data);
+
+/* char: 0x7d '}' */
+
+static final byte[] ch125data = {
+(byte) 0xe0,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x20,(byte) 0x18,(byte) 0x18,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch125 = new BitmapCharRec(5,12,-1,1,9,ch125data);
+
+/* char: 0x7c '|' */
+
+static final byte[] ch124data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch124 = new BitmapCharRec(1,12,-4,1,9,ch124data);
+
+/* char: 0x7b '{' */
+
+static final byte[] ch123data = {
+(byte) 0x38,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0xc0,(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x38,
+};
+
+static final BitmapCharRec ch123 = new BitmapCharRec(5,12,-3,1,9,ch123data);
+
+/* char: 0x7a 'z' */
+
+static final byte[] ch122data = {
+(byte) 0xfe,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch122 = new BitmapCharRec(7,7,-1,0,9,ch122data);
+
+/* char: 0x79 'y' */
+
+static final byte[] ch121data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,
+};
+
+static final BitmapCharRec ch121 = new BitmapCharRec(6,10,-1,3,9,ch121data);
+
+/* char: 0x78 'x' */
+
+static final byte[] ch120data = {
+(byte) 0x82,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x82,
+};
+
+static final BitmapCharRec ch120 = new BitmapCharRec(7,7,-1,0,9,ch120data);
+
+/* char: 0x77 'w' */
+
+static final byte[] ch119data = {
+(byte) 0x44,(byte) 0xaa,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch119 = new BitmapCharRec(7,7,-1,0,9,ch119data);
+
+/* char: 0x76 'v' */
+
+static final byte[] ch118data = {
+(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch118 = new BitmapCharRec(7,7,-1,0,9,ch118data);
+
+/* char: 0x75 'u' */
+
+static final byte[] ch117data = {
+(byte) 0x7a,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,
+};
+
+static final BitmapCharRec ch117 = new BitmapCharRec(7,7,-1,0,9,ch117data);
+
+/* char: 0x74 't' */
+
+static final byte[] ch116data = {
+(byte) 0x1c,(byte) 0x22,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xfc,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch116 = new BitmapCharRec(7,9,-1,0,9,ch116data);
+
+/* char: 0x73 's' */
+
+static final byte[] ch115data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x2,(byte) 0x7c,(byte) 0x80,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch115 = new BitmapCharRec(7,7,-1,0,9,ch115data);
+
+/* char: 0x72 'r' */
+
+static final byte[] ch114data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x42,(byte) 0x62,(byte) 0x9c,
+};
+
+static final BitmapCharRec ch114 = new BitmapCharRec(7,7,-1,0,9,ch114data);
+
+/* char: 0x71 'q' */
+
+static final byte[] ch113data = {
+(byte) 0x2,(byte) 0x2,(byte) 0x2,(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x86,(byte) 0x7a,
+};
+
+static final BitmapCharRec ch113 = new BitmapCharRec(7,10,-1,3,9,ch113data);
+
+/* char: 0x70 'p' */
+
+static final byte[] ch112data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xbc,(byte) 0xc2,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xc2,(byte) 0xbc,
+};
+
+static final BitmapCharRec ch112 = new BitmapCharRec(7,10,-1,3,9,ch112data);
+
+/* char: 0x6f 'o' */
+
+static final byte[] ch111data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch111 = new BitmapCharRec(7,7,-1,0,9,ch111data);
+
+/* char: 0x6e 'n' */
+
+static final byte[] ch110data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xc2,(byte) 0xbc,
+};
+
+static final BitmapCharRec ch110 = new BitmapCharRec(7,7,-1,0,9,ch110data);
+
+/* char: 0x6d 'm' */
+
+static final byte[] ch109data = {
+(byte) 0x82,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0xec,
+};
+
+static final BitmapCharRec ch109 = new BitmapCharRec(7,7,-1,0,9,ch109data);
+
+/* char: 0x6c 'l' */
+
+static final byte[] ch108data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch108 = new BitmapCharRec(5,10,-2,0,9,ch108data);
+
+/* char: 0x6b 'k' */
+
+static final byte[] ch107data = {
+(byte) 0x82,(byte) 0x8c,(byte) 0xb0,(byte) 0xc0,(byte) 0xb0,(byte) 0x8c,(byte) 0x82,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch107 = new BitmapCharRec(7,10,-1,0,9,ch107data);
+
+/* char: 0x6a 'j' */
+
+static final byte[] ch106data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x1c,(byte) 0x0,(byte) 0x0,(byte) 0xc,
+};
+
+static final BitmapCharRec ch106 = new BitmapCharRec(6,13,-1,3,9,ch106data);
+
+/* char: 0x69 'i' */
+
+static final byte[] ch105data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch105 = new BitmapCharRec(5,10,-2,0,9,ch105data);
+
+/* char: 0x68 'h' */
+
+static final byte[] ch104data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xc2,(byte) 0xbc,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch104 = new BitmapCharRec(7,10,-1,0,9,ch104data);
+
+/* char: 0x67 'g' */
+
+static final byte[] ch103data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x80,(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x7a,
+};
+
+static final BitmapCharRec ch103 = new BitmapCharRec(7,10,-1,3,9,ch103data);
+
+/* char: 0x66 'f' */
+
+static final byte[] ch102data = {
+(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x22,(byte) 0x22,(byte) 0x1c,
+};
+
+static final BitmapCharRec ch102 = new BitmapCharRec(7,10,-1,0,9,ch102data);
+
+/* char: 0x65 'e' */
+
+static final byte[] ch101data = {
+(byte) 0x7c,(byte) 0x80,(byte) 0x80,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch101 = new BitmapCharRec(7,7,-1,0,9,ch101data);
+
+/* char: 0x64 'd' */
+
+static final byte[] ch100data = {
+(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x86,(byte) 0x7a,(byte) 0x2,(byte) 0x2,(byte) 0x2,
+};
+
+static final BitmapCharRec ch100 = new BitmapCharRec(7,10,-1,0,9,ch100data);
+
+/* char: 0x63 'c' */
+
+static final byte[] ch99data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch99 = new BitmapCharRec(7,7,-1,0,9,ch99data);
+
+/* char: 0x62 'b' */
+
+static final byte[] ch98data = {
+(byte) 0xbc,(byte) 0xc2,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xc2,(byte) 0xbc,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch98 = new BitmapCharRec(7,10,-1,0,9,ch98data);
+
+/* char: 0x61 'a' */
+
+static final byte[] ch97data = {
+(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x7e,(byte) 0x2,(byte) 0x2,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch97 = new BitmapCharRec(7,7,-1,0,9,ch97data);
+
+/* char: 0x60 '`' */
+
+static final byte[] ch96data = {
+(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch96 = new BitmapCharRec(4,4,-3,-6,9,ch96data);
+
+/* char: 0x5f '_' */
+
+static final byte[] ch95data = {
+(byte) 0xff,
+};
+
+static final BitmapCharRec ch95 = new BitmapCharRec(8,1,0,1,9,ch95data);
+
+/* char: 0x5e '^' */
+
+static final byte[] ch94data = {
+(byte) 0x82,(byte) 0x44,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch94 = new BitmapCharRec(7,4,-1,-6,9,ch94data);
+
+/* char: 0x5d ']' */
+
+static final byte[] ch93data = {
+(byte) 0xf0,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch93 = new BitmapCharRec(4,12,-2,1,9,ch93data);
+
+/* char: 0x5c '\' */
+
+static final byte[] ch92data = {
+(byte) 0x2,(byte) 0x4,(byte) 0x4,(byte) 0x8,(byte) 0x10,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch92 = new BitmapCharRec(7,10,-1,0,9,ch92data);
+
+/* char: 0x5b '[' */
+
+static final byte[] ch91data = {
+(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch91 = new BitmapCharRec(4,12,-3,1,9,ch91data);
+
+/* char: 0x5a 'Z' */
+
+static final byte[] ch90data = {
+(byte) 0xfe,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0x2,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch90 = new BitmapCharRec(7,10,-1,0,9,ch90data);
+
+/* char: 0x59 'Y' */
+
+static final byte[] ch89data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch89 = new BitmapCharRec(7,10,-1,0,9,ch89data);
+
+/* char: 0x58 'X' */
+
+static final byte[] ch88data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch88 = new BitmapCharRec(7,10,-1,0,9,ch88data);
+
+/* char: 0x57 'W' */
+
+static final byte[] ch87data = {
+(byte) 0x44,(byte) 0xaa,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch87 = new BitmapCharRec(7,10,-1,0,9,ch87data);
+
+/* char: 0x56 'V' */
+
+static final byte[] ch86data = {
+(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch86 = new BitmapCharRec(7,10,-1,0,9,ch86data);
+
+/* char: 0x55 'U' */
+
+static final byte[] ch85data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch85 = new BitmapCharRec(7,10,-1,0,9,ch85data);
+
+/* char: 0x54 'T' */
+
+static final byte[] ch84data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch84 = new BitmapCharRec(7,10,-1,0,9,ch84data);
+
+/* char: 0x53 'S' */
+
+static final byte[] ch83data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x2,(byte) 0xc,(byte) 0x70,(byte) 0x80,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch83 = new BitmapCharRec(7,10,-1,0,9,ch83data);
+
+/* char: 0x52 'R' */
+
+static final byte[] ch82data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x84,(byte) 0x88,(byte) 0x90,(byte) 0xfc,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch82 = new BitmapCharRec(7,10,-1,0,9,ch82data);
+
+/* char: 0x51 'Q' */
+
+static final byte[] ch81data = {
+(byte) 0x6,(byte) 0x8,(byte) 0x7c,(byte) 0x92,(byte) 0xa2,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch81 = new BitmapCharRec(7,12,-1,2,9,ch81data);
+
+/* char: 0x50 'P' */
+
+static final byte[] ch80data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch80 = new BitmapCharRec(7,10,-1,0,9,ch80data);
+
+/* char: 0x4f 'O' */
+
+static final byte[] ch79data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch79 = new BitmapCharRec(7,10,-1,0,9,ch79data);
+
+/* char: 0x4e 'N' */
+
+static final byte[] ch78data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x86,(byte) 0x8a,(byte) 0x92,(byte) 0xa2,(byte) 0xc2,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch78 = new BitmapCharRec(7,10,-1,0,9,ch78data);
+
+/* char: 0x4d 'M' */
+
+static final byte[] ch77data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x92,(byte) 0x92,(byte) 0xaa,(byte) 0xaa,(byte) 0xc6,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch77 = new BitmapCharRec(7,10,-1,0,9,ch77data);
+
+/* char: 0x4c 'L' */
+
+static final byte[] ch76data = {
+(byte) 0xfe,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch76 = new BitmapCharRec(7,10,-1,0,9,ch76data);
+
+/* char: 0x4b 'K' */
+
+static final byte[] ch75data = {
+(byte) 0x82,(byte) 0x84,(byte) 0x88,(byte) 0x90,(byte) 0xa0,(byte) 0xe0,(byte) 0x90,(byte) 0x88,(byte) 0x84,(byte) 0x82,
+};
+
+static final BitmapCharRec ch75 = new BitmapCharRec(7,10,-1,0,9,ch75data);
+
+/* char: 0x4a 'J' */
+
+static final byte[] ch74data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x1e,
+};
+
+static final BitmapCharRec ch74 = new BitmapCharRec(7,10,-1,0,9,ch74data);
+
+/* char: 0x49 'I' */
+
+static final byte[] ch73data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch73 = new BitmapCharRec(5,10,-2,0,9,ch73data);
+
+/* char: 0x48 'H' */
+
+static final byte[] ch72data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch72 = new BitmapCharRec(7,10,-1,0,9,ch72data);
+
+/* char: 0x47 'G' */
+
+static final byte[] ch71data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x8e,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch71 = new BitmapCharRec(7,10,-1,0,9,ch71data);
+
+/* char: 0x46 'F' */
+
+static final byte[] ch70data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x78,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch70 = new BitmapCharRec(7,10,-1,0,9,ch70data);
+
+/* char: 0x45 'E' */
+
+static final byte[] ch69data = {
+(byte) 0xfe,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x78,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch69 = new BitmapCharRec(7,10,-1,0,9,ch69data);
+
+/* char: 0x44 'D' */
+
+static final byte[] ch68data = {
+(byte) 0xfc,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch68 = new BitmapCharRec(7,10,-1,0,9,ch68data);
+
+/* char: 0x43 'C' */
+
+static final byte[] ch67data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch67 = new BitmapCharRec(7,10,-1,0,9,ch67data);
+
+/* char: 0x42 'B' */
+
+static final byte[] ch66data = {
+(byte) 0xfc,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x7c,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch66 = new BitmapCharRec(7,10,-1,0,9,ch66data);
+
+/* char: 0x41 'A' */
+
+static final byte[] ch65data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch65 = new BitmapCharRec(7,10,-1,0,9,ch65data);
+
+/* char: 0x40 '@' */
+
+static final byte[] ch64data = {
+(byte) 0x7c,(byte) 0x80,(byte) 0x80,(byte) 0x9a,(byte) 0xa6,(byte) 0xa2,(byte) 0x9e,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch64 = new BitmapCharRec(7,10,-1,0,9,ch64data);
+
+/* char: 0x3f '?' */
+
+static final byte[] ch63data = {
+(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0x2,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch63 = new BitmapCharRec(7,10,-1,0,9,ch63data);
+
+/* char: 0x3e '>' */
+
+static final byte[] ch62data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x8,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch62 = new BitmapCharRec(5,10,-2,0,9,ch62data);
+
+/* char: 0x3d '=' */
+
+static final byte[] ch61data = {
+(byte) 0xfe,(byte) 0x0,(byte) 0x0,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch61 = new BitmapCharRec(7,4,-1,-2,9,ch61data);
+
+/* char: 0x3c '<' */
+
+static final byte[] ch60data = {
+(byte) 0x8,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch60 = new BitmapCharRec(5,10,-2,0,9,ch60data);
+
+/* char: 0x3b ';' */
+
+static final byte[] ch59data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch59 = new BitmapCharRec(2,10,-4,3,9,ch59data);
+
+/* char: 0x3a ':' */
+
+static final byte[] ch58data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch58 = new BitmapCharRec(2,7,-4,0,9,ch58data);
+
+/* char: 0x39 '9' */
+
+static final byte[] ch57data = {
+(byte) 0x78,(byte) 0x4,(byte) 0x2,(byte) 0x2,(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch57 = new BitmapCharRec(7,10,-1,0,9,ch57data);
+
+/* char: 0x38 '8' */
+
+static final byte[] ch56data = {
+(byte) 0x38,(byte) 0x44,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,(byte) 0x44,(byte) 0x82,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch56 = new BitmapCharRec(7,10,-1,0,9,ch56data);
+
+/* char: 0x37 '7' */
+
+static final byte[] ch55data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0x2,(byte) 0x2,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch55 = new BitmapCharRec(7,10,-1,0,9,ch55data);
+
+/* char: 0x36 '6' */
+
+static final byte[] ch54data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xc2,(byte) 0xbc,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch54 = new BitmapCharRec(7,10,-1,0,9,ch54data);
+
+/* char: 0x35 '5' */
+
+static final byte[] ch53data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x2,(byte) 0x2,(byte) 0x2,(byte) 0xc2,(byte) 0xbc,(byte) 0x80,(byte) 0x80,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch53 = new BitmapCharRec(7,10,-1,0,9,ch53data);
+
+/* char: 0x34 '4' */
+
+static final byte[] ch52data = {
+(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0xfe,(byte) 0x84,(byte) 0x44,(byte) 0x24,(byte) 0x14,(byte) 0xc,(byte) 0x4,
+};
+
+static final BitmapCharRec ch52 = new BitmapCharRec(7,10,-1,0,9,ch52data);
+
+/* char: 0x33 '3' */
+
+static final byte[] ch51data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x2,(byte) 0x2,(byte) 0x2,(byte) 0x1c,(byte) 0x8,(byte) 0x4,(byte) 0x2,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch51 = new BitmapCharRec(7,10,-1,0,9,ch51data);
+
+/* char: 0x32 '2' */
+
+static final byte[] ch50data = {
+(byte) 0xfe,(byte) 0x80,(byte) 0x40,(byte) 0x30,(byte) 0x8,(byte) 0x4,(byte) 0x2,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch50 = new BitmapCharRec(7,10,-1,0,9,ch50data);
+
+/* char: 0x31 '1' */
+
+static final byte[] ch49data = {
+(byte) 0xfe,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x90,(byte) 0x50,(byte) 0x30,(byte) 0x10,
+};
+
+static final BitmapCharRec ch49 = new BitmapCharRec(7,10,-1,0,9,ch49data);
+
+/* char: 0x30 '0' */
+
+static final byte[] ch48data = {
+(byte) 0x38,(byte) 0x44,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch48 = new BitmapCharRec(7,10,-1,0,9,ch48data);
+
+/* char: 0x2f '/' */
+
+static final byte[] ch47data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0x4,(byte) 0x2,
+};
+
+static final BitmapCharRec ch47 = new BitmapCharRec(7,10,-1,0,9,ch47data);
+
+/* char: 0x2e '.' */
+
+static final byte[] ch46data = {
+(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch46 = new BitmapCharRec(2,2,-4,0,9,ch46data);
+
+/* char: 0x2d '-' */
+
+static final byte[] ch45data = {
+(byte) 0xfe,
+};
+
+static final BitmapCharRec ch45 = new BitmapCharRec(7,1,-1,-4,9,ch45data);
+
+/* char: 0x2c ',' */
+
+static final byte[] ch44data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch44 = new BitmapCharRec(2,5,-4,3,9,ch44data);
+
+/* char: 0x2b '+' */
+
+static final byte[] ch43data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xfe,(byte) 0x10,(byte) 0x10,(byte) 0x10,
+};
+
+static final BitmapCharRec ch43 = new BitmapCharRec(7,7,-1,-1,9,ch43data);
+
+/* char: 0x2a '*' */
+
+static final byte[] ch42data = {
+(byte) 0x10,(byte) 0x92,(byte) 0x54,(byte) 0x38,(byte) 0x54,(byte) 0x92,(byte) 0x10,
+};
+
+static final BitmapCharRec ch42 = new BitmapCharRec(7,7,-1,-1,9,ch42data);
+
+/* char: 0x29 ')' */
+
+static final byte[] ch41data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch41 = new BitmapCharRec(3,12,-3,1,9,ch41data);
+
+/* char: 0x28 '(' */
+
+static final byte[] ch40data = {
+(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch40 = new BitmapCharRec(3,12,-3,1,9,ch40data);
+
+/* char: 0x27 ''' */
+
+static final byte[] ch39data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x30,
+};
+
+static final BitmapCharRec ch39 = new BitmapCharRec(4,4,-3,-6,9,ch39data);
+
+/* char: 0x26 '&' */
+
+static final byte[] ch38data = {
+(byte) 0x62,(byte) 0x94,(byte) 0x88,(byte) 0x94,(byte) 0x62,(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch38 = new BitmapCharRec(7,10,-1,0,9,ch38data);
+
+/* char: 0x25 '%' */
+
+static final byte[] ch37data = {
+(byte) 0x84,(byte) 0x4a,(byte) 0x4a,(byte) 0x24,(byte) 0x10,(byte) 0x10,(byte) 0x48,(byte) 0xa4,(byte) 0xa4,(byte) 0x42,
+};
+
+static final BitmapCharRec ch37 = new BitmapCharRec(7,10,-1,0,9,ch37data);
+
+/* char: 0x24 '$' */
+
+static final byte[] ch36data = {
+(byte) 0x10,(byte) 0x7c,(byte) 0x92,(byte) 0x12,(byte) 0x12,(byte) 0x14,(byte) 0x38,(byte) 0x50,(byte) 0x90,(byte) 0x92,(byte) 0x7c,(byte) 0x10,
+};
+
+static final BitmapCharRec ch36 = new BitmapCharRec(7,12,-1,1,9,ch36data);
+
+/* char: 0x23 '#' */
+
+static final byte[] ch35data = {
+(byte) 0x48,(byte) 0x48,(byte) 0xfc,(byte) 0x48,(byte) 0x48,(byte) 0xfc,(byte) 0x48,(byte) 0x48,
+};
+
+static final BitmapCharRec ch35 = new BitmapCharRec(6,8,-1,-1,9,ch35data);
+
+/* char: 0x22 '"' */
+
+static final byte[] ch34data = {
+(byte) 0x90,(byte) 0x90,(byte) 0x90,
+};
+
+static final BitmapCharRec ch34 = new BitmapCharRec(4,3,-3,-7,9,ch34data);
+
+/* char: 0x21 '!' */
+
+static final byte[] ch33data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch33 = new BitmapCharRec(1,11,-4,0,9,ch33data);
+
+/* char: 0x1f */
+
+static final byte[] ch31data = {
+(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch31 = new BitmapCharRec(2,2,-4,-2,9,ch31data);
+
+/* char: 0x1e */
+
+static final byte[] ch30data = {
+(byte) 0x5c,(byte) 0xa2,(byte) 0x60,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x22,(byte) 0x1c,
+};
+
+static final BitmapCharRec ch30 = new BitmapCharRec(7,10,-1,0,9,ch30data);
+
+/* char: 0x1d */
+
+static final byte[] ch29data = {
+(byte) 0x80,(byte) 0x40,(byte) 0xfe,(byte) 0x10,(byte) 0xfe,(byte) 0x4,(byte) 0x2,
+};
+
+static final BitmapCharRec ch29 = new BitmapCharRec(7,7,-1,0,9,ch29data);
+
+/* char: 0x1c */
+
+static final byte[] ch28data = {
+(byte) 0x44,(byte) 0x24,(byte) 0x24,(byte) 0x24,(byte) 0x24,(byte) 0x24,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch28 = new BitmapCharRec(7,7,-1,0,9,ch28data);
+
+/* char: 0x1b */
+
+static final byte[] ch27data = {
+(byte) 0xfe,(byte) 0x0,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x8,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch27 = new BitmapCharRec(7,12,-1,2,9,ch27data);
+
+/* char: 0x1a */
+
+static final byte[] ch26data = {
+(byte) 0xfc,(byte) 0x0,(byte) 0x4,(byte) 0x8,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x4,
+};
+
+static final BitmapCharRec ch26 = new BitmapCharRec(6,12,-2,2,9,ch26data);
+
+/* char: 0x19 */
+
+static final byte[] ch25data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch25 = new BitmapCharRec(1,15,-4,3,9,ch25data);
+
+/* char: 0x18 */
+
+static final byte[] ch24data = {
+(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0xff,(byte) 0x80,
+};
+
+static final BitmapCharRec ch24 = new BitmapCharRec(9,7,0,3,9,ch24data);
+
+/* char: 0x17 */
+
+static final byte[] ch23data = {
+(byte) 0xff,(byte) 0x80,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,
+(byte) 0x8,(byte) 0x0,
+};
+
+static final BitmapCharRec ch23 = new BitmapCharRec(9,9,0,-3,9,ch23data);
+
+/* char: 0x16 */
+
+static final byte[] ch22data = {
+(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0xf8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,
+};
+
+static final BitmapCharRec ch22 = new BitmapCharRec(5,15,0,3,9,ch22data);
+
+/* char: 0x15 */
+
+static final byte[] ch21data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch21 = new BitmapCharRec(5,15,-4,3,9,ch21data);
+
+/* char: 0x14 */
+
+static final byte[] ch20data = {
+(byte) 0xff,(byte) 0x80,
+};
+
+static final BitmapCharRec ch20 = new BitmapCharRec(9,1,0,1,9,ch20data);
+
+/* char: 0x13 */
+
+static final byte[] ch19data = {
+(byte) 0xff,(byte) 0x80,
+};
+
+static final BitmapCharRec ch19 = new BitmapCharRec(9,1,0,-1,9,ch19data);
+
+/* char: 0x12 */
+
+static final byte[] ch18data = {
+(byte) 0xff,(byte) 0x80,
+};
+
+static final BitmapCharRec ch18 = new BitmapCharRec(9,1,0,-3,9,ch18data);
+
+/* char: 0x11 */
+
+static final byte[] ch17data = {
+(byte) 0xff,(byte) 0x80,
+};
+
+static final BitmapCharRec ch17 = new BitmapCharRec(9,1,0,-5,9,ch17data);
+
+/* char: 0x10 */
+
+static final byte[] ch16data = {
+(byte) 0xff,(byte) 0x80,
+};
+
+static final BitmapCharRec ch16 = new BitmapCharRec(9,1,0,-7,9,ch16data);
+
+/* char: 0xf */
+
+static final byte[] ch15data = {
+(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0x8,(byte) 0x0,
+(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,
+};
+
+static final BitmapCharRec ch15 = new BitmapCharRec(9,15,0,3,9,ch15data);
+
+/* char: 0xe */
+
+static final byte[] ch14data = {
+(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch14 = new BitmapCharRec(5,9,-4,-3,9,ch14data);
+
+/* char: 0xd */
+
+static final byte[] ch13data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch13 = new BitmapCharRec(5,7,-4,3,9,ch13data);
+
+/* char: 0xc */
+
+static final byte[] ch12data = {
+(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch12 = new BitmapCharRec(5,7,0,3,9,ch12data);
+
+/* char: 0xb */
+
+static final byte[] ch11data = {
+(byte) 0xf8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,
+};
+
+static final BitmapCharRec ch11 = new BitmapCharRec(5,9,0,-3,9,ch11data);
+
+/* char: 0xa */
+
+static final byte[] ch10data = {
+(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x3e,(byte) 0x0,(byte) 0x20,(byte) 0x50,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch10 = new BitmapCharRec(7,10,-1,2,9,ch10data);
+
+/* char: 0x9 */
+
+static final byte[] ch9data = {
+(byte) 0x3e,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x88,(byte) 0x98,(byte) 0xa8,(byte) 0xc8,(byte) 0x88,
+};
+
+static final BitmapCharRec ch9 = new BitmapCharRec(7,10,-1,2,9,ch9data);
+
+/* char: 0x8 */
+
+static final byte[] ch8data = {
+(byte) 0xfe,(byte) 0x10,(byte) 0x10,(byte) 0xfe,(byte) 0x10,(byte) 0x10,
+};
+
+static final BitmapCharRec ch8 = new BitmapCharRec(7,6,-1,0,9,ch8data);
+
+/* char: 0x7 */
+
+static final byte[] ch7data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch7 = new BitmapCharRec(5,4,-2,-6,9,ch7data);
+
+/* char: 0x6 */
+
+static final byte[] ch6data = {
+(byte) 0x20,(byte) 0x20,(byte) 0x3c,(byte) 0x20,(byte) 0x3e,(byte) 0x0,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch6 = new BitmapCharRec(7,10,-1,2,9,ch6data);
+
+/* char: 0x5 */
+
+static final byte[] ch5data = {
+(byte) 0x22,(byte) 0x22,(byte) 0x3c,(byte) 0x22,(byte) 0x3c,(byte) 0x0,(byte) 0x78,(byte) 0x80,(byte) 0x80,(byte) 0x78,
+};
+
+static final BitmapCharRec ch5 = new BitmapCharRec(7,10,-1,2,9,ch5data);
+
+/* char: 0x4 */
+
+static final byte[] ch4data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x1c,(byte) 0x10,(byte) 0x1e,(byte) 0x80,(byte) 0x80,(byte) 0xe0,(byte) 0x80,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch4 = new BitmapCharRec(7,10,-1,2,9,ch4data);
+
+/* char: 0x3 */
+
+static final byte[] ch3data = {
+(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x3e,(byte) 0x0,(byte) 0x88,(byte) 0x88,(byte) 0xf8,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch3 = new BitmapCharRec(7,10,-1,2,9,ch3data);
+
+/* char: 0x2 */
+
+static final byte[] ch2data = {
+(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,
+};
+
+static final BitmapCharRec ch2 = new BitmapCharRec(8,14,0,3,9,ch2data);
+
+/* char: 0x1 */
+
+static final byte[] ch1data = {
+(byte) 0x10,(byte) 0x38,(byte) 0x7c,(byte) 0xfe,(byte) 0x7c,(byte) 0x38,(byte) 0x10,
+};
+
+static final BitmapCharRec ch1 = new BitmapCharRec(7,7,-1,0,9,ch1data);
+
+static final BitmapCharRec[] chars = {
+ch0,
+ch1,
+ch2,
+ch3,
+ch4,
+ch5,
+ch6,
+ch7,
+ch8,
+ch9,
+ch10,
+ch11,
+ch12,
+ch13,
+ch14,
+ch15,
+ch16,
+ch17,
+ch18,
+ch19,
+ch20,
+ch21,
+ch22,
+ch23,
+ch24,
+ch25,
+ch26,
+ch27,
+ch28,
+ch29,
+ch30,
+ch31,
+ch32,
+ch33,
+ch34,
+ch35,
+ch36,
+ch37,
+ch38,
+ch39,
+ch40,
+ch41,
+ch42,
+ch43,
+ch44,
+ch45,
+ch46,
+ch47,
+ch48,
+ch49,
+ch50,
+ch51,
+ch52,
+ch53,
+ch54,
+ch55,
+ch56,
+ch57,
+ch58,
+ch59,
+ch60,
+ch61,
+ch62,
+ch63,
+ch64,
+ch65,
+ch66,
+ch67,
+ch68,
+ch69,
+ch70,
+ch71,
+ch72,
+ch73,
+ch74,
+ch75,
+ch76,
+ch77,
+ch78,
+ch79,
+ch80,
+ch81,
+ch82,
+ch83,
+ch84,
+ch85,
+ch86,
+ch87,
+ch88,
+ch89,
+ch90,
+ch91,
+ch92,
+ch93,
+ch94,
+ch95,
+ch96,
+ch97,
+ch98,
+ch99,
+ch100,
+ch101,
+ch102,
+ch103,
+ch104,
+ch105,
+ch106,
+ch107,
+ch108,
+ch109,
+ch110,
+ch111,
+ch112,
+ch113,
+ch114,
+ch115,
+ch116,
+ch117,
+ch118,
+ch119,
+ch120,
+ch121,
+ch122,
+ch123,
+ch124,
+ch125,
+ch126,
+ch127,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+ch160,
+ch161,
+ch162,
+ch163,
+ch164,
+ch165,
+ch166,
+ch167,
+ch168,
+ch169,
+ch170,
+ch171,
+ch172,
+ch173,
+ch174,
+ch175,
+ch176,
+ch177,
+ch178,
+ch179,
+ch180,
+ch181,
+ch182,
+ch183,
+ch184,
+ch185,
+ch186,
+ch187,
+ch188,
+ch189,
+ch190,
+ch191,
+ch192,
+ch193,
+ch194,
+ch195,
+ch196,
+ch197,
+ch198,
+ch199,
+ch200,
+ch201,
+ch202,
+ch203,
+ch204,
+ch205,
+ch206,
+ch207,
+ch208,
+ch209,
+ch210,
+ch211,
+ch212,
+ch213,
+ch214,
+ch215,
+ch216,
+ch217,
+ch218,
+ch219,
+ch220,
+ch221,
+ch222,
+ch223,
+ch224,
+ch225,
+ch226,
+ch227,
+ch228,
+ch229,
+ch230,
+ch231,
+ch232,
+ch233,
+ch234,
+ch235,
+ch236,
+ch237,
+ch238,
+ch239,
+ch240,
+ch241,
+ch242,
+ch243,
+ch244,
+ch245,
+ch246,
+ch247,
+ch248,
+ch249,
+ch250,
+ch251,
+ch252,
+ch253,
+ch254,
+ch255,
+};
+
+ public static final BitmapFontRec glutBitmap9By15 = new BitmapFontRec("-misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1",
+ 256,
+ 0,
+ chars);
+}
diff --git a/src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmapHelvetica10.java b/src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmapHelvetica10.java
new file mode 100644
index 000000000..fa383ae94
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmapHelvetica10.java
@@ -0,0 +1,1800 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.glut.fonts;
+
+import com.sun.opengl.util.glut.rec.*;
+
+public class GLUTBitmapHelvetica10 {
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+/* char: 0xff */
+
+static final byte[] ch255data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x60,(byte) 0xa0,(byte) 0xa0,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch255 = new BitmapCharRec(4,10,0,2,5,ch255data);
+
+/* char: 0xfe */
+
+static final byte[] ch254data = {
+(byte) 0x80,(byte) 0x80,(byte) 0xb0,(byte) 0xc8,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch254 = new BitmapCharRec(5,10,0,2,6,ch254data);
+
+/* char: 0xfd */
+
+static final byte[] ch253data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x60,(byte) 0xa0,(byte) 0xa0,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch253 = new BitmapCharRec(4,11,0,2,5,ch253data);
+
+/* char: 0xfc */
+
+static final byte[] ch252data = {
+(byte) 0x70,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch252 = new BitmapCharRec(4,8,0,0,5,ch252data);
+
+/* char: 0xfb */
+
+static final byte[] ch251data = {
+(byte) 0x70,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch251 = new BitmapCharRec(4,9,0,0,5,ch251data);
+
+/* char: 0xfa */
+
+static final byte[] ch250data = {
+(byte) 0x70,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch250 = new BitmapCharRec(4,9,0,0,5,ch250data);
+
+/* char: 0xf9 */
+
+static final byte[] ch249data = {
+(byte) 0x70,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch249 = new BitmapCharRec(4,9,0,0,5,ch249data);
+
+/* char: 0xf8 */
+
+static final byte[] ch248data = {
+(byte) 0x70,(byte) 0x88,(byte) 0xc8,(byte) 0xa8,(byte) 0x98,(byte) 0x74,
+};
+
+static final BitmapCharRec ch248 = new BitmapCharRec(6,6,0,0,6,ch248data);
+
+/* char: 0xf7 */
+
+static final byte[] ch247data = {
+(byte) 0x20,(byte) 0x0,(byte) 0xf8,(byte) 0x0,(byte) 0x20,
+};
+
+static final BitmapCharRec ch247 = new BitmapCharRec(5,5,0,-1,6,ch247data);
+
+/* char: 0xf6 */
+
+static final byte[] ch246data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch246 = new BitmapCharRec(5,8,0,0,6,ch246data);
+
+/* char: 0xf5 */
+
+static final byte[] ch245data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch245 = new BitmapCharRec(5,9,0,0,6,ch245data);
+
+/* char: 0xf4 */
+
+static final byte[] ch244data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch244 = new BitmapCharRec(5,9,0,0,6,ch244data);
+
+/* char: 0xf3 */
+
+static final byte[] ch243data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch243 = new BitmapCharRec(5,9,0,0,6,ch243data);
+
+/* char: 0xf2 */
+
+static final byte[] ch242data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch242 = new BitmapCharRec(5,9,0,0,6,ch242data);
+
+/* char: 0xf1 */
+
+static final byte[] ch241data = {
+(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,(byte) 0x0,(byte) 0xa0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch241 = new BitmapCharRec(4,9,0,0,5,ch241data);
+
+/* char: 0xf0 */
+
+static final byte[] ch240data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x90,(byte) 0x60,(byte) 0x50,
+};
+
+static final BitmapCharRec ch240 = new BitmapCharRec(5,9,0,0,6,ch240data);
+
+/* char: 0xef */
+
+static final byte[] ch239data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch239 = new BitmapCharRec(3,8,0,0,2,ch239data);
+
+/* char: 0xee */
+
+static final byte[] ch238data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch238 = new BitmapCharRec(3,9,1,0,2,ch238data);
+
+/* char: 0xed */
+
+static final byte[] ch237data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch237 = new BitmapCharRec(2,9,0,0,2,ch237data);
+
+/* char: 0xec */
+
+static final byte[] ch236data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch236 = new BitmapCharRec(2,9,1,0,2,ch236data);
+
+/* char: 0xeb */
+
+static final byte[] ch235data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0xf0,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch235 = new BitmapCharRec(4,8,0,0,5,ch235data);
+
+/* char: 0xea */
+
+static final byte[] ch234data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0xf0,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch234 = new BitmapCharRec(4,9,0,0,5,ch234data);
+
+/* char: 0xe9 */
+
+static final byte[] ch233data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0xf0,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch233 = new BitmapCharRec(4,9,0,0,5,ch233data);
+
+/* char: 0xe8 */
+
+static final byte[] ch232data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0xf0,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch232 = new BitmapCharRec(4,9,0,0,5,ch232data);
+
+/* char: 0xe7 */
+
+static final byte[] ch231data = {
+(byte) 0x60,(byte) 0x20,(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0x80,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch231 = new BitmapCharRec(4,8,0,2,5,ch231data);
+
+/* char: 0xe6 */
+
+static final byte[] ch230data = {
+(byte) 0x6c,(byte) 0x92,(byte) 0x90,(byte) 0x7e,(byte) 0x12,(byte) 0xec,
+};
+
+static final BitmapCharRec ch230 = new BitmapCharRec(7,6,0,0,8,ch230data);
+
+/* char: 0xe5 */
+
+static final byte[] ch229data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0xe0,(byte) 0x20,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch229 = new BitmapCharRec(5,9,0,0,5,ch229data);
+
+/* char: 0xe4 */
+
+static final byte[] ch228data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0xe0,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch228 = new BitmapCharRec(5,8,0,0,5,ch228data);
+
+/* char: 0xe3 */
+
+static final byte[] ch227data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0xe0,(byte) 0x0,(byte) 0xa0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch227 = new BitmapCharRec(5,9,0,0,5,ch227data);
+
+/* char: 0xe2 */
+
+static final byte[] ch226data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0xe0,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch226 = new BitmapCharRec(5,9,0,0,5,ch226data);
+
+/* char: 0xe1 */
+
+static final byte[] ch225data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0xe0,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch225 = new BitmapCharRec(5,9,0,0,5,ch225data);
+
+/* char: 0xe0 */
+
+static final byte[] ch224data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0xe0,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch224 = new BitmapCharRec(5,9,0,0,5,ch224data);
+
+/* char: 0xdf */
+
+static final byte[] ch223data = {
+(byte) 0xa0,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xa0,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch223 = new BitmapCharRec(4,8,0,0,5,ch223data);
+
+/* char: 0xde */
+
+static final byte[] ch222data = {
+(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x88,(byte) 0x88,(byte) 0xf0,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch222 = new BitmapCharRec(5,8,-1,0,7,ch222data);
+
+/* char: 0xdd */
+
+static final byte[] ch221data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch221 = new BitmapCharRec(7,11,0,0,7,ch221data);
+
+/* char: 0xdc */
+
+static final byte[] ch220data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x48,
+};
+
+static final BitmapCharRec ch220 = new BitmapCharRec(6,10,-1,0,8,ch220data);
+
+/* char: 0xdb */
+
+static final byte[] ch219data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch219 = new BitmapCharRec(6,11,-1,0,8,ch219data);
+
+/* char: 0xda */
+
+static final byte[] ch218data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch218 = new BitmapCharRec(6,11,-1,0,8,ch218data);
+
+/* char: 0xd9 */
+
+static final byte[] ch217data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch217 = new BitmapCharRec(6,11,-1,0,8,ch217data);
+
+/* char: 0xd8 */
+
+static final byte[] ch216data = {
+(byte) 0x80,(byte) 0x78,(byte) 0xc4,(byte) 0xa4,(byte) 0xa4,(byte) 0x94,(byte) 0x94,(byte) 0x8c,(byte) 0x78,(byte) 0x4,
+};
+
+static final BitmapCharRec ch216 = new BitmapCharRec(6,10,-1,1,8,ch216data);
+
+/* char: 0xd7 */
+
+static final byte[] ch215data = {
+(byte) 0x88,(byte) 0x50,(byte) 0x20,(byte) 0x50,(byte) 0x88,
+};
+
+static final BitmapCharRec ch215 = new BitmapCharRec(5,5,0,-1,6,ch215data);
+
+/* char: 0xd6 */
+
+static final byte[] ch214data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x48,
+};
+
+static final BitmapCharRec ch214 = new BitmapCharRec(6,10,-1,0,8,ch214data);
+
+/* char: 0xd5 */
+
+static final byte[] ch213data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch213 = new BitmapCharRec(6,11,-1,0,8,ch213data);
+
+/* char: 0xd4 */
+
+static final byte[] ch212data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch212 = new BitmapCharRec(6,11,-1,0,8,ch212data);
+
+/* char: 0xd3 */
+
+static final byte[] ch211data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch211 = new BitmapCharRec(6,11,-1,0,8,ch211data);
+
+/* char: 0xd2 */
+
+static final byte[] ch210data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch210 = new BitmapCharRec(6,11,-1,0,8,ch210data);
+
+/* char: 0xd1 */
+
+static final byte[] ch209data = {
+(byte) 0x8c,(byte) 0x8c,(byte) 0x94,(byte) 0x94,(byte) 0xa4,(byte) 0xa4,(byte) 0xc4,(byte) 0xc4,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch209 = new BitmapCharRec(6,11,-1,0,8,ch209data);
+
+/* char: 0xd0 */
+
+static final byte[] ch208data = {
+(byte) 0x78,(byte) 0x44,(byte) 0x42,(byte) 0x42,(byte) 0xf2,(byte) 0x42,(byte) 0x44,(byte) 0x78,
+};
+
+static final BitmapCharRec ch208 = new BitmapCharRec(7,8,0,0,8,ch208data);
+
+/* char: 0xcf */
+
+static final byte[] ch207data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch207 = new BitmapCharRec(3,10,0,0,3,ch207data);
+
+/* char: 0xce */
+
+static final byte[] ch206data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch206 = new BitmapCharRec(3,11,0,0,3,ch206data);
+
+/* char: 0xcd */
+
+static final byte[] ch205data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch205 = new BitmapCharRec(2,11,-1,0,3,ch205data);
+
+/* char: 0xcc */
+
+static final byte[] ch204data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch204 = new BitmapCharRec(2,11,0,0,3,ch204data);
+
+/* char: 0xcb */
+
+static final byte[] ch203data = {
+(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch203 = new BitmapCharRec(5,10,-1,0,7,ch203data);
+
+/* char: 0xca */
+
+static final byte[] ch202data = {
+(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch202 = new BitmapCharRec(5,11,-1,0,7,ch202data);
+
+/* char: 0xc9 */
+
+static final byte[] ch201data = {
+(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch201 = new BitmapCharRec(5,11,-1,0,7,ch201data);
+
+/* char: 0xc8 */
+
+static final byte[] ch200data = {
+(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch200 = new BitmapCharRec(5,11,-1,0,7,ch200data);
+
+/* char: 0xc7 */
+
+static final byte[] ch199data = {
+(byte) 0x30,(byte) 0x10,(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch199 = new BitmapCharRec(6,10,-1,2,8,ch199data);
+
+/* char: 0xc6 */
+
+static final byte[] ch198data = {
+(byte) 0x8f,(byte) 0x80,(byte) 0x88,(byte) 0x0,(byte) 0x78,(byte) 0x0,(byte) 0x48,(byte) 0x0,(byte) 0x2f,(byte) 0x80,(byte) 0x28,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x1f,(byte) 0x80,
+};
+
+static final BitmapCharRec ch198 = new BitmapCharRec(9,8,0,0,10,ch198data);
+
+/* char: 0xc5 */
+
+static final byte[] ch197data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch197 = new BitmapCharRec(7,11,0,0,7,ch197data);
+
+/* char: 0xc4 */
+
+static final byte[] ch196data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x28,
+};
+
+static final BitmapCharRec ch196 = new BitmapCharRec(7,10,0,0,7,ch196data);
+
+/* char: 0xc3 */
+
+static final byte[] ch195data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x28,(byte) 0x14,
+};
+
+static final BitmapCharRec ch195 = new BitmapCharRec(7,11,0,0,7,ch195data);
+
+/* char: 0xc2 */
+
+static final byte[] ch194data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch194 = new BitmapCharRec(7,11,0,0,7,ch194data);
+
+/* char: 0xc1 */
+
+static final byte[] ch193data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch193 = new BitmapCharRec(7,11,0,0,7,ch193data);
+
+/* char: 0xc0 */
+
+static final byte[] ch192data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch192 = new BitmapCharRec(7,11,0,0,7,ch192data);
+
+/* char: 0xbf */
+
+static final byte[] ch191data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x0,(byte) 0x20,
+};
+
+static final BitmapCharRec ch191 = new BitmapCharRec(4,8,-1,2,6,ch191data);
+
+/* char: 0xbe */
+
+static final byte[] ch190data = {
+(byte) 0x21,(byte) 0x0,(byte) 0x17,(byte) 0x80,(byte) 0x13,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0xc8,(byte) 0x0,(byte) 0x24,(byte) 0x0,(byte) 0x44,(byte) 0x0,(byte) 0xe2,(byte) 0x0,
+};
+
+static final BitmapCharRec ch190 = new BitmapCharRec(9,8,0,0,9,ch190data);
+
+/* char: 0xbd */
+
+static final byte[] ch189data = {
+(byte) 0x27,(byte) 0x12,(byte) 0x15,(byte) 0xb,(byte) 0x48,(byte) 0x44,(byte) 0xc4,(byte) 0x42,
+};
+
+static final BitmapCharRec ch189 = new BitmapCharRec(8,8,0,0,9,ch189data);
+
+/* char: 0xbc */
+
+static final byte[] ch188data = {
+(byte) 0x21,(byte) 0x0,(byte) 0x17,(byte) 0x80,(byte) 0x13,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x48,(byte) 0x0,(byte) 0x44,(byte) 0x0,(byte) 0xc4,(byte) 0x0,(byte) 0x42,(byte) 0x0,
+};
+
+static final BitmapCharRec ch188 = new BitmapCharRec(9,8,0,0,9,ch188data);
+
+/* char: 0xbb */
+
+static final byte[] ch187data = {
+(byte) 0xa0,(byte) 0x50,(byte) 0x28,(byte) 0x50,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch187 = new BitmapCharRec(5,5,0,0,6,ch187data);
+
+/* char: 0xba */
+
+static final byte[] ch186data = {
+(byte) 0xe0,(byte) 0x0,(byte) 0xe0,(byte) 0xa0,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch186 = new BitmapCharRec(3,5,0,-3,4,ch186data);
+
+/* char: 0xb9 */
+
+static final byte[] ch185data = {
+(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch185 = new BitmapCharRec(2,4,0,-3,3,ch185data);
+
+/* char: 0xb8 */
+
+static final byte[] ch184data = {
+(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch184 = new BitmapCharRec(2,2,0,2,3,ch184data);
+
+/* char: 0xb7 */
+
+static final byte[] ch183data = {
+(byte) 0xc0,
+};
+
+static final BitmapCharRec ch183 = new BitmapCharRec(2,1,0,-3,3,ch183data);
+
+/* char: 0xb6 */
+
+static final byte[] ch182data = {
+(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x68,(byte) 0xe8,(byte) 0xe8,(byte) 0xe8,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch182 = new BitmapCharRec(6,10,0,2,6,ch182data);
+
+/* char: 0xb5 */
+
+static final byte[] ch181data = {
+(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,
+};
+
+static final BitmapCharRec ch181 = new BitmapCharRec(4,8,0,2,5,ch181data);
+
+/* char: 0xb4 */
+
+static final byte[] ch180data = {
+(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch180 = new BitmapCharRec(2,2,0,-6,3,ch180data);
+
+/* char: 0xb3 */
+
+static final byte[] ch179data = {
+(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch179 = new BitmapCharRec(3,4,0,-3,3,ch179data);
+
+/* char: 0xb2 */
+
+static final byte[] ch178data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0xa0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch178 = new BitmapCharRec(3,4,0,-3,3,ch178data);
+
+/* char: 0xb1 */
+
+static final byte[] ch177data = {
+(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch177 = new BitmapCharRec(5,7,0,0,6,ch177data);
+
+/* char: 0xb0 */
+
+static final byte[] ch176data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch176 = new BitmapCharRec(4,4,0,-3,4,ch176data);
+
+/* char: 0xaf */
+
+static final byte[] ch175data = {
+(byte) 0xe0,
+};
+
+static final BitmapCharRec ch175 = new BitmapCharRec(3,1,0,-7,3,ch175data);
+
+/* char: 0xae */
+
+static final byte[] ch174data = {
+(byte) 0x38,(byte) 0x44,(byte) 0xaa,(byte) 0xb2,(byte) 0xba,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch174 = new BitmapCharRec(7,7,-1,0,9,ch174data);
+
+/* char: 0xad */
+
+static final byte[] ch173data = {
+(byte) 0xe0,
+};
+
+static final BitmapCharRec ch173 = new BitmapCharRec(3,1,0,-3,4,ch173data);
+
+/* char: 0xac */
+
+static final byte[] ch172data = {
+(byte) 0x8,(byte) 0x8,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch172 = new BitmapCharRec(5,3,-1,-2,7,ch172data);
+
+/* char: 0xab */
+
+static final byte[] ch171data = {
+(byte) 0x28,(byte) 0x50,(byte) 0xa0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch171 = new BitmapCharRec(5,5,0,0,6,ch171data);
+
+/* char: 0xaa */
+
+static final byte[] ch170data = {
+(byte) 0xe0,(byte) 0x0,(byte) 0xa0,(byte) 0x20,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch170 = new BitmapCharRec(3,5,0,-3,4,ch170data);
+
+/* char: 0xa9 */
+
+static final byte[] ch169data = {
+(byte) 0x38,(byte) 0x44,(byte) 0x9a,(byte) 0xa2,(byte) 0x9a,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch169 = new BitmapCharRec(7,7,-1,0,9,ch169data);
+
+/* char: 0xa8 */
+
+static final byte[] ch168data = {
+(byte) 0xa0,
+};
+
+static final BitmapCharRec ch168 = new BitmapCharRec(3,1,0,-7,3,ch168data);
+
+/* char: 0xa7 */
+
+static final byte[] ch167data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x18,(byte) 0x70,(byte) 0xc8,(byte) 0x98,(byte) 0x70,(byte) 0xc0,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch167 = new BitmapCharRec(5,10,0,2,6,ch167data);
+
+/* char: 0xa6 */
+
+static final byte[] ch166data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch166 = new BitmapCharRec(1,10,-1,2,3,ch166data);
+
+/* char: 0xa5 */
+
+static final byte[] ch165data = {
+(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0xf8,(byte) 0x50,(byte) 0x50,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch165 = new BitmapCharRec(5,8,0,0,6,ch165data);
+
+/* char: 0xa4 */
+
+static final byte[] ch164data = {
+(byte) 0x90,(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x90,
+};
+
+static final BitmapCharRec ch164 = new BitmapCharRec(4,6,0,-1,5,ch164data);
+
+/* char: 0xa3 */
+
+static final byte[] ch163data = {
+(byte) 0xb0,(byte) 0x48,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch163 = new BitmapCharRec(5,8,0,0,6,ch163data);
+
+/* char: 0xa2 */
+
+static final byte[] ch162data = {
+(byte) 0x40,(byte) 0x70,(byte) 0xa8,(byte) 0xa0,(byte) 0xa0,(byte) 0xa8,(byte) 0x70,(byte) 0x10,
+};
+
+static final BitmapCharRec ch162 = new BitmapCharRec(5,8,0,1,6,ch162data);
+
+/* char: 0xa1 */
+
+static final byte[] ch161data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch161 = new BitmapCharRec(1,8,-1,2,3,ch161data);
+
+/* char: 0xa0 */
+
+static final BitmapCharRec ch160 = new BitmapCharRec(0,0,0,0,3,null);
+
+/* char: 0x7e '~' */
+
+static final byte[] ch126data = {
+(byte) 0x98,(byte) 0x64,
+};
+
+static final BitmapCharRec ch126 = new BitmapCharRec(6,2,0,-3,7,ch126data);
+
+/* char: 0x7d '}' */
+
+static final byte[] ch125data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch125 = new BitmapCharRec(3,10,0,2,3,ch125data);
+
+/* char: 0x7c '|' */
+
+static final byte[] ch124data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch124 = new BitmapCharRec(1,10,-1,2,3,ch124data);
+
+/* char: 0x7b '{' */
+
+static final byte[] ch123data = {
+(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch123 = new BitmapCharRec(3,10,0,2,3,ch123data);
+
+/* char: 0x7a 'z' */
+
+static final byte[] ch122data = {
+(byte) 0xf0,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch122 = new BitmapCharRec(4,6,0,0,5,ch122data);
+
+/* char: 0x79 'y' */
+
+static final byte[] ch121data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x60,(byte) 0xa0,(byte) 0xa0,(byte) 0x90,(byte) 0x90,
+};
+
+static final BitmapCharRec ch121 = new BitmapCharRec(4,8,0,2,5,ch121data);
+
+/* char: 0x78 'x' */
+
+static final byte[] ch120data = {
+(byte) 0x88,(byte) 0x88,(byte) 0x50,(byte) 0x20,(byte) 0x50,(byte) 0x88,
+};
+
+static final BitmapCharRec ch120 = new BitmapCharRec(5,6,0,0,6,ch120data);
+
+/* char: 0x77 'w' */
+
+static final byte[] ch119data = {
+(byte) 0x28,(byte) 0x28,(byte) 0x54,(byte) 0x54,(byte) 0x92,(byte) 0x92,
+};
+
+static final BitmapCharRec ch119 = new BitmapCharRec(7,6,0,0,8,ch119data);
+
+/* char: 0x76 'v' */
+
+static final byte[] ch118data = {
+(byte) 0x20,(byte) 0x20,(byte) 0x50,(byte) 0x50,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch118 = new BitmapCharRec(5,6,0,0,6,ch118data);
+
+/* char: 0x75 'u' */
+
+static final byte[] ch117data = {
+(byte) 0x70,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,
+};
+
+static final BitmapCharRec ch117 = new BitmapCharRec(4,6,0,0,5,ch117data);
+
+/* char: 0x74 't' */
+
+static final byte[] ch116data = {
+(byte) 0x60,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x40,
+};
+
+static final BitmapCharRec ch116 = new BitmapCharRec(3,8,0,0,4,ch116data);
+
+/* char: 0x73 's' */
+
+static final byte[] ch115data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x10,(byte) 0x60,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch115 = new BitmapCharRec(4,6,0,0,5,ch115data);
+
+/* char: 0x72 'r' */
+
+static final byte[] ch114data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xc0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch114 = new BitmapCharRec(3,6,0,0,4,ch114data);
+
+/* char: 0x71 'q' */
+
+static final byte[] ch113data = {
+(byte) 0x8,(byte) 0x8,(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x98,(byte) 0x68,
+};
+
+static final BitmapCharRec ch113 = new BitmapCharRec(5,8,0,2,6,ch113data);
+
+/* char: 0x70 'p' */
+
+static final byte[] ch112data = {
+(byte) 0x80,(byte) 0x80,(byte) 0xb0,(byte) 0xc8,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,
+};
+
+static final BitmapCharRec ch112 = new BitmapCharRec(5,8,0,2,6,ch112data);
+
+/* char: 0x6f 'o' */
+
+static final byte[] ch111data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch111 = new BitmapCharRec(5,6,0,0,6,ch111data);
+
+/* char: 0x6e 'n' */
+
+static final byte[] ch110data = {
+(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,
+};
+
+static final BitmapCharRec ch110 = new BitmapCharRec(5,6,0,0,6,ch110data);
+
+/* char: 0x6d 'm' */
+
+static final byte[] ch109data = {
+(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0xec,
+};
+
+static final BitmapCharRec ch109 = new BitmapCharRec(7,6,0,0,8,ch109data);
+
+/* char: 0x6c 'l' */
+
+static final byte[] ch108data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch108 = new BitmapCharRec(1,8,0,0,2,ch108data);
+
+/* char: 0x6b 'k' */
+
+static final byte[] ch107data = {
+(byte) 0x90,(byte) 0x90,(byte) 0xa0,(byte) 0xc0,(byte) 0xa0,(byte) 0x90,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch107 = new BitmapCharRec(4,8,0,0,5,ch107data);
+
+/* char: 0x6a 'j' */
+
+static final byte[] ch106data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch106 = new BitmapCharRec(1,9,0,1,2,ch106data);
+
+/* char: 0x69 'i' */
+
+static final byte[] ch105data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch105 = new BitmapCharRec(1,8,0,0,2,ch105data);
+
+/* char: 0x68 'h' */
+
+static final byte[] ch104data = {
+(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch104 = new BitmapCharRec(5,8,0,0,6,ch104data);
+
+/* char: 0x67 'g' */
+
+static final byte[] ch103data = {
+(byte) 0x70,(byte) 0x8,(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x98,(byte) 0x68,
+};
+
+static final BitmapCharRec ch103 = new BitmapCharRec(5,8,0,2,6,ch103data);
+
+/* char: 0x66 'f' */
+
+static final byte[] ch102data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x30,
+};
+
+static final BitmapCharRec ch102 = new BitmapCharRec(4,8,0,0,4,ch102data);
+
+/* char: 0x65 'e' */
+
+static final byte[] ch101data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0xf0,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch101 = new BitmapCharRec(4,6,0,0,5,ch101data);
+
+/* char: 0x64 'd' */
+
+static final byte[] ch100data = {
+(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x98,(byte) 0x68,(byte) 0x8,(byte) 0x8,
+};
+
+static final BitmapCharRec ch100 = new BitmapCharRec(5,8,0,0,6,ch100data);
+
+/* char: 0x63 'c' */
+
+static final byte[] ch99data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0x80,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch99 = new BitmapCharRec(4,6,0,0,5,ch99data);
+
+/* char: 0x62 'b' */
+
+static final byte[] ch98data = {
+(byte) 0xb0,(byte) 0xc8,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch98 = new BitmapCharRec(5,8,0,0,6,ch98data);
+
+/* char: 0x61 'a' */
+
+static final byte[] ch97data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch97 = new BitmapCharRec(5,6,0,0,5,ch97data);
+
+/* char: 0x60 '`' */
+
+static final byte[] ch96data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch96 = new BitmapCharRec(2,3,0,-5,3,ch96data);
+
+/* char: 0x5f '_' */
+
+static final byte[] ch95data = {
+(byte) 0xfc,
+};
+
+static final BitmapCharRec ch95 = new BitmapCharRec(6,1,0,2,6,ch95data);
+
+/* char: 0x5e '^' */
+
+static final byte[] ch94data = {
+(byte) 0x88,(byte) 0x50,(byte) 0x50,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch94 = new BitmapCharRec(5,5,0,-3,6,ch94data);
+
+/* char: 0x5d ']' */
+
+static final byte[] ch93data = {
+(byte) 0xc0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch93 = new BitmapCharRec(2,10,0,2,3,ch93data);
+
+/* char: 0x5c '\' */
+
+static final byte[] ch92data = {
+(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch92 = new BitmapCharRec(3,8,0,0,3,ch92data);
+
+/* char: 0x5b '[' */
+
+static final byte[] ch91data = {
+(byte) 0xc0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch91 = new BitmapCharRec(2,10,-1,2,3,ch91data);
+
+/* char: 0x5a 'Z' */
+
+static final byte[] ch90data = {
+(byte) 0xf8,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch90 = new BitmapCharRec(5,8,-1,0,7,ch90data);
+
+/* char: 0x59 'Y' */
+
+static final byte[] ch89data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x82,
+};
+
+static final BitmapCharRec ch89 = new BitmapCharRec(7,8,0,0,7,ch89data);
+
+/* char: 0x58 'X' */
+
+static final byte[] ch88data = {
+(byte) 0x88,(byte) 0x88,(byte) 0x50,(byte) 0x50,(byte) 0x20,(byte) 0x50,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch88 = new BitmapCharRec(5,8,-1,0,7,ch88data);
+
+/* char: 0x57 'W' */
+
+static final byte[] ch87data = {
+(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0x49,(byte) 0x0,(byte) 0x49,(byte) 0x0,(byte) 0x88,(byte) 0x80,(byte) 0x88,(byte) 0x80,
+};
+
+static final BitmapCharRec ch87 = new BitmapCharRec(9,8,0,0,9,ch87data);
+
+/* char: 0x56 'V' */
+
+static final byte[] ch86data = {
+(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch86 = new BitmapCharRec(7,8,0,0,7,ch86data);
+
+/* char: 0x55 'U' */
+
+static final byte[] ch85data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,
+};
+
+static final BitmapCharRec ch85 = new BitmapCharRec(6,8,-1,0,8,ch85data);
+
+/* char: 0x54 'T' */
+
+static final byte[] ch84data = {
+(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch84 = new BitmapCharRec(5,8,0,0,5,ch84data);
+
+/* char: 0x53 'S' */
+
+static final byte[] ch83data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x8,(byte) 0x70,(byte) 0x80,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch83 = new BitmapCharRec(5,8,-1,0,7,ch83data);
+
+/* char: 0x52 'R' */
+
+static final byte[] ch82data = {
+(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xf0,(byte) 0x88,(byte) 0x88,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch82 = new BitmapCharRec(5,8,-1,0,7,ch82data);
+
+/* char: 0x51 'Q' */
+
+static final byte[] ch81data = {
+(byte) 0x2,(byte) 0x7c,(byte) 0x8c,(byte) 0x94,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch81 = new BitmapCharRec(7,9,-1,1,8,ch81data);
+
+/* char: 0x50 'P' */
+
+static final byte[] ch80data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x88,(byte) 0x88,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch80 = new BitmapCharRec(5,8,-1,0,7,ch80data);
+
+/* char: 0x4f 'O' */
+
+static final byte[] ch79data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch79 = new BitmapCharRec(6,8,-1,0,8,ch79data);
+
+/* char: 0x4e 'N' */
+
+static final byte[] ch78data = {
+(byte) 0x8c,(byte) 0x8c,(byte) 0x94,(byte) 0x94,(byte) 0xa4,(byte) 0xa4,(byte) 0xc4,(byte) 0xc4,
+};
+
+static final BitmapCharRec ch78 = new BitmapCharRec(6,8,-1,0,8,ch78data);
+
+/* char: 0x4d 'M' */
+
+static final byte[] ch77data = {
+(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0xaa,(byte) 0xaa,(byte) 0xc6,(byte) 0xc6,(byte) 0x82,
+};
+
+static final BitmapCharRec ch77 = new BitmapCharRec(7,8,-1,0,9,ch77data);
+
+/* char: 0x4c 'L' */
+
+static final byte[] ch76data = {
+(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch76 = new BitmapCharRec(4,8,-1,0,6,ch76data);
+
+/* char: 0x4b 'K' */
+
+static final byte[] ch75data = {
+(byte) 0x88,(byte) 0x88,(byte) 0x90,(byte) 0x90,(byte) 0xe0,(byte) 0xa0,(byte) 0x90,(byte) 0x88,
+};
+
+static final BitmapCharRec ch75 = new BitmapCharRec(5,8,-1,0,7,ch75data);
+
+/* char: 0x4a 'J' */
+
+static final byte[] ch74data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,
+};
+
+static final BitmapCharRec ch74 = new BitmapCharRec(4,8,0,0,5,ch74data);
+
+/* char: 0x49 'I' */
+
+static final byte[] ch73data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch73 = new BitmapCharRec(1,8,-1,0,3,ch73data);
+
+/* char: 0x48 'H' */
+
+static final byte[] ch72data = {
+(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x84,
+};
+
+static final BitmapCharRec ch72 = new BitmapCharRec(6,8,-1,0,8,ch72data);
+
+/* char: 0x47 'G' */
+
+static final byte[] ch71data = {
+(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x8c,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch71 = new BitmapCharRec(6,8,-1,0,8,ch71data);
+
+/* char: 0x46 'F' */
+
+static final byte[] ch70data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch70 = new BitmapCharRec(5,8,-1,0,6,ch70data);
+
+/* char: 0x45 'E' */
+
+static final byte[] ch69data = {
+(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch69 = new BitmapCharRec(5,8,-1,0,7,ch69data);
+
+/* char: 0x44 'D' */
+
+static final byte[] ch68data = {
+(byte) 0xf0,(byte) 0x88,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x88,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch68 = new BitmapCharRec(6,8,-1,0,8,ch68data);
+
+/* char: 0x43 'C' */
+
+static final byte[] ch67data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch67 = new BitmapCharRec(6,8,-1,0,8,ch67data);
+
+/* char: 0x42 'B' */
+
+static final byte[] ch66data = {
+(byte) 0xf0,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xf0,(byte) 0x88,(byte) 0x88,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch66 = new BitmapCharRec(5,8,-1,0,7,ch66data);
+
+/* char: 0x41 'A' */
+
+static final byte[] ch65data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,(byte) 0x10,
+};
+
+static final BitmapCharRec ch65 = new BitmapCharRec(7,8,0,0,7,ch65data);
+
+/* char: 0x40 '@' */
+
+static final byte[] ch64data = {
+(byte) 0x3e,(byte) 0x0,(byte) 0x40,(byte) 0x0,(byte) 0x9b,(byte) 0x0,(byte) 0xa4,(byte) 0x80,(byte) 0xa4,(byte) 0x80,(byte) 0xa2,(byte) 0x40,(byte) 0x92,(byte) 0x40,(byte) 0x4d,(byte) 0x40,
+(byte) 0x20,(byte) 0x80,(byte) 0x1f,(byte) 0x0,
+};
+
+static final BitmapCharRec ch64 = new BitmapCharRec(10,10,0,2,11,ch64data);
+
+/* char: 0x3f '?' */
+
+static final byte[] ch63data = {
+(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch63 = new BitmapCharRec(4,8,-1,0,6,ch63data);
+
+/* char: 0x3e '>' */
+
+static final byte[] ch62data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch62 = new BitmapCharRec(3,5,-1,-1,6,ch62data);
+
+/* char: 0x3d '=' */
+
+static final byte[] ch61data = {
+(byte) 0xf0,(byte) 0x0,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch61 = new BitmapCharRec(4,3,0,-2,5,ch61data);
+
+/* char: 0x3c '<' */
+
+static final byte[] ch60data = {
+(byte) 0x20,(byte) 0x40,(byte) 0x80,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch60 = new BitmapCharRec(3,5,-1,-1,6,ch60data);
+
+/* char: 0x3b ';' */
+
+static final byte[] ch59data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch59 = new BitmapCharRec(2,8,0,2,3,ch59data);
+
+/* char: 0x3a ':' */
+
+static final byte[] ch58data = {
+(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch58 = new BitmapCharRec(1,6,-1,0,3,ch58data);
+
+/* char: 0x39 '9' */
+
+static final byte[] ch57data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch57 = new BitmapCharRec(5,8,0,0,6,ch57data);
+
+/* char: 0x38 '8' */
+
+static final byte[] ch56data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch56 = new BitmapCharRec(5,8,0,0,6,ch56data);
+
+/* char: 0x37 '7' */
+
+static final byte[] ch55data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x8,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch55 = new BitmapCharRec(5,8,0,0,6,ch55data);
+
+/* char: 0x36 '6' */
+
+static final byte[] ch54data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch54 = new BitmapCharRec(5,8,0,0,6,ch54data);
+
+/* char: 0x35 '5' */
+
+static final byte[] ch53data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch53 = new BitmapCharRec(5,8,0,0,6,ch53data);
+
+/* char: 0x34 '4' */
+
+static final byte[] ch52data = {
+(byte) 0x10,(byte) 0x10,(byte) 0xf8,(byte) 0x90,(byte) 0x50,(byte) 0x50,(byte) 0x30,(byte) 0x10,
+};
+
+static final BitmapCharRec ch52 = new BitmapCharRec(5,8,0,0,6,ch52data);
+
+/* char: 0x33 '3' */
+
+static final byte[] ch51data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch51 = new BitmapCharRec(5,8,0,0,6,ch51data);
+
+/* char: 0x32 '2' */
+
+static final byte[] ch50data = {
+(byte) 0xf8,(byte) 0x80,(byte) 0x40,(byte) 0x30,(byte) 0x8,(byte) 0x8,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch50 = new BitmapCharRec(5,8,0,0,6,ch50data);
+
+/* char: 0x31 '1' */
+
+static final byte[] ch49data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch49 = new BitmapCharRec(2,8,-1,0,6,ch49data);
+
+/* char: 0x30 '0' */
+
+static final byte[] ch48data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch48 = new BitmapCharRec(5,8,0,0,6,ch48data);
+
+/* char: 0x2f '/' */
+
+static final byte[] ch47data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch47 = new BitmapCharRec(3,8,0,0,3,ch47data);
+
+/* char: 0x2e '.' */
+
+static final byte[] ch46data = {
+(byte) 0x80,
+};
+
+static final BitmapCharRec ch46 = new BitmapCharRec(1,1,-1,0,3,ch46data);
+
+/* char: 0x2d '-' */
+
+static final byte[] ch45data = {
+(byte) 0xf8,
+};
+
+static final BitmapCharRec ch45 = new BitmapCharRec(5,1,-1,-3,7,ch45data);
+
+/* char: 0x2c ',' */
+
+static final byte[] ch44data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,
+};
+
+static final BitmapCharRec ch44 = new BitmapCharRec(2,3,0,2,3,ch44data);
+
+/* char: 0x2b '+' */
+
+static final byte[] ch43data = {
+(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch43 = new BitmapCharRec(5,5,0,-1,6,ch43data);
+
+/* char: 0x2a '*' */
+
+static final byte[] ch42data = {
+(byte) 0xa0,(byte) 0x40,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch42 = new BitmapCharRec(3,3,0,-5,4,ch42data);
+
+/* char: 0x29 ')' */
+
+static final byte[] ch41data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch41 = new BitmapCharRec(3,10,-1,2,4,ch41data);
+
+/* char: 0x28 '(' */
+
+static final byte[] ch40data = {
+(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch40 = new BitmapCharRec(3,10,0,2,4,ch40data);
+
+/* char: 0x27 ''' */
+
+static final byte[] ch39data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,
+};
+
+static final BitmapCharRec ch39 = new BitmapCharRec(2,3,-1,-5,3,ch39data);
+
+/* char: 0x26 '&' */
+
+static final byte[] ch38data = {
+(byte) 0x64,(byte) 0x98,(byte) 0x98,(byte) 0xa4,(byte) 0x60,(byte) 0x50,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch38 = new BitmapCharRec(6,8,-1,0,8,ch38data);
+
+/* char: 0x25 '%' */
+
+static final byte[] ch37data = {
+(byte) 0x26,(byte) 0x29,(byte) 0x16,(byte) 0x10,(byte) 0x8,(byte) 0x68,(byte) 0x94,(byte) 0x64,
+};
+
+static final BitmapCharRec ch37 = new BitmapCharRec(8,8,0,0,9,ch37data);
+
+/* char: 0x24 '$' */
+
+static final byte[] ch36data = {
+(byte) 0x20,(byte) 0x70,(byte) 0xa8,(byte) 0x28,(byte) 0x70,(byte) 0xa0,(byte) 0xa8,(byte) 0x70,(byte) 0x20,
+};
+
+static final BitmapCharRec ch36 = new BitmapCharRec(5,9,0,1,6,ch36data);
+
+/* char: 0x23 '#' */
+
+static final byte[] ch35data = {
+(byte) 0x50,(byte) 0x50,(byte) 0xf8,(byte) 0x28,(byte) 0x7c,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch35 = new BitmapCharRec(6,7,0,0,6,ch35data);
+
+/* char: 0x22 '"' */
+
+static final byte[] ch34data = {
+(byte) 0xa0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch34 = new BitmapCharRec(3,2,-1,-6,4,ch34data);
+
+/* char: 0x21 '!' */
+
+static final byte[] ch33data = {
+(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch33 = new BitmapCharRec(1,8,-1,0,3,ch33data);
+
+/* char: 0x20 ' ' */
+
+static final BitmapCharRec ch32 = new BitmapCharRec(0,0,0,0,3,null);
+
+static final BitmapCharRec[] chars = {
+ch32,
+ch33,
+ch34,
+ch35,
+ch36,
+ch37,
+ch38,
+ch39,
+ch40,
+ch41,
+ch42,
+ch43,
+ch44,
+ch45,
+ch46,
+ch47,
+ch48,
+ch49,
+ch50,
+ch51,
+ch52,
+ch53,
+ch54,
+ch55,
+ch56,
+ch57,
+ch58,
+ch59,
+ch60,
+ch61,
+ch62,
+ch63,
+ch64,
+ch65,
+ch66,
+ch67,
+ch68,
+ch69,
+ch70,
+ch71,
+ch72,
+ch73,
+ch74,
+ch75,
+ch76,
+ch77,
+ch78,
+ch79,
+ch80,
+ch81,
+ch82,
+ch83,
+ch84,
+ch85,
+ch86,
+ch87,
+ch88,
+ch89,
+ch90,
+ch91,
+ch92,
+ch93,
+ch94,
+ch95,
+ch96,
+ch97,
+ch98,
+ch99,
+ch100,
+ch101,
+ch102,
+ch103,
+ch104,
+ch105,
+ch106,
+ch107,
+ch108,
+ch109,
+ch110,
+ch111,
+ch112,
+ch113,
+ch114,
+ch115,
+ch116,
+ch117,
+ch118,
+ch119,
+ch120,
+ch121,
+ch122,
+ch123,
+ch124,
+ch125,
+ch126,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+ch160,
+ch161,
+ch162,
+ch163,
+ch164,
+ch165,
+ch166,
+ch167,
+ch168,
+ch169,
+ch170,
+ch171,
+ch172,
+ch173,
+ch174,
+ch175,
+ch176,
+ch177,
+ch178,
+ch179,
+ch180,
+ch181,
+ch182,
+ch183,
+ch184,
+ch185,
+ch186,
+ch187,
+ch188,
+ch189,
+ch190,
+ch191,
+ch192,
+ch193,
+ch194,
+ch195,
+ch196,
+ch197,
+ch198,
+ch199,
+ch200,
+ch201,
+ch202,
+ch203,
+ch204,
+ch205,
+ch206,
+ch207,
+ch208,
+ch209,
+ch210,
+ch211,
+ch212,
+ch213,
+ch214,
+ch215,
+ch216,
+ch217,
+ch218,
+ch219,
+ch220,
+ch221,
+ch222,
+ch223,
+ch224,
+ch225,
+ch226,
+ch227,
+ch228,
+ch229,
+ch230,
+ch231,
+ch232,
+ch233,
+ch234,
+ch235,
+ch236,
+ch237,
+ch238,
+ch239,
+ch240,
+ch241,
+ch242,
+ch243,
+ch244,
+ch245,
+ch246,
+ch247,
+ch248,
+ch249,
+ch250,
+ch251,
+ch252,
+ch253,
+ch254,
+ch255,
+};
+
+ public static final BitmapFontRec glutBitmapHelvetica10 = new BitmapFontRec("-adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1",
+ 224,
+ 32,
+ chars);
+}
diff --git a/src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmapHelvetica12.java b/src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmapHelvetica12.java
new file mode 100644
index 000000000..9677d7307
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmapHelvetica12.java
@@ -0,0 +1,1810 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.glut.fonts;
+
+import com.sun.opengl.util.glut.rec.*;
+
+public class GLUTBitmapHelvetica12 {
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+/* char: 0xff */
+
+static final byte[] ch255data = {
+(byte) 0xc0,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x30,(byte) 0x50,(byte) 0x50,(byte) 0x48,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch255 = new BitmapCharRec(5,12,-1,3,7,ch255data);
+
+/* char: 0xfe */
+
+static final byte[] ch254data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xb0,(byte) 0xc8,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch254 = new BitmapCharRec(5,12,-1,3,7,ch254data);
+
+/* char: 0xfd */
+
+static final byte[] ch253data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x50,(byte) 0x50,(byte) 0x90,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch253 = new BitmapCharRec(5,13,-1,3,7,ch253data);
+
+/* char: 0xfc */
+
+static final byte[] ch252data = {
+(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch252 = new BitmapCharRec(5,9,-1,0,7,ch252data);
+
+/* char: 0xfb */
+
+static final byte[] ch251data = {
+(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch251 = new BitmapCharRec(5,10,-1,0,7,ch251data);
+
+/* char: 0xfa */
+
+static final byte[] ch250data = {
+(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch250 = new BitmapCharRec(5,10,-1,0,7,ch250data);
+
+/* char: 0xf9 */
+
+static final byte[] ch249data = {
+(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch249 = new BitmapCharRec(5,10,-1,0,7,ch249data);
+
+/* char: 0xf8 */
+
+static final byte[] ch248data = {
+(byte) 0xb8,(byte) 0x44,(byte) 0x64,(byte) 0x54,(byte) 0x4c,(byte) 0x44,(byte) 0x3a,
+};
+
+static final BitmapCharRec ch248 = new BitmapCharRec(7,7,0,0,7,ch248data);
+
+/* char: 0xf7 */
+
+static final byte[] ch247data = {
+(byte) 0x20,(byte) 0x0,(byte) 0xf8,(byte) 0x0,(byte) 0x20,
+};
+
+static final BitmapCharRec ch247 = new BitmapCharRec(5,5,-1,-1,7,ch247data);
+
+/* char: 0xf6 */
+
+static final byte[] ch246data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch246 = new BitmapCharRec(5,9,-1,0,7,ch246data);
+
+/* char: 0xf5 */
+
+static final byte[] ch245data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch245 = new BitmapCharRec(5,10,-1,0,7,ch245data);
+
+/* char: 0xf4 */
+
+static final byte[] ch244data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch244 = new BitmapCharRec(5,10,-1,0,7,ch244data);
+
+/* char: 0xf3 */
+
+static final byte[] ch243data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch243 = new BitmapCharRec(5,10,-1,0,7,ch243data);
+
+/* char: 0xf2 */
+
+static final byte[] ch242data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch242 = new BitmapCharRec(5,10,-1,0,7,ch242data);
+
+/* char: 0xf1 */
+
+static final byte[] ch241data = {
+(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch241 = new BitmapCharRec(5,10,-1,0,7,ch241data);
+
+/* char: 0xf0 */
+
+static final byte[] ch240data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x50,(byte) 0x30,(byte) 0x68,
+};
+
+static final BitmapCharRec ch240 = new BitmapCharRec(5,10,-1,0,7,ch240data);
+
+/* char: 0xef */
+
+static final byte[] ch239data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch239 = new BitmapCharRec(3,9,0,0,3,ch239data);
+
+/* char: 0xee */
+
+static final byte[] ch238data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch238 = new BitmapCharRec(3,10,0,0,3,ch238data);
+
+/* char: 0xed */
+
+static final byte[] ch237data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch237 = new BitmapCharRec(2,10,-1,0,3,ch237data);
+
+/* char: 0xec */
+
+static final byte[] ch236data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch236 = new BitmapCharRec(2,10,0,0,3,ch236data);
+
+/* char: 0xeb */
+
+static final byte[] ch235data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x80,(byte) 0xf8,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch235 = new BitmapCharRec(5,9,-1,0,7,ch235data);
+
+/* char: 0xea */
+
+static final byte[] ch234data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x80,(byte) 0xf8,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch234 = new BitmapCharRec(5,10,-1,0,7,ch234data);
+
+/* char: 0xe9 */
+
+static final byte[] ch233data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x80,(byte) 0xf8,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch233 = new BitmapCharRec(5,10,-1,0,7,ch233data);
+
+/* char: 0xe8 */
+
+static final byte[] ch232data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x80,(byte) 0xf8,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch232 = new BitmapCharRec(5,10,-1,0,7,ch232data);
+
+/* char: 0xe7 */
+
+static final byte[] ch231data = {
+(byte) 0x60,(byte) 0x10,(byte) 0x20,(byte) 0x70,(byte) 0x88,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch231 = new BitmapCharRec(5,10,-1,3,7,ch231data);
+
+/* char: 0xe6 */
+
+static final byte[] ch230data = {
+(byte) 0x77,(byte) 0x0,(byte) 0x88,(byte) 0x80,(byte) 0x88,(byte) 0x0,(byte) 0x7f,(byte) 0x80,(byte) 0x8,(byte) 0x80,(byte) 0x88,(byte) 0x80,(byte) 0x77,(byte) 0x0,
+};
+
+static final BitmapCharRec ch230 = new BitmapCharRec(9,7,-1,0,11,ch230data);
+
+/* char: 0xe5 */
+
+static final byte[] ch229data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x88,(byte) 0x70,(byte) 0x30,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch229 = new BitmapCharRec(6,10,-1,0,7,ch229data);
+
+/* char: 0xe4 */
+
+static final byte[] ch228data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch228 = new BitmapCharRec(6,9,-1,0,7,ch228data);
+
+/* char: 0xe3 */
+
+static final byte[] ch227data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch227 = new BitmapCharRec(6,10,-1,0,7,ch227data);
+
+/* char: 0xe2 */
+
+static final byte[] ch226data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch226 = new BitmapCharRec(6,10,-1,0,7,ch226data);
+
+/* char: 0xe1 */
+
+static final byte[] ch225data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch225 = new BitmapCharRec(6,10,-1,0,7,ch225data);
+
+/* char: 0xe0 */
+
+static final byte[] ch224data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch224 = new BitmapCharRec(6,10,-1,0,7,ch224data);
+
+/* char: 0xdf */
+
+static final byte[] ch223data = {
+(byte) 0xb0,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xb0,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch223 = new BitmapCharRec(5,9,-1,0,7,ch223data);
+
+/* char: 0xde */
+
+static final byte[] ch222data = {
+(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch222 = new BitmapCharRec(6,9,-1,0,8,ch222data);
+
+/* char: 0xdd */
+
+static final byte[] ch221data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x82,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch221 = new BitmapCharRec(7,12,-1,0,9,ch221data);
+
+/* char: 0xdc */
+
+static final byte[] ch220data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x48,
+};
+
+static final BitmapCharRec ch220 = new BitmapCharRec(6,11,-1,0,8,ch220data);
+
+/* char: 0xdb */
+
+static final byte[] ch219data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch219 = new BitmapCharRec(6,12,-1,0,8,ch219data);
+
+/* char: 0xda */
+
+static final byte[] ch218data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch218 = new BitmapCharRec(6,12,-1,0,8,ch218data);
+
+/* char: 0xd9 */
+
+static final byte[] ch217data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch217 = new BitmapCharRec(6,12,-1,0,8,ch217data);
+
+/* char: 0xd8 */
+
+static final byte[] ch216data = {
+(byte) 0x80,(byte) 0x0,(byte) 0x5e,(byte) 0x0,(byte) 0x21,(byte) 0x0,(byte) 0x50,(byte) 0x80,(byte) 0x48,(byte) 0x80,(byte) 0x44,(byte) 0x80,(byte) 0x44,(byte) 0x80,(byte) 0x42,(byte) 0x80,
+(byte) 0x21,(byte) 0x0,(byte) 0x1e,(byte) 0x80,(byte) 0x0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch216 = new BitmapCharRec(10,11,0,1,10,ch216data);
+
+/* char: 0xd7 */
+
+static final byte[] ch215data = {
+(byte) 0x88,(byte) 0x50,(byte) 0x20,(byte) 0x50,(byte) 0x88,
+};
+
+static final BitmapCharRec ch215 = new BitmapCharRec(5,5,-1,-1,7,ch215data);
+
+/* char: 0xd6 */
+
+static final byte[] ch214data = {
+(byte) 0x3c,(byte) 0x42,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x42,(byte) 0x3c,(byte) 0x0,(byte) 0x24,
+};
+
+static final BitmapCharRec ch214 = new BitmapCharRec(8,11,-1,0,10,ch214data);
+
+/* char: 0xd5 */
+
+static final byte[] ch213data = {
+(byte) 0x3c,(byte) 0x42,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x42,(byte) 0x3c,(byte) 0x0,(byte) 0x28,(byte) 0x14,
+};
+
+static final BitmapCharRec ch213 = new BitmapCharRec(8,12,-1,0,10,ch213data);
+
+/* char: 0xd4 */
+
+static final byte[] ch212data = {
+(byte) 0x3c,(byte) 0x42,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x42,(byte) 0x3c,(byte) 0x0,(byte) 0x14,(byte) 0x8,
+};
+
+static final BitmapCharRec ch212 = new BitmapCharRec(8,12,-1,0,10,ch212data);
+
+/* char: 0xd3 */
+
+static final byte[] ch211data = {
+(byte) 0x3c,(byte) 0x42,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x42,(byte) 0x3c,(byte) 0x0,(byte) 0x8,(byte) 0x4,
+};
+
+static final BitmapCharRec ch211 = new BitmapCharRec(8,12,-1,0,10,ch211data);
+
+/* char: 0xd2 */
+
+static final byte[] ch210data = {
+(byte) 0x3c,(byte) 0x42,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x42,(byte) 0x3c,(byte) 0x0,(byte) 0x8,(byte) 0x10,
+};
+
+static final BitmapCharRec ch210 = new BitmapCharRec(8,12,-1,0,10,ch210data);
+
+/* char: 0xd1 */
+
+static final byte[] ch209data = {
+(byte) 0x82,(byte) 0x86,(byte) 0x8a,(byte) 0x8a,(byte) 0x92,(byte) 0xa2,(byte) 0xa2,(byte) 0xc2,(byte) 0x82,(byte) 0x0,(byte) 0x28,(byte) 0x14,
+};
+
+static final BitmapCharRec ch209 = new BitmapCharRec(7,12,-1,0,9,ch209data);
+
+/* char: 0xd0 */
+
+static final byte[] ch208data = {
+(byte) 0x7c,(byte) 0x42,(byte) 0x41,(byte) 0x41,(byte) 0xf1,(byte) 0x41,(byte) 0x41,(byte) 0x42,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch208 = new BitmapCharRec(8,9,0,0,9,ch208data);
+
+/* char: 0xcf */
+
+static final byte[] ch207data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch207 = new BitmapCharRec(3,11,0,0,3,ch207data);
+
+/* char: 0xce */
+
+static final byte[] ch206data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch206 = new BitmapCharRec(3,12,0,0,3,ch206data);
+
+/* char: 0xcd */
+
+static final byte[] ch205data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch205 = new BitmapCharRec(2,12,-1,0,3,ch205data);
+
+/* char: 0xcc */
+
+static final byte[] ch204data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch204 = new BitmapCharRec(2,12,0,0,3,ch204data);
+
+/* char: 0xcb */
+
+static final byte[] ch203data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x28,
+};
+
+static final BitmapCharRec ch203 = new BitmapCharRec(6,11,-1,0,8,ch203data);
+
+/* char: 0xca */
+
+static final byte[] ch202data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch202 = new BitmapCharRec(6,12,-1,0,8,ch202data);
+
+/* char: 0xc9 */
+
+static final byte[] ch201data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch201 = new BitmapCharRec(6,12,-1,0,8,ch201data);
+
+/* char: 0xc8 */
+
+static final byte[] ch200data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch200 = new BitmapCharRec(6,12,-1,0,8,ch200data);
+
+/* char: 0xc7 */
+
+static final byte[] ch199data = {
+(byte) 0x30,(byte) 0x8,(byte) 0x8,(byte) 0x3c,(byte) 0x42,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x42,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch199 = new BitmapCharRec(7,12,-1,3,9,ch199data);
+
+/* char: 0xc6 */
+
+static final byte[] ch198data = {
+(byte) 0x8f,(byte) 0x80,(byte) 0x88,(byte) 0x0,(byte) 0x88,(byte) 0x0,(byte) 0x78,(byte) 0x0,(byte) 0x4f,(byte) 0x80,(byte) 0x48,(byte) 0x0,(byte) 0x28,(byte) 0x0,(byte) 0x28,(byte) 0x0,
+(byte) 0x1f,(byte) 0x80,
+};
+
+static final BitmapCharRec ch198 = new BitmapCharRec(9,9,-1,0,11,ch198data);
+
+/* char: 0xc5 */
+
+static final byte[] ch197data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch197 = new BitmapCharRec(7,12,-1,0,9,ch197data);
+
+/* char: 0xc4 */
+
+static final byte[] ch196data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x28,
+};
+
+static final BitmapCharRec ch196 = new BitmapCharRec(7,11,-1,0,9,ch196data);
+
+/* char: 0xc3 */
+
+static final byte[] ch195data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x28,(byte) 0x14,
+};
+
+static final BitmapCharRec ch195 = new BitmapCharRec(7,12,-1,0,9,ch195data);
+
+/* char: 0xc2 */
+
+static final byte[] ch194data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch194 = new BitmapCharRec(7,12,-1,0,9,ch194data);
+
+/* char: 0xc1 */
+
+static final byte[] ch193data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch193 = new BitmapCharRec(7,12,-1,0,9,ch193data);
+
+/* char: 0xc0 */
+
+static final byte[] ch192data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch192 = new BitmapCharRec(7,12,-1,0,9,ch192data);
+
+/* char: 0xbf */
+
+static final byte[] ch191data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x0,(byte) 0x20,
+};
+
+static final BitmapCharRec ch191 = new BitmapCharRec(5,9,-1,3,7,ch191data);
+
+/* char: 0xbe */
+
+static final byte[] ch190data = {
+(byte) 0x21,(byte) 0x0,(byte) 0x17,(byte) 0x80,(byte) 0x15,(byte) 0x0,(byte) 0xb,(byte) 0x0,(byte) 0xc9,(byte) 0x0,(byte) 0x24,(byte) 0x0,(byte) 0x44,(byte) 0x0,(byte) 0x22,(byte) 0x0,
+(byte) 0xe1,(byte) 0x0,
+};
+
+static final BitmapCharRec ch190 = new BitmapCharRec(9,9,0,0,10,ch190data);
+
+/* char: 0xbd */
+
+static final byte[] ch189data = {
+(byte) 0x47,(byte) 0x80,(byte) 0x22,(byte) 0x0,(byte) 0x11,(byte) 0x0,(byte) 0x14,(byte) 0x80,(byte) 0x4b,(byte) 0x0,(byte) 0x48,(byte) 0x0,(byte) 0x44,(byte) 0x0,(byte) 0xc2,(byte) 0x0,
+(byte) 0x41,(byte) 0x0,
+};
+
+static final BitmapCharRec ch189 = new BitmapCharRec(9,9,0,0,10,ch189data);
+
+/* char: 0xbc */
+
+static final byte[] ch188data = {
+(byte) 0x41,(byte) 0x0,(byte) 0x27,(byte) 0x80,(byte) 0x15,(byte) 0x0,(byte) 0x13,(byte) 0x0,(byte) 0x49,(byte) 0x0,(byte) 0x44,(byte) 0x0,(byte) 0x44,(byte) 0x0,(byte) 0xc2,(byte) 0x0,
+(byte) 0x41,(byte) 0x0,
+};
+
+static final BitmapCharRec ch188 = new BitmapCharRec(9,9,0,0,10,ch188data);
+
+/* char: 0xbb */
+
+static final byte[] ch187data = {
+(byte) 0xa0,(byte) 0x50,(byte) 0x28,(byte) 0x50,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch187 = new BitmapCharRec(5,5,-1,-1,7,ch187data);
+
+/* char: 0xba */
+
+static final byte[] ch186data = {
+(byte) 0xe0,(byte) 0x0,(byte) 0xe0,(byte) 0xa0,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch186 = new BitmapCharRec(3,5,-1,-4,5,ch186data);
+
+/* char: 0xb9 */
+
+static final byte[] ch185data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch185 = new BitmapCharRec(2,5,-1,-3,4,ch185data);
+
+/* char: 0xb8 */
+
+static final byte[] ch184data = {
+(byte) 0xc0,(byte) 0x20,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch184 = new BitmapCharRec(3,4,0,3,3,ch184data);
+
+/* char: 0xb7 */
+
+static final byte[] ch183data = {
+(byte) 0x80,
+};
+
+static final BitmapCharRec ch183 = new BitmapCharRec(1,1,-1,-3,3,ch183data);
+
+/* char: 0xb6 */
+
+static final byte[] ch182data = {
+(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x68,(byte) 0xe8,(byte) 0xe8,(byte) 0xe8,(byte) 0x68,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch182 = new BitmapCharRec(6,12,0,3,7,ch182data);
+
+/* char: 0xb5 */
+
+static final byte[] ch181data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xe8,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch181 = new BitmapCharRec(5,10,-1,3,7,ch181data);
+
+/* char: 0xb4 */
+
+static final byte[] ch180data = {
+(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch180 = new BitmapCharRec(2,2,0,-8,2,ch180data);
+
+/* char: 0xb3 */
+
+static final byte[] ch179data = {
+(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0x20,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch179 = new BitmapCharRec(3,5,0,-3,4,ch179data);
+
+/* char: 0xb2 */
+
+static final byte[] ch178data = {
+(byte) 0xf0,(byte) 0x40,(byte) 0x20,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch178 = new BitmapCharRec(4,5,0,-3,4,ch178data);
+
+/* char: 0xb1 */
+
+static final byte[] ch177data = {
+(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch177 = new BitmapCharRec(5,7,-1,0,7,ch177data);
+
+/* char: 0xb0 */
+
+static final byte[] ch176data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch176 = new BitmapCharRec(4,4,0,-4,5,ch176data);
+
+/* char: 0xaf */
+
+static final byte[] ch175data = {
+(byte) 0xf0,
+};
+
+static final BitmapCharRec ch175 = new BitmapCharRec(4,1,0,-8,4,ch175data);
+
+/* char: 0xae */
+
+static final byte[] ch174data = {
+(byte) 0x3e,(byte) 0x0,(byte) 0x41,(byte) 0x0,(byte) 0x94,(byte) 0x80,(byte) 0x94,(byte) 0x80,(byte) 0x98,(byte) 0x80,(byte) 0x94,(byte) 0x80,(byte) 0x9c,(byte) 0x80,(byte) 0x41,(byte) 0x0,
+(byte) 0x3e,(byte) 0x0,
+};
+
+static final BitmapCharRec ch174 = new BitmapCharRec(9,9,-1,0,11,ch174data);
+
+/* char: 0xad */
+
+static final byte[] ch173data = {
+(byte) 0xf0,
+};
+
+static final BitmapCharRec ch173 = new BitmapCharRec(4,1,0,-3,5,ch173data);
+
+/* char: 0xac */
+
+static final byte[] ch172data = {
+(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch172 = new BitmapCharRec(6,4,-1,-2,8,ch172data);
+
+/* char: 0xab */
+
+static final byte[] ch171data = {
+(byte) 0x28,(byte) 0x50,(byte) 0xa0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch171 = new BitmapCharRec(5,5,-1,-1,7,ch171data);
+
+/* char: 0xaa */
+
+static final byte[] ch170data = {
+(byte) 0xe0,(byte) 0x0,(byte) 0xa0,(byte) 0x20,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch170 = new BitmapCharRec(3,5,-1,-4,5,ch170data);
+
+/* char: 0xa9 */
+
+static final byte[] ch169data = {
+(byte) 0x3e,(byte) 0x0,(byte) 0x41,(byte) 0x0,(byte) 0x9c,(byte) 0x80,(byte) 0xa2,(byte) 0x80,(byte) 0xa0,(byte) 0x80,(byte) 0xa2,(byte) 0x80,(byte) 0x9c,(byte) 0x80,(byte) 0x41,(byte) 0x0,
+(byte) 0x3e,(byte) 0x0,
+};
+
+static final BitmapCharRec ch169 = new BitmapCharRec(9,9,-1,0,11,ch169data);
+
+/* char: 0xa8 */
+
+static final byte[] ch168data = {
+(byte) 0xa0,
+};
+
+static final BitmapCharRec ch168 = new BitmapCharRec(3,1,0,-8,3,ch168data);
+
+/* char: 0xa7 */
+
+static final byte[] ch167data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x30,(byte) 0x48,(byte) 0x88,(byte) 0x88,(byte) 0x90,(byte) 0x60,(byte) 0x80,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch167 = new BitmapCharRec(5,12,0,3,6,ch167data);
+
+/* char: 0xa6 */
+
+static final byte[] ch166data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch166 = new BitmapCharRec(1,11,-1,2,3,ch166data);
+
+/* char: 0xa5 */
+
+static final byte[] ch165data = {
+(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x50,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch165 = new BitmapCharRec(5,9,-1,0,7,ch165data);
+
+/* char: 0xa4 */
+
+static final byte[] ch164data = {
+(byte) 0x84,(byte) 0x78,(byte) 0x48,(byte) 0x48,(byte) 0x78,(byte) 0x84,
+};
+
+static final BitmapCharRec ch164 = new BitmapCharRec(6,6,0,-1,7,ch164data);
+
+/* char: 0xa3 */
+
+static final byte[] ch163data = {
+(byte) 0xb0,(byte) 0x48,(byte) 0x20,(byte) 0x20,(byte) 0xf0,(byte) 0x40,(byte) 0x40,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch163 = new BitmapCharRec(5,9,-1,0,7,ch163data);
+
+/* char: 0xa2 */
+
+static final byte[] ch162data = {
+(byte) 0x40,(byte) 0x70,(byte) 0xc8,(byte) 0xa0,(byte) 0xa0,(byte) 0xa0,(byte) 0xa8,(byte) 0x70,(byte) 0x10,
+};
+
+static final BitmapCharRec ch162 = new BitmapCharRec(5,9,-1,1,7,ch162data);
+
+/* char: 0xa1 */
+
+static final byte[] ch161data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch161 = new BitmapCharRec(1,10,-1,3,3,ch161data);
+
+/* char: 0xa0 */
+
+static final BitmapCharRec ch160 = new BitmapCharRec(0,0,0,0,4,null);
+
+/* char: 0x7e '~' */
+
+static final byte[] ch126data = {
+(byte) 0x98,(byte) 0x64,
+};
+
+static final BitmapCharRec ch126 = new BitmapCharRec(6,2,0,-3,7,ch126data);
+
+/* char: 0x7d '}' */
+
+static final byte[] ch125data = {
+(byte) 0xc0,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch125 = new BitmapCharRec(4,12,0,3,4,ch125data);
+
+/* char: 0x7c '|' */
+
+static final byte[] ch124data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch124 = new BitmapCharRec(1,12,-1,3,3,ch124data);
+
+/* char: 0x7b '{' */
+
+static final byte[] ch123data = {
+(byte) 0x30,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x30,
+};
+
+static final BitmapCharRec ch123 = new BitmapCharRec(4,12,0,3,4,ch123data);
+
+/* char: 0x7a 'z' */
+
+static final byte[] ch122data = {
+(byte) 0xf0,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch122 = new BitmapCharRec(4,7,-1,0,6,ch122data);
+
+/* char: 0x79 'y' */
+
+static final byte[] ch121data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x50,(byte) 0x50,(byte) 0x90,(byte) 0x88,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch121 = new BitmapCharRec(5,10,-1,3,7,ch121data);
+
+/* char: 0x78 'x' */
+
+static final byte[] ch120data = {
+(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x30,(byte) 0x48,(byte) 0x84,
+};
+
+static final BitmapCharRec ch120 = new BitmapCharRec(6,7,0,0,6,ch120data);
+
+/* char: 0x77 'w' */
+
+static final byte[] ch119data = {
+(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0x49,(byte) 0x0,(byte) 0x49,(byte) 0x0,(byte) 0x88,(byte) 0x80,(byte) 0x88,(byte) 0x80,
+};
+
+static final BitmapCharRec ch119 = new BitmapCharRec(9,7,0,0,9,ch119data);
+
+/* char: 0x76 'v' */
+
+static final byte[] ch118data = {
+(byte) 0x20,(byte) 0x20,(byte) 0x50,(byte) 0x50,(byte) 0x88,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch118 = new BitmapCharRec(5,7,-1,0,7,ch118data);
+
+/* char: 0x75 'u' */
+
+static final byte[] ch117data = {
+(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch117 = new BitmapCharRec(5,7,-1,0,7,ch117data);
+
+/* char: 0x74 't' */
+
+static final byte[] ch116data = {
+(byte) 0x60,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x40,
+};
+
+static final BitmapCharRec ch116 = new BitmapCharRec(3,9,0,0,3,ch116data);
+
+/* char: 0x73 's' */
+
+static final byte[] ch115data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x10,(byte) 0x60,(byte) 0x80,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch115 = new BitmapCharRec(4,7,-1,0,6,ch115data);
+
+/* char: 0x72 'r' */
+
+static final byte[] ch114data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xc0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch114 = new BitmapCharRec(3,7,-1,0,4,ch114data);
+
+/* char: 0x71 'q' */
+
+static final byte[] ch113data = {
+(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x98,(byte) 0x68,
+};
+
+static final BitmapCharRec ch113 = new BitmapCharRec(5,10,-1,3,7,ch113data);
+
+/* char: 0x70 'p' */
+
+static final byte[] ch112data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xb0,(byte) 0xc8,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,
+};
+
+static final BitmapCharRec ch112 = new BitmapCharRec(5,10,-1,3,7,ch112data);
+
+/* char: 0x6f 'o' */
+
+static final byte[] ch111data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch111 = new BitmapCharRec(5,7,-1,0,7,ch111data);
+
+/* char: 0x6e 'n' */
+
+static final byte[] ch110data = {
+(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,
+};
+
+static final BitmapCharRec ch110 = new BitmapCharRec(5,7,-1,0,7,ch110data);
+
+/* char: 0x6d 'm' */
+
+static final byte[] ch109data = {
+(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0xda,(byte) 0xa4,
+};
+
+static final BitmapCharRec ch109 = new BitmapCharRec(7,7,-1,0,9,ch109data);
+
+/* char: 0x6c 'l' */
+
+static final byte[] ch108data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch108 = new BitmapCharRec(1,9,-1,0,3,ch108data);
+
+/* char: 0x6b 'k' */
+
+static final byte[] ch107data = {
+(byte) 0x88,(byte) 0x90,(byte) 0xa0,(byte) 0xc0,(byte) 0xc0,(byte) 0xa0,(byte) 0x90,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch107 = new BitmapCharRec(5,9,-1,0,6,ch107data);
+
+/* char: 0x6a 'j' */
+
+static final byte[] ch106data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch106 = new BitmapCharRec(2,12,0,3,3,ch106data);
+
+/* char: 0x69 'i' */
+
+static final byte[] ch105data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch105 = new BitmapCharRec(1,9,-1,0,3,ch105data);
+
+/* char: 0x68 'h' */
+
+static final byte[] ch104data = {
+(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch104 = new BitmapCharRec(5,9,-1,0,7,ch104data);
+
+/* char: 0x67 'g' */
+
+static final byte[] ch103data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x98,(byte) 0x68,
+};
+
+static final BitmapCharRec ch103 = new BitmapCharRec(5,10,-1,3,7,ch103data);
+
+/* char: 0x66 'f' */
+
+static final byte[] ch102data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x30,
+};
+
+static final BitmapCharRec ch102 = new BitmapCharRec(4,9,0,0,3,ch102data);
+
+/* char: 0x65 'e' */
+
+static final byte[] ch101data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x80,(byte) 0xf8,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch101 = new BitmapCharRec(5,7,-1,0,7,ch101data);
+
+/* char: 0x64 'd' */
+
+static final byte[] ch100data = {
+(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x98,(byte) 0x68,(byte) 0x8,(byte) 0x8,
+};
+
+static final BitmapCharRec ch100 = new BitmapCharRec(5,9,-1,0,7,ch100data);
+
+/* char: 0x63 'c' */
+
+static final byte[] ch99data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch99 = new BitmapCharRec(5,7,-1,0,7,ch99data);
+
+/* char: 0x62 'b' */
+
+static final byte[] ch98data = {
+(byte) 0xb0,(byte) 0xc8,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch98 = new BitmapCharRec(5,9,-1,0,7,ch98data);
+
+/* char: 0x61 'a' */
+
+static final byte[] ch97data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch97 = new BitmapCharRec(6,7,-1,0,7,ch97data);
+
+/* char: 0x60 '`' */
+
+static final byte[] ch96data = {
+(byte) 0xc0,(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch96 = new BitmapCharRec(2,3,0,-6,3,ch96data);
+
+/* char: 0x5f '_' */
+
+static final byte[] ch95data = {
+(byte) 0xfe,
+};
+
+static final BitmapCharRec ch95 = new BitmapCharRec(7,1,0,2,7,ch95data);
+
+/* char: 0x5e '^' */
+
+static final byte[] ch94data = {
+(byte) 0x88,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch94 = new BitmapCharRec(5,3,0,-5,6,ch94data);
+
+/* char: 0x5d ']' */
+
+static final byte[] ch93data = {
+(byte) 0xc0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch93 = new BitmapCharRec(2,12,0,3,3,ch93data);
+
+/* char: 0x5c '\' */
+
+static final byte[] ch92data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch92 = new BitmapCharRec(4,9,0,0,4,ch92data);
+
+/* char: 0x5b '[' */
+
+static final byte[] ch91data = {
+(byte) 0xc0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch91 = new BitmapCharRec(2,12,-1,3,3,ch91data);
+
+/* char: 0x5a 'Z' */
+
+static final byte[] ch90data = {
+(byte) 0xfe,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0x2,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch90 = new BitmapCharRec(7,9,-1,0,9,ch90data);
+
+/* char: 0x59 'Y' */
+
+static final byte[] ch89data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch89 = new BitmapCharRec(7,9,-1,0,9,ch89data);
+
+/* char: 0x58 'X' */
+
+static final byte[] ch88data = {
+(byte) 0x82,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x82,
+};
+
+static final BitmapCharRec ch88 = new BitmapCharRec(7,9,-1,0,9,ch88data);
+
+/* char: 0x57 'W' */
+
+static final byte[] ch87data = {
+(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0x49,(byte) 0x0,(byte) 0x88,(byte) 0x80,(byte) 0x88,(byte) 0x80,
+(byte) 0x88,(byte) 0x80,
+};
+
+static final BitmapCharRec ch87 = new BitmapCharRec(9,9,-1,0,11,ch87data);
+
+/* char: 0x56 'V' */
+
+static final byte[] ch86data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch86 = new BitmapCharRec(7,9,-1,0,9,ch86data);
+
+/* char: 0x55 'U' */
+
+static final byte[] ch85data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,
+};
+
+static final BitmapCharRec ch85 = new BitmapCharRec(6,9,-1,0,8,ch85data);
+
+/* char: 0x54 'T' */
+
+static final byte[] ch84data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch84 = new BitmapCharRec(7,9,0,0,7,ch84data);
+
+/* char: 0x53 'S' */
+
+static final byte[] ch83data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x4,(byte) 0x18,(byte) 0x60,(byte) 0x80,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch83 = new BitmapCharRec(6,9,-1,0,8,ch83data);
+
+/* char: 0x52 'R' */
+
+static final byte[] ch82data = {
+(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x88,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch82 = new BitmapCharRec(6,9,-1,0,8,ch82data);
+
+/* char: 0x51 'Q' */
+
+static final byte[] ch81data = {
+(byte) 0x3d,(byte) 0x42,(byte) 0x85,(byte) 0x89,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x42,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch81 = new BitmapCharRec(8,9,-1,0,10,ch81data);
+
+/* char: 0x50 'P' */
+
+static final byte[] ch80data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch80 = new BitmapCharRec(6,9,-1,0,8,ch80data);
+
+/* char: 0x4f 'O' */
+
+static final byte[] ch79data = {
+(byte) 0x3c,(byte) 0x42,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x42,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch79 = new BitmapCharRec(8,9,-1,0,10,ch79data);
+
+/* char: 0x4e 'N' */
+
+static final byte[] ch78data = {
+(byte) 0x82,(byte) 0x86,(byte) 0x8a,(byte) 0x8a,(byte) 0x92,(byte) 0xa2,(byte) 0xa2,(byte) 0xc2,(byte) 0x82,
+};
+
+static final BitmapCharRec ch78 = new BitmapCharRec(7,9,-1,0,9,ch78data);
+
+/* char: 0x4d 'M' */
+
+static final byte[] ch77data = {
+(byte) 0x88,(byte) 0x80,(byte) 0x88,(byte) 0x80,(byte) 0x94,(byte) 0x80,(byte) 0x94,(byte) 0x80,(byte) 0xa2,(byte) 0x80,(byte) 0xa2,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,
+(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch77 = new BitmapCharRec(9,9,-1,0,11,ch77data);
+
+/* char: 0x4c 'L' */
+
+static final byte[] ch76data = {
+(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch76 = new BitmapCharRec(5,9,-1,0,7,ch76data);
+
+/* char: 0x4b 'K' */
+
+static final byte[] ch75data = {
+(byte) 0x82,(byte) 0x84,(byte) 0x88,(byte) 0x90,(byte) 0xe0,(byte) 0xa0,(byte) 0x90,(byte) 0x88,(byte) 0x84,
+};
+
+static final BitmapCharRec ch75 = new BitmapCharRec(7,9,-1,0,8,ch75data);
+
+/* char: 0x4a 'J' */
+
+static final byte[] ch74data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,
+};
+
+static final BitmapCharRec ch74 = new BitmapCharRec(5,9,-1,0,7,ch74data);
+
+/* char: 0x49 'I' */
+
+static final byte[] ch73data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch73 = new BitmapCharRec(1,9,-1,0,3,ch73data);
+
+/* char: 0x48 'H' */
+
+static final byte[] ch72data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch72 = new BitmapCharRec(7,9,-1,0,9,ch72data);
+
+/* char: 0x47 'G' */
+
+static final byte[] ch71data = {
+(byte) 0x3a,(byte) 0x46,(byte) 0x82,(byte) 0x82,(byte) 0x8e,(byte) 0x80,(byte) 0x80,(byte) 0x42,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch71 = new BitmapCharRec(7,9,-1,0,9,ch71data);
+
+/* char: 0x46 'F' */
+
+static final byte[] ch70data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch70 = new BitmapCharRec(6,9,-1,0,8,ch70data);
+
+/* char: 0x45 'E' */
+
+static final byte[] ch69data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch69 = new BitmapCharRec(6,9,-1,0,8,ch69data);
+
+/* char: 0x44 'D' */
+
+static final byte[] ch68data = {
+(byte) 0xf8,(byte) 0x84,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x84,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch68 = new BitmapCharRec(7,9,-1,0,9,ch68data);
+
+/* char: 0x43 'C' */
+
+static final byte[] ch67data = {
+(byte) 0x3c,(byte) 0x42,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x42,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch67 = new BitmapCharRec(7,9,-1,0,9,ch67data);
+
+/* char: 0x42 'B' */
+
+static final byte[] ch66data = {
+(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch66 = new BitmapCharRec(6,9,-1,0,8,ch66data);
+
+/* char: 0x41 'A' */
+
+static final byte[] ch65data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch65 = new BitmapCharRec(7,9,-1,0,9,ch65data);
+
+/* char: 0x40 '@' */
+
+static final byte[] ch64data = {
+(byte) 0x3e,(byte) 0x0,(byte) 0x40,(byte) 0x0,(byte) 0x9b,(byte) 0x0,(byte) 0xa6,(byte) 0x80,(byte) 0xa2,(byte) 0x40,(byte) 0xa2,(byte) 0x40,(byte) 0x92,(byte) 0x40,(byte) 0x4d,(byte) 0x40,
+(byte) 0x60,(byte) 0x80,(byte) 0x1f,(byte) 0x0,
+};
+
+static final BitmapCharRec ch64 = new BitmapCharRec(10,10,-1,1,12,ch64data);
+
+/* char: 0x3f '?' */
+
+static final byte[] ch63data = {
+(byte) 0x20,(byte) 0x0,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch63 = new BitmapCharRec(5,9,-1,0,7,ch63data);
+
+/* char: 0x3e '>' */
+
+static final byte[] ch62data = {
+(byte) 0xc0,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch62 = new BitmapCharRec(6,5,-1,-1,7,ch62data);
+
+/* char: 0x3d '=' */
+
+static final byte[] ch61data = {
+(byte) 0xf8,(byte) 0x0,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch61 = new BitmapCharRec(5,3,-1,-2,7,ch61data);
+
+/* char: 0x3c '<' */
+
+static final byte[] ch60data = {
+(byte) 0xc,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc,
+};
+
+static final BitmapCharRec ch60 = new BitmapCharRec(6,5,0,-1,7,ch60data);
+
+/* char: 0x3b ';' */
+
+static final byte[] ch59data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch59 = new BitmapCharRec(2,8,0,2,3,ch59data);
+
+/* char: 0x3a ':' */
+
+static final byte[] ch58data = {
+(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch58 = new BitmapCharRec(1,6,-1,0,3,ch58data);
+
+/* char: 0x39 '9' */
+
+static final byte[] ch57data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0x78,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch57 = new BitmapCharRec(5,9,-1,0,7,ch57data);
+
+/* char: 0x38 '8' */
+
+static final byte[] ch56data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch56 = new BitmapCharRec(5,9,-1,0,7,ch56data);
+
+/* char: 0x37 '7' */
+
+static final byte[] ch55data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x8,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch55 = new BitmapCharRec(5,9,-1,0,7,ch55data);
+
+/* char: 0x36 '6' */
+
+static final byte[] ch54data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch54 = new BitmapCharRec(5,9,-1,0,7,ch54data);
+
+/* char: 0x35 '5' */
+
+static final byte[] ch53data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch53 = new BitmapCharRec(5,9,-1,0,7,ch53data);
+
+/* char: 0x34 '4' */
+
+static final byte[] ch52data = {
+(byte) 0x8,(byte) 0x8,(byte) 0xfc,(byte) 0x88,(byte) 0x48,(byte) 0x28,(byte) 0x28,(byte) 0x18,(byte) 0x8,
+};
+
+static final BitmapCharRec ch52 = new BitmapCharRec(6,9,0,0,7,ch52data);
+
+/* char: 0x33 '3' */
+
+static final byte[] ch51data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch51 = new BitmapCharRec(5,9,-1,0,7,ch51data);
+
+/* char: 0x32 '2' */
+
+static final byte[] ch50data = {
+(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch50 = new BitmapCharRec(5,9,-1,0,7,ch50data);
+
+/* char: 0x31 '1' */
+
+static final byte[] ch49data = {
+(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xe0,(byte) 0x20,
+};
+
+static final BitmapCharRec ch49 = new BitmapCharRec(3,9,-1,0,7,ch49data);
+
+/* char: 0x30 '0' */
+
+static final byte[] ch48data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch48 = new BitmapCharRec(5,9,-1,0,7,ch48data);
+
+/* char: 0x2f '/' */
+
+static final byte[] ch47data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x10,
+};
+
+static final BitmapCharRec ch47 = new BitmapCharRec(4,9,0,0,4,ch47data);
+
+/* char: 0x2e '.' */
+
+static final byte[] ch46data = {
+(byte) 0x80,
+};
+
+static final BitmapCharRec ch46 = new BitmapCharRec(1,1,-1,0,3,ch46data);
+
+/* char: 0x2d '-' */
+
+static final byte[] ch45data = {
+(byte) 0xf8,
+};
+
+static final BitmapCharRec ch45 = new BitmapCharRec(5,1,-1,-3,8,ch45data);
+
+/* char: 0x2c ',' */
+
+static final byte[] ch44data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,
+};
+
+static final BitmapCharRec ch44 = new BitmapCharRec(2,3,-1,2,4,ch44data);
+
+/* char: 0x2b '+' */
+
+static final byte[] ch43data = {
+(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch43 = new BitmapCharRec(5,5,-1,-1,7,ch43data);
+
+/* char: 0x2a '*' */
+
+static final byte[] ch42data = {
+(byte) 0xa0,(byte) 0x40,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch42 = new BitmapCharRec(3,3,-1,-6,5,ch42data);
+
+/* char: 0x29 ')' */
+
+static final byte[] ch41data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch41 = new BitmapCharRec(3,12,0,3,4,ch41data);
+
+/* char: 0x28 '(' */
+
+static final byte[] ch40data = {
+(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch40 = new BitmapCharRec(3,12,-1,3,4,ch40data);
+
+/* char: 0x27 ''' */
+
+static final byte[] ch39data = {
+(byte) 0x80,(byte) 0x40,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch39 = new BitmapCharRec(2,3,-1,-6,3,ch39data);
+
+/* char: 0x26 '&' */
+
+static final byte[] ch38data = {
+(byte) 0x72,(byte) 0x8c,(byte) 0x84,(byte) 0x8a,(byte) 0x50,(byte) 0x30,(byte) 0x48,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch38 = new BitmapCharRec(7,9,-1,0,9,ch38data);
+
+/* char: 0x25 '%' */
+
+static final byte[] ch37data = {
+(byte) 0x23,(byte) 0x0,(byte) 0x14,(byte) 0x80,(byte) 0x14,(byte) 0x80,(byte) 0x13,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x68,(byte) 0x0,(byte) 0x94,(byte) 0x0,(byte) 0x94,(byte) 0x0,
+(byte) 0x62,(byte) 0x0,
+};
+
+static final BitmapCharRec ch37 = new BitmapCharRec(9,9,-1,0,11,ch37data);
+
+/* char: 0x24 '$' */
+
+static final byte[] ch36data = {
+(byte) 0x20,(byte) 0x70,(byte) 0xa8,(byte) 0xa8,(byte) 0x28,(byte) 0x70,(byte) 0xa0,(byte) 0xa8,(byte) 0x70,(byte) 0x20,
+};
+
+static final BitmapCharRec ch36 = new BitmapCharRec(5,10,-1,1,7,ch36data);
+
+/* char: 0x23 '#' */
+
+static final byte[] ch35data = {
+(byte) 0x50,(byte) 0x50,(byte) 0x50,(byte) 0xfc,(byte) 0x28,(byte) 0xfc,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch35 = new BitmapCharRec(6,8,0,0,7,ch35data);
+
+/* char: 0x22 '"' */
+
+static final byte[] ch34data = {
+(byte) 0xa0,(byte) 0xa0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch34 = new BitmapCharRec(3,3,-1,-6,5,ch34data);
+
+/* char: 0x21 '!' */
+
+static final byte[] ch33data = {
+(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch33 = new BitmapCharRec(1,9,-1,0,3,ch33data);
+
+/* char: 0x20 ' ' */
+
+static final BitmapCharRec ch32 = new BitmapCharRec(0,0,0,0,4,null);
+
+static final BitmapCharRec[] chars = {
+ch32,
+ch33,
+ch34,
+ch35,
+ch36,
+ch37,
+ch38,
+ch39,
+ch40,
+ch41,
+ch42,
+ch43,
+ch44,
+ch45,
+ch46,
+ch47,
+ch48,
+ch49,
+ch50,
+ch51,
+ch52,
+ch53,
+ch54,
+ch55,
+ch56,
+ch57,
+ch58,
+ch59,
+ch60,
+ch61,
+ch62,
+ch63,
+ch64,
+ch65,
+ch66,
+ch67,
+ch68,
+ch69,
+ch70,
+ch71,
+ch72,
+ch73,
+ch74,
+ch75,
+ch76,
+ch77,
+ch78,
+ch79,
+ch80,
+ch81,
+ch82,
+ch83,
+ch84,
+ch85,
+ch86,
+ch87,
+ch88,
+ch89,
+ch90,
+ch91,
+ch92,
+ch93,
+ch94,
+ch95,
+ch96,
+ch97,
+ch98,
+ch99,
+ch100,
+ch101,
+ch102,
+ch103,
+ch104,
+ch105,
+ch106,
+ch107,
+ch108,
+ch109,
+ch110,
+ch111,
+ch112,
+ch113,
+ch114,
+ch115,
+ch116,
+ch117,
+ch118,
+ch119,
+ch120,
+ch121,
+ch122,
+ch123,
+ch124,
+ch125,
+ch126,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+ch160,
+ch161,
+ch162,
+ch163,
+ch164,
+ch165,
+ch166,
+ch167,
+ch168,
+ch169,
+ch170,
+ch171,
+ch172,
+ch173,
+ch174,
+ch175,
+ch176,
+ch177,
+ch178,
+ch179,
+ch180,
+ch181,
+ch182,
+ch183,
+ch184,
+ch185,
+ch186,
+ch187,
+ch188,
+ch189,
+ch190,
+ch191,
+ch192,
+ch193,
+ch194,
+ch195,
+ch196,
+ch197,
+ch198,
+ch199,
+ch200,
+ch201,
+ch202,
+ch203,
+ch204,
+ch205,
+ch206,
+ch207,
+ch208,
+ch209,
+ch210,
+ch211,
+ch212,
+ch213,
+ch214,
+ch215,
+ch216,
+ch217,
+ch218,
+ch219,
+ch220,
+ch221,
+ch222,
+ch223,
+ch224,
+ch225,
+ch226,
+ch227,
+ch228,
+ch229,
+ch230,
+ch231,
+ch232,
+ch233,
+ch234,
+ch235,
+ch236,
+ch237,
+ch238,
+ch239,
+ch240,
+ch241,
+ch242,
+ch243,
+ch244,
+ch245,
+ch246,
+ch247,
+ch248,
+ch249,
+ch250,
+ch251,
+ch252,
+ch253,
+ch254,
+ch255,
+};
+
+ public static final BitmapFontRec glutBitmapHelvetica12 = new BitmapFontRec("-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1",
+ 224,
+ 32,
+ chars);
+}
diff --git a/src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmapHelvetica18.java b/src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmapHelvetica18.java
new file mode 100644
index 000000000..ebdd941f1
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmapHelvetica18.java
@@ -0,0 +1,1919 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.glut.fonts;
+
+import com.sun.opengl.util.glut.rec.*;
+
+public class GLUTBitmapHelvetica18 {
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+/* char: 0xff */
+
+static final byte[] ch255data = {
+(byte) 0x70,(byte) 0x70,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x3c,(byte) 0x24,(byte) 0x66,(byte) 0x66,(byte) 0x66,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0x0,(byte) 0x66,
+(byte) 0x66,
+};
+
+static final BitmapCharRec ch255 = new BitmapCharRec(8,17,-1,4,10,ch255data);
+
+/* char: 0xfe */
+
+static final byte[] ch254data = {
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xde,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xe3,(byte) 0x0,(byte) 0xc1,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xe3,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xde,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch254 = new BitmapCharRec(9,18,-1,4,11,ch254data);
+
+/* char: 0xfd */
+
+static final byte[] ch253data = {
+(byte) 0x70,(byte) 0x70,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x3c,(byte) 0x24,(byte) 0x66,(byte) 0x66,(byte) 0x66,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0x0,(byte) 0x18,
+(byte) 0xc,(byte) 0x6,
+};
+
+static final BitmapCharRec ch253 = new BitmapCharRec(8,18,-1,4,10,ch253data);
+
+/* char: 0xfc */
+
+static final byte[] ch252data = {
+(byte) 0x73,(byte) 0xfb,(byte) 0xc7,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0x0,(byte) 0x66,(byte) 0x66,
+};
+
+static final BitmapCharRec ch252 = new BitmapCharRec(8,13,-1,0,10,ch252data);
+
+/* char: 0xfb */
+
+static final byte[] ch251data = {
+(byte) 0x73,(byte) 0xfb,(byte) 0xc7,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0x0,(byte) 0x66,(byte) 0x3c,(byte) 0x18,
+};
+
+static final BitmapCharRec ch251 = new BitmapCharRec(8,14,-1,0,10,ch251data);
+
+/* char: 0xfa */
+
+static final byte[] ch250data = {
+(byte) 0x73,(byte) 0xfb,(byte) 0xc7,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x6,
+};
+
+static final BitmapCharRec ch250 = new BitmapCharRec(8,14,-1,0,10,ch250data);
+
+/* char: 0xf9 */
+
+static final byte[] ch249data = {
+(byte) 0x73,(byte) 0xfb,(byte) 0xc7,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x30,
+};
+
+static final BitmapCharRec ch249 = new BitmapCharRec(8,14,-1,0,10,ch249data);
+
+/* char: 0xf8 */
+
+static final byte[] ch248data = {
+(byte) 0xce,(byte) 0x0,(byte) 0x7f,(byte) 0x80,(byte) 0x31,(byte) 0x80,(byte) 0x78,(byte) 0xc0,(byte) 0x6c,(byte) 0xc0,(byte) 0x66,(byte) 0xc0,(byte) 0x63,(byte) 0xc0,(byte) 0x31,(byte) 0x80,
+(byte) 0x3f,(byte) 0xc0,(byte) 0xe,(byte) 0x60,
+};
+
+static final BitmapCharRec ch248 = new BitmapCharRec(11,10,0,0,11,ch248data);
+
+/* char: 0xf7 */
+
+static final byte[] ch247data = {
+(byte) 0x18,(byte) 0x18,(byte) 0x0,(byte) 0xff,(byte) 0xff,(byte) 0x0,(byte) 0x18,(byte) 0x18,
+};
+
+static final BitmapCharRec ch247 = new BitmapCharRec(8,8,-1,-1,10,ch247data);
+
+/* char: 0xf6 */
+
+static final byte[] ch246data = {
+(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x0,
+(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x36,(byte) 0x0,(byte) 0x36,(byte) 0x0,
+};
+
+static final BitmapCharRec ch246 = new BitmapCharRec(9,13,-1,0,11,ch246data);
+
+/* char: 0xf5 */
+
+static final byte[] ch245data = {
+(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x0,
+(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x26,(byte) 0x0,(byte) 0x2d,(byte) 0x0,(byte) 0x19,(byte) 0x0,
+};
+
+static final BitmapCharRec ch245 = new BitmapCharRec(9,14,-1,0,11,ch245data);
+
+/* char: 0xf4 */
+
+static final byte[] ch244data = {
+(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x0,
+(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0xc,(byte) 0x0,
+};
+
+static final BitmapCharRec ch244 = new BitmapCharRec(9,14,-1,0,11,ch244data);
+
+/* char: 0xf3 */
+
+static final byte[] ch243data = {
+(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x0,
+(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+};
+
+static final BitmapCharRec ch243 = new BitmapCharRec(9,14,-1,0,11,ch243data);
+
+/* char: 0xf2 */
+
+static final byte[] ch242data = {
+(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x0,
+(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x30,(byte) 0x0,
+};
+
+static final BitmapCharRec ch242 = new BitmapCharRec(9,14,-1,0,11,ch242data);
+
+/* char: 0xf1 */
+
+static final byte[] ch241data = {
+(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xe3,(byte) 0xdf,(byte) 0xce,(byte) 0x0,(byte) 0x4c,(byte) 0x5a,(byte) 0x32,
+};
+
+static final BitmapCharRec ch241 = new BitmapCharRec(8,14,-1,0,10,ch241data);
+
+/* char: 0xf0 */
+
+static final byte[] ch240data = {
+(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x0,
+(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x4c,(byte) 0x0,(byte) 0x38,(byte) 0x0,(byte) 0x36,(byte) 0x0,(byte) 0x60,(byte) 0x0,
+};
+
+static final BitmapCharRec ch240 = new BitmapCharRec(9,14,-1,0,11,ch240data);
+
+/* char: 0xef */
+
+static final byte[] ch239data = {
+(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x0,(byte) 0xd8,(byte) 0xd8,
+};
+
+static final BitmapCharRec ch239 = new BitmapCharRec(5,13,0,0,4,ch239data);
+
+/* char: 0xee */
+
+static final byte[] ch238data = {
+(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0xcc,(byte) 0x78,(byte) 0x30,
+};
+
+static final BitmapCharRec ch238 = new BitmapCharRec(6,14,1,0,4,ch238data);
+
+/* char: 0xed */
+
+static final byte[] ch237data = {
+(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x0,(byte) 0xc0,(byte) 0x60,(byte) 0x30,
+};
+
+static final BitmapCharRec ch237 = new BitmapCharRec(4,14,0,0,4,ch237data);
+
+/* char: 0xec */
+
+static final byte[] ch236data = {
+(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x0,(byte) 0x30,(byte) 0x60,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch236 = new BitmapCharRec(4,14,0,0,4,ch236data);
+
+/* char: 0xeb */
+
+static final byte[] ch235data = {
+(byte) 0x3c,(byte) 0x7f,(byte) 0xe3,(byte) 0xc0,(byte) 0xc0,(byte) 0xff,(byte) 0xc3,(byte) 0xc3,(byte) 0x7e,(byte) 0x3c,(byte) 0x0,(byte) 0x36,(byte) 0x36,
+};
+
+static final BitmapCharRec ch235 = new BitmapCharRec(8,13,-1,0,10,ch235data);
+
+/* char: 0xea */
+
+static final byte[] ch234data = {
+(byte) 0x3c,(byte) 0x7f,(byte) 0xe3,(byte) 0xc0,(byte) 0xc0,(byte) 0xff,(byte) 0xc3,(byte) 0xc3,(byte) 0x7e,(byte) 0x3c,(byte) 0x0,(byte) 0x66,(byte) 0x3c,(byte) 0x18,
+};
+
+static final BitmapCharRec ch234 = new BitmapCharRec(8,14,-1,0,10,ch234data);
+
+/* char: 0xe9 */
+
+static final byte[] ch233data = {
+(byte) 0x3c,(byte) 0x7f,(byte) 0xe3,(byte) 0xc0,(byte) 0xc0,(byte) 0xff,(byte) 0xc3,(byte) 0xc3,(byte) 0x7e,(byte) 0x3c,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x6,
+};
+
+static final BitmapCharRec ch233 = new BitmapCharRec(8,14,-1,0,10,ch233data);
+
+/* char: 0xe8 */
+
+static final byte[] ch232data = {
+(byte) 0x3c,(byte) 0x7f,(byte) 0xe3,(byte) 0xc0,(byte) 0xc0,(byte) 0xff,(byte) 0xc3,(byte) 0xc3,(byte) 0x7e,(byte) 0x3c,(byte) 0x0,(byte) 0x18,(byte) 0x30,(byte) 0x60,
+};
+
+static final BitmapCharRec ch232 = new BitmapCharRec(8,14,-1,0,10,ch232data);
+
+/* char: 0xe7 */
+
+static final byte[] ch231data = {
+(byte) 0x78,(byte) 0x6c,(byte) 0xc,(byte) 0x38,(byte) 0x3e,(byte) 0x7f,(byte) 0x63,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x63,(byte) 0x7f,(byte) 0x3e,
+};
+
+static final BitmapCharRec ch231 = new BitmapCharRec(8,14,-1,4,10,ch231data);
+
+/* char: 0xe6 */
+
+static final byte[] ch230data = {
+(byte) 0x75,(byte) 0xe0,(byte) 0xef,(byte) 0xf8,(byte) 0xc7,(byte) 0x18,(byte) 0xc6,(byte) 0x0,(byte) 0xe6,(byte) 0x0,(byte) 0x7f,(byte) 0xf8,(byte) 0xe,(byte) 0x18,(byte) 0xc6,(byte) 0x18,
+(byte) 0xef,(byte) 0xf0,(byte) 0x7d,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch230 = new BitmapCharRec(13,10,-1,0,15,ch230data);
+
+/* char: 0xe5 */
+
+static final byte[] ch229data = {
+(byte) 0x76,(byte) 0xee,(byte) 0xc6,(byte) 0xc6,(byte) 0xe6,(byte) 0x7e,(byte) 0xe,(byte) 0xc6,(byte) 0xee,(byte) 0x7c,(byte) 0x38,(byte) 0x6c,(byte) 0x6c,(byte) 0x38,
+};
+
+static final BitmapCharRec ch229 = new BitmapCharRec(7,14,-1,0,9,ch229data);
+
+/* char: 0xe4 */
+
+static final byte[] ch228data = {
+(byte) 0x76,(byte) 0xee,(byte) 0xc6,(byte) 0xc6,(byte) 0xe6,(byte) 0x7e,(byte) 0xe,(byte) 0xc6,(byte) 0xee,(byte) 0x7c,(byte) 0x0,(byte) 0x6c,(byte) 0x6c,
+};
+
+static final BitmapCharRec ch228 = new BitmapCharRec(7,13,-1,0,9,ch228data);
+
+/* char: 0xe3 */
+
+static final byte[] ch227data = {
+(byte) 0x76,(byte) 0xee,(byte) 0xc6,(byte) 0xc6,(byte) 0xe6,(byte) 0x7e,(byte) 0xe,(byte) 0xc6,(byte) 0xee,(byte) 0x7c,(byte) 0x0,(byte) 0x4c,(byte) 0x5a,(byte) 0x32,
+};
+
+static final BitmapCharRec ch227 = new BitmapCharRec(7,14,-1,0,9,ch227data);
+
+/* char: 0xe2 */
+
+static final byte[] ch226data = {
+(byte) 0x76,(byte) 0xee,(byte) 0xc6,(byte) 0xc6,(byte) 0xe6,(byte) 0x7e,(byte) 0xe,(byte) 0xc6,(byte) 0xee,(byte) 0x7c,(byte) 0x0,(byte) 0x66,(byte) 0x3c,(byte) 0x18,
+};
+
+static final BitmapCharRec ch226 = new BitmapCharRec(7,14,-1,0,9,ch226data);
+
+/* char: 0xe1 */
+
+static final byte[] ch225data = {
+(byte) 0x76,(byte) 0xee,(byte) 0xc6,(byte) 0xc6,(byte) 0xe6,(byte) 0x7e,(byte) 0xe,(byte) 0xc6,(byte) 0xee,(byte) 0x7c,(byte) 0x0,(byte) 0x30,(byte) 0x18,(byte) 0xc,
+};
+
+static final BitmapCharRec ch225 = new BitmapCharRec(7,14,-1,0,9,ch225data);
+
+/* char: 0xe0 */
+
+static final byte[] ch224data = {
+(byte) 0x76,(byte) 0xee,(byte) 0xc6,(byte) 0xc6,(byte) 0xe6,(byte) 0x7e,(byte) 0xe,(byte) 0xc6,(byte) 0xee,(byte) 0x7c,(byte) 0x0,(byte) 0x18,(byte) 0x30,(byte) 0x60,
+};
+
+static final BitmapCharRec ch224 = new BitmapCharRec(7,14,-1,0,9,ch224data);
+
+/* char: 0xdf */
+
+static final byte[] ch223data = {
+(byte) 0xdc,(byte) 0xde,(byte) 0xc6,(byte) 0xc6,(byte) 0xc6,(byte) 0xc6,(byte) 0xdc,(byte) 0xdc,(byte) 0xc6,(byte) 0xc6,(byte) 0xc6,(byte) 0xc6,(byte) 0x7c,(byte) 0x38,
+};
+
+static final BitmapCharRec ch223 = new BitmapCharRec(7,14,-1,0,9,ch223data);
+
+/* char: 0xde */
+
+static final byte[] ch222data = {
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xc1,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc1,(byte) 0xc0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch222 = new BitmapCharRec(10,14,-1,0,12,ch222data);
+
+/* char: 0xdd */
+
+static final byte[] ch221data = {
+(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x19,(byte) 0x80,
+(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,(byte) 0x1,(byte) 0x80,
+};
+
+static final BitmapCharRec ch221 = new BitmapCharRec(12,18,-1,0,14,ch221data);
+
+/* char: 0xdc */
+
+static final byte[] ch220data = {
+(byte) 0x1f,(byte) 0x0,(byte) 0x7f,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
+(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x19,(byte) 0x80,
+(byte) 0x19,(byte) 0x80,
+};
+
+static final BitmapCharRec ch220 = new BitmapCharRec(11,17,-1,0,13,ch220data);
+
+/* char: 0xdb */
+
+static final byte[] ch219data = {
+(byte) 0x1f,(byte) 0x0,(byte) 0x7f,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
+(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x19,(byte) 0x80,
+(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+};
+
+static final BitmapCharRec ch219 = new BitmapCharRec(11,18,-1,0,13,ch219data);
+
+/* char: 0xda */
+
+static final byte[] ch218data = {
+(byte) 0x1f,(byte) 0x0,(byte) 0x7f,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
+(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0xc,(byte) 0x0,
+(byte) 0x6,(byte) 0x0,(byte) 0x3,(byte) 0x0,
+};
+
+static final BitmapCharRec ch218 = new BitmapCharRec(11,18,-1,0,13,ch218data);
+
+/* char: 0xd9 */
+
+static final byte[] ch217data = {
+(byte) 0x1f,(byte) 0x0,(byte) 0x7f,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
+(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0x0,
+};
+
+static final BitmapCharRec ch217 = new BitmapCharRec(11,18,-1,0,13,ch217data);
+
+/* char: 0xd8 */
+
+static final byte[] ch216data = {
+(byte) 0xc7,(byte) 0xc0,(byte) 0xff,(byte) 0xf0,(byte) 0x78,(byte) 0x38,(byte) 0x38,(byte) 0x18,(byte) 0x6c,(byte) 0x1c,(byte) 0x6e,(byte) 0xc,(byte) 0x67,(byte) 0xc,(byte) 0x63,(byte) 0x8c,
+(byte) 0x61,(byte) 0xcc,(byte) 0x70,(byte) 0xdc,(byte) 0x30,(byte) 0x78,(byte) 0x38,(byte) 0x38,(byte) 0x1f,(byte) 0xfc,(byte) 0x7,(byte) 0xcc,
+};
+
+static final BitmapCharRec ch216 = new BitmapCharRec(14,14,0,0,15,ch216data);
+
+/* char: 0xd7 */
+
+static final byte[] ch215data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x33,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x61,(byte) 0x80,
+(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch215 = new BitmapCharRec(10,9,0,0,10,ch215data);
+
+/* char: 0xd6 */
+
+static final byte[] ch214data = {
+(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x38,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,
+(byte) 0xc0,(byte) 0x18,(byte) 0xe0,(byte) 0x38,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0xd,(byte) 0x80,
+(byte) 0xd,(byte) 0x80,
+};
+
+static final BitmapCharRec ch214 = new BitmapCharRec(13,17,-1,0,15,ch214data);
+
+/* char: 0xd5 */
+
+static final byte[] ch213data = {
+(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x38,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,
+(byte) 0xc0,(byte) 0x18,(byte) 0xe0,(byte) 0x38,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x9,(byte) 0x80,
+(byte) 0xb,(byte) 0x40,(byte) 0x6,(byte) 0x40,
+};
+
+static final BitmapCharRec ch213 = new BitmapCharRec(13,18,-1,0,15,ch213data);
+
+/* char: 0xd4 */
+
+static final byte[] ch212data = {
+(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x38,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,
+(byte) 0xc0,(byte) 0x18,(byte) 0xe0,(byte) 0x38,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0xc,(byte) 0xc0,
+(byte) 0x7,(byte) 0x80,(byte) 0x3,(byte) 0x0,
+};
+
+static final BitmapCharRec ch212 = new BitmapCharRec(13,18,-1,0,15,ch212data);
+
+/* char: 0xd3 */
+
+static final byte[] ch211data = {
+(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x38,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,
+(byte) 0xc0,(byte) 0x18,(byte) 0xe0,(byte) 0x38,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x3,(byte) 0x0,
+(byte) 0x1,(byte) 0x80,(byte) 0x0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch211 = new BitmapCharRec(13,18,-1,0,15,ch211data);
+
+/* char: 0xd2 */
+
+static final byte[] ch210data = {
+(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x38,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,
+(byte) 0xc0,(byte) 0x18,(byte) 0xe0,(byte) 0x38,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x3,(byte) 0x0,
+(byte) 0x6,(byte) 0x0,(byte) 0xc,(byte) 0x0,
+};
+
+static final BitmapCharRec ch210 = new BitmapCharRec(13,18,-1,0,15,ch210data);
+
+/* char: 0xd1 */
+
+static final byte[] ch209data = {
+(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe0,(byte) 0xc1,(byte) 0xe0,(byte) 0xc1,(byte) 0xe0,(byte) 0xc3,(byte) 0x60,(byte) 0xc6,(byte) 0x60,(byte) 0xc6,(byte) 0x60,(byte) 0xcc,(byte) 0x60,
+(byte) 0xcc,(byte) 0x60,(byte) 0xd8,(byte) 0x60,(byte) 0xd8,(byte) 0x60,(byte) 0xf0,(byte) 0x60,(byte) 0xe0,(byte) 0x60,(byte) 0xe0,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x13,(byte) 0x0,
+(byte) 0x16,(byte) 0x80,(byte) 0xc,(byte) 0x80,
+};
+
+static final BitmapCharRec ch209 = new BitmapCharRec(11,18,-1,0,13,ch209data);
+
+/* char: 0xd0 */
+
+static final byte[] ch208data = {
+(byte) 0x7f,(byte) 0x80,(byte) 0x7f,(byte) 0xc0,(byte) 0x60,(byte) 0xe0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x30,(byte) 0x60,(byte) 0x30,(byte) 0xfc,(byte) 0x30,(byte) 0xfc,(byte) 0x30,
+(byte) 0x60,(byte) 0x30,(byte) 0x60,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0xe0,(byte) 0x7f,(byte) 0xc0,(byte) 0x7f,(byte) 0x80,
+};
+
+static final BitmapCharRec ch208 = new BitmapCharRec(12,14,0,0,13,ch208data);
+
+/* char: 0xcf */
+
+static final byte[] ch207data = {
+(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0xcc,
+(byte) 0xcc,
+};
+
+static final BitmapCharRec ch207 = new BitmapCharRec(6,17,0,0,6,ch207data);
+
+/* char: 0xce */
+
+static final byte[] ch206data = {
+(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0xcc,
+(byte) 0x78,(byte) 0x30,
+};
+
+static final BitmapCharRec ch206 = new BitmapCharRec(6,18,0,0,6,ch206data);
+
+/* char: 0xcd */
+
+static final byte[] ch205data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,
+(byte) 0x60,(byte) 0x30,
+};
+
+static final BitmapCharRec ch205 = new BitmapCharRec(4,18,-2,0,6,ch205data);
+
+/* char: 0xcc */
+
+static final byte[] ch204data = {
+(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0x30,
+(byte) 0x60,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch204 = new BitmapCharRec(4,18,0,0,6,ch204data);
+
+/* char: 0xcb */
+
+static final byte[] ch203data = {
+(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x33,(byte) 0x0,
+(byte) 0x33,(byte) 0x0,
+};
+
+static final BitmapCharRec ch203 = new BitmapCharRec(9,17,-1,0,11,ch203data);
+
+/* char: 0xca */
+
+static final byte[] ch202data = {
+(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x33,(byte) 0x0,
+(byte) 0x1e,(byte) 0x0,(byte) 0xc,(byte) 0x0,
+};
+
+static final BitmapCharRec ch202 = new BitmapCharRec(9,18,-1,0,11,ch202data);
+
+/* char: 0xc9 */
+
+static final byte[] ch201data = {
+(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0xc,(byte) 0x0,
+(byte) 0x6,(byte) 0x0,(byte) 0x3,(byte) 0x0,
+};
+
+static final BitmapCharRec ch201 = new BitmapCharRec(9,18,-1,0,11,ch201data);
+
+/* char: 0xc8 */
+
+static final byte[] ch200data = {
+(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0xc,(byte) 0x0,
+(byte) 0x18,(byte) 0x0,(byte) 0x30,(byte) 0x0,
+};
+
+static final BitmapCharRec ch200 = new BitmapCharRec(9,18,-1,0,11,ch200data);
+
+/* char: 0xc7 */
+
+static final byte[] ch199data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x1b,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,
+(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xe0,(byte) 0x0,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,
+(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,
+};
+
+static final BitmapCharRec ch199 = new BitmapCharRec(12,18,-1,4,14,ch199data);
+
+/* char: 0xc6 */
+
+static final byte[] ch198data = {
+(byte) 0xc1,(byte) 0xff,(byte) 0xc1,(byte) 0xff,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x7f,(byte) 0x80,(byte) 0x3f,(byte) 0x80,(byte) 0x31,(byte) 0xfe,(byte) 0x31,(byte) 0xfe,
+(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xd,(byte) 0x80,(byte) 0xd,(byte) 0x80,(byte) 0x7,(byte) 0xff,(byte) 0x7,(byte) 0xff,
+};
+
+static final BitmapCharRec ch198 = new BitmapCharRec(16,14,-1,0,18,ch198data);
+
+/* char: 0xc5 */
+
+static final byte[] ch197data = {
+(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x7f,(byte) 0xe0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
+(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x19,(byte) 0x80,
+(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,
+};
+
+static final BitmapCharRec ch197 = new BitmapCharRec(12,18,0,0,12,ch197data);
+
+/* char: 0xc4 */
+
+static final byte[] ch196data = {
+(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x7f,(byte) 0xe0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
+(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x19,(byte) 0x80,
+(byte) 0x19,(byte) 0x80,
+};
+
+static final BitmapCharRec ch196 = new BitmapCharRec(12,17,0,0,12,ch196data);
+
+/* char: 0xc3 */
+
+static final byte[] ch195data = {
+(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x7f,(byte) 0xe0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
+(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x13,(byte) 0x0,
+(byte) 0x16,(byte) 0x80,(byte) 0xc,(byte) 0x80,
+};
+
+static final BitmapCharRec ch195 = new BitmapCharRec(12,18,0,0,12,ch195data);
+
+/* char: 0xc2 */
+
+static final byte[] ch194data = {
+(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x7f,(byte) 0xe0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
+(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x19,(byte) 0x80,
+(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+};
+
+static final BitmapCharRec ch194 = new BitmapCharRec(12,18,0,0,12,ch194data);
+
+/* char: 0xc1 */
+
+static final byte[] ch193data = {
+(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x7f,(byte) 0xe0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
+(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,(byte) 0x1,(byte) 0x80,
+};
+
+static final BitmapCharRec ch193 = new BitmapCharRec(12,18,0,0,12,ch193data);
+
+/* char: 0xc0 */
+
+static final byte[] ch192data = {
+(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x7f,(byte) 0xe0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
+(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0x0,
+};
+
+static final BitmapCharRec ch192 = new BitmapCharRec(12,18,0,0,12,ch192data);
+
+/* char: 0xbf */
+
+static final byte[] ch191data = {
+(byte) 0x7c,(byte) 0xfe,(byte) 0xc6,(byte) 0xc6,(byte) 0xe0,(byte) 0x70,(byte) 0x38,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x0,(byte) 0x0,(byte) 0x18,(byte) 0x18,
+};
+
+static final BitmapCharRec ch191 = new BitmapCharRec(7,14,-1,4,10,ch191data);
+
+/* char: 0xbe */
+
+static final byte[] ch190data = {
+(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0xc,(byte) 0xfc,(byte) 0x6,(byte) 0xd8,(byte) 0x6,(byte) 0x78,(byte) 0x73,(byte) 0x38,(byte) 0xf9,(byte) 0x18,(byte) 0x99,(byte) 0x88,
+(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x98,(byte) 0x60,(byte) 0xf8,(byte) 0x30,(byte) 0x70,(byte) 0x30,
+};
+
+static final BitmapCharRec ch190 = new BitmapCharRec(14,13,0,0,15,ch190data);
+
+/* char: 0xbd */
+
+static final byte[] ch189data = {
+(byte) 0x30,(byte) 0xf8,(byte) 0x30,(byte) 0xf8,(byte) 0x18,(byte) 0x60,(byte) 0xc,(byte) 0x30,(byte) 0xc,(byte) 0x18,(byte) 0x66,(byte) 0x98,(byte) 0x62,(byte) 0xf8,(byte) 0x63,(byte) 0x70,
+(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xe0,(byte) 0xc0,(byte) 0xe0,(byte) 0x60,(byte) 0x60,(byte) 0x60,
+};
+
+static final BitmapCharRec ch189 = new BitmapCharRec(13,13,-1,0,15,ch189data);
+
+/* char: 0xbc */
+
+static final byte[] ch188data = {
+(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x19,(byte) 0xf8,(byte) 0xd,(byte) 0xb0,(byte) 0xc,(byte) 0xf0,(byte) 0x66,(byte) 0x70,(byte) 0x62,(byte) 0x30,(byte) 0x63,(byte) 0x10,
+(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xe0,(byte) 0xc0,(byte) 0xe0,(byte) 0x60,(byte) 0x60,(byte) 0x60,
+};
+
+static final BitmapCharRec ch188 = new BitmapCharRec(13,13,-1,0,15,ch188data);
+
+/* char: 0xbb */
+
+static final byte[] ch187data = {
+(byte) 0x90,(byte) 0xd8,(byte) 0x6c,(byte) 0x36,(byte) 0x36,(byte) 0x6c,(byte) 0xd8,(byte) 0x90,
+};
+
+static final BitmapCharRec ch187 = new BitmapCharRec(7,8,-1,-1,9,ch187data);
+
+/* char: 0xba */
+
+static final byte[] ch186data = {
+(byte) 0xf8,(byte) 0x0,(byte) 0x70,(byte) 0xd8,(byte) 0x88,(byte) 0x88,(byte) 0xd8,(byte) 0x70,
+};
+
+static final BitmapCharRec ch186 = new BitmapCharRec(5,8,-1,-6,7,ch186data);
+
+/* char: 0xb9 */
+
+static final byte[] ch185data = {
+(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0xe0,(byte) 0xe0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch185 = new BitmapCharRec(3,8,-1,-5,6,ch185data);
+
+/* char: 0xb8 */
+
+static final byte[] ch184data = {
+(byte) 0xf0,(byte) 0xd8,(byte) 0x18,(byte) 0x70,(byte) 0x60,
+};
+
+static final BitmapCharRec ch184 = new BitmapCharRec(5,5,0,4,5,ch184data);
+
+/* char: 0xb7 */
+
+static final byte[] ch183data = {
+(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch183 = new BitmapCharRec(2,2,-1,-4,4,ch183data);
+
+/* char: 0xb6 */
+
+static final byte[] ch182data = {
+(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x32,(byte) 0x72,(byte) 0xf2,(byte) 0xf2,(byte) 0xf2,(byte) 0xf2,
+(byte) 0x72,(byte) 0x3f,
+};
+
+static final BitmapCharRec ch182 = new BitmapCharRec(8,18,-1,4,10,ch182data);
+
+/* char: 0xb5 */
+
+static final byte[] ch181data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xdb,(byte) 0xff,(byte) 0xe7,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,
+};
+
+static final BitmapCharRec ch181 = new BitmapCharRec(8,14,-1,4,10,ch181data);
+
+/* char: 0xb4 */
+
+static final byte[] ch180data = {
+(byte) 0xc0,(byte) 0x60,(byte) 0x30,
+};
+
+static final BitmapCharRec ch180 = new BitmapCharRec(4,3,0,-11,4,ch180data);
+
+/* char: 0xb3 */
+
+static final byte[] ch179data = {
+(byte) 0x70,(byte) 0xf8,(byte) 0x98,(byte) 0x30,(byte) 0x30,(byte) 0x98,(byte) 0xf8,(byte) 0x70,
+};
+
+static final BitmapCharRec ch179 = new BitmapCharRec(5,8,0,-5,6,ch179data);
+
+/* char: 0xb2 */
+
+static final byte[] ch178data = {
+(byte) 0xf8,(byte) 0xf8,(byte) 0x60,(byte) 0x30,(byte) 0x18,(byte) 0x98,(byte) 0xf8,(byte) 0x70,
+};
+
+static final BitmapCharRec ch178 = new BitmapCharRec(5,8,0,-5,6,ch178data);
+
+/* char: 0xb1 */
+
+static final byte[] ch177data = {
+(byte) 0xff,(byte) 0xff,(byte) 0x0,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0xff,(byte) 0xff,(byte) 0x18,(byte) 0x18,(byte) 0x18,
+};
+
+static final BitmapCharRec ch177 = new BitmapCharRec(8,11,-1,0,10,ch177data);
+
+/* char: 0xb0 */
+
+static final byte[] ch176data = {
+(byte) 0x70,(byte) 0xd8,(byte) 0x88,(byte) 0xd8,(byte) 0x70,
+};
+
+static final BitmapCharRec ch176 = new BitmapCharRec(5,5,-1,-8,7,ch176data);
+
+/* char: 0xaf */
+
+static final byte[] ch175data = {
+(byte) 0xf8,
+};
+
+static final BitmapCharRec ch175 = new BitmapCharRec(5,1,0,-12,5,ch175data);
+
+/* char: 0xae */
+
+static final byte[] ch174data = {
+(byte) 0xf,(byte) 0x80,(byte) 0x30,(byte) 0x60,(byte) 0x40,(byte) 0x10,(byte) 0x48,(byte) 0x50,(byte) 0x88,(byte) 0x88,(byte) 0x89,(byte) 0x8,(byte) 0x8f,(byte) 0x88,(byte) 0x88,(byte) 0x48,
+(byte) 0x88,(byte) 0x48,(byte) 0x4f,(byte) 0x90,(byte) 0x40,(byte) 0x10,(byte) 0x30,(byte) 0x60,(byte) 0xf,(byte) 0x80,
+};
+
+static final BitmapCharRec ch174 = new BitmapCharRec(13,13,-1,0,14,ch174data);
+
+/* char: 0xad */
+
+static final byte[] ch173data = {
+(byte) 0xf8,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch173 = new BitmapCharRec(5,2,-1,-4,7,ch173data);
+
+/* char: 0xac */
+
+static final byte[] ch172data = {
+(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,
+};
+
+static final BitmapCharRec ch172 = new BitmapCharRec(9,5,-1,-3,11,ch172data);
+
+/* char: 0xab */
+
+static final byte[] ch171data = {
+(byte) 0x12,(byte) 0x36,(byte) 0x6c,(byte) 0xd8,(byte) 0xd8,(byte) 0x6c,(byte) 0x36,(byte) 0x12,
+};
+
+static final BitmapCharRec ch171 = new BitmapCharRec(7,8,-1,-1,9,ch171data);
+
+/* char: 0xaa */
+
+static final byte[] ch170data = {
+(byte) 0xf8,(byte) 0x0,(byte) 0x68,(byte) 0xd8,(byte) 0x48,(byte) 0x38,(byte) 0xc8,(byte) 0x70,
+};
+
+static final BitmapCharRec ch170 = new BitmapCharRec(5,8,-1,-6,7,ch170data);
+
+/* char: 0xa9 */
+
+static final byte[] ch169data = {
+(byte) 0xf,(byte) 0x80,(byte) 0x30,(byte) 0x60,(byte) 0x40,(byte) 0x10,(byte) 0x47,(byte) 0x10,(byte) 0x88,(byte) 0x88,(byte) 0x90,(byte) 0x8,(byte) 0x90,(byte) 0x8,(byte) 0x90,(byte) 0x8,
+(byte) 0x88,(byte) 0x88,(byte) 0x47,(byte) 0x10,(byte) 0x40,(byte) 0x10,(byte) 0x30,(byte) 0x60,(byte) 0xf,(byte) 0x80,
+};
+
+static final BitmapCharRec ch169 = new BitmapCharRec(13,13,-1,0,15,ch169data);
+
+/* char: 0xa8 */
+
+static final byte[] ch168data = {
+(byte) 0xd8,(byte) 0xd8,
+};
+
+static final BitmapCharRec ch168 = new BitmapCharRec(5,2,0,-11,6,ch168data);
+
+/* char: 0xa7 */
+
+static final byte[] ch167data = {
+(byte) 0x3c,(byte) 0x7e,(byte) 0xc3,(byte) 0xc3,(byte) 0x7,(byte) 0xe,(byte) 0x3e,(byte) 0x73,(byte) 0xe3,(byte) 0xc3,(byte) 0xc7,(byte) 0x6e,(byte) 0x7c,(byte) 0xf0,(byte) 0xc3,(byte) 0xc3,
+(byte) 0x7e,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch167 = new BitmapCharRec(8,18,-1,4,10,ch167data);
+
+/* char: 0xa6 */
+
+static final byte[] ch166data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,
+};
+
+static final BitmapCharRec ch166 = new BitmapCharRec(2,17,-1,3,4,ch166data);
+
+/* char: 0xa5 */
+
+static final byte[] ch165data = {
+(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0xff,(byte) 0x18,(byte) 0xff,(byte) 0x3c,(byte) 0x66,(byte) 0x66,(byte) 0x66,(byte) 0xc3,(byte) 0xc3,
+};
+
+static final BitmapCharRec ch165 = new BitmapCharRec(8,13,-1,0,10,ch165data);
+
+/* char: 0xa4 */
+
+static final byte[] ch164data = {
+(byte) 0xc3,(byte) 0xff,(byte) 0x66,(byte) 0x66,(byte) 0x66,(byte) 0xff,(byte) 0xc3,
+};
+
+static final BitmapCharRec ch164 = new BitmapCharRec(8,7,-1,-3,10,ch164data);
+
+/* char: 0xa3 */
+
+static final byte[] ch163data = {
+(byte) 0xdf,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0x60,(byte) 0x80,(byte) 0x30,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x7e,(byte) 0x0,(byte) 0x30,(byte) 0x0,
+(byte) 0x60,(byte) 0x0,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x3f,(byte) 0x0,(byte) 0x1e,(byte) 0x0,
+};
+
+static final BitmapCharRec ch163 = new BitmapCharRec(9,13,0,0,10,ch163data);
+
+/* char: 0xa2 */
+
+static final byte[] ch162data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x3e,(byte) 0x7f,(byte) 0x6b,(byte) 0xc8,(byte) 0xc8,(byte) 0xc8,(byte) 0xc8,(byte) 0x6b,(byte) 0x7f,(byte) 0x3e,(byte) 0x4,(byte) 0x4,
+};
+
+static final BitmapCharRec ch162 = new BitmapCharRec(8,14,-1,2,10,ch162data);
+
+/* char: 0xa1 */
+
+static final byte[] ch161data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch161 = new BitmapCharRec(2,14,-2,4,6,ch161data);
+
+/* char: 0xa0 */
+
+static final BitmapCharRec ch160 = new BitmapCharRec(0,0,0,0,5,null);
+
+/* char: 0x7e '~' */
+
+static final byte[] ch126data = {
+(byte) 0xcc,(byte) 0x7e,(byte) 0x33,
+};
+
+static final BitmapCharRec ch126 = new BitmapCharRec(8,3,-1,-4,10,ch126data);
+
+/* char: 0x7d '}' */
+
+static final byte[] ch125data = {
+(byte) 0xc0,(byte) 0x60,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x18,(byte) 0xc,(byte) 0x18,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
+(byte) 0x60,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch125 = new BitmapCharRec(6,18,0,4,6,ch125data);
+
+/* char: 0x7c '|' */
+
+static final byte[] ch124data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch124 = new BitmapCharRec(2,18,-1,4,4,ch124data);
+
+/* char: 0x7b '{' */
+
+static final byte[] ch123data = {
+(byte) 0xc,(byte) 0x18,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
+(byte) 0x18,(byte) 0xc,
+};
+
+static final BitmapCharRec ch123 = new BitmapCharRec(6,18,0,4,6,ch123data);
+
+/* char: 0x7a 'z' */
+
+static final byte[] ch122data = {
+(byte) 0xfe,(byte) 0xfe,(byte) 0xc0,(byte) 0x60,(byte) 0x30,(byte) 0x18,(byte) 0xc,(byte) 0x6,(byte) 0xfe,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch122 = new BitmapCharRec(7,10,-1,0,9,ch122data);
+
+/* char: 0x79 'y' */
+
+static final byte[] ch121data = {
+(byte) 0x70,(byte) 0x70,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x3c,(byte) 0x24,(byte) 0x66,(byte) 0x66,(byte) 0x66,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,
+};
+
+static final BitmapCharRec ch121 = new BitmapCharRec(8,14,-1,4,10,ch121data);
+
+/* char: 0x78 'x' */
+
+static final byte[] ch120data = {
+(byte) 0xc3,(byte) 0xe7,(byte) 0x66,(byte) 0x3c,(byte) 0x18,(byte) 0x18,(byte) 0x3c,(byte) 0x66,(byte) 0xe7,(byte) 0xc3,
+};
+
+static final BitmapCharRec ch120 = new BitmapCharRec(8,10,-1,0,10,ch120data);
+
+/* char: 0x77 'w' */
+
+static final byte[] ch119data = {
+(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0x39,(byte) 0xc0,(byte) 0x29,(byte) 0x40,(byte) 0x69,(byte) 0x60,(byte) 0x66,(byte) 0x60,(byte) 0x66,(byte) 0x60,(byte) 0xc6,(byte) 0x30,
+(byte) 0xc6,(byte) 0x30,(byte) 0xc6,(byte) 0x30,
+};
+
+static final BitmapCharRec ch119 = new BitmapCharRec(12,10,-1,0,14,ch119data);
+
+/* char: 0x76 'v' */
+
+static final byte[] ch118data = {
+(byte) 0x18,(byte) 0x18,(byte) 0x3c,(byte) 0x24,(byte) 0x66,(byte) 0x66,(byte) 0x66,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,
+};
+
+static final BitmapCharRec ch118 = new BitmapCharRec(8,10,-1,0,10,ch118data);
+
+/* char: 0x75 'u' */
+
+static final byte[] ch117data = {
+(byte) 0x73,(byte) 0xfb,(byte) 0xc7,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,
+};
+
+static final BitmapCharRec ch117 = new BitmapCharRec(8,10,-1,0,10,ch117data);
+
+/* char: 0x74 't' */
+
+static final byte[] ch116data = {
+(byte) 0x18,(byte) 0x38,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0xfc,(byte) 0xfc,(byte) 0x30,(byte) 0x30,(byte) 0x30,
+};
+
+static final BitmapCharRec ch116 = new BitmapCharRec(6,13,0,0,6,ch116data);
+
+/* char: 0x73 's' */
+
+static final byte[] ch115data = {
+(byte) 0x78,(byte) 0xfc,(byte) 0xc6,(byte) 0x6,(byte) 0x3e,(byte) 0xfc,(byte) 0xc0,(byte) 0xc6,(byte) 0x7e,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch115 = new BitmapCharRec(7,10,-1,0,9,ch115data);
+
+/* char: 0x72 'r' */
+
+static final byte[] ch114data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xe0,(byte) 0xd8,(byte) 0xd8,
+};
+
+static final BitmapCharRec ch114 = new BitmapCharRec(5,10,-1,0,6,ch114data);
+
+/* char: 0x71 'q' */
+
+static final byte[] ch113data = {
+(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x3d,(byte) 0x80,(byte) 0x7f,(byte) 0x80,(byte) 0x63,(byte) 0x80,(byte) 0xc1,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x80,(byte) 0x7f,(byte) 0x80,(byte) 0x3d,(byte) 0x80,
+};
+
+static final BitmapCharRec ch113 = new BitmapCharRec(9,14,-1,4,11,ch113data);
+
+/* char: 0x70 'p' */
+
+static final byte[] ch112data = {
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xde,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xe3,(byte) 0x0,(byte) 0xc1,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xe3,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xde,(byte) 0x0,
+};
+
+static final BitmapCharRec ch112 = new BitmapCharRec(9,14,-1,4,11,ch112data);
+
+/* char: 0x6f 'o' */
+
+static final byte[] ch111data = {
+(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x0,
+(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,
+};
+
+static final BitmapCharRec ch111 = new BitmapCharRec(9,10,-1,0,11,ch111data);
+
+/* char: 0x6e 'n' */
+
+static final byte[] ch110data = {
+(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xe3,(byte) 0xdf,(byte) 0xce,
+};
+
+static final BitmapCharRec ch110 = new BitmapCharRec(8,10,-1,0,10,ch110data);
+
+/* char: 0x6d 'm' */
+
+static final byte[] ch109data = {
+(byte) 0xc6,(byte) 0x30,(byte) 0xc6,(byte) 0x30,(byte) 0xc6,(byte) 0x30,(byte) 0xc6,(byte) 0x30,(byte) 0xc6,(byte) 0x30,(byte) 0xc6,(byte) 0x30,(byte) 0xc6,(byte) 0x30,(byte) 0xe7,(byte) 0x30,
+(byte) 0xde,(byte) 0xf0,(byte) 0xcc,(byte) 0x60,
+};
+
+static final BitmapCharRec ch109 = new BitmapCharRec(12,10,-1,0,14,ch109data);
+
+/* char: 0x6c 'l' */
+
+static final byte[] ch108data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch108 = new BitmapCharRec(2,14,-1,0,4,ch108data);
+
+/* char: 0x6b 'k' */
+
+static final byte[] ch107data = {
+(byte) 0xc7,(byte) 0xc6,(byte) 0xce,(byte) 0xcc,(byte) 0xd8,(byte) 0xf8,(byte) 0xf0,(byte) 0xd8,(byte) 0xcc,(byte) 0xc6,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch107 = new BitmapCharRec(8,14,-1,0,9,ch107data);
+
+/* char: 0x6a 'j' */
+
+static final byte[] ch106data = {
+(byte) 0xe0,(byte) 0xf0,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0x0,
+(byte) 0x30,(byte) 0x30,
+};
+
+static final BitmapCharRec ch106 = new BitmapCharRec(4,18,1,4,4,ch106data);
+
+/* char: 0x69 'i' */
+
+static final byte[] ch105data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch105 = new BitmapCharRec(2,14,-1,0,4,ch105data);
+
+/* char: 0x68 'h' */
+
+static final byte[] ch104data = {
+(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xe3,(byte) 0xdf,(byte) 0xce,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch104 = new BitmapCharRec(8,14,-1,0,10,ch104data);
+
+/* char: 0x67 'g' */
+
+static final byte[] ch103data = {
+(byte) 0x1c,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x1,(byte) 0x80,(byte) 0x3d,(byte) 0x80,(byte) 0x7f,(byte) 0x80,(byte) 0x63,(byte) 0x80,(byte) 0xc1,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x7f,(byte) 0x80,(byte) 0x3d,(byte) 0x80,
+};
+
+static final BitmapCharRec ch103 = new BitmapCharRec(9,14,-1,4,11,ch103data);
+
+/* char: 0x66 'f' */
+
+static final byte[] ch102data = {
+(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0xfc,(byte) 0xfc,(byte) 0x30,(byte) 0x30,(byte) 0x3c,(byte) 0x1c,
+};
+
+static final BitmapCharRec ch102 = new BitmapCharRec(6,14,0,0,6,ch102data);
+
+/* char: 0x65 'e' */
+
+static final byte[] ch101data = {
+(byte) 0x3c,(byte) 0x7f,(byte) 0xe3,(byte) 0xc0,(byte) 0xc0,(byte) 0xff,(byte) 0xc3,(byte) 0xc3,(byte) 0x7e,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch101 = new BitmapCharRec(8,10,-1,0,10,ch101data);
+
+/* char: 0x64 'd' */
+
+static final byte[] ch100data = {
+(byte) 0x3d,(byte) 0x80,(byte) 0x7f,(byte) 0x80,(byte) 0x63,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x80,
+(byte) 0x7f,(byte) 0x80,(byte) 0x3d,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,
+};
+
+static final BitmapCharRec ch100 = new BitmapCharRec(9,14,-1,0,11,ch100data);
+
+/* char: 0x63 'c' */
+
+static final byte[] ch99data = {
+(byte) 0x3e,(byte) 0x7f,(byte) 0x63,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x63,(byte) 0x7f,(byte) 0x3e,
+};
+
+static final BitmapCharRec ch99 = new BitmapCharRec(8,10,-1,0,10,ch99data);
+
+/* char: 0x62 'b' */
+
+static final byte[] ch98data = {
+(byte) 0xde,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xe3,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xe3,(byte) 0x0,
+(byte) 0xff,(byte) 0x0,(byte) 0xde,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch98 = new BitmapCharRec(9,14,-1,0,11,ch98data);
+
+/* char: 0x61 'a' */
+
+static final byte[] ch97data = {
+(byte) 0x76,(byte) 0xee,(byte) 0xc6,(byte) 0xc6,(byte) 0xe6,(byte) 0x7e,(byte) 0xe,(byte) 0xc6,(byte) 0xee,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch97 = new BitmapCharRec(7,10,-1,0,9,ch97data);
+
+/* char: 0x60 '`' */
+
+static final byte[] ch96data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0x80,(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch96 = new BitmapCharRec(2,5,-1,-9,4,ch96data);
+
+/* char: 0x5f '_' */
+
+static final byte[] ch95data = {
+(byte) 0xff,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch95 = new BitmapCharRec(10,2,0,4,10,ch95data);
+
+/* char: 0x5e '^' */
+
+static final byte[] ch94data = {
+(byte) 0x82,(byte) 0xc6,(byte) 0x6c,(byte) 0x38,(byte) 0x10,
+};
+
+static final BitmapCharRec ch94 = new BitmapCharRec(7,5,-1,-8,9,ch94data);
+
+/* char: 0x5d ']' */
+
+static final byte[] ch93data = {
+(byte) 0xf0,(byte) 0xf0,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
+(byte) 0xf0,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch93 = new BitmapCharRec(4,18,0,4,5,ch93data);
+
+/* char: 0x5c '\' */
+
+static final byte[] ch92data = {
+(byte) 0x18,(byte) 0x18,(byte) 0x10,(byte) 0x10,(byte) 0x30,(byte) 0x30,(byte) 0x20,(byte) 0x20,(byte) 0x60,(byte) 0x60,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch92 = new BitmapCharRec(5,14,0,0,5,ch92data);
+
+/* char: 0x5b '[' */
+
+static final byte[] ch91data = {
+(byte) 0xf0,(byte) 0xf0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xf0,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch91 = new BitmapCharRec(4,18,-1,4,5,ch91data);
+
+/* char: 0x5a 'Z' */
+
+static final byte[] ch90data = {
+(byte) 0xff,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0xc,(byte) 0x0,
+(byte) 0x6,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x1,(byte) 0x80,(byte) 0x0,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch90 = new BitmapCharRec(10,14,-1,0,12,ch90data);
+
+/* char: 0x59 'Y' */
+
+static final byte[] ch89data = {
+(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x19,(byte) 0x80,
+(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,
+};
+
+static final BitmapCharRec ch89 = new BitmapCharRec(12,14,-1,0,14,ch89data);
+
+/* char: 0x58 'X' */
+
+static final byte[] ch88data = {
+(byte) 0xc0,(byte) 0x60,(byte) 0xe0,(byte) 0xe0,(byte) 0x60,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x31,(byte) 0x80,(byte) 0x1b,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0xe,(byte) 0x0,
+(byte) 0x1b,(byte) 0x0,(byte) 0x31,(byte) 0x80,(byte) 0x71,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe0,(byte) 0xe0,(byte) 0xc0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch88 = new BitmapCharRec(11,14,-1,0,13,ch88data);
+
+/* char: 0x57 'W' */
+
+static final byte[] ch87data = {
+(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x1c,(byte) 0x38,(byte) 0x34,(byte) 0x2c,(byte) 0x36,(byte) 0x6c,(byte) 0x36,(byte) 0x6c,(byte) 0x66,(byte) 0x66,(byte) 0x66,(byte) 0x66,
+(byte) 0x62,(byte) 0x46,(byte) 0x63,(byte) 0xc6,(byte) 0xc3,(byte) 0xc3,(byte) 0xc1,(byte) 0x83,(byte) 0xc1,(byte) 0x83,(byte) 0xc1,(byte) 0x83,
+};
+
+static final BitmapCharRec ch87 = new BitmapCharRec(16,14,-1,0,18,ch87data);
+
+/* char: 0x56 'V' */
+
+static final byte[] ch86data = {
+(byte) 0x6,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
+(byte) 0x30,(byte) 0xc0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,
+};
+
+static final BitmapCharRec ch86 = new BitmapCharRec(12,14,-1,0,14,ch86data);
+
+/* char: 0x55 'U' */
+
+static final byte[] ch85data = {
+(byte) 0x1f,(byte) 0x0,(byte) 0x7f,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
+(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch85 = new BitmapCharRec(11,14,-1,0,13,ch85data);
+
+/* char: 0x54 'T' */
+
+static final byte[] ch84data = {
+(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,
+(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xff,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch84 = new BitmapCharRec(10,14,-1,0,12,ch84data);
+
+/* char: 0x53 'S' */
+
+static final byte[] ch83data = {
+(byte) 0x3f,(byte) 0x0,(byte) 0x7f,(byte) 0xc0,(byte) 0xe0,(byte) 0xe0,(byte) 0xc0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0xe0,(byte) 0x3,(byte) 0xc0,(byte) 0x1f,(byte) 0x0,
+(byte) 0x7c,(byte) 0x0,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x60,(byte) 0xe0,(byte) 0xe0,(byte) 0x7f,(byte) 0xc0,(byte) 0x1f,(byte) 0x0,
+};
+
+static final BitmapCharRec ch83 = new BitmapCharRec(11,14,-1,0,13,ch83data);
+
+/* char: 0x52 'R' */
+
+static final byte[] ch82data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x80,
+(byte) 0xc1,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc1,(byte) 0xc0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x0,
+};
+
+static final BitmapCharRec ch82 = new BitmapCharRec(10,14,-1,0,12,ch82data);
+
+/* char: 0x51 'Q' */
+
+static final byte[] ch81data = {
+(byte) 0x0,(byte) 0x30,(byte) 0xf,(byte) 0xb0,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0xf0,(byte) 0x61,(byte) 0xb0,(byte) 0xe1,(byte) 0xb8,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,
+(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0xe0,(byte) 0x38,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,
+};
+
+static final BitmapCharRec ch81 = new BitmapCharRec(13,15,-1,1,15,ch81data);
+
+/* char: 0x50 'P' */
+
+static final byte[] ch80data = {
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x80,
+(byte) 0xc1,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc1,(byte) 0xc0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x0,
+};
+
+static final BitmapCharRec ch80 = new BitmapCharRec(10,14,-1,0,12,ch80data);
+
+/* char: 0x4f 'O' */
+
+static final byte[] ch79data = {
+(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x38,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,
+(byte) 0xc0,(byte) 0x18,(byte) 0xe0,(byte) 0x38,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,
+};
+
+static final BitmapCharRec ch79 = new BitmapCharRec(13,14,-1,0,15,ch79data);
+
+/* char: 0x4e 'N' */
+
+static final byte[] ch78data = {
+(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe0,(byte) 0xc1,(byte) 0xe0,(byte) 0xc1,(byte) 0xe0,(byte) 0xc3,(byte) 0x60,(byte) 0xc6,(byte) 0x60,(byte) 0xc6,(byte) 0x60,(byte) 0xcc,(byte) 0x60,
+(byte) 0xcc,(byte) 0x60,(byte) 0xd8,(byte) 0x60,(byte) 0xf0,(byte) 0x60,(byte) 0xf0,(byte) 0x60,(byte) 0xe0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch78 = new BitmapCharRec(11,14,-1,0,13,ch78data);
+
+/* char: 0x4d 'M' */
+
+static final byte[] ch77data = {
+(byte) 0xc3,(byte) 0xc,(byte) 0xc3,(byte) 0xc,(byte) 0xc7,(byte) 0x8c,(byte) 0xc4,(byte) 0x8c,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,(byte) 0xd8,(byte) 0x6c,(byte) 0xd8,(byte) 0x6c,
+(byte) 0xf0,(byte) 0x3c,(byte) 0xf0,(byte) 0x3c,(byte) 0xe0,(byte) 0x1c,(byte) 0xe0,(byte) 0x1c,(byte) 0xc0,(byte) 0xc,(byte) 0xc0,(byte) 0xc,
+};
+
+static final BitmapCharRec ch77 = new BitmapCharRec(14,14,-1,0,16,ch77data);
+
+/* char: 0x4c 'L' */
+
+static final byte[] ch76data = {
+(byte) 0xff,(byte) 0xff,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch76 = new BitmapCharRec(8,14,-1,0,10,ch76data);
+
+/* char: 0x4b 'K' */
+
+static final byte[] ch75data = {
+(byte) 0xc0,(byte) 0x70,(byte) 0xc0,(byte) 0xe0,(byte) 0xc1,(byte) 0xc0,(byte) 0xc3,(byte) 0x80,(byte) 0xc7,(byte) 0x0,(byte) 0xce,(byte) 0x0,(byte) 0xfc,(byte) 0x0,(byte) 0xf8,(byte) 0x0,
+(byte) 0xdc,(byte) 0x0,(byte) 0xce,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x80,(byte) 0xc1,(byte) 0xc0,(byte) 0xc0,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch75 = new BitmapCharRec(12,14,-1,0,13,ch75data);
+
+/* char: 0x4a 'J' */
+
+static final byte[] ch74data = {
+(byte) 0x3c,(byte) 0x7e,(byte) 0xe7,(byte) 0xc3,(byte) 0xc3,(byte) 0x3,(byte) 0x3,(byte) 0x3,(byte) 0x3,(byte) 0x3,(byte) 0x3,(byte) 0x3,(byte) 0x3,(byte) 0x3,
+};
+
+static final BitmapCharRec ch74 = new BitmapCharRec(8,14,-1,0,10,ch74data);
+
+/* char: 0x49 'I' */
+
+static final byte[] ch73data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch73 = new BitmapCharRec(2,14,-2,0,6,ch73data);
+
+/* char: 0x48 'H' */
+
+static final byte[] ch72data = {
+(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xff,(byte) 0xe0,(byte) 0xff,(byte) 0xe0,
+(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch72 = new BitmapCharRec(11,14,-1,0,13,ch72data);
+
+/* char: 0x47 'G' */
+
+static final byte[] ch71data = {
+(byte) 0xf,(byte) 0xb0,(byte) 0x3f,(byte) 0xf0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x30,(byte) 0xc1,(byte) 0xf0,(byte) 0xc1,(byte) 0xf0,(byte) 0xc0,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0xe0,(byte) 0x30,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,
+};
+
+static final BitmapCharRec ch71 = new BitmapCharRec(12,14,-1,0,14,ch71data);
+
+/* char: 0x46 'F' */
+
+static final byte[] ch70data = {
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,
+};
+
+static final BitmapCharRec ch70 = new BitmapCharRec(9,14,-1,0,11,ch70data);
+
+/* char: 0x45 'E' */
+
+static final byte[] ch69data = {
+(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,
+};
+
+static final BitmapCharRec ch69 = new BitmapCharRec(9,14,-1,0,11,ch69data);
+
+/* char: 0x44 'D' */
+
+static final byte[] ch68data = {
+(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xc1,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
+(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0xc1,(byte) 0xc0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x0,
+};
+
+static final BitmapCharRec ch68 = new BitmapCharRec(11,14,-1,0,13,ch68data);
+
+/* char: 0x43 'C' */
+
+static final byte[] ch67data = {
+(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0xe0,(byte) 0x0,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,
+};
+
+static final BitmapCharRec ch67 = new BitmapCharRec(12,14,-1,0,14,ch67data);
+
+/* char: 0x42 'B' */
+
+static final byte[] ch66data = {
+(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0xc0,(byte) 0xc0,(byte) 0xe0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe0,(byte) 0xff,(byte) 0xc0,(byte) 0xff,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc1,(byte) 0xc0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x0,
+};
+
+static final BitmapCharRec ch66 = new BitmapCharRec(11,14,-1,0,13,ch66data);
+
+/* char: 0x41 'A' */
+
+static final byte[] ch65data = {
+(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x7f,(byte) 0xe0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
+(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+};
+
+static final BitmapCharRec ch65 = new BitmapCharRec(12,14,0,0,12,ch65data);
+
+/* char: 0x40 '@' */
+
+static final byte[] ch64data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1f,(byte) 0xf0,(byte) 0x38,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x67,(byte) 0x70,(byte) 0xcf,(byte) 0xf8,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,(byte) 0x66,
+(byte) 0xcc,(byte) 0x66,(byte) 0xcc,(byte) 0x63,(byte) 0xc6,(byte) 0x33,(byte) 0x67,(byte) 0x73,(byte) 0x63,(byte) 0xb3,(byte) 0x30,(byte) 0x6,(byte) 0x1c,(byte) 0xe,(byte) 0xf,(byte) 0xfc,
+(byte) 0x3,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch64 = new BitmapCharRec(16,17,-1,3,18,ch64data);
+
+/* char: 0x3f '?' */
+
+static final byte[] ch63data = {
+(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x38,(byte) 0x1c,(byte) 0xe,(byte) 0xc6,(byte) 0xc6,(byte) 0xfe,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch63 = new BitmapCharRec(7,14,-1,0,10,ch63data);
+
+/* char: 0x3e '>' */
+
+static final byte[] ch62data = {
+(byte) 0xc0,(byte) 0xf0,(byte) 0x3c,(byte) 0xe,(byte) 0x3,(byte) 0xe,(byte) 0x3c,(byte) 0xf0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch62 = new BitmapCharRec(8,9,-1,0,10,ch62data);
+
+/* char: 0x3d '=' */
+
+static final byte[] ch61data = {
+(byte) 0xfe,(byte) 0xfe,(byte) 0x0,(byte) 0x0,(byte) 0xfe,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch61 = new BitmapCharRec(7,6,-2,-2,11,ch61data);
+
+/* char: 0x3c '<' */
+
+static final byte[] ch60data = {
+(byte) 0x3,(byte) 0xf,(byte) 0x3c,(byte) 0x70,(byte) 0xc0,(byte) 0x70,(byte) 0x3c,(byte) 0xf,(byte) 0x3,
+};
+
+static final BitmapCharRec ch60 = new BitmapCharRec(8,9,-1,0,10,ch60data);
+
+/* char: 0x3b ';' */
+
+static final byte[] ch59data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch59 = new BitmapCharRec(2,13,-1,3,5,ch59data);
+
+/* char: 0x3a ':' */
+
+static final byte[] ch58data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch58 = new BitmapCharRec(2,10,-1,0,5,ch58data);
+
+/* char: 0x39 '9' */
+
+static final byte[] ch57data = {
+(byte) 0x7c,(byte) 0xfe,(byte) 0xc6,(byte) 0x3,(byte) 0x3,(byte) 0x3b,(byte) 0x7f,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc7,(byte) 0x7e,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch57 = new BitmapCharRec(8,13,-1,0,10,ch57data);
+
+/* char: 0x38 '8' */
+
+static final byte[] ch56data = {
+(byte) 0x3c,(byte) 0x7e,(byte) 0xe7,(byte) 0xc3,(byte) 0xc3,(byte) 0x66,(byte) 0x7e,(byte) 0x66,(byte) 0xc3,(byte) 0xc3,(byte) 0xe7,(byte) 0x7e,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch56 = new BitmapCharRec(8,13,-1,0,10,ch56data);
+
+/* char: 0x37 '7' */
+
+static final byte[] ch55data = {
+(byte) 0x60,(byte) 0x60,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x18,(byte) 0x18,(byte) 0xc,(byte) 0xc,(byte) 0x6,(byte) 0x3,(byte) 0xff,(byte) 0xff,
+};
+
+static final BitmapCharRec ch55 = new BitmapCharRec(8,13,-1,0,10,ch55data);
+
+/* char: 0x36 '6' */
+
+static final byte[] ch54data = {
+(byte) 0x3c,(byte) 0x7e,(byte) 0xe3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xfe,(byte) 0xdc,(byte) 0xc0,(byte) 0xc0,(byte) 0x63,(byte) 0x7f,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch54 = new BitmapCharRec(8,13,-1,0,10,ch54data);
+
+/* char: 0x35 '5' */
+
+static final byte[] ch53data = {
+(byte) 0x7c,(byte) 0xfe,(byte) 0xc7,(byte) 0xc3,(byte) 0x3,(byte) 0x3,(byte) 0xc7,(byte) 0xfe,(byte) 0xfc,(byte) 0xc0,(byte) 0xc0,(byte) 0xfe,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch53 = new BitmapCharRec(8,13,-1,0,10,ch53data);
+
+/* char: 0x34 '4' */
+
+static final byte[] ch52data = {
+(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x33,(byte) 0x0,
+(byte) 0x33,(byte) 0x0,(byte) 0x1b,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x7,(byte) 0x0,(byte) 0x3,(byte) 0x0,
+};
+
+static final BitmapCharRec ch52 = new BitmapCharRec(9,13,-1,0,10,ch52data);
+
+/* char: 0x33 '3' */
+
+static final byte[] ch51data = {
+(byte) 0x3c,(byte) 0x7e,(byte) 0xc7,(byte) 0xc3,(byte) 0x3,(byte) 0x7,(byte) 0x1e,(byte) 0x1c,(byte) 0x6,(byte) 0xc3,(byte) 0xc3,(byte) 0x7e,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch51 = new BitmapCharRec(8,13,-1,0,10,ch51data);
+
+/* char: 0x32 '2' */
+
+static final byte[] ch50data = {
+(byte) 0xff,(byte) 0xff,(byte) 0xc0,(byte) 0xe0,(byte) 0x70,(byte) 0x38,(byte) 0x1c,(byte) 0xe,(byte) 0x7,(byte) 0x3,(byte) 0xc3,(byte) 0xfe,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch50 = new BitmapCharRec(8,13,-1,0,10,ch50data);
+
+/* char: 0x31 '1' */
+
+static final byte[] ch49data = {
+(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0xf8,(byte) 0xf8,(byte) 0x18,
+};
+
+static final BitmapCharRec ch49 = new BitmapCharRec(5,13,-2,0,10,ch49data);
+
+/* char: 0x30 '0' */
+
+static final byte[] ch48data = {
+(byte) 0x3c,(byte) 0x7e,(byte) 0x66,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0x66,(byte) 0x7e,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch48 = new BitmapCharRec(8,13,-1,0,10,ch48data);
+
+/* char: 0x2f '/' */
+
+static final byte[] ch47data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0x40,(byte) 0x40,(byte) 0x60,(byte) 0x60,(byte) 0x20,(byte) 0x20,(byte) 0x30,(byte) 0x30,(byte) 0x10,(byte) 0x10,(byte) 0x18,(byte) 0x18,
+};
+
+static final BitmapCharRec ch47 = new BitmapCharRec(5,14,0,0,5,ch47data);
+
+/* char: 0x2e '.' */
+
+static final byte[] ch46data = {
+(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch46 = new BitmapCharRec(2,2,-1,0,5,ch46data);
+
+/* char: 0x2d '-' */
+
+static final byte[] ch45data = {
+(byte) 0xff,(byte) 0xff,
+};
+
+static final BitmapCharRec ch45 = new BitmapCharRec(8,2,-1,-4,11,ch45data);
+
+/* char: 0x2c ',' */
+
+static final byte[] ch44data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch44 = new BitmapCharRec(2,5,-1,3,5,ch44data);
+
+/* char: 0x2b '+' */
+
+static final byte[] ch43data = {
+(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0xff,(byte) 0xff,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,
+};
+
+static final BitmapCharRec ch43 = new BitmapCharRec(8,10,-1,0,10,ch43data);
+
+/* char: 0x2a '*' */
+
+static final byte[] ch42data = {
+(byte) 0x88,(byte) 0x70,(byte) 0x70,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch42 = new BitmapCharRec(5,6,-1,-8,7,ch42data);
+
+/* char: 0x29 ')' */
+
+static final byte[] ch41data = {
+(byte) 0x80,(byte) 0xc0,(byte) 0x60,(byte) 0x60,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x60,(byte) 0x60,
+(byte) 0xc0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch41 = new BitmapCharRec(4,18,-1,4,6,ch41data);
+
+/* char: 0x28 '(' */
+
+static final byte[] ch40data = {
+(byte) 0x10,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0x60,
+(byte) 0x30,(byte) 0x10,
+};
+
+static final BitmapCharRec ch40 = new BitmapCharRec(4,18,-1,4,6,ch40data);
+
+/* char: 0x27 ''' */
+
+static final byte[] ch39data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch39 = new BitmapCharRec(2,5,-1,-9,4,ch39data);
+
+/* char: 0x26 '&' */
+
+static final byte[] ch38data = {
+(byte) 0x3c,(byte) 0x70,(byte) 0x7e,(byte) 0xe0,(byte) 0xe7,(byte) 0xc0,(byte) 0xc3,(byte) 0x80,(byte) 0xc3,(byte) 0xc0,(byte) 0xc6,(byte) 0xc0,(byte) 0xee,(byte) 0xc0,(byte) 0x7c,(byte) 0x0,
+(byte) 0x3c,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0x7e,(byte) 0x0,(byte) 0x3c,(byte) 0x0,
+};
+
+static final BitmapCharRec ch38 = new BitmapCharRec(12,13,-1,0,13,ch38data);
+
+/* char: 0x25 '%' */
+
+static final byte[] ch37data = {
+(byte) 0x18,(byte) 0x78,(byte) 0x18,(byte) 0xfc,(byte) 0xc,(byte) 0xcc,(byte) 0xc,(byte) 0xcc,(byte) 0x6,(byte) 0xfc,(byte) 0x6,(byte) 0x78,(byte) 0x3,(byte) 0x0,(byte) 0x7b,(byte) 0x0,
+(byte) 0xfd,(byte) 0x80,(byte) 0xcd,(byte) 0x80,(byte) 0xcc,(byte) 0xc0,(byte) 0xfc,(byte) 0xc0,(byte) 0x78,(byte) 0x60,
+};
+
+static final BitmapCharRec ch37 = new BitmapCharRec(14,13,-1,0,16,ch37data);
+
+/* char: 0x24 '$' */
+
+static final byte[] ch36data = {
+(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0xeb,(byte) 0x80,(byte) 0xc9,(byte) 0x80,(byte) 0x9,(byte) 0x80,(byte) 0xf,(byte) 0x0,
+(byte) 0x3e,(byte) 0x0,(byte) 0x78,(byte) 0x0,(byte) 0xe8,(byte) 0x0,(byte) 0xc8,(byte) 0x0,(byte) 0xcb,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x8,(byte) 0x0,
+};
+
+static final BitmapCharRec ch36 = new BitmapCharRec(9,16,-1,2,10,ch36data);
+
+/* char: 0x23 '#' */
+
+static final byte[] ch35data = {
+(byte) 0x24,(byte) 0x0,(byte) 0x24,(byte) 0x0,(byte) 0x24,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0x12,(byte) 0x0,(byte) 0x12,(byte) 0x0,(byte) 0x12,(byte) 0x0,
+(byte) 0x7f,(byte) 0xc0,(byte) 0x7f,(byte) 0xc0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,
+};
+
+static final BitmapCharRec ch35 = new BitmapCharRec(10,13,0,0,10,ch35data);
+
+/* char: 0x22 '"' */
+
+static final byte[] ch34data = {
+(byte) 0x90,(byte) 0x90,(byte) 0xd8,(byte) 0xd8,(byte) 0xd8,
+};
+
+static final BitmapCharRec ch34 = new BitmapCharRec(5,5,0,-9,5,ch34data);
+
+/* char: 0x21 '!' */
+
+static final byte[] ch33data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch33 = new BitmapCharRec(2,14,-2,0,6,ch33data);
+
+/* char: 0x20 ' ' */
+
+static final BitmapCharRec ch32 = new BitmapCharRec(0,0,0,0,5,null);
+
+static final BitmapCharRec[] chars = {
+ch32,
+ch33,
+ch34,
+ch35,
+ch36,
+ch37,
+ch38,
+ch39,
+ch40,
+ch41,
+ch42,
+ch43,
+ch44,
+ch45,
+ch46,
+ch47,
+ch48,
+ch49,
+ch50,
+ch51,
+ch52,
+ch53,
+ch54,
+ch55,
+ch56,
+ch57,
+ch58,
+ch59,
+ch60,
+ch61,
+ch62,
+ch63,
+ch64,
+ch65,
+ch66,
+ch67,
+ch68,
+ch69,
+ch70,
+ch71,
+ch72,
+ch73,
+ch74,
+ch75,
+ch76,
+ch77,
+ch78,
+ch79,
+ch80,
+ch81,
+ch82,
+ch83,
+ch84,
+ch85,
+ch86,
+ch87,
+ch88,
+ch89,
+ch90,
+ch91,
+ch92,
+ch93,
+ch94,
+ch95,
+ch96,
+ch97,
+ch98,
+ch99,
+ch100,
+ch101,
+ch102,
+ch103,
+ch104,
+ch105,
+ch106,
+ch107,
+ch108,
+ch109,
+ch110,
+ch111,
+ch112,
+ch113,
+ch114,
+ch115,
+ch116,
+ch117,
+ch118,
+ch119,
+ch120,
+ch121,
+ch122,
+ch123,
+ch124,
+ch125,
+ch126,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+ch160,
+ch161,
+ch162,
+ch163,
+ch164,
+ch165,
+ch166,
+ch167,
+ch168,
+ch169,
+ch170,
+ch171,
+ch172,
+ch173,
+ch174,
+ch175,
+ch176,
+ch177,
+ch178,
+ch179,
+ch180,
+ch181,
+ch182,
+ch183,
+ch184,
+ch185,
+ch186,
+ch187,
+ch188,
+ch189,
+ch190,
+ch191,
+ch192,
+ch193,
+ch194,
+ch195,
+ch196,
+ch197,
+ch198,
+ch199,
+ch200,
+ch201,
+ch202,
+ch203,
+ch204,
+ch205,
+ch206,
+ch207,
+ch208,
+ch209,
+ch210,
+ch211,
+ch212,
+ch213,
+ch214,
+ch215,
+ch216,
+ch217,
+ch218,
+ch219,
+ch220,
+ch221,
+ch222,
+ch223,
+ch224,
+ch225,
+ch226,
+ch227,
+ch228,
+ch229,
+ch230,
+ch231,
+ch232,
+ch233,
+ch234,
+ch235,
+ch236,
+ch237,
+ch238,
+ch239,
+ch240,
+ch241,
+ch242,
+ch243,
+ch244,
+ch245,
+ch246,
+ch247,
+ch248,
+ch249,
+ch250,
+ch251,
+ch252,
+ch253,
+ch254,
+ch255,
+};
+
+ public static final BitmapFontRec glutBitmapHelvetica18 = new BitmapFontRec("-adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1",
+ 224,
+ 32,
+ chars);
+}
diff --git a/src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmapTimesRoman10.java b/src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmapTimesRoman10.java
new file mode 100644
index 000000000..c220e6eb2
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmapTimesRoman10.java
@@ -0,0 +1,1799 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.glut.fonts;
+
+import com.sun.opengl.util.glut.rec.*;
+
+public class GLUTBitmapTimesRoman10 {
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+/* char: 0xff */
+
+static final byte[] ch255data = {
+(byte) 0x80,(byte) 0xc0,(byte) 0x40,(byte) 0x60,(byte) 0xa0,(byte) 0x90,(byte) 0xb8,(byte) 0x0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch255 = new BitmapCharRec(5,9,0,2,5,ch255data);
+
+/* char: 0xfe */
+
+static final byte[] ch254data = {
+(byte) 0xc0,(byte) 0x80,(byte) 0xe0,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch254 = new BitmapCharRec(4,9,0,2,5,ch254data);
+
+/* char: 0xfd */
+
+static final byte[] ch253data = {
+(byte) 0x80,(byte) 0xc0,(byte) 0x40,(byte) 0x60,(byte) 0xa0,(byte) 0x90,(byte) 0xb8,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch253 = new BitmapCharRec(5,10,0,2,5,ch253data);
+
+/* char: 0xfc */
+
+static final byte[] ch252data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch252 = new BitmapCharRec(5,7,0,0,5,ch252data);
+
+/* char: 0xfb */
+
+static final byte[] ch251data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch251 = new BitmapCharRec(5,8,0,0,5,ch251data);
+
+/* char: 0xfa */
+
+static final byte[] ch250data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch250 = new BitmapCharRec(5,8,0,0,5,ch250data);
+
+/* char: 0xf9 */
+
+static final byte[] ch249data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch249 = new BitmapCharRec(5,8,0,0,5,ch249data);
+
+/* char: 0xf8 */
+
+static final byte[] ch248data = {
+(byte) 0x80,(byte) 0x70,(byte) 0x48,(byte) 0x48,(byte) 0x48,(byte) 0x38,(byte) 0x4,
+};
+
+static final BitmapCharRec ch248 = new BitmapCharRec(6,7,1,1,5,ch248data);
+
+/* char: 0xf7 */
+
+static final byte[] ch247data = {
+(byte) 0x20,(byte) 0x0,(byte) 0xf8,(byte) 0x0,(byte) 0x20,
+};
+
+static final BitmapCharRec ch247 = new BitmapCharRec(5,5,0,0,6,ch247data);
+
+/* char: 0xf6 */
+
+static final byte[] ch246data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch246 = new BitmapCharRec(4,7,0,0,5,ch246data);
+
+/* char: 0xf5 */
+
+static final byte[] ch245data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0xa0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch245 = new BitmapCharRec(4,8,0,0,5,ch245data);
+
+/* char: 0xf4 */
+
+static final byte[] ch244data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch244 = new BitmapCharRec(4,8,0,0,5,ch244data);
+
+/* char: 0xf3 */
+
+static final byte[] ch243data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch243 = new BitmapCharRec(4,8,0,0,5,ch243data);
+
+/* char: 0xf2 */
+
+static final byte[] ch242data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch242 = new BitmapCharRec(4,8,0,0,5,ch242data);
+
+/* char: 0xf1 */
+
+static final byte[] ch241data = {
+(byte) 0xd8,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,(byte) 0x0,(byte) 0xa0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch241 = new BitmapCharRec(5,8,0,0,5,ch241data);
+
+/* char: 0xf0 */
+
+static final byte[] ch240data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0xa0,(byte) 0x70,(byte) 0x40,
+};
+
+static final BitmapCharRec ch240 = new BitmapCharRec(4,8,0,0,5,ch240data);
+
+/* char: 0xef */
+
+static final byte[] ch239data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch239 = new BitmapCharRec(3,7,0,0,4,ch239data);
+
+/* char: 0xee */
+
+static final byte[] ch238data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch238 = new BitmapCharRec(3,8,0,0,4,ch238data);
+
+/* char: 0xed */
+
+static final byte[] ch237data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x0,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch237 = new BitmapCharRec(3,8,0,0,4,ch237data);
+
+/* char: 0xec */
+
+static final byte[] ch236data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x0,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch236 = new BitmapCharRec(3,8,0,0,4,ch236data);
+
+/* char: 0xeb */
+
+static final byte[] ch235data = {
+(byte) 0x60,(byte) 0x80,(byte) 0xc0,(byte) 0xa0,(byte) 0x60,(byte) 0x0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch235 = new BitmapCharRec(3,7,0,0,4,ch235data);
+
+/* char: 0xea */
+
+static final byte[] ch234data = {
+(byte) 0x60,(byte) 0x80,(byte) 0xc0,(byte) 0xa0,(byte) 0x60,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch234 = new BitmapCharRec(3,8,0,0,4,ch234data);
+
+/* char: 0xe9 */
+
+static final byte[] ch233data = {
+(byte) 0x60,(byte) 0x80,(byte) 0xc0,(byte) 0xa0,(byte) 0x60,(byte) 0x0,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch233 = new BitmapCharRec(3,8,0,0,4,ch233data);
+
+/* char: 0xe8 */
+
+static final byte[] ch232data = {
+(byte) 0x60,(byte) 0x80,(byte) 0xc0,(byte) 0xa0,(byte) 0x60,(byte) 0x0,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch232 = new BitmapCharRec(3,8,0,0,4,ch232data);
+
+/* char: 0xe7 */
+
+static final byte[] ch231data = {
+(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0x60,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x60,
+};
+
+static final BitmapCharRec ch231 = new BitmapCharRec(3,8,0,3,4,ch231data);
+
+/* char: 0xe6 */
+
+static final byte[] ch230data = {
+(byte) 0xd8,(byte) 0xa0,(byte) 0x70,(byte) 0x28,(byte) 0xd8,
+};
+
+static final BitmapCharRec ch230 = new BitmapCharRec(5,5,0,0,6,ch230data);
+
+/* char: 0xe5 */
+
+static final byte[] ch229data = {
+(byte) 0xe0,(byte) 0xa0,(byte) 0x60,(byte) 0x20,(byte) 0xc0,(byte) 0x40,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch229 = new BitmapCharRec(3,8,0,0,4,ch229data);
+
+/* char: 0xe4 */
+
+static final byte[] ch228data = {
+(byte) 0xe0,(byte) 0xa0,(byte) 0x60,(byte) 0x20,(byte) 0xc0,(byte) 0x0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch228 = new BitmapCharRec(3,7,0,0,4,ch228data);
+
+/* char: 0xe3 */
+
+static final byte[] ch227data = {
+(byte) 0xe0,(byte) 0xa0,(byte) 0x60,(byte) 0x20,(byte) 0xc0,(byte) 0x0,(byte) 0xa0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch227 = new BitmapCharRec(4,8,0,0,4,ch227data);
+
+/* char: 0xe2 */
+
+static final byte[] ch226data = {
+(byte) 0xe0,(byte) 0xa0,(byte) 0x60,(byte) 0x20,(byte) 0xc0,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch226 = new BitmapCharRec(3,8,0,0,4,ch226data);
+
+/* char: 0xe1 */
+
+static final byte[] ch225data = {
+(byte) 0xe0,(byte) 0xa0,(byte) 0x60,(byte) 0x20,(byte) 0xc0,(byte) 0x0,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch225 = new BitmapCharRec(3,8,0,0,4,ch225data);
+
+/* char: 0xe0 */
+
+static final byte[] ch224data = {
+(byte) 0xe0,(byte) 0xa0,(byte) 0x60,(byte) 0x20,(byte) 0xc0,(byte) 0x0,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch224 = new BitmapCharRec(3,8,0,0,4,ch224data);
+
+/* char: 0xdf */
+
+static final byte[] ch223data = {
+(byte) 0xe0,(byte) 0x50,(byte) 0x50,(byte) 0x60,(byte) 0x50,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch223 = new BitmapCharRec(4,7,0,0,5,ch223data);
+
+/* char: 0xde */
+
+static final byte[] ch222data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x70,(byte) 0x48,(byte) 0x70,(byte) 0x40,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch222 = new BitmapCharRec(5,7,0,0,6,ch222data);
+
+/* char: 0xdd */
+
+static final byte[] ch221data = {
+(byte) 0x38,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0xee,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch221 = new BitmapCharRec(7,10,0,0,8,ch221data);
+
+/* char: 0xdc */
+
+static final byte[] ch220data = {
+(byte) 0x38,(byte) 0x6c,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0xee,(byte) 0x0,(byte) 0x28,
+};
+
+static final BitmapCharRec ch220 = new BitmapCharRec(7,9,0,0,8,ch220data);
+
+/* char: 0xdb */
+
+static final byte[] ch219data = {
+(byte) 0x38,(byte) 0x6c,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0xee,(byte) 0x0,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch219 = new BitmapCharRec(7,10,0,0,8,ch219data);
+
+/* char: 0xda */
+
+static final byte[] ch218data = {
+(byte) 0x38,(byte) 0x6c,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0xee,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch218 = new BitmapCharRec(7,10,0,0,8,ch218data);
+
+/* char: 0xd9 */
+
+static final byte[] ch217data = {
+(byte) 0x38,(byte) 0x6c,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0xee,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch217 = new BitmapCharRec(7,10,0,0,8,ch217data);
+
+/* char: 0xd8 */
+
+static final byte[] ch216data = {
+(byte) 0x80,(byte) 0x7c,(byte) 0x66,(byte) 0x52,(byte) 0x52,(byte) 0x4a,(byte) 0x66,(byte) 0x3e,(byte) 0x1,
+};
+
+static final BitmapCharRec ch216 = new BitmapCharRec(8,9,0,1,8,ch216data);
+
+/* char: 0xd7 */
+
+static final byte[] ch215data = {
+(byte) 0x88,(byte) 0x50,(byte) 0x20,(byte) 0x50,(byte) 0x88,
+};
+
+static final BitmapCharRec ch215 = new BitmapCharRec(5,5,0,0,6,ch215data);
+
+/* char: 0xd6 */
+
+static final byte[] ch214data = {
+(byte) 0x78,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xcc,(byte) 0x78,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch214 = new BitmapCharRec(6,9,0,0,7,ch214data);
+
+/* char: 0xd5 */
+
+static final byte[] ch213data = {
+(byte) 0x78,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xcc,(byte) 0x78,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch213 = new BitmapCharRec(6,10,0,0,7,ch213data);
+
+/* char: 0xd4 */
+
+static final byte[] ch212data = {
+(byte) 0x78,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xcc,(byte) 0x78,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch212 = new BitmapCharRec(6,10,0,0,7,ch212data);
+
+/* char: 0xd3 */
+
+static final byte[] ch211data = {
+(byte) 0x78,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xcc,(byte) 0x78,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch211 = new BitmapCharRec(6,10,0,0,7,ch211data);
+
+/* char: 0xd2 */
+
+static final byte[] ch210data = {
+(byte) 0x78,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xcc,(byte) 0x78,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch210 = new BitmapCharRec(6,10,0,0,7,ch210data);
+
+/* char: 0xd1 */
+
+static final byte[] ch209data = {
+(byte) 0xe4,(byte) 0x4c,(byte) 0x4c,(byte) 0x54,(byte) 0x54,(byte) 0x64,(byte) 0xee,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch209 = new BitmapCharRec(7,10,0,0,8,ch209data);
+
+/* char: 0xd0 */
+
+static final byte[] ch208data = {
+(byte) 0xf8,(byte) 0x4c,(byte) 0x44,(byte) 0xe4,(byte) 0x44,(byte) 0x4c,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch208 = new BitmapCharRec(6,7,0,0,7,ch208data);
+
+/* char: 0xcf */
+
+static final byte[] ch207data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch207 = new BitmapCharRec(3,9,0,0,4,ch207data);
+
+/* char: 0xce */
+
+static final byte[] ch206data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch206 = new BitmapCharRec(3,10,0,0,4,ch206data);
+
+/* char: 0xcd */
+
+static final byte[] ch205data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x0,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch205 = new BitmapCharRec(3,10,0,0,4,ch205data);
+
+/* char: 0xcc */
+
+static final byte[] ch204data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x0,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch204 = new BitmapCharRec(3,10,0,0,4,ch204data);
+
+/* char: 0xcb */
+
+static final byte[] ch203data = {
+(byte) 0xf8,(byte) 0x48,(byte) 0x40,(byte) 0x70,(byte) 0x40,(byte) 0x48,(byte) 0xf8,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch203 = new BitmapCharRec(5,9,0,0,6,ch203data);
+
+/* char: 0xca */
+
+static final byte[] ch202data = {
+(byte) 0xf8,(byte) 0x48,(byte) 0x40,(byte) 0x70,(byte) 0x40,(byte) 0x48,(byte) 0xf8,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch202 = new BitmapCharRec(5,10,0,0,6,ch202data);
+
+/* char: 0xc9 */
+
+static final byte[] ch201data = {
+(byte) 0xf8,(byte) 0x48,(byte) 0x40,(byte) 0x70,(byte) 0x40,(byte) 0x48,(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch201 = new BitmapCharRec(5,10,0,0,6,ch201data);
+
+/* char: 0xc8 */
+
+static final byte[] ch200data = {
+(byte) 0xf8,(byte) 0x48,(byte) 0x40,(byte) 0x70,(byte) 0x40,(byte) 0x48,(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch200 = new BitmapCharRec(5,10,0,0,6,ch200data);
+
+/* char: 0xc7 */
+
+static final byte[] ch199data = {
+(byte) 0x60,(byte) 0x10,(byte) 0x20,(byte) 0x78,(byte) 0xc4,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xc4,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch199 = new BitmapCharRec(6,10,0,3,7,ch199data);
+
+/* char: 0xc6 */
+
+static final byte[] ch198data = {
+(byte) 0xef,(byte) 0x49,(byte) 0x78,(byte) 0x2e,(byte) 0x28,(byte) 0x39,(byte) 0x1f,
+};
+
+static final BitmapCharRec ch198 = new BitmapCharRec(8,7,0,0,9,ch198data);
+
+/* char: 0xc5 */
+
+static final byte[] ch197data = {
+(byte) 0xee,(byte) 0x44,(byte) 0x7c,(byte) 0x28,(byte) 0x28,(byte) 0x38,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch197 = new BitmapCharRec(7,10,0,0,8,ch197data);
+
+/* char: 0xc4 */
+
+static final byte[] ch196data = {
+(byte) 0xee,(byte) 0x44,(byte) 0x7c,(byte) 0x28,(byte) 0x28,(byte) 0x38,(byte) 0x10,(byte) 0x0,(byte) 0x28,
+};
+
+static final BitmapCharRec ch196 = new BitmapCharRec(7,9,0,0,8,ch196data);
+
+/* char: 0xc3 */
+
+static final byte[] ch195data = {
+(byte) 0xee,(byte) 0x44,(byte) 0x7c,(byte) 0x28,(byte) 0x28,(byte) 0x38,(byte) 0x10,(byte) 0x0,(byte) 0x28,(byte) 0x14,
+};
+
+static final BitmapCharRec ch195 = new BitmapCharRec(7,10,0,0,8,ch195data);
+
+/* char: 0xc2 */
+
+static final byte[] ch194data = {
+(byte) 0xee,(byte) 0x44,(byte) 0x7c,(byte) 0x28,(byte) 0x28,(byte) 0x38,(byte) 0x10,(byte) 0x0,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch194 = new BitmapCharRec(7,10,0,0,8,ch194data);
+
+/* char: 0xc1 */
+
+static final byte[] ch193data = {
+(byte) 0xee,(byte) 0x44,(byte) 0x7c,(byte) 0x28,(byte) 0x28,(byte) 0x38,(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch193 = new BitmapCharRec(7,10,0,0,8,ch193data);
+
+/* char: 0xc0 */
+
+static final byte[] ch192data = {
+(byte) 0xee,(byte) 0x44,(byte) 0x7c,(byte) 0x28,(byte) 0x28,(byte) 0x38,(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch192 = new BitmapCharRec(7,10,0,0,8,ch192data);
+
+/* char: 0xbf */
+
+static final byte[] ch191data = {
+(byte) 0xe0,(byte) 0xa0,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch191 = new BitmapCharRec(3,7,0,2,4,ch191data);
+
+/* char: 0xbe */
+
+static final byte[] ch190data = {
+(byte) 0x44,(byte) 0x3e,(byte) 0x2c,(byte) 0xd4,(byte) 0x28,(byte) 0x48,(byte) 0xe4,
+};
+
+static final BitmapCharRec ch190 = new BitmapCharRec(7,7,0,0,8,ch190data);
+
+/* char: 0xbd */
+
+static final byte[] ch189data = {
+(byte) 0x4e,(byte) 0x24,(byte) 0x2a,(byte) 0xf6,(byte) 0x48,(byte) 0xc8,(byte) 0x44,
+};
+
+static final BitmapCharRec ch189 = new BitmapCharRec(7,7,0,0,8,ch189data);
+
+/* char: 0xbc */
+
+static final byte[] ch188data = {
+(byte) 0x44,(byte) 0x3e,(byte) 0x2c,(byte) 0xf4,(byte) 0x48,(byte) 0xc8,(byte) 0x44,
+};
+
+static final BitmapCharRec ch188 = new BitmapCharRec(7,7,0,0,8,ch188data);
+
+/* char: 0xbb */
+
+static final byte[] ch187data = {
+(byte) 0xa0,(byte) 0x50,(byte) 0x50,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch187 = new BitmapCharRec(4,4,0,-1,5,ch187data);
+
+/* char: 0xba */
+
+static final byte[] ch186data = {
+(byte) 0xe0,(byte) 0x0,(byte) 0x40,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch186 = new BitmapCharRec(3,5,0,-2,4,ch186data);
+
+/* char: 0xb9 */
+
+static final byte[] ch185data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch185 = new BitmapCharRec(3,4,0,-3,3,ch185data);
+
+/* char: 0xb8 */
+
+static final byte[] ch184data = {
+(byte) 0xc0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch184 = new BitmapCharRec(3,3,0,3,4,ch184data);
+
+/* char: 0xb7 */
+
+static final byte[] ch183data = {
+(byte) 0x80,
+};
+
+static final BitmapCharRec ch183 = new BitmapCharRec(1,1,0,-2,2,ch183data);
+
+/* char: 0xb6 */
+
+static final byte[] ch182data = {
+(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x68,(byte) 0xe8,(byte) 0xe8,(byte) 0xe8,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch182 = new BitmapCharRec(6,9,0,2,6,ch182data);
+
+/* char: 0xb5 */
+
+static final byte[] ch181data = {
+(byte) 0x80,(byte) 0x80,(byte) 0xe8,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,
+};
+
+static final BitmapCharRec ch181 = new BitmapCharRec(5,7,0,2,5,ch181data);
+
+/* char: 0xb4 */
+
+static final byte[] ch180data = {
+(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch180 = new BitmapCharRec(2,2,0,-5,3,ch180data);
+
+/* char: 0xb3 */
+
+static final byte[] ch179data = {
+(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch179 = new BitmapCharRec(3,4,0,-3,3,ch179data);
+
+/* char: 0xb2 */
+
+static final byte[] ch178data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0xa0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch178 = new BitmapCharRec(3,4,0,-3,3,ch178data);
+
+/* char: 0xb1 */
+
+static final byte[] ch177data = {
+(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch177 = new BitmapCharRec(5,7,0,0,6,ch177data);
+
+/* char: 0xb0 */
+
+static final byte[] ch176data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch176 = new BitmapCharRec(4,4,0,-3,4,ch176data);
+
+/* char: 0xaf */
+
+static final byte[] ch175data = {
+(byte) 0xe0,
+};
+
+static final BitmapCharRec ch175 = new BitmapCharRec(3,1,0,-6,4,ch175data);
+
+/* char: 0xae */
+
+static final byte[] ch174data = {
+(byte) 0x38,(byte) 0x44,(byte) 0xaa,(byte) 0xb2,(byte) 0xba,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch174 = new BitmapCharRec(7,7,-1,0,9,ch174data);
+
+/* char: 0xad */
+
+static final byte[] ch173data = {
+(byte) 0xe0,
+};
+
+static final BitmapCharRec ch173 = new BitmapCharRec(3,1,0,-2,4,ch173data);
+
+/* char: 0xac */
+
+static final byte[] ch172data = {
+(byte) 0x8,(byte) 0x8,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch172 = new BitmapCharRec(5,3,-1,-1,7,ch172data);
+
+/* char: 0xab */
+
+static final byte[] ch171data = {
+(byte) 0x50,(byte) 0xa0,(byte) 0xa0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch171 = new BitmapCharRec(4,4,0,-1,5,ch171data);
+
+/* char: 0xaa */
+
+static final byte[] ch170data = {
+(byte) 0xe0,(byte) 0x0,(byte) 0xa0,(byte) 0x20,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch170 = new BitmapCharRec(3,5,0,-2,4,ch170data);
+
+/* char: 0xa9 */
+
+static final byte[] ch169data = {
+(byte) 0x38,(byte) 0x44,(byte) 0x9a,(byte) 0xa2,(byte) 0x9a,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch169 = new BitmapCharRec(7,7,-1,0,9,ch169data);
+
+/* char: 0xa8 */
+
+static final byte[] ch168data = {
+(byte) 0xa0,
+};
+
+static final BitmapCharRec ch168 = new BitmapCharRec(3,1,-1,-6,5,ch168data);
+
+/* char: 0xa7 */
+
+static final byte[] ch167data = {
+(byte) 0xe0,(byte) 0x90,(byte) 0x20,(byte) 0x50,(byte) 0x90,(byte) 0xa0,(byte) 0x40,(byte) 0x90,(byte) 0x70,
+};
+
+static final BitmapCharRec ch167 = new BitmapCharRec(4,9,0,1,5,ch167data);
+
+/* char: 0xa6 */
+
+static final byte[] ch166data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch166 = new BitmapCharRec(1,7,0,0,2,ch166data);
+
+/* char: 0xa5 */
+
+static final byte[] ch165data = {
+(byte) 0x70,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0xd8,(byte) 0x50,(byte) 0x88,
+};
+
+static final BitmapCharRec ch165 = new BitmapCharRec(5,7,0,0,5,ch165data);
+
+/* char: 0xa4 */
+
+static final byte[] ch164data = {
+(byte) 0x88,(byte) 0x70,(byte) 0x50,(byte) 0x50,(byte) 0x70,(byte) 0x88,
+};
+
+static final BitmapCharRec ch164 = new BitmapCharRec(5,6,0,-1,5,ch164data);
+
+/* char: 0xa3 */
+
+static final byte[] ch163data = {
+(byte) 0xf0,(byte) 0xc8,(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x50,(byte) 0x30,
+};
+
+static final BitmapCharRec ch163 = new BitmapCharRec(5,7,0,0,5,ch163data);
+
+/* char: 0xa2 */
+
+static final byte[] ch162data = {
+(byte) 0x80,(byte) 0xe0,(byte) 0x90,(byte) 0x80,(byte) 0x90,(byte) 0x70,(byte) 0x10,
+};
+
+static final BitmapCharRec ch162 = new BitmapCharRec(4,7,0,1,5,ch162data);
+
+/* char: 0xa1 */
+
+static final byte[] ch161data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch161 = new BitmapCharRec(1,7,-1,2,3,ch161data);
+
+/* char: 0xa0 */
+
+static final BitmapCharRec ch160 = new BitmapCharRec(0,0,0,0,2,null);
+
+/* char: 0x7e '~' */
+
+static final byte[] ch126data = {
+(byte) 0x98,(byte) 0x64,
+};
+
+static final BitmapCharRec ch126 = new BitmapCharRec(6,2,0,-2,7,ch126data);
+
+/* char: 0x7d '}' */
+
+static final byte[] ch125data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch125 = new BitmapCharRec(3,9,0,2,4,ch125data);
+
+/* char: 0x7c '|' */
+
+static final byte[] ch124data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch124 = new BitmapCharRec(1,9,0,2,2,ch124data);
+
+/* char: 0x7b '{' */
+
+static final byte[] ch123data = {
+(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch123 = new BitmapCharRec(3,9,0,2,4,ch123data);
+
+/* char: 0x7a 'z' */
+
+static final byte[] ch122data = {
+(byte) 0xf0,(byte) 0x90,(byte) 0x40,(byte) 0x20,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch122 = new BitmapCharRec(4,5,0,0,5,ch122data);
+
+/* char: 0x79 'y' */
+
+static final byte[] ch121data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x30,(byte) 0x50,(byte) 0x48,(byte) 0xdc,
+};
+
+static final BitmapCharRec ch121 = new BitmapCharRec(6,7,1,2,5,ch121data);
+
+/* char: 0x78 'x' */
+
+static final byte[] ch120data = {
+(byte) 0xd8,(byte) 0x50,(byte) 0x20,(byte) 0x50,(byte) 0xd8,
+};
+
+static final BitmapCharRec ch120 = new BitmapCharRec(5,5,0,0,6,ch120data);
+
+/* char: 0x77 'w' */
+
+static final byte[] ch119data = {
+(byte) 0x28,(byte) 0x6c,(byte) 0x54,(byte) 0x92,(byte) 0xdb,
+};
+
+static final BitmapCharRec ch119 = new BitmapCharRec(8,5,0,0,8,ch119data);
+
+/* char: 0x76 'v' */
+
+static final byte[] ch118data = {
+(byte) 0x20,(byte) 0x60,(byte) 0x50,(byte) 0x90,(byte) 0xd8,
+};
+
+static final BitmapCharRec ch118 = new BitmapCharRec(5,5,0,0,5,ch118data);
+
+/* char: 0x75 'u' */
+
+static final byte[] ch117data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,
+};
+
+static final BitmapCharRec ch117 = new BitmapCharRec(5,5,0,0,5,ch117data);
+
+/* char: 0x74 't' */
+
+static final byte[] ch116data = {
+(byte) 0x30,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch116 = new BitmapCharRec(4,6,0,0,4,ch116data);
+
+/* char: 0x73 's' */
+
+static final byte[] ch115data = {
+(byte) 0xe0,(byte) 0x20,(byte) 0x60,(byte) 0x80,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch115 = new BitmapCharRec(3,5,0,0,4,ch115data);
+
+/* char: 0x72 'r' */
+
+static final byte[] ch114data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x60,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch114 = new BitmapCharRec(3,5,0,0,4,ch114data);
+
+/* char: 0x71 'q' */
+
+static final byte[] ch113data = {
+(byte) 0x38,(byte) 0x10,(byte) 0x70,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x70,
+};
+
+static final BitmapCharRec ch113 = new BitmapCharRec(5,7,0,2,5,ch113data);
+
+/* char: 0x70 'p' */
+
+static final byte[] ch112data = {
+(byte) 0xc0,(byte) 0x80,(byte) 0xe0,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch112 = new BitmapCharRec(4,7,0,2,5,ch112data);
+
+/* char: 0x6f 'o' */
+
+static final byte[] ch111data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch111 = new BitmapCharRec(4,5,0,0,5,ch111data);
+
+/* char: 0x6e 'n' */
+
+static final byte[] ch110data = {
+(byte) 0xd8,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch110 = new BitmapCharRec(5,5,0,0,5,ch110data);
+
+/* char: 0x6d 'm' */
+
+static final byte[] ch109data = {
+(byte) 0xdb,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0xec,
+};
+
+static final BitmapCharRec ch109 = new BitmapCharRec(8,5,0,0,8,ch109data);
+
+/* char: 0x6c 'l' */
+
+static final byte[] ch108data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch108 = new BitmapCharRec(3,7,0,0,4,ch108data);
+
+/* char: 0x6b 'k' */
+
+static final byte[] ch107data = {
+(byte) 0x98,(byte) 0x90,(byte) 0xe0,(byte) 0xa0,(byte) 0x90,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch107 = new BitmapCharRec(5,7,0,0,5,ch107data);
+
+/* char: 0x6a 'j' */
+
+static final byte[] ch106data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch106 = new BitmapCharRec(2,9,0,2,3,ch106data);
+
+/* char: 0x69 'i' */
+
+static final byte[] ch105data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch105 = new BitmapCharRec(2,7,0,0,3,ch105data);
+
+/* char: 0x68 'h' */
+
+static final byte[] ch104data = {
+(byte) 0xd8,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch104 = new BitmapCharRec(5,7,0,0,5,ch104data);
+
+/* char: 0x67 'g' */
+
+static final byte[] ch103data = {
+(byte) 0xe0,(byte) 0x90,(byte) 0x60,(byte) 0x40,(byte) 0xa0,(byte) 0xa0,(byte) 0x70,
+};
+
+static final BitmapCharRec ch103 = new BitmapCharRec(4,7,0,2,5,ch103data);
+
+/* char: 0x66 'f' */
+
+static final byte[] ch102data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x30,
+};
+
+static final BitmapCharRec ch102 = new BitmapCharRec(4,7,0,0,4,ch102data);
+
+/* char: 0x65 'e' */
+
+static final byte[] ch101data = {
+(byte) 0x60,(byte) 0x80,(byte) 0xc0,(byte) 0xa0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch101 = new BitmapCharRec(3,5,0,0,4,ch101data);
+
+/* char: 0x64 'd' */
+
+static final byte[] ch100data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0x30,
+};
+
+static final BitmapCharRec ch100 = new BitmapCharRec(5,7,0,0,5,ch100data);
+
+/* char: 0x63 'c' */
+
+static final byte[] ch99data = {
+(byte) 0x60,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x60,
+};
+
+static final BitmapCharRec ch99 = new BitmapCharRec(3,5,0,0,4,ch99data);
+
+/* char: 0x62 'b' */
+
+static final byte[] ch98data = {
+(byte) 0xe0,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch98 = new BitmapCharRec(4,7,0,0,5,ch98data);
+
+/* char: 0x61 'a' */
+
+static final byte[] ch97data = {
+(byte) 0xe0,(byte) 0xa0,(byte) 0x60,(byte) 0x20,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch97 = new BitmapCharRec(3,5,0,0,4,ch97data);
+
+/* char: 0x60 '`' */
+
+static final byte[] ch96data = {
+(byte) 0xc0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch96 = new BitmapCharRec(2,2,0,-5,3,ch96data);
+
+/* char: 0x5f '_' */
+
+static final byte[] ch95data = {
+(byte) 0xf8,
+};
+
+static final BitmapCharRec ch95 = new BitmapCharRec(5,1,0,3,5,ch95data);
+
+/* char: 0x5e '^' */
+
+static final byte[] ch94data = {
+(byte) 0xa0,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch94 = new BitmapCharRec(3,3,-1,-4,5,ch94data);
+
+/* char: 0x5d ']' */
+
+static final byte[] ch93data = {
+(byte) 0xc0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch93 = new BitmapCharRec(2,9,0,2,3,ch93data);
+
+/* char: 0x5c '\' */
+
+static final byte[] ch92data = {
+(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch92 = new BitmapCharRec(3,7,0,0,3,ch92data);
+
+/* char: 0x5b '[' */
+
+static final byte[] ch91data = {
+(byte) 0xc0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch91 = new BitmapCharRec(2,9,0,2,3,ch91data);
+
+/* char: 0x5a 'Z' */
+
+static final byte[] ch90data = {
+(byte) 0xf8,(byte) 0x88,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x88,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch90 = new BitmapCharRec(5,7,0,0,6,ch90data);
+
+/* char: 0x59 'Y' */
+
+static final byte[] ch89data = {
+(byte) 0x38,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0xee,
+};
+
+static final BitmapCharRec ch89 = new BitmapCharRec(7,7,0,0,8,ch89data);
+
+/* char: 0x58 'X' */
+
+static final byte[] ch88data = {
+(byte) 0xee,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0xee,
+};
+
+static final BitmapCharRec ch88 = new BitmapCharRec(7,7,0,0,8,ch88data);
+
+/* char: 0x57 'W' */
+
+static final byte[] ch87data = {
+(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0xc9,(byte) 0x80,(byte) 0x88,(byte) 0x80,(byte) 0xdd,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch87 = new BitmapCharRec(10,7,0,0,10,ch87data);
+
+/* char: 0x56 'V' */
+
+static final byte[] ch86data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x6c,(byte) 0x44,(byte) 0xee,
+};
+
+static final BitmapCharRec ch86 = new BitmapCharRec(7,7,0,0,8,ch86data);
+
+/* char: 0x55 'U' */
+
+static final byte[] ch85data = {
+(byte) 0x38,(byte) 0x6c,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0xee,
+};
+
+static final BitmapCharRec ch85 = new BitmapCharRec(7,7,0,0,8,ch85data);
+
+/* char: 0x54 'T' */
+
+static final byte[] ch84data = {
+(byte) 0x70,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xa8,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch84 = new BitmapCharRec(5,7,0,0,6,ch84data);
+
+/* char: 0x53 'S' */
+
+static final byte[] ch83data = {
+(byte) 0xe0,(byte) 0x90,(byte) 0x10,(byte) 0x60,(byte) 0xc0,(byte) 0x90,(byte) 0x70,
+};
+
+static final BitmapCharRec ch83 = new BitmapCharRec(4,7,0,0,5,ch83data);
+
+/* char: 0x52 'R' */
+
+static final byte[] ch82data = {
+(byte) 0xec,(byte) 0x48,(byte) 0x50,(byte) 0x70,(byte) 0x48,(byte) 0x48,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch82 = new BitmapCharRec(6,7,0,0,7,ch82data);
+
+/* char: 0x51 'Q' */
+
+static final byte[] ch81data = {
+(byte) 0xc,(byte) 0x18,(byte) 0x70,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xcc,(byte) 0x78,
+};
+
+static final BitmapCharRec ch81 = new BitmapCharRec(6,9,0,2,7,ch81data);
+
+/* char: 0x50 'P' */
+
+static final byte[] ch80data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x70,(byte) 0x48,(byte) 0x48,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch80 = new BitmapCharRec(5,7,0,0,6,ch80data);
+
+/* char: 0x4f 'O' */
+
+static final byte[] ch79data = {
+(byte) 0x78,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xcc,(byte) 0x78,
+};
+
+static final BitmapCharRec ch79 = new BitmapCharRec(6,7,0,0,7,ch79data);
+
+/* char: 0x4e 'N' */
+
+static final byte[] ch78data = {
+(byte) 0xe4,(byte) 0x4c,(byte) 0x4c,(byte) 0x54,(byte) 0x54,(byte) 0x64,(byte) 0xee,
+};
+
+static final BitmapCharRec ch78 = new BitmapCharRec(7,7,0,0,8,ch78data);
+
+/* char: 0x4d 'M' */
+
+static final byte[] ch77data = {
+(byte) 0xeb,(byte) 0x80,(byte) 0x49,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xe3,(byte) 0x80,
+};
+
+static final BitmapCharRec ch77 = new BitmapCharRec(9,7,0,0,10,ch77data);
+
+/* char: 0x4c 'L' */
+
+static final byte[] ch76data = {
+(byte) 0xf8,(byte) 0x48,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch76 = new BitmapCharRec(5,7,0,0,6,ch76data);
+
+/* char: 0x4b 'K' */
+
+static final byte[] ch75data = {
+(byte) 0xec,(byte) 0x48,(byte) 0x50,(byte) 0x60,(byte) 0x50,(byte) 0x48,(byte) 0xec,
+};
+
+static final BitmapCharRec ch75 = new BitmapCharRec(6,7,0,0,7,ch75data);
+
+/* char: 0x4a 'J' */
+
+static final byte[] ch74data = {
+(byte) 0xc0,(byte) 0xa0,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x70,
+};
+
+static final BitmapCharRec ch74 = new BitmapCharRec(4,7,0,0,4,ch74data);
+
+/* char: 0x49 'I' */
+
+static final byte[] ch73data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch73 = new BitmapCharRec(3,7,0,0,4,ch73data);
+
+/* char: 0x48 'H' */
+
+static final byte[] ch72data = {
+(byte) 0xee,(byte) 0x44,(byte) 0x44,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0xee,
+};
+
+static final BitmapCharRec ch72 = new BitmapCharRec(7,7,0,0,8,ch72data);
+
+/* char: 0x47 'G' */
+
+static final byte[] ch71data = {
+(byte) 0x78,(byte) 0xc4,(byte) 0x84,(byte) 0x9c,(byte) 0x80,(byte) 0xc4,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch71 = new BitmapCharRec(6,7,0,0,7,ch71data);
+
+/* char: 0x46 'F' */
+
+static final byte[] ch70data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x70,(byte) 0x40,(byte) 0x48,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch70 = new BitmapCharRec(5,7,0,0,6,ch70data);
+
+/* char: 0x45 'E' */
+
+static final byte[] ch69data = {
+(byte) 0xf8,(byte) 0x48,(byte) 0x40,(byte) 0x70,(byte) 0x40,(byte) 0x48,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch69 = new BitmapCharRec(5,7,0,0,6,ch69data);
+
+/* char: 0x44 'D' */
+
+static final byte[] ch68data = {
+(byte) 0xf8,(byte) 0x4c,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x4c,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch68 = new BitmapCharRec(6,7,0,0,7,ch68data);
+
+/* char: 0x43 'C' */
+
+static final byte[] ch67data = {
+(byte) 0x78,(byte) 0xc4,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xc4,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch67 = new BitmapCharRec(6,7,0,0,7,ch67data);
+
+/* char: 0x42 'B' */
+
+static final byte[] ch66data = {
+(byte) 0xf0,(byte) 0x48,(byte) 0x48,(byte) 0x70,(byte) 0x48,(byte) 0x48,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch66 = new BitmapCharRec(5,7,0,0,6,ch66data);
+
+/* char: 0x41 'A' */
+
+static final byte[] ch65data = {
+(byte) 0xee,(byte) 0x44,(byte) 0x7c,(byte) 0x28,(byte) 0x28,(byte) 0x38,(byte) 0x10,
+};
+
+static final BitmapCharRec ch65 = new BitmapCharRec(7,7,0,0,8,ch65data);
+
+/* char: 0x40 '@' */
+
+static final byte[] ch64data = {
+(byte) 0x3e,(byte) 0x40,(byte) 0x92,(byte) 0xad,(byte) 0xa5,(byte) 0xa5,(byte) 0x9d,(byte) 0x42,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch64 = new BitmapCharRec(8,9,0,2,9,ch64data);
+
+/* char: 0x3f '?' */
+
+static final byte[] ch63data = {
+(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0xa0,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch63 = new BitmapCharRec(3,7,0,0,4,ch63data);
+
+/* char: 0x3e '>' */
+
+static final byte[] ch62data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch62 = new BitmapCharRec(3,5,0,0,5,ch62data);
+
+/* char: 0x3d '=' */
+
+static final byte[] ch61data = {
+(byte) 0xf8,(byte) 0x0,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch61 = new BitmapCharRec(5,3,0,-1,6,ch61data);
+
+/* char: 0x3c '<' */
+
+static final byte[] ch60data = {
+(byte) 0x20,(byte) 0x40,(byte) 0x80,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch60 = new BitmapCharRec(3,5,-1,0,5,ch60data);
+
+/* char: 0x3b ';' */
+
+static final byte[] ch59data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch59 = new BitmapCharRec(1,7,-1,2,3,ch59data);
+
+/* char: 0x3a ':' */
+
+static final byte[] ch58data = {
+(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch58 = new BitmapCharRec(1,5,-1,0,3,ch58data);
+
+/* char: 0x39 '9' */
+
+static final byte[] ch57data = {
+(byte) 0xc0,(byte) 0x20,(byte) 0x70,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch57 = new BitmapCharRec(4,7,0,0,5,ch57data);
+
+/* char: 0x38 '8' */
+
+static final byte[] ch56data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch56 = new BitmapCharRec(4,7,0,0,5,ch56data);
+
+/* char: 0x37 '7' */
+
+static final byte[] ch55data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x90,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch55 = new BitmapCharRec(4,7,0,0,5,ch55data);
+
+/* char: 0x36 '6' */
+
+static final byte[] ch54data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,(byte) 0x40,(byte) 0x30,
+};
+
+static final BitmapCharRec ch54 = new BitmapCharRec(4,7,0,0,5,ch54data);
+
+/* char: 0x35 '5' */
+
+static final byte[] ch53data = {
+(byte) 0xe0,(byte) 0x90,(byte) 0x10,(byte) 0x10,(byte) 0xe0,(byte) 0x40,(byte) 0x70,
+};
+
+static final BitmapCharRec ch53 = new BitmapCharRec(4,7,0,0,5,ch53data);
+
+/* char: 0x34 '4' */
+
+static final byte[] ch52data = {
+(byte) 0x10,(byte) 0x10,(byte) 0xf8,(byte) 0x90,(byte) 0x50,(byte) 0x30,(byte) 0x10,
+};
+
+static final BitmapCharRec ch52 = new BitmapCharRec(5,7,0,0,5,ch52data);
+
+/* char: 0x33 '3' */
+
+static final byte[] ch51data = {
+(byte) 0xe0,(byte) 0x10,(byte) 0x10,(byte) 0x60,(byte) 0x10,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch51 = new BitmapCharRec(4,7,0,0,5,ch51data);
+
+/* char: 0x32 '2' */
+
+static final byte[] ch50data = {
+(byte) 0xf0,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch50 = new BitmapCharRec(4,7,0,0,5,ch50data);
+
+/* char: 0x31 '1' */
+
+static final byte[] ch49data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch49 = new BitmapCharRec(3,7,-1,0,5,ch49data);
+
+/* char: 0x30 '0' */
+
+static final byte[] ch48data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch48 = new BitmapCharRec(4,7,0,0,5,ch48data);
+
+/* char: 0x2f '/' */
+
+static final byte[] ch47data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch47 = new BitmapCharRec(3,7,0,0,3,ch47data);
+
+/* char: 0x2e '.' */
+
+static final byte[] ch46data = {
+(byte) 0x80,
+};
+
+static final BitmapCharRec ch46 = new BitmapCharRec(1,1,-1,0,3,ch46data);
+
+/* char: 0x2d '-' */
+
+static final byte[] ch45data = {
+(byte) 0xf0,
+};
+
+static final BitmapCharRec ch45 = new BitmapCharRec(4,1,-1,-2,7,ch45data);
+
+/* char: 0x2c ',' */
+
+static final byte[] ch44data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch44 = new BitmapCharRec(1,3,-1,2,3,ch44data);
+
+/* char: 0x2b '+' */
+
+static final byte[] ch43data = {
+(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch43 = new BitmapCharRec(5,5,0,0,6,ch43data);
+
+/* char: 0x2a '*' */
+
+static final byte[] ch42data = {
+(byte) 0xa0,(byte) 0x40,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch42 = new BitmapCharRec(3,3,0,-4,5,ch42data);
+
+/* char: 0x29 ')' */
+
+static final byte[] ch41data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch41 = new BitmapCharRec(3,9,0,2,4,ch41data);
+
+/* char: 0x28 '(' */
+
+static final byte[] ch40data = {
+(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch40 = new BitmapCharRec(3,9,0,2,4,ch40data);
+
+/* char: 0x27 ''' */
+
+static final byte[] ch39data = {
+(byte) 0x40,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch39 = new BitmapCharRec(2,2,0,-5,3,ch39data);
+
+/* char: 0x26 '&' */
+
+static final byte[] ch38data = {
+(byte) 0x76,(byte) 0x8d,(byte) 0x98,(byte) 0x74,(byte) 0x6e,(byte) 0x50,(byte) 0x30,
+};
+
+static final BitmapCharRec ch38 = new BitmapCharRec(8,7,0,0,8,ch38data);
+
+/* char: 0x25 '%' */
+
+static final byte[] ch37data = {
+(byte) 0x44,(byte) 0x2a,(byte) 0x2a,(byte) 0x56,(byte) 0xa8,(byte) 0xa4,(byte) 0x7e,
+};
+
+static final BitmapCharRec ch37 = new BitmapCharRec(7,7,0,0,8,ch37data);
+
+/* char: 0x24 '$' */
+
+static final byte[] ch36data = {
+(byte) 0x20,(byte) 0xe0,(byte) 0x90,(byte) 0x10,(byte) 0x60,(byte) 0x80,(byte) 0x90,(byte) 0x70,(byte) 0x20,
+};
+
+static final BitmapCharRec ch36 = new BitmapCharRec(4,9,0,1,5,ch36data);
+
+/* char: 0x23 '#' */
+
+static final byte[] ch35data = {
+(byte) 0x50,(byte) 0x50,(byte) 0xf8,(byte) 0x50,(byte) 0xf8,(byte) 0x50,(byte) 0x50,
+};
+
+static final BitmapCharRec ch35 = new BitmapCharRec(5,7,0,0,5,ch35data);
+
+/* char: 0x22 '"' */
+
+static final byte[] ch34data = {
+(byte) 0xa0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch34 = new BitmapCharRec(3,2,0,-5,4,ch34data);
+
+/* char: 0x21 '!' */
+
+static final byte[] ch33data = {
+(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch33 = new BitmapCharRec(1,7,-1,0,3,ch33data);
+
+/* char: 0x20 ' ' */
+
+static final BitmapCharRec ch32 = new BitmapCharRec(0,0,0,0,2,null);
+
+static final BitmapCharRec[] chars = {
+ch32,
+ch33,
+ch34,
+ch35,
+ch36,
+ch37,
+ch38,
+ch39,
+ch40,
+ch41,
+ch42,
+ch43,
+ch44,
+ch45,
+ch46,
+ch47,
+ch48,
+ch49,
+ch50,
+ch51,
+ch52,
+ch53,
+ch54,
+ch55,
+ch56,
+ch57,
+ch58,
+ch59,
+ch60,
+ch61,
+ch62,
+ch63,
+ch64,
+ch65,
+ch66,
+ch67,
+ch68,
+ch69,
+ch70,
+ch71,
+ch72,
+ch73,
+ch74,
+ch75,
+ch76,
+ch77,
+ch78,
+ch79,
+ch80,
+ch81,
+ch82,
+ch83,
+ch84,
+ch85,
+ch86,
+ch87,
+ch88,
+ch89,
+ch90,
+ch91,
+ch92,
+ch93,
+ch94,
+ch95,
+ch96,
+ch97,
+ch98,
+ch99,
+ch100,
+ch101,
+ch102,
+ch103,
+ch104,
+ch105,
+ch106,
+ch107,
+ch108,
+ch109,
+ch110,
+ch111,
+ch112,
+ch113,
+ch114,
+ch115,
+ch116,
+ch117,
+ch118,
+ch119,
+ch120,
+ch121,
+ch122,
+ch123,
+ch124,
+ch125,
+ch126,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+ch160,
+ch161,
+ch162,
+ch163,
+ch164,
+ch165,
+ch166,
+ch167,
+ch168,
+ch169,
+ch170,
+ch171,
+ch172,
+ch173,
+ch174,
+ch175,
+ch176,
+ch177,
+ch178,
+ch179,
+ch180,
+ch181,
+ch182,
+ch183,
+ch184,
+ch185,
+ch186,
+ch187,
+ch188,
+ch189,
+ch190,
+ch191,
+ch192,
+ch193,
+ch194,
+ch195,
+ch196,
+ch197,
+ch198,
+ch199,
+ch200,
+ch201,
+ch202,
+ch203,
+ch204,
+ch205,
+ch206,
+ch207,
+ch208,
+ch209,
+ch210,
+ch211,
+ch212,
+ch213,
+ch214,
+ch215,
+ch216,
+ch217,
+ch218,
+ch219,
+ch220,
+ch221,
+ch222,
+ch223,
+ch224,
+ch225,
+ch226,
+ch227,
+ch228,
+ch229,
+ch230,
+ch231,
+ch232,
+ch233,
+ch234,
+ch235,
+ch236,
+ch237,
+ch238,
+ch239,
+ch240,
+ch241,
+ch242,
+ch243,
+ch244,
+ch245,
+ch246,
+ch247,
+ch248,
+ch249,
+ch250,
+ch251,
+ch252,
+ch253,
+ch254,
+ch255,
+};
+
+ public static final BitmapFontRec glutBitmapTimesRoman10 = new BitmapFontRec("-adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1",
+ 224,
+ 32,
+ chars);
+}
diff --git a/src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmapTimesRoman24.java b/src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmapTimesRoman24.java
new file mode 100644
index 000000000..58fbc5d72
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/glut/fonts/GLUTBitmapTimesRoman24.java
@@ -0,0 +1,2082 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.glut.fonts;
+
+import com.sun.opengl.util.glut.rec.*;
+
+public class GLUTBitmapTimesRoman24 {
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+/* char: 0xff */
+
+static final byte[] ch255data = {
+(byte) 0xe0,(byte) 0x0,(byte) 0xf0,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0xe,(byte) 0x0,
+(byte) 0x1a,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x31,(byte) 0x0,(byte) 0x30,(byte) 0x80,(byte) 0x30,(byte) 0x80,(byte) 0x60,(byte) 0x80,(byte) 0x60,(byte) 0xc0,
+(byte) 0xf1,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x33,(byte) 0x0,
+};
+
+static final BitmapCharRec ch255 = new BitmapCharRec(11,21,0,5,11,ch255data);
+
+/* char: 0xfe */
+
+static final byte[] ch254data = {
+(byte) 0xf0,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x6e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,
+(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,
+(byte) 0x6e,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0xe0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch254 = new BitmapCharRec(10,22,-1,5,12,ch254data);
+
+/* char: 0xfd */
+
+static final byte[] ch253data = {
+(byte) 0xe0,(byte) 0x0,(byte) 0xf0,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0xe,(byte) 0x0,
+(byte) 0x1a,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x31,(byte) 0x0,(byte) 0x30,(byte) 0x80,(byte) 0x30,(byte) 0x80,(byte) 0x60,(byte) 0x80,(byte) 0x60,(byte) 0xc0,
+(byte) 0xf1,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x3,(byte) 0x80,(byte) 0x1,(byte) 0x80,
+};
+
+static final BitmapCharRec ch253 = new BitmapCharRec(11,22,0,5,11,ch253data);
+
+/* char: 0xfc */
+
+static final byte[] ch252data = {
+(byte) 0x1c,(byte) 0xe0,(byte) 0x3e,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
+(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe1,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x33,(byte) 0x0,
+};
+
+static final BitmapCharRec ch252 = new BitmapCharRec(11,16,-1,0,13,ch252data);
+
+/* char: 0xfb */
+
+static final byte[] ch251data = {
+(byte) 0x1c,(byte) 0xe0,(byte) 0x3e,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
+(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe1,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x21,(byte) 0x0,(byte) 0x12,(byte) 0x0,(byte) 0x1e,(byte) 0x0,
+(byte) 0xc,(byte) 0x0,
+};
+
+static final BitmapCharRec ch251 = new BitmapCharRec(11,17,-1,0,13,ch251data);
+
+/* char: 0xfa */
+
+static final byte[] ch250data = {
+(byte) 0x1c,(byte) 0xe0,(byte) 0x3e,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
+(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe1,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x3,(byte) 0x80,
+(byte) 0x1,(byte) 0x80,
+};
+
+static final BitmapCharRec ch250 = new BitmapCharRec(11,17,-1,0,13,ch250data);
+
+/* char: 0xf9 */
+
+static final byte[] ch249data = {
+(byte) 0x1c,(byte) 0xe0,(byte) 0x3e,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
+(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe1,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x2,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x38,(byte) 0x0,
+(byte) 0x30,(byte) 0x0,
+};
+
+static final BitmapCharRec ch249 = new BitmapCharRec(11,17,-1,0,13,ch249data);
+
+/* char: 0xf8 */
+
+static final byte[] ch248data = {
+(byte) 0xc0,(byte) 0x0,(byte) 0xde,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x71,(byte) 0x80,(byte) 0xd0,(byte) 0xc0,(byte) 0xd8,(byte) 0xc0,(byte) 0xc8,(byte) 0xc0,(byte) 0xcc,(byte) 0xc0,
+(byte) 0xc4,(byte) 0xc0,(byte) 0xc6,(byte) 0xc0,(byte) 0x63,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1e,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch248 = new BitmapCharRec(10,14,-1,1,12,ch248data);
+
+/* char: 0xf7 */
+
+static final byte[] ch247data = {
+(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,
+(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+};
+
+static final BitmapCharRec ch247 = new BitmapCharRec(12,10,-1,-2,14,ch247data);
+
+/* char: 0xf6 */
+
+static final byte[] ch246data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x33,(byte) 0x0,
+};
+
+static final BitmapCharRec ch246 = new BitmapCharRec(10,16,-1,0,12,ch246data);
+
+/* char: 0xf5 */
+
+static final byte[] ch245data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x27,(byte) 0x0,(byte) 0x1c,(byte) 0x80,
+};
+
+static final BitmapCharRec ch245 = new BitmapCharRec(10,16,-1,0,12,ch245data);
+
+/* char: 0xf4 */
+
+static final byte[] ch244data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x21,(byte) 0x0,(byte) 0x12,(byte) 0x0,(byte) 0x1e,(byte) 0x0,
+(byte) 0xc,(byte) 0x0,
+};
+
+static final BitmapCharRec ch244 = new BitmapCharRec(10,17,-1,0,12,ch244data);
+
+/* char: 0xf3 */
+
+static final byte[] ch243data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x3,(byte) 0x80,
+(byte) 0x1,(byte) 0x80,
+};
+
+static final BitmapCharRec ch243 = new BitmapCharRec(10,17,-1,0,12,ch243data);
+
+/* char: 0xf2 */
+
+static final byte[] ch242data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x2,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x38,(byte) 0x0,
+(byte) 0x30,(byte) 0x0,
+};
+
+static final BitmapCharRec ch242 = new BitmapCharRec(10,17,-1,0,12,ch242data);
+
+/* char: 0xf1 */
+
+static final byte[] ch241data = {
+(byte) 0xf1,(byte) 0xe0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
+(byte) 0x60,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x6f,(byte) 0x80,(byte) 0xe7,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x27,(byte) 0x0,(byte) 0x1c,(byte) 0x80,
+};
+
+static final BitmapCharRec ch241 = new BitmapCharRec(11,16,-1,0,13,ch241data);
+
+/* char: 0xf0 */
+
+static final byte[] ch240data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1f,(byte) 0x0,(byte) 0xc6,(byte) 0x0,(byte) 0x3c,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x71,(byte) 0x80,
+(byte) 0xc0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch240 = new BitmapCharRec(10,17,-1,0,12,ch240data);
+
+/* char: 0xef */
+
+static final byte[] ch239data = {
+(byte) 0x78,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x70,(byte) 0x0,(byte) 0x0,(byte) 0xcc,(byte) 0xcc,
+};
+
+static final BitmapCharRec ch239 = new BitmapCharRec(6,16,0,0,6,ch239data);
+
+/* char: 0xee */
+
+static final byte[] ch238data = {
+(byte) 0x78,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x70,(byte) 0x0,(byte) 0x84,(byte) 0x48,(byte) 0x78,
+(byte) 0x30,
+};
+
+static final BitmapCharRec ch238 = new BitmapCharRec(6,17,0,0,6,ch238data);
+
+/* char: 0xed */
+
+static final byte[] ch237data = {
+(byte) 0xf0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0xe0,(byte) 0x0,(byte) 0x80,(byte) 0x60,(byte) 0x38,
+(byte) 0x18,
+};
+
+static final BitmapCharRec ch237 = new BitmapCharRec(5,17,-1,0,6,ch237data);
+
+/* char: 0xec */
+
+static final byte[] ch236data = {
+(byte) 0x78,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x70,(byte) 0x0,(byte) 0x8,(byte) 0x30,(byte) 0xe0,
+(byte) 0xc0,
+};
+
+static final BitmapCharRec ch236 = new BitmapCharRec(5,17,0,0,6,ch236data);
+
+/* char: 0xeb */
+
+static final byte[] ch235data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x70,(byte) 0x80,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0x41,(byte) 0x80,(byte) 0x63,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x33,(byte) 0x0,
+};
+
+static final BitmapCharRec ch235 = new BitmapCharRec(9,16,-1,0,11,ch235data);
+
+/* char: 0xea */
+
+static final byte[] ch234data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x70,(byte) 0x80,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0x41,(byte) 0x80,(byte) 0x63,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x21,(byte) 0x0,(byte) 0x12,(byte) 0x0,(byte) 0x1e,(byte) 0x0,
+(byte) 0xc,(byte) 0x0,
+};
+
+static final BitmapCharRec ch234 = new BitmapCharRec(9,17,-1,0,11,ch234data);
+
+/* char: 0xe9 */
+
+static final byte[] ch233data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x70,(byte) 0x80,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0x41,(byte) 0x80,(byte) 0x63,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x7,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,
+};
+
+static final BitmapCharRec ch233 = new BitmapCharRec(9,17,-1,0,11,ch233data);
+
+/* char: 0xe8 */
+
+static final byte[] ch232data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x70,(byte) 0x80,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0x41,(byte) 0x80,(byte) 0x63,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x70,(byte) 0x0,
+(byte) 0x60,(byte) 0x0,
+};
+
+static final BitmapCharRec ch232 = new BitmapCharRec(9,17,-1,0,11,ch232data);
+
+/* char: 0xe7 */
+
+static final byte[] ch231data = {
+(byte) 0x3c,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,
+(byte) 0x70,(byte) 0x80,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x41,(byte) 0x80,
+(byte) 0x63,(byte) 0x80,(byte) 0x1f,(byte) 0x0,
+};
+
+static final BitmapCharRec ch231 = new BitmapCharRec(9,18,-1,6,11,ch231data);
+
+/* char: 0xe6 */
+
+static final byte[] ch230data = {
+(byte) 0x70,(byte) 0xf0,(byte) 0xfb,(byte) 0xf8,(byte) 0xc7,(byte) 0x84,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0xfc,
+(byte) 0x3,(byte) 0xc,(byte) 0x63,(byte) 0xc,(byte) 0x67,(byte) 0x98,(byte) 0x3c,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch230 = new BitmapCharRec(14,12,-1,0,16,ch230data);
+
+/* char: 0xe5 */
+
+static final byte[] ch229data = {
+(byte) 0x71,(byte) 0x80,(byte) 0xfb,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,
+(byte) 0x1c,(byte) 0x0,
+};
+
+static final BitmapCharRec ch229 = new BitmapCharRec(9,17,-1,0,11,ch229data);
+
+/* char: 0xe4 */
+
+static final byte[] ch228data = {
+(byte) 0x71,(byte) 0x80,(byte) 0xfb,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0x66,(byte) 0x0,
+};
+
+static final BitmapCharRec ch228 = new BitmapCharRec(9,16,-1,0,11,ch228data);
+
+/* char: 0xe3 */
+
+static final byte[] ch227data = {
+(byte) 0x71,(byte) 0x80,(byte) 0xfb,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x5c,(byte) 0x0,(byte) 0x3a,(byte) 0x0,
+};
+
+static final BitmapCharRec ch227 = new BitmapCharRec(9,16,-1,0,11,ch227data);
+
+/* char: 0xe2 */
+
+static final byte[] ch226data = {
+(byte) 0x71,(byte) 0x80,(byte) 0xfb,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x42,(byte) 0x0,(byte) 0x24,(byte) 0x0,(byte) 0x3c,(byte) 0x0,
+(byte) 0x18,(byte) 0x0,
+};
+
+static final BitmapCharRec ch226 = new BitmapCharRec(9,17,-1,0,11,ch226data);
+
+/* char: 0xe1 */
+
+static final byte[] ch225data = {
+(byte) 0x71,(byte) 0x80,(byte) 0xfb,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x7,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,
+};
+
+static final BitmapCharRec ch225 = new BitmapCharRec(9,17,-1,0,11,ch225data);
+
+/* char: 0xe0 */
+
+static final byte[] ch224data = {
+(byte) 0x71,(byte) 0x80,(byte) 0xfb,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x70,(byte) 0x0,
+(byte) 0x60,(byte) 0x0,
+};
+
+static final BitmapCharRec ch224 = new BitmapCharRec(9,17,-1,0,11,ch224data);
+
+/* char: 0xdf */
+
+static final byte[] ch223data = {
+(byte) 0xe7,(byte) 0x0,(byte) 0x6c,(byte) 0x80,(byte) 0x6c,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x61,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x63,(byte) 0x80,
+(byte) 0x67,(byte) 0x0,(byte) 0x6c,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x33,(byte) 0x0,
+(byte) 0x1e,(byte) 0x0,
+};
+
+static final BitmapCharRec ch223 = new BitmapCharRec(10,17,-1,0,12,ch223data);
+
+/* char: 0xde */
+
+static final byte[] ch222data = {
+(byte) 0xfc,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x70,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x18,
+(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x70,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,
+(byte) 0xfc,(byte) 0x0,
+};
+
+static final BitmapCharRec ch222 = new BitmapCharRec(13,17,-1,0,15,ch222data);
+
+/* char: 0xdd */
+
+static final byte[] ch221data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x3,(byte) 0xc0,
+(byte) 0x3,(byte) 0x40,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x20,(byte) 0xc,(byte) 0x30,(byte) 0x1c,(byte) 0x10,(byte) 0x18,(byte) 0x18,(byte) 0x38,(byte) 0x8,(byte) 0x30,(byte) 0xc,
+(byte) 0xfc,(byte) 0x3f,(byte) 0x0,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x30,
+};
+
+static final BitmapCharRec ch221 = new BitmapCharRec(16,22,0,0,16,ch221data);
+
+/* char: 0xdc */
+
+static final byte[] ch220data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x30,(byte) 0x18,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0xfc,(byte) 0x1f,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x30,(byte) 0x6,(byte) 0x30,
+};
+
+static final BitmapCharRec ch220 = new BitmapCharRec(16,21,-1,0,18,ch220data);
+
+/* char: 0xdb */
+
+static final byte[] ch219data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x30,(byte) 0x18,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0xfc,(byte) 0x1f,(byte) 0x0,(byte) 0x0,(byte) 0x8,(byte) 0x10,(byte) 0x6,(byte) 0x60,(byte) 0x3,(byte) 0xc0,(byte) 0x1,(byte) 0x80,
+};
+
+static final BitmapCharRec ch219 = new BitmapCharRec(16,22,-1,0,18,ch219data);
+
+/* char: 0xda */
+
+static final byte[] ch218data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x30,(byte) 0x18,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0xfc,(byte) 0x1f,(byte) 0x0,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x30,
+};
+
+static final BitmapCharRec ch218 = new BitmapCharRec(16,22,-1,0,18,ch218data);
+
+/* char: 0xd9 */
+
+static final byte[] ch217data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x30,(byte) 0x18,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0xfc,(byte) 0x1f,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x40,(byte) 0x1,(byte) 0x80,(byte) 0x7,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+};
+
+static final BitmapCharRec ch217 = new BitmapCharRec(16,22,-1,0,18,ch217data);
+
+/* char: 0xd8 */
+
+static final byte[] ch216data = {
+(byte) 0x20,(byte) 0x0,(byte) 0x27,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x68,(byte) 0x6,(byte) 0x64,(byte) 0x6,(byte) 0xc2,(byte) 0x3,(byte) 0xc2,(byte) 0x3,
+(byte) 0xc1,(byte) 0x3,(byte) 0xc1,(byte) 0x3,(byte) 0xc0,(byte) 0x83,(byte) 0xc0,(byte) 0x83,(byte) 0xc0,(byte) 0x43,(byte) 0x60,(byte) 0x46,(byte) 0x60,(byte) 0x26,(byte) 0x38,(byte) 0x1c,
+(byte) 0x1c,(byte) 0x38,(byte) 0x7,(byte) 0xe4,(byte) 0x0,(byte) 0x4,
+};
+
+static final BitmapCharRec ch216 = new BitmapCharRec(16,19,-1,1,18,ch216data);
+
+/* char: 0xd7 */
+
+static final byte[] ch215data = {
+(byte) 0x80,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x33,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x33,(byte) 0x0,
+(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch215 = new BitmapCharRec(10,11,-2,-1,14,ch215data);
+
+/* char: 0xd6 */
+
+static final byte[] ch214data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,
+(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x38,(byte) 0x1c,(byte) 0x1c,(byte) 0x38,
+(byte) 0x7,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x60,
+};
+
+static final BitmapCharRec ch214 = new BitmapCharRec(16,21,-1,0,18,ch214data);
+
+/* char: 0xd5 */
+
+static final byte[] ch213data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,
+(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x38,(byte) 0x1c,(byte) 0x1c,(byte) 0x38,
+(byte) 0x7,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x4,(byte) 0xe0,(byte) 0x3,(byte) 0x90,
+};
+
+static final BitmapCharRec ch213 = new BitmapCharRec(16,21,-1,0,18,ch213data);
+
+/* char: 0xd4 */
+
+static final byte[] ch212data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,
+(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x38,(byte) 0x1c,(byte) 0x1c,(byte) 0x38,
+(byte) 0x7,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x8,(byte) 0x10,(byte) 0x6,(byte) 0x60,(byte) 0x3,(byte) 0xc0,(byte) 0x1,(byte) 0x80,
+};
+
+static final BitmapCharRec ch212 = new BitmapCharRec(16,22,-1,0,18,ch212data);
+
+/* char: 0xd3 */
+
+static final byte[] ch211data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,
+(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x38,(byte) 0x1c,(byte) 0x1c,(byte) 0x38,
+(byte) 0x7,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x30,
+};
+
+static final BitmapCharRec ch211 = new BitmapCharRec(16,22,-1,0,18,ch211data);
+
+/* char: 0xd2 */
+
+static final byte[] ch210data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,
+(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x38,(byte) 0x1c,(byte) 0x1c,(byte) 0x38,
+(byte) 0x7,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x40,(byte) 0x1,(byte) 0x80,(byte) 0x7,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+};
+
+static final BitmapCharRec ch210 = new BitmapCharRec(16,22,-1,0,18,ch210data);
+
+/* char: 0xd1 */
+
+static final byte[] ch209data = {
+(byte) 0xf8,(byte) 0xc,(byte) 0x20,(byte) 0x1c,(byte) 0x20,(byte) 0x1c,(byte) 0x20,(byte) 0x34,(byte) 0x20,(byte) 0x64,(byte) 0x20,(byte) 0x64,(byte) 0x20,(byte) 0xc4,(byte) 0x21,(byte) 0x84,
+(byte) 0x21,(byte) 0x84,(byte) 0x23,(byte) 0x4,(byte) 0x26,(byte) 0x4,(byte) 0x26,(byte) 0x4,(byte) 0x2c,(byte) 0x4,(byte) 0x38,(byte) 0x4,(byte) 0x38,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0xf0,(byte) 0x1f,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x4,(byte) 0xe0,(byte) 0x3,(byte) 0x90,
+};
+
+static final BitmapCharRec ch209 = new BitmapCharRec(16,21,-1,0,18,ch209data);
+
+/* char: 0xd0 */
+
+static final byte[] ch208data = {
+(byte) 0x7f,(byte) 0xe0,(byte) 0x18,(byte) 0x38,(byte) 0x18,(byte) 0x1c,(byte) 0x18,(byte) 0x6,(byte) 0x18,(byte) 0x6,(byte) 0x18,(byte) 0x3,(byte) 0x18,(byte) 0x3,(byte) 0x18,(byte) 0x3,
+(byte) 0xff,(byte) 0x3,(byte) 0x18,(byte) 0x3,(byte) 0x18,(byte) 0x3,(byte) 0x18,(byte) 0x3,(byte) 0x18,(byte) 0x6,(byte) 0x18,(byte) 0x6,(byte) 0x18,(byte) 0x1c,(byte) 0x18,(byte) 0x38,
+(byte) 0x7f,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch208 = new BitmapCharRec(16,17,0,0,17,ch208data);
+
+/* char: 0xcf */
+
+static final byte[] ch207data = {
+(byte) 0xfc,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
+(byte) 0xfc,(byte) 0x0,(byte) 0x0,(byte) 0xcc,(byte) 0xcc,
+};
+
+static final BitmapCharRec ch207 = new BitmapCharRec(6,21,-1,0,8,ch207data);
+
+/* char: 0xce */
+
+static final byte[] ch206data = {
+(byte) 0x7e,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,
+(byte) 0x7e,(byte) 0x0,(byte) 0x81,(byte) 0x66,(byte) 0x3c,(byte) 0x18,
+};
+
+static final BitmapCharRec ch206 = new BitmapCharRec(8,22,-1,0,8,ch206data);
+
+/* char: 0xcd */
+
+static final byte[] ch205data = {
+(byte) 0xfc,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
+(byte) 0xfc,(byte) 0x0,(byte) 0x40,(byte) 0x30,(byte) 0x1c,(byte) 0xc,
+};
+
+static final BitmapCharRec ch205 = new BitmapCharRec(6,22,-1,0,8,ch205data);
+
+/* char: 0xcc */
+
+static final byte[] ch204data = {
+(byte) 0xfc,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
+(byte) 0xfc,(byte) 0x0,(byte) 0x8,(byte) 0x30,(byte) 0xe0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch204 = new BitmapCharRec(6,22,-1,0,8,ch204data);
+
+/* char: 0xcb */
+
+static final byte[] ch203data = {
+(byte) 0xff,(byte) 0xf8,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,
+(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x30,
+(byte) 0xff,(byte) 0xf0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,
+};
+
+static final BitmapCharRec ch203 = new BitmapCharRec(13,21,-1,0,15,ch203data);
+
+/* char: 0xca */
+
+static final byte[] ch202data = {
+(byte) 0xff,(byte) 0xf8,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,
+(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x30,
+(byte) 0xff,(byte) 0xf0,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x20,(byte) 0xc,(byte) 0xc0,(byte) 0x7,(byte) 0x80,(byte) 0x3,(byte) 0x0,
+};
+
+static final BitmapCharRec ch202 = new BitmapCharRec(13,22,-1,0,15,ch202data);
+
+/* char: 0xc9 */
+
+static final byte[] ch201data = {
+(byte) 0xff,(byte) 0xf8,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,
+(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x30,
+(byte) 0xff,(byte) 0xf0,(byte) 0x0,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch201 = new BitmapCharRec(13,22,-1,0,15,ch201data);
+
+/* char: 0xc8 */
+
+static final byte[] ch200data = {
+(byte) 0xff,(byte) 0xf8,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,
+(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x30,
+(byte) 0xff,(byte) 0xf0,(byte) 0x0,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0x18,(byte) 0x0,
+};
+
+static final BitmapCharRec ch200 = new BitmapCharRec(13,22,-1,0,15,ch200data);
+
+/* char: 0xc7 */
+
+static final byte[] ch199data = {
+(byte) 0x7,(byte) 0x80,(byte) 0xc,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x7,(byte) 0xe0,(byte) 0x1e,(byte) 0x38,
+(byte) 0x38,(byte) 0x8,(byte) 0x60,(byte) 0x4,(byte) 0x60,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x60,(byte) 0x4,(byte) 0x60,(byte) 0x4,(byte) 0x38,(byte) 0xc,(byte) 0x1c,(byte) 0x3c,(byte) 0x7,(byte) 0xe4,
+};
+
+static final BitmapCharRec ch199 = new BitmapCharRec(14,23,-1,6,16,ch199data);
+
+/* char: 0xc6 */
+
+static final byte[] ch198data = {
+(byte) 0xf9,(byte) 0xff,(byte) 0xf0,(byte) 0x30,(byte) 0x60,(byte) 0x30,(byte) 0x10,(byte) 0x60,(byte) 0x10,(byte) 0x10,(byte) 0x60,(byte) 0x10,(byte) 0x18,(byte) 0x60,(byte) 0x0,(byte) 0x8,
+(byte) 0x60,(byte) 0x0,(byte) 0xf,(byte) 0xe0,(byte) 0x80,(byte) 0xc,(byte) 0x60,(byte) 0x80,(byte) 0x4,(byte) 0x7f,(byte) 0x80,(byte) 0x4,(byte) 0x60,(byte) 0x80,(byte) 0x6,(byte) 0x60,
+(byte) 0x80,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x20,(byte) 0x1,(byte) 0x60,(byte) 0x20,(byte) 0x1,(byte) 0xe0,(byte) 0x60,
+(byte) 0x3,(byte) 0xff,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch198 = new BitmapCharRec(20,17,0,0,21,ch198data);
+
+/* char: 0xc5 */
+
+static final byte[] ch197data = {
+(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x8,
+(byte) 0xc,(byte) 0x0,(byte) 0xf,(byte) 0xf8,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,
+(byte) 0x0,(byte) 0x2,(byte) 0x30,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
+(byte) 0x0,(byte) 0x80,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x2,(byte) 0x20,(byte) 0x0,(byte) 0x2,(byte) 0x20,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch197 = new BitmapCharRec(17,21,0,0,17,ch197data);
+
+/* char: 0xc4 */
+
+static final byte[] ch196data = {
+(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x8,
+(byte) 0xc,(byte) 0x0,(byte) 0xf,(byte) 0xf8,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,
+(byte) 0x0,(byte) 0x2,(byte) 0x30,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
+(byte) 0x0,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,(byte) 0x0,
+};
+
+static final BitmapCharRec ch196 = new BitmapCharRec(17,21,0,0,17,ch196data);
+
+/* char: 0xc3 */
+
+static final byte[] ch195data = {
+(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x7,(byte) 0x0,(byte) 0x10,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x8,
+(byte) 0xc,(byte) 0x0,(byte) 0xf,(byte) 0xf8,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,
+(byte) 0x0,(byte) 0x2,(byte) 0x30,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
+(byte) 0x0,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x4,(byte) 0xe0,(byte) 0x0,(byte) 0x3,(byte) 0x90,(byte) 0x0,
+};
+
+static final BitmapCharRec ch195 = new BitmapCharRec(17,21,0,0,17,ch195data);
+
+/* char: 0xc2 */
+
+static final byte[] ch194data = {
+(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x8,
+(byte) 0xc,(byte) 0x0,(byte) 0xf,(byte) 0xf8,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,
+(byte) 0x0,(byte) 0x2,(byte) 0x30,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
+(byte) 0x0,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x8,(byte) 0x10,(byte) 0x0,(byte) 0x6,(byte) 0x60,(byte) 0x0,(byte) 0x3,(byte) 0xc0,(byte) 0x0,(byte) 0x1,
+(byte) 0x80,(byte) 0x0,
+};
+
+static final BitmapCharRec ch194 = new BitmapCharRec(17,22,0,0,17,ch194data);
+
+/* char: 0xc1 */
+
+static final byte[] ch193data = {
+(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x8,
+(byte) 0xc,(byte) 0x0,(byte) 0xf,(byte) 0xf8,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,
+(byte) 0x0,(byte) 0x2,(byte) 0x30,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
+(byte) 0x0,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x0,
+(byte) 0x30,(byte) 0x0,
+};
+
+static final BitmapCharRec ch193 = new BitmapCharRec(17,22,0,0,17,ch193data);
+
+/* char: 0xc0 */
+
+static final byte[] ch192data = {
+(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x8,
+(byte) 0xc,(byte) 0x0,(byte) 0xf,(byte) 0xf8,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,
+(byte) 0x0,(byte) 0x2,(byte) 0x30,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
+(byte) 0x0,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x3,(byte) 0x80,(byte) 0x0,(byte) 0x3,
+(byte) 0x0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch192 = new BitmapCharRec(17,22,0,0,17,ch192data);
+
+/* char: 0xbf */
+
+static final byte[] ch191data = {
+(byte) 0x3e,(byte) 0x63,(byte) 0xc1,(byte) 0xc3,(byte) 0xc3,(byte) 0xe0,(byte) 0x70,(byte) 0x30,(byte) 0x38,(byte) 0x18,(byte) 0x18,(byte) 0x8,(byte) 0x8,(byte) 0x0,(byte) 0x0,(byte) 0xc,
+(byte) 0xc,
+};
+
+static final BitmapCharRec ch191 = new BitmapCharRec(8,17,-1,5,11,ch191data);
+
+/* char: 0xbe */
+
+static final byte[] ch190data = {
+(byte) 0x18,(byte) 0x2,(byte) 0x0,(byte) 0x8,(byte) 0x2,(byte) 0x0,(byte) 0xc,(byte) 0x7f,(byte) 0x80,(byte) 0x4,(byte) 0x22,(byte) 0x0,(byte) 0x6,(byte) 0x32,(byte) 0x0,(byte) 0x3,
+(byte) 0x12,(byte) 0x0,(byte) 0x1,(byte) 0xa,(byte) 0x0,(byte) 0x71,(byte) 0x8e,(byte) 0x0,(byte) 0x88,(byte) 0x86,(byte) 0x0,(byte) 0x8c,(byte) 0xc2,(byte) 0x0,(byte) 0xc,(byte) 0x60,
+(byte) 0x0,(byte) 0x8,(byte) 0x20,(byte) 0x0,(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0x8,(byte) 0x10,(byte) 0x0,(byte) 0x8c,(byte) 0x18,(byte) 0x0,(byte) 0x4c,(byte) 0xc,(byte) 0x0,
+(byte) 0x38,(byte) 0x4,(byte) 0x0,
+};
+
+static final BitmapCharRec ch190 = new BitmapCharRec(17,17,0,0,18,ch190data);
+
+/* char: 0xbd */
+
+static final byte[] ch189data = {
+(byte) 0x30,(byte) 0x7e,(byte) 0x10,(byte) 0x22,(byte) 0x18,(byte) 0x10,(byte) 0x8,(byte) 0x18,(byte) 0xc,(byte) 0x8,(byte) 0x6,(byte) 0x4,(byte) 0x2,(byte) 0x6,(byte) 0xfb,(byte) 0x46,
+(byte) 0x21,(byte) 0x26,(byte) 0x21,(byte) 0x9c,(byte) 0x20,(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0x20,(byte) 0x60,(byte) 0x20,(byte) 0x20,(byte) 0xa0,(byte) 0x30,(byte) 0x60,(byte) 0x18,
+(byte) 0x20,(byte) 0x8,
+};
+
+static final BitmapCharRec ch189 = new BitmapCharRec(15,17,-1,0,18,ch189data);
+
+/* char: 0xbc */
+
+static final byte[] ch188data = {
+(byte) 0x30,(byte) 0x4,(byte) 0x10,(byte) 0x4,(byte) 0x18,(byte) 0xff,(byte) 0x8,(byte) 0x44,(byte) 0xc,(byte) 0x64,(byte) 0x6,(byte) 0x24,(byte) 0x2,(byte) 0x14,(byte) 0xfb,(byte) 0x1c,
+(byte) 0x21,(byte) 0xc,(byte) 0x21,(byte) 0x84,(byte) 0x20,(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0x20,(byte) 0x60,(byte) 0x20,(byte) 0x20,(byte) 0xa0,(byte) 0x30,(byte) 0x60,(byte) 0x18,
+(byte) 0x20,(byte) 0x8,
+};
+
+static final BitmapCharRec ch188 = new BitmapCharRec(16,17,-1,0,18,ch188data);
+
+/* char: 0xbb */
+
+static final byte[] ch187data = {
+(byte) 0x88,(byte) 0x0,(byte) 0xcc,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0x33,(byte) 0x0,(byte) 0x66,(byte) 0x0,
+(byte) 0xcc,(byte) 0x0,(byte) 0x88,(byte) 0x0,
+};
+
+static final BitmapCharRec ch187 = new BitmapCharRec(9,10,-2,-1,12,ch187data);
+
+/* char: 0xba */
+
+static final byte[] ch186data = {
+(byte) 0xfc,(byte) 0x0,(byte) 0x78,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,(byte) 0x78,
+};
+
+static final BitmapCharRec ch186 = new BitmapCharRec(6,9,-1,-8,8,ch186data);
+
+/* char: 0xb9 */
+
+static final byte[] ch185data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xa0,(byte) 0x60,(byte) 0x20,
+};
+
+static final BitmapCharRec ch185 = new BitmapCharRec(5,10,-1,-7,7,ch185data);
+
+/* char: 0xb8 */
+
+static final byte[] ch184data = {
+(byte) 0x78,(byte) 0xcc,(byte) 0xc,(byte) 0x3c,(byte) 0x30,(byte) 0x10,
+};
+
+static final BitmapCharRec ch184 = new BitmapCharRec(6,6,-1,6,8,ch184data);
+
+/* char: 0xb7 */
+
+static final byte[] ch183data = {
+(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch183 = new BitmapCharRec(2,2,-2,-6,6,ch183data);
+
+/* char: 0xb6 */
+
+static final byte[] ch182data = {
+(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,
+(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x39,(byte) 0x0,(byte) 0x79,(byte) 0x0,(byte) 0x79,(byte) 0x0,(byte) 0xf9,(byte) 0x0,
+(byte) 0xf9,(byte) 0x0,(byte) 0xf9,(byte) 0x0,(byte) 0x79,(byte) 0x0,(byte) 0x79,(byte) 0x0,(byte) 0x39,(byte) 0x0,(byte) 0x1f,(byte) 0x80,
+};
+
+static final BitmapCharRec ch182 = new BitmapCharRec(9,22,-1,5,11,ch182data);
+
+/* char: 0xb5 */
+
+static final byte[] ch181data = {
+(byte) 0x40,(byte) 0x0,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x0,(byte) 0x5c,(byte) 0xe0,(byte) 0x7e,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,
+(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
+(byte) 0xe1,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch181 = new BitmapCharRec(11,17,-1,5,13,ch181data);
+
+/* char: 0xb4 */
+
+static final byte[] ch180data = {
+(byte) 0x80,(byte) 0x60,(byte) 0x38,(byte) 0x18,
+};
+
+static final BitmapCharRec ch180 = new BitmapCharRec(5,4,-2,-13,8,ch180data);
+
+/* char: 0xb3 */
+
+static final byte[] ch179data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x8c,(byte) 0xc,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x8c,(byte) 0x4c,(byte) 0x38,
+};
+
+static final BitmapCharRec ch179 = new BitmapCharRec(6,10,0,-7,7,ch179data);
+
+/* char: 0xb2 */
+
+static final byte[] ch178data = {
+(byte) 0xfc,(byte) 0x44,(byte) 0x20,(byte) 0x30,(byte) 0x10,(byte) 0x8,(byte) 0xc,(byte) 0x8c,(byte) 0x4c,(byte) 0x38,
+};
+
+static final BitmapCharRec ch178 = new BitmapCharRec(6,10,0,-7,7,ch178data);
+
+/* char: 0xb1 */
+
+static final byte[] ch177data = {
+(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+};
+
+static final BitmapCharRec ch177 = new BitmapCharRec(12,15,-1,0,14,ch177data);
+
+/* char: 0xb0 */
+
+static final byte[] ch176data = {
+(byte) 0x38,(byte) 0x44,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch176 = new BitmapCharRec(7,7,-1,-10,9,ch176data);
+
+/* char: 0xaf */
+
+static final byte[] ch175data = {
+(byte) 0xfc,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch175 = new BitmapCharRec(6,2,-1,-14,8,ch175data);
+
+/* char: 0xae */
+
+static final byte[] ch174data = {
+(byte) 0x7,(byte) 0xf0,(byte) 0x0,(byte) 0x1c,(byte) 0x1c,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x60,(byte) 0x3,(byte) 0x0,(byte) 0x47,(byte) 0x19,(byte) 0x0,(byte) 0xc2,
+(byte) 0x31,(byte) 0x80,(byte) 0x82,(byte) 0x20,(byte) 0x80,(byte) 0x82,(byte) 0x40,(byte) 0x80,(byte) 0x83,(byte) 0xe0,(byte) 0x80,(byte) 0x82,(byte) 0x30,(byte) 0x80,(byte) 0x82,(byte) 0x10,
+(byte) 0x80,(byte) 0xc2,(byte) 0x11,(byte) 0x80,(byte) 0x42,(byte) 0x31,(byte) 0x0,(byte) 0x67,(byte) 0xe3,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x1c,(byte) 0x1c,(byte) 0x0,
+(byte) 0x7,(byte) 0xf0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch174 = new BitmapCharRec(17,17,-1,0,19,ch174data);
+
+/* char: 0xad */
+
+static final byte[] ch173data = {
+(byte) 0xfe,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch173 = new BitmapCharRec(7,2,-1,-5,9,ch173data);
+
+/* char: 0xac */
+
+static final byte[] ch172data = {
+(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch172 = new BitmapCharRec(12,7,-1,-3,14,ch172data);
+
+/* char: 0xab */
+
+static final byte[] ch171data = {
+(byte) 0x8,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0x33,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0xcc,(byte) 0x0,(byte) 0xcc,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0x33,(byte) 0x0,
+(byte) 0x19,(byte) 0x80,(byte) 0x8,(byte) 0x80,
+};
+
+static final BitmapCharRec ch171 = new BitmapCharRec(9,10,-2,-1,13,ch171data);
+
+/* char: 0xaa */
+
+static final byte[] ch170data = {
+(byte) 0x7e,(byte) 0x0,(byte) 0x76,(byte) 0xcc,(byte) 0xcc,(byte) 0x7c,(byte) 0xc,(byte) 0xcc,(byte) 0x78,
+};
+
+static final BitmapCharRec ch170 = new BitmapCharRec(7,9,0,-8,8,ch170data);
+
+/* char: 0xa9 */
+
+static final byte[] ch169data = {
+(byte) 0x7,(byte) 0xf0,(byte) 0x0,(byte) 0x1c,(byte) 0x1c,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x61,(byte) 0xc3,(byte) 0x0,(byte) 0x47,(byte) 0x71,(byte) 0x0,(byte) 0xc4,
+(byte) 0x19,(byte) 0x80,(byte) 0x8c,(byte) 0x0,(byte) 0x80,(byte) 0x88,(byte) 0x0,(byte) 0x80,(byte) 0x88,(byte) 0x0,(byte) 0x80,(byte) 0x88,(byte) 0x0,(byte) 0x80,(byte) 0x8c,(byte) 0x0,
+(byte) 0x80,(byte) 0xc4,(byte) 0x19,(byte) 0x80,(byte) 0x47,(byte) 0x31,(byte) 0x0,(byte) 0x61,(byte) 0xe3,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x1c,(byte) 0x1c,(byte) 0x0,
+(byte) 0x7,(byte) 0xf0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch169 = new BitmapCharRec(17,17,-1,0,19,ch169data);
+
+/* char: 0xa8 */
+
+static final byte[] ch168data = {
+(byte) 0xcc,(byte) 0xcc,
+};
+
+static final BitmapCharRec ch168 = new BitmapCharRec(6,2,-1,-14,8,ch168data);
+
+/* char: 0xa7 */
+
+static final byte[] ch167data = {
+(byte) 0x38,(byte) 0x64,(byte) 0x62,(byte) 0x6,(byte) 0xe,(byte) 0x1c,(byte) 0x38,(byte) 0x74,(byte) 0xe2,(byte) 0xc3,(byte) 0x83,(byte) 0x87,(byte) 0x4e,(byte) 0x3c,(byte) 0x38,(byte) 0x70,
+(byte) 0x60,(byte) 0x46,(byte) 0x26,(byte) 0x1c,
+};
+
+static final BitmapCharRec ch167 = new BitmapCharRec(8,20,-2,2,12,ch167data);
+
+/* char: 0xa6 */
+
+static final byte[] ch166data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,
+};
+
+static final BitmapCharRec ch166 = new BitmapCharRec(2,17,-2,0,6,ch166data);
+
+/* char: 0xa5 */
+
+static final byte[] ch165data = {
+(byte) 0xf,(byte) 0xc0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x1f,(byte) 0xe0,(byte) 0x3,(byte) 0x0,(byte) 0x1f,(byte) 0xe0,
+(byte) 0x3,(byte) 0x0,(byte) 0x7,(byte) 0x80,(byte) 0xc,(byte) 0x80,(byte) 0xc,(byte) 0xc0,(byte) 0x18,(byte) 0x40,(byte) 0x18,(byte) 0x60,(byte) 0x30,(byte) 0x20,(byte) 0x70,(byte) 0x30,
+(byte) 0xf8,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch165 = new BitmapCharRec(14,17,0,0,14,ch165data);
+
+/* char: 0xa4 */
+
+static final byte[] ch164data = {
+(byte) 0xc0,(byte) 0x60,(byte) 0xee,(byte) 0xe0,(byte) 0x7f,(byte) 0xc0,(byte) 0x31,(byte) 0x80,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
+(byte) 0x31,(byte) 0x80,(byte) 0x7f,(byte) 0xc0,(byte) 0xee,(byte) 0xe0,(byte) 0xc0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch164 = new BitmapCharRec(11,12,-1,-3,13,ch164data);
+
+/* char: 0xa3 */
+
+static final byte[] ch163data = {
+(byte) 0xe7,(byte) 0x80,(byte) 0xbe,(byte) 0xc0,(byte) 0x78,(byte) 0x40,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,
+(byte) 0x30,(byte) 0x0,(byte) 0xfc,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x31,(byte) 0x80,(byte) 0x19,(byte) 0x80,
+(byte) 0xf,(byte) 0x0,
+};
+
+static final BitmapCharRec ch163 = new BitmapCharRec(10,17,-1,0,12,ch163data);
+
+/* char: 0xa2 */
+
+static final byte[] ch162data = {
+(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x70,(byte) 0x80,(byte) 0xd0,(byte) 0x0,(byte) 0xc8,(byte) 0x0,(byte) 0xc8,(byte) 0x0,
+(byte) 0xc8,(byte) 0x0,(byte) 0xc4,(byte) 0x0,(byte) 0xc4,(byte) 0x0,(byte) 0x43,(byte) 0x80,(byte) 0x63,(byte) 0x80,(byte) 0x1f,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x1,(byte) 0x0,
+};
+
+static final BitmapCharRec ch162 = new BitmapCharRec(9,16,-1,2,12,ch162data);
+
+/* char: 0xa1 */
+
+static final byte[] ch161data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,
+(byte) 0xc0,
+};
+
+static final BitmapCharRec ch161 = new BitmapCharRec(2,17,-4,5,8,ch161data);
+
+/* char: 0xa0 */
+
+static final BitmapCharRec ch160 = new BitmapCharRec(0,0,0,0,6,null);
+
+/* char: 0x7e '~' */
+
+static final byte[] ch126data = {
+(byte) 0x83,(byte) 0x80,(byte) 0xc7,(byte) 0xc0,(byte) 0x7c,(byte) 0x60,(byte) 0x38,(byte) 0x20,
+};
+
+static final BitmapCharRec ch126 = new BitmapCharRec(11,4,-1,-5,13,ch126data);
+
+/* char: 0x7d '}' */
+
+static final byte[] ch125data = {
+(byte) 0xe0,(byte) 0x30,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x8,(byte) 0xc,(byte) 0x4,(byte) 0x3,(byte) 0x4,(byte) 0xc,(byte) 0x8,(byte) 0x18,
+(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x30,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch125 = new BitmapCharRec(8,22,-1,5,10,ch125data);
+
+/* char: 0x7c '|' */
+
+static final byte[] ch124data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,
+};
+
+static final BitmapCharRec ch124 = new BitmapCharRec(2,17,-2,0,6,ch124data);
+
+/* char: 0x7b '{' */
+
+static final byte[] ch123data = {
+(byte) 0x7,(byte) 0xc,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x10,(byte) 0x30,(byte) 0x20,(byte) 0xc0,(byte) 0x20,(byte) 0x30,(byte) 0x10,(byte) 0x18,
+(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0xc,(byte) 0x7,
+};
+
+static final BitmapCharRec ch123 = new BitmapCharRec(8,22,-1,5,10,ch123data);
+
+/* char: 0x7a 'z' */
+
+static final byte[] ch122data = {
+(byte) 0xff,(byte) 0xc3,(byte) 0x61,(byte) 0x70,(byte) 0x30,(byte) 0x38,(byte) 0x18,(byte) 0x1c,(byte) 0xe,(byte) 0x86,(byte) 0xc3,(byte) 0xff,
+};
+
+static final BitmapCharRec ch122 = new BitmapCharRec(8,12,-1,0,10,ch122data);
+
+/* char: 0x79 'y' */
+
+static final byte[] ch121data = {
+(byte) 0xe0,(byte) 0x0,(byte) 0xf0,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0xe,(byte) 0x0,
+(byte) 0x1a,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x31,(byte) 0x0,(byte) 0x30,(byte) 0x80,(byte) 0x30,(byte) 0x80,(byte) 0x60,(byte) 0x80,(byte) 0x60,(byte) 0xc0,
+(byte) 0xf1,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch121 = new BitmapCharRec(11,17,0,5,11,ch121data);
+
+/* char: 0x78 'x' */
+
+static final byte[] ch120data = {
+(byte) 0xf1,(byte) 0xe0,(byte) 0x60,(byte) 0xc0,(byte) 0x21,(byte) 0x80,(byte) 0x33,(byte) 0x80,(byte) 0x1b,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x1a,(byte) 0x0,
+(byte) 0x39,(byte) 0x0,(byte) 0x31,(byte) 0x80,(byte) 0x60,(byte) 0xc0,(byte) 0xf1,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch120 = new BitmapCharRec(11,12,-1,0,13,ch120data);
+
+/* char: 0x77 'w' */
+
+static final byte[] ch119data = {
+(byte) 0x4,(byte) 0x10,(byte) 0x0,(byte) 0xe,(byte) 0x38,(byte) 0x0,(byte) 0xe,(byte) 0x38,(byte) 0x0,(byte) 0x1a,(byte) 0x28,(byte) 0x0,(byte) 0x1a,(byte) 0x64,(byte) 0x0,(byte) 0x19,
+(byte) 0x64,(byte) 0x0,(byte) 0x31,(byte) 0x64,(byte) 0x0,(byte) 0x30,(byte) 0xc2,(byte) 0x0,(byte) 0x30,(byte) 0xc2,(byte) 0x0,(byte) 0x60,(byte) 0xc2,(byte) 0x0,(byte) 0x60,(byte) 0xc3,
+(byte) 0x0,(byte) 0xf1,(byte) 0xe7,(byte) 0x80,
+};
+
+static final BitmapCharRec ch119 = new BitmapCharRec(17,12,0,0,17,ch119data);
+
+/* char: 0x76 'v' */
+
+static final byte[] ch118data = {
+(byte) 0x4,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0x1a,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x31,(byte) 0x0,(byte) 0x30,(byte) 0x80,
+(byte) 0x30,(byte) 0x80,(byte) 0x60,(byte) 0x80,(byte) 0x60,(byte) 0xc0,(byte) 0xf1,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch118 = new BitmapCharRec(11,12,0,0,11,ch118data);
+
+/* char: 0x75 'u' */
+
+static final byte[] ch117data = {
+(byte) 0x1c,(byte) 0xe0,(byte) 0x3e,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
+(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe1,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch117 = new BitmapCharRec(11,12,-1,0,13,ch117data);
+
+/* char: 0x74 't' */
+
+static final byte[] ch116data = {
+(byte) 0x1c,(byte) 0x32,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0xfe,(byte) 0x70,(byte) 0x30,(byte) 0x10,
+};
+
+static final BitmapCharRec ch116 = new BitmapCharRec(7,15,0,0,7,ch116data);
+
+/* char: 0x73 's' */
+
+static final byte[] ch115data = {
+(byte) 0xf8,(byte) 0xc6,(byte) 0x83,(byte) 0x3,(byte) 0x7,(byte) 0x1e,(byte) 0x7c,(byte) 0x70,(byte) 0xe0,(byte) 0xc2,(byte) 0x66,(byte) 0x3e,
+};
+
+static final BitmapCharRec ch115 = new BitmapCharRec(8,12,-1,0,10,ch115data);
+
+/* char: 0x72 'r' */
+
+static final byte[] ch114data = {
+(byte) 0xf0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x76,(byte) 0x6e,(byte) 0xe6,
+};
+
+static final BitmapCharRec ch114 = new BitmapCharRec(7,12,-1,0,8,ch114data);
+
+/* char: 0x71 'q' */
+
+static final byte[] ch113data = {
+(byte) 0x3,(byte) 0xc0,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1d,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,
+(byte) 0x1d,(byte) 0x80,
+};
+
+static final BitmapCharRec ch113 = new BitmapCharRec(10,17,-1,5,12,ch113data);
+
+/* char: 0x70 'p' */
+
+static final byte[] ch112data = {
+(byte) 0xf0,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x6e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,
+(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,
+(byte) 0xee,(byte) 0x0,
+};
+
+static final BitmapCharRec ch112 = new BitmapCharRec(10,17,-1,5,12,ch112data);
+
+/* char: 0x6f 'o' */
+
+static final byte[] ch111data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1e,(byte) 0x0,
+};
+
+static final BitmapCharRec ch111 = new BitmapCharRec(10,12,-1,0,12,ch111data);
+
+/* char: 0x6e 'n' */
+
+static final byte[] ch110data = {
+(byte) 0xf1,(byte) 0xe0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
+(byte) 0x60,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x6f,(byte) 0x80,(byte) 0xe7,(byte) 0x0,
+};
+
+static final BitmapCharRec ch110 = new BitmapCharRec(11,12,-1,0,13,ch110data);
+
+/* char: 0x6d 'm' */
+
+static final byte[] ch109data = {
+(byte) 0xf1,(byte) 0xe3,(byte) 0xc0,(byte) 0x60,(byte) 0xc1,(byte) 0x80,(byte) 0x60,(byte) 0xc1,(byte) 0x80,(byte) 0x60,(byte) 0xc1,(byte) 0x80,(byte) 0x60,(byte) 0xc1,(byte) 0x80,(byte) 0x60,
+(byte) 0xc1,(byte) 0x80,(byte) 0x60,(byte) 0xc1,(byte) 0x80,(byte) 0x60,(byte) 0xc1,(byte) 0x80,(byte) 0x60,(byte) 0xc1,(byte) 0x80,(byte) 0x71,(byte) 0xe3,(byte) 0x80,(byte) 0x6f,(byte) 0x9f,
+(byte) 0x0,(byte) 0xe7,(byte) 0xe,(byte) 0x0,
+};
+
+static final BitmapCharRec ch109 = new BitmapCharRec(18,12,-1,0,20,ch109data);
+
+/* char: 0x6c 'l' */
+
+static final byte[] ch108data = {
+(byte) 0xf0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,
+(byte) 0xe0,
+};
+
+static final BitmapCharRec ch108 = new BitmapCharRec(4,17,-1,0,6,ch108data);
+
+/* char: 0x6b 'k' */
+
+static final byte[] ch107data = {
+(byte) 0xf3,(byte) 0xe0,(byte) 0x61,(byte) 0xc0,(byte) 0x63,(byte) 0x80,(byte) 0x67,(byte) 0x0,(byte) 0x6e,(byte) 0x0,(byte) 0x6c,(byte) 0x0,(byte) 0x78,(byte) 0x0,(byte) 0x68,(byte) 0x0,
+(byte) 0x64,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0xc0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,
+(byte) 0xe0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch107 = new BitmapCharRec(11,17,-1,0,12,ch107data);
+
+/* char: 0x6a 'j' */
+
+static final byte[] ch106data = {
+(byte) 0xc0,(byte) 0xe0,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
+(byte) 0x70,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x30,
+};
+
+static final BitmapCharRec ch106 = new BitmapCharRec(4,22,0,5,6,ch106data);
+
+/* char: 0x69 'i' */
+
+static final byte[] ch105data = {
+(byte) 0xf0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x60,
+(byte) 0x60,
+};
+
+static final BitmapCharRec ch105 = new BitmapCharRec(4,17,-1,0,6,ch105data);
+
+/* char: 0x68 'h' */
+
+static final byte[] ch104data = {
+(byte) 0xf1,(byte) 0xe0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
+(byte) 0x60,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x6f,(byte) 0x80,(byte) 0x67,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,
+(byte) 0xe0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch104 = new BitmapCharRec(11,17,-1,0,13,ch104data);
+
+/* char: 0x67 'g' */
+
+static final byte[] ch103data = {
+(byte) 0x3f,(byte) 0x0,(byte) 0xf1,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x20,(byte) 0x60,(byte) 0x60,(byte) 0x3f,(byte) 0xc0,(byte) 0x7f,(byte) 0x0,(byte) 0x60,(byte) 0x0,
+(byte) 0x30,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x33,(byte) 0x0,
+(byte) 0x1f,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch103 = new BitmapCharRec(11,17,-1,5,12,ch103data);
+
+/* char: 0x66 'f' */
+
+static final byte[] ch102data = {
+(byte) 0x78,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0xfe,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x16,
+(byte) 0xe,
+};
+
+static final BitmapCharRec ch102 = new BitmapCharRec(7,17,0,0,7,ch102data);
+
+/* char: 0x65 'e' */
+
+static final byte[] ch101data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x70,(byte) 0x80,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0x41,(byte) 0x80,(byte) 0x63,(byte) 0x0,(byte) 0x1e,(byte) 0x0,
+};
+
+static final BitmapCharRec ch101 = new BitmapCharRec(9,12,-1,0,11,ch101data);
+
+/* char: 0x64 'd' */
+
+static final byte[] ch100data = {
+(byte) 0x1e,(byte) 0xc0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1d,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,
+(byte) 0x3,(byte) 0x80,
+};
+
+static final BitmapCharRec ch100 = new BitmapCharRec(10,17,-1,0,12,ch100data);
+
+/* char: 0x63 'c' */
+
+static final byte[] ch99data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x70,(byte) 0x80,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0x41,(byte) 0x80,(byte) 0x63,(byte) 0x80,(byte) 0x1f,(byte) 0x0,
+};
+
+static final BitmapCharRec ch99 = new BitmapCharRec(9,12,-1,0,11,ch99data);
+
+/* char: 0x62 'b' */
+
+static final byte[] ch98data = {
+(byte) 0x5e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
+(byte) 0x60,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x6e,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,
+(byte) 0xe0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch98 = new BitmapCharRec(10,17,-1,0,12,ch98data);
+
+/* char: 0x61 'a' */
+
+static final byte[] ch97data = {
+(byte) 0x71,(byte) 0x80,(byte) 0xfb,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0x0,(byte) 0x3e,(byte) 0x0,
+};
+
+static final BitmapCharRec ch97 = new BitmapCharRec(9,12,-1,0,11,ch97data);
+
+/* char: 0x60 '`' */
+
+static final byte[] ch96data = {
+(byte) 0x60,(byte) 0xe0,(byte) 0x80,(byte) 0xc0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch96 = new BitmapCharRec(3,5,-2,-12,7,ch96data);
+
+/* char: 0x5f '_' */
+
+static final byte[] ch95data = {
+(byte) 0xff,(byte) 0xf8,(byte) 0xff,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch95 = new BitmapCharRec(13,2,0,5,13,ch95data);
+
+/* char: 0x5e '^' */
+
+static final byte[] ch94data = {
+(byte) 0x80,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x41,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x36,(byte) 0x0,(byte) 0x14,(byte) 0x0,(byte) 0x1c,(byte) 0x0,
+(byte) 0x8,(byte) 0x0,
+};
+
+static final BitmapCharRec ch94 = new BitmapCharRec(9,9,-1,-8,11,ch94data);
+
+/* char: 0x5d ']' */
+
+static final byte[] ch93data = {
+(byte) 0xf8,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,
+(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch93 = new BitmapCharRec(5,21,-1,4,8,ch93data);
+
+/* char: 0x5c '\' */
+
+static final byte[] ch92data = {
+(byte) 0x6,(byte) 0x6,(byte) 0x4,(byte) 0xc,(byte) 0xc,(byte) 0x8,(byte) 0x18,(byte) 0x18,(byte) 0x10,(byte) 0x30,(byte) 0x30,(byte) 0x20,(byte) 0x60,(byte) 0x60,(byte) 0x40,(byte) 0xc0,
+(byte) 0xc0,
+};
+
+static final BitmapCharRec ch92 = new BitmapCharRec(7,17,0,0,7,ch92data);
+
+/* char: 0x5b '[' */
+
+static final byte[] ch91data = {
+(byte) 0xf8,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch91 = new BitmapCharRec(5,21,-2,4,8,ch91data);
+
+/* char: 0x5a 'Z' */
+
+static final byte[] ch90data = {
+(byte) 0xff,(byte) 0xf8,(byte) 0xe0,(byte) 0x18,(byte) 0x70,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x38,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0xe,(byte) 0x0,
+(byte) 0x6,(byte) 0x0,(byte) 0x7,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x80,(byte) 0x1,(byte) 0xc0,(byte) 0x80,(byte) 0xc0,(byte) 0x80,(byte) 0xe0,(byte) 0xc0,(byte) 0x70,
+(byte) 0xff,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch90 = new BitmapCharRec(13,17,-1,0,15,ch90data);
+
+/* char: 0x59 'Y' */
+
+static final byte[] ch89data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x3,(byte) 0xc0,
+(byte) 0x3,(byte) 0x40,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x20,(byte) 0xc,(byte) 0x30,(byte) 0x1c,(byte) 0x10,(byte) 0x18,(byte) 0x18,(byte) 0x38,(byte) 0x8,(byte) 0x30,(byte) 0xc,
+(byte) 0xfc,(byte) 0x3f,
+};
+
+static final BitmapCharRec ch89 = new BitmapCharRec(16,17,0,0,16,ch89data);
+
+/* char: 0x58 'X' */
+
+static final byte[] ch88data = {
+(byte) 0xfc,(byte) 0xf,(byte) 0xc0,(byte) 0x30,(byte) 0x3,(byte) 0x80,(byte) 0x18,(byte) 0x7,(byte) 0x0,(byte) 0x8,(byte) 0xe,(byte) 0x0,(byte) 0x4,(byte) 0xc,(byte) 0x0,(byte) 0x6,
+(byte) 0x18,(byte) 0x0,(byte) 0x2,(byte) 0x38,(byte) 0x0,(byte) 0x1,(byte) 0x70,(byte) 0x0,(byte) 0x0,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,
+(byte) 0x0,(byte) 0x3,(byte) 0xa0,(byte) 0x0,(byte) 0x3,(byte) 0x10,(byte) 0x0,(byte) 0x6,(byte) 0x8,(byte) 0x0,(byte) 0xe,(byte) 0xc,(byte) 0x0,(byte) 0x1c,(byte) 0x6,(byte) 0x0,
+(byte) 0x7e,(byte) 0xf,(byte) 0x80,
+};
+
+static final BitmapCharRec ch88 = new BitmapCharRec(18,17,0,0,18,ch88data);
+
+/* char: 0x57 'W' */
+
+static final byte[] ch87data = {
+(byte) 0x1,(byte) 0x83,(byte) 0x0,(byte) 0x1,(byte) 0x83,(byte) 0x0,(byte) 0x1,(byte) 0x83,(byte) 0x80,(byte) 0x3,(byte) 0x87,(byte) 0x80,(byte) 0x3,(byte) 0x46,(byte) 0x80,(byte) 0x3,
+(byte) 0x46,(byte) 0xc0,(byte) 0x6,(byte) 0x46,(byte) 0x40,(byte) 0x6,(byte) 0x4c,(byte) 0x40,(byte) 0x6,(byte) 0x4c,(byte) 0x60,(byte) 0xc,(byte) 0x2c,(byte) 0x60,(byte) 0xc,(byte) 0x2c,
+(byte) 0x20,(byte) 0x18,(byte) 0x2c,(byte) 0x20,(byte) 0x18,(byte) 0x18,(byte) 0x30,(byte) 0x18,(byte) 0x18,(byte) 0x10,(byte) 0x30,(byte) 0x18,(byte) 0x10,(byte) 0x30,(byte) 0x18,(byte) 0x18,
+(byte) 0xfc,(byte) 0x7e,(byte) 0x7e,
+};
+
+static final BitmapCharRec ch87 = new BitmapCharRec(23,17,0,0,23,ch87data);
+
+/* char: 0x56 'V' */
+
+static final byte[] ch86data = {
+(byte) 0x1,(byte) 0x80,(byte) 0x0,(byte) 0x1,(byte) 0x80,(byte) 0x0,(byte) 0x1,(byte) 0x80,(byte) 0x0,(byte) 0x3,(byte) 0xc0,(byte) 0x0,(byte) 0x3,(byte) 0x40,(byte) 0x0,(byte) 0x3,
+(byte) 0x60,(byte) 0x0,(byte) 0x6,(byte) 0x20,(byte) 0x0,(byte) 0x6,(byte) 0x20,(byte) 0x0,(byte) 0x6,(byte) 0x30,(byte) 0x0,(byte) 0xc,(byte) 0x10,(byte) 0x0,(byte) 0xc,(byte) 0x18,
+(byte) 0x0,(byte) 0x18,(byte) 0x8,(byte) 0x0,(byte) 0x18,(byte) 0x8,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x30,(byte) 0x4,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,
+(byte) 0xfc,(byte) 0x1f,(byte) 0x80,
+};
+
+static final BitmapCharRec ch86 = new BitmapCharRec(17,17,0,0,17,ch86data);
+
+/* char: 0x55 'U' */
+
+static final byte[] ch85data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x30,(byte) 0x18,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0xfc,(byte) 0x1f,
+};
+
+static final BitmapCharRec ch85 = new BitmapCharRec(16,17,-1,0,18,ch85data);
+
+/* char: 0x54 'T' */
+
+static final byte[] ch84data = {
+(byte) 0xf,(byte) 0xc0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x83,(byte) 0x4,(byte) 0x83,(byte) 0x4,(byte) 0xc3,(byte) 0xc,
+(byte) 0xff,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch84 = new BitmapCharRec(14,17,-1,0,16,ch84data);
+
+/* char: 0x53 'S' */
+
+static final byte[] ch83data = {
+(byte) 0x9e,(byte) 0x0,(byte) 0xf1,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0x80,(byte) 0x60,(byte) 0x80,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0xe0,(byte) 0x3,(byte) 0xc0,
+(byte) 0xf,(byte) 0x80,(byte) 0x1e,(byte) 0x0,(byte) 0x78,(byte) 0x0,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x40,(byte) 0xc0,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,(byte) 0x63,(byte) 0xc0,
+(byte) 0x1e,(byte) 0x40,
+};
+
+static final BitmapCharRec ch83 = new BitmapCharRec(11,17,-1,0,13,ch83data);
+
+/* char: 0x52 'R' */
+
+static final byte[] ch82data = {
+(byte) 0xfc,(byte) 0x1e,(byte) 0x30,(byte) 0x1c,(byte) 0x30,(byte) 0x38,(byte) 0x30,(byte) 0x70,(byte) 0x30,(byte) 0x60,(byte) 0x30,(byte) 0xc0,(byte) 0x31,(byte) 0xc0,(byte) 0x33,(byte) 0x80,
+(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x70,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x38,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x38,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x70,
+(byte) 0xff,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch82 = new BitmapCharRec(15,17,-1,0,16,ch82data);
+
+/* char: 0x51 'Q' */
+
+static final byte[] ch81data = {
+(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x38,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0xe0,(byte) 0x1,(byte) 0xc0,(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,
+(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,
+(byte) 0xc0,(byte) 0x3,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x38,(byte) 0x1c,(byte) 0x1c,(byte) 0x38,(byte) 0x7,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch81 = new BitmapCharRec(16,22,-1,5,18,ch81data);
+
+/* char: 0x50 'P' */
+
+static final byte[] ch80data = {
+(byte) 0xfc,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,
+(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x70,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x70,
+(byte) 0xff,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch80 = new BitmapCharRec(13,17,-1,0,15,ch80data);
+
+/* char: 0x4f 'O' */
+
+static final byte[] ch79data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,
+(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x38,(byte) 0x1c,(byte) 0x1c,(byte) 0x38,
+(byte) 0x7,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch79 = new BitmapCharRec(16,17,-1,0,18,ch79data);
+
+/* char: 0x4e 'N' */
+
+static final byte[] ch78data = {
+(byte) 0xf8,(byte) 0xc,(byte) 0x20,(byte) 0x1c,(byte) 0x20,(byte) 0x1c,(byte) 0x20,(byte) 0x34,(byte) 0x20,(byte) 0x64,(byte) 0x20,(byte) 0x64,(byte) 0x20,(byte) 0xc4,(byte) 0x21,(byte) 0x84,
+(byte) 0x21,(byte) 0x84,(byte) 0x23,(byte) 0x4,(byte) 0x26,(byte) 0x4,(byte) 0x26,(byte) 0x4,(byte) 0x2c,(byte) 0x4,(byte) 0x38,(byte) 0x4,(byte) 0x38,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0xf0,(byte) 0x1f,
+};
+
+static final BitmapCharRec ch78 = new BitmapCharRec(16,17,-1,0,18,ch78data);
+
+/* char: 0x4d 'M' */
+
+static final byte[] ch77data = {
+(byte) 0xf8,(byte) 0x21,(byte) 0xf8,(byte) 0x20,(byte) 0x60,(byte) 0x60,(byte) 0x20,(byte) 0x60,(byte) 0x60,(byte) 0x20,(byte) 0xd0,(byte) 0x60,(byte) 0x20,(byte) 0xd0,(byte) 0x60,(byte) 0x21,
+(byte) 0x88,(byte) 0x60,(byte) 0x21,(byte) 0x88,(byte) 0x60,(byte) 0x23,(byte) 0x8,(byte) 0x60,(byte) 0x23,(byte) 0x4,(byte) 0x60,(byte) 0x26,(byte) 0x4,(byte) 0x60,(byte) 0x26,(byte) 0x2,
+(byte) 0x60,(byte) 0x2c,(byte) 0x2,(byte) 0x60,(byte) 0x2c,(byte) 0x2,(byte) 0x60,(byte) 0x38,(byte) 0x1,(byte) 0x60,(byte) 0x38,(byte) 0x1,(byte) 0x60,(byte) 0x30,(byte) 0x0,(byte) 0xe0,
+(byte) 0xf0,(byte) 0x0,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch77 = new BitmapCharRec(21,17,-1,0,22,ch77data);
+
+/* char: 0x4c 'L' */
+
+static final byte[] ch76data = {
+(byte) 0xff,(byte) 0xf8,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,
+(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,
+(byte) 0xfc,(byte) 0x0,
+};
+
+static final BitmapCharRec ch76 = new BitmapCharRec(13,17,-1,0,14,ch76data);
+
+/* char: 0x4b 'K' */
+
+static final byte[] ch75data = {
+(byte) 0xfc,(byte) 0x1f,(byte) 0x30,(byte) 0xe,(byte) 0x30,(byte) 0x1c,(byte) 0x30,(byte) 0x38,(byte) 0x30,(byte) 0x70,(byte) 0x30,(byte) 0xe0,(byte) 0x31,(byte) 0xc0,(byte) 0x33,(byte) 0x80,
+(byte) 0x3f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x31,(byte) 0x80,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x18,
+(byte) 0xfc,(byte) 0x7e,
+};
+
+static final BitmapCharRec ch75 = new BitmapCharRec(16,17,-1,0,17,ch75data);
+
+/* char: 0x4a 'J' */
+
+static final byte[] ch74data = {
+(byte) 0x78,(byte) 0x0,(byte) 0xcc,(byte) 0x0,(byte) 0xc6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+(byte) 0x1f,(byte) 0x80,
+};
+
+static final BitmapCharRec ch74 = new BitmapCharRec(9,17,-1,0,11,ch74data);
+
+/* char: 0x49 'I' */
+
+static final byte[] ch73data = {
+(byte) 0xfc,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
+(byte) 0xfc,
+};
+
+static final BitmapCharRec ch73 = new BitmapCharRec(6,17,-1,0,8,ch73data);
+
+/* char: 0x48 'H' */
+
+static final byte[] ch72data = {
+(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,
+(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x3f,(byte) 0xfe,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,
+(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,
+(byte) 0xfc,(byte) 0x1f,(byte) 0x80,
+};
+
+static final BitmapCharRec ch72 = new BitmapCharRec(17,17,-1,0,19,ch72data);
+
+/* char: 0x47 'G' */
+
+static final byte[] ch71data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1e,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x60,(byte) 0xc,(byte) 0x60,(byte) 0xc,(byte) 0xc0,(byte) 0xc,(byte) 0xc0,(byte) 0xc,(byte) 0xc0,(byte) 0x3f,
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x60,(byte) 0x4,(byte) 0x60,(byte) 0x4,(byte) 0x38,(byte) 0xc,(byte) 0x1c,(byte) 0x3c,
+(byte) 0x7,(byte) 0xe4,
+};
+
+static final BitmapCharRec ch71 = new BitmapCharRec(16,17,-1,0,18,ch71data);
+
+/* char: 0x46 'F' */
+
+static final byte[] ch70data = {
+(byte) 0xfc,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x20,(byte) 0x30,(byte) 0x20,
+(byte) 0x3f,(byte) 0xe0,(byte) 0x30,(byte) 0x20,(byte) 0x30,(byte) 0x20,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x30,
+(byte) 0xff,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch70 = new BitmapCharRec(12,17,-1,0,14,ch70data);
+
+/* char: 0x45 'E' */
+
+static final byte[] ch69data = {
+(byte) 0xff,(byte) 0xf8,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,
+(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x30,
+(byte) 0xff,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch69 = new BitmapCharRec(13,17,-1,0,15,ch69data);
+
+/* char: 0x44 'D' */
+
+static final byte[] ch68data = {
+(byte) 0xff,(byte) 0xc0,(byte) 0x30,(byte) 0x70,(byte) 0x30,(byte) 0x38,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0x6,(byte) 0x30,(byte) 0x6,(byte) 0x30,(byte) 0x6,
+(byte) 0x30,(byte) 0x6,(byte) 0x30,(byte) 0x6,(byte) 0x30,(byte) 0x6,(byte) 0x30,(byte) 0x6,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0x38,(byte) 0x30,(byte) 0x70,
+(byte) 0xff,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch68 = new BitmapCharRec(15,17,-1,0,17,ch68data);
+
+/* char: 0x43 'C' */
+
+static final byte[] ch67data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1e,(byte) 0x38,(byte) 0x38,(byte) 0x8,(byte) 0x60,(byte) 0x4,(byte) 0x60,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x60,(byte) 0x4,(byte) 0x60,(byte) 0x4,(byte) 0x38,(byte) 0xc,(byte) 0x1c,(byte) 0x3c,
+(byte) 0x7,(byte) 0xe4,
+};
+
+static final BitmapCharRec ch67 = new BitmapCharRec(14,17,-1,0,16,ch67data);
+
+/* char: 0x42 'B' */
+
+static final byte[] ch66data = {
+(byte) 0xff,(byte) 0xe0,(byte) 0x30,(byte) 0x78,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x38,
+(byte) 0x3f,(byte) 0xe0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x70,
+(byte) 0xff,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch66 = new BitmapCharRec(14,17,-1,0,16,ch66data);
+
+/* char: 0x41 'A' */
+
+static final byte[] ch65data = {
+(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x8,
+(byte) 0xc,(byte) 0x0,(byte) 0xf,(byte) 0xf8,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,
+(byte) 0x0,(byte) 0x2,(byte) 0x30,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
+(byte) 0x0,(byte) 0x80,(byte) 0x0,
+};
+
+static final BitmapCharRec ch65 = new BitmapCharRec(17,17,0,0,17,ch65data);
+
+/* char: 0x40 '@' */
+
+static final byte[] ch64data = {
+(byte) 0x3,(byte) 0xf0,(byte) 0x0,(byte) 0xe,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x0,(byte) 0x61,(byte) 0xde,(byte) 0x0,(byte) 0x63,
+(byte) 0x7b,(byte) 0x0,(byte) 0xc6,(byte) 0x39,(byte) 0x80,(byte) 0xc6,(byte) 0x18,(byte) 0x80,(byte) 0xc6,(byte) 0x18,(byte) 0xc0,(byte) 0xc6,(byte) 0x18,(byte) 0x40,(byte) 0xc6,(byte) 0xc,
+(byte) 0x40,(byte) 0xc3,(byte) 0xc,(byte) 0x40,(byte) 0xc3,(byte) 0x8c,(byte) 0x40,(byte) 0xe1,(byte) 0xfc,(byte) 0x40,(byte) 0x60,(byte) 0xec,(byte) 0xc0,(byte) 0x70,(byte) 0x0,(byte) 0x80,
+(byte) 0x38,(byte) 0x1,(byte) 0x80,(byte) 0x1c,(byte) 0x3,(byte) 0x0,(byte) 0xf,(byte) 0xe,(byte) 0x0,(byte) 0x3,(byte) 0xf8,(byte) 0x0,
+};
+
+static final BitmapCharRec ch64 = new BitmapCharRec(18,20,-2,3,22,ch64data);
+
+/* char: 0x3f '?' */
+
+static final byte[] ch63data = {
+(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x18,(byte) 0x18,(byte) 0xc,(byte) 0xe,(byte) 0x7,(byte) 0xc3,(byte) 0xc3,(byte) 0x83,(byte) 0xc6,
+(byte) 0x7c,
+};
+
+static final BitmapCharRec ch63 = new BitmapCharRec(8,17,-2,0,11,ch63data);
+
+/* char: 0x3e '>' */
+
+static final byte[] ch62data = {
+(byte) 0xc0,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0x7,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x60,(byte) 0x1,(byte) 0xc0,(byte) 0x7,(byte) 0x0,
+(byte) 0x1c,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch62 = new BitmapCharRec(11,11,-1,-1,13,ch62data);
+
+/* char: 0x3d '=' */
+
+static final byte[] ch61data = {
+(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch61 = new BitmapCharRec(12,6,-1,-4,14,ch61data);
+
+/* char: 0x3c '<' */
+
+static final byte[] ch60data = {
+(byte) 0x0,(byte) 0x60,(byte) 0x1,(byte) 0xc0,(byte) 0x7,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x1c,(byte) 0x0,
+(byte) 0x7,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch60 = new BitmapCharRec(11,11,-1,-1,13,ch60data);
+
+/* char: 0x3b ';' */
+
+static final byte[] ch59data = {
+(byte) 0xc0,(byte) 0x60,(byte) 0x20,(byte) 0xe0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch59 = new BitmapCharRec(3,14,-2,3,7,ch59data);
+
+/* char: 0x3a ':' */
+
+static final byte[] ch58data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch58 = new BitmapCharRec(2,11,-2,0,6,ch58data);
+
+/* char: 0x39 '9' */
+
+static final byte[] ch57data = {
+(byte) 0xf0,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1d,(byte) 0x80,(byte) 0x73,(byte) 0xc0,
+(byte) 0x61,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc1,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x77,(byte) 0x80,
+(byte) 0x1e,(byte) 0x0,
+};
+
+static final BitmapCharRec ch57 = new BitmapCharRec(10,17,-1,0,12,ch57data);
+
+/* char: 0x38 '8' */
+
+static final byte[] ch56data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0xe1,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x41,(byte) 0xc0,(byte) 0x61,(byte) 0x80,
+(byte) 0x37,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x33,(byte) 0x0,
+(byte) 0x1e,(byte) 0x0,
+};
+
+static final BitmapCharRec ch56 = new BitmapCharRec(10,17,-1,0,12,ch56data);
+
+/* char: 0x37 '7' */
+
+static final byte[] ch55data = {
+(byte) 0x18,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+(byte) 0x2,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x1,(byte) 0x80,(byte) 0x81,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,
+(byte) 0x7f,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch55 = new BitmapCharRec(10,17,-1,0,12,ch55data);
+
+/* char: 0x36 '6' */
+
+static final byte[] ch54data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x7b,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xe0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc1,(byte) 0x80,(byte) 0xf3,(byte) 0x80,(byte) 0xee,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0xe,(byte) 0x0,
+(byte) 0x3,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch54 = new BitmapCharRec(10,17,-1,0,12,ch54data);
+
+/* char: 0x35 '5' */
+
+static final byte[] ch53data = {
+(byte) 0x7e,(byte) 0x0,(byte) 0xe3,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x1,(byte) 0xc0,
+(byte) 0x3,(byte) 0x80,(byte) 0xf,(byte) 0x80,(byte) 0x7e,(byte) 0x0,(byte) 0x78,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x20,(byte) 0x0,(byte) 0x20,(byte) 0x0,(byte) 0x1f,(byte) 0x80,
+(byte) 0x1f,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch53 = new BitmapCharRec(10,17,-1,0,12,ch53data);
+
+/* char: 0x34 '4' */
+
+static final byte[] ch52data = {
+(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0xff,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,(byte) 0xc3,(byte) 0x0,(byte) 0x43,(byte) 0x0,
+(byte) 0x63,(byte) 0x0,(byte) 0x23,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x13,(byte) 0x0,(byte) 0x1b,(byte) 0x0,(byte) 0xb,(byte) 0x0,(byte) 0x7,(byte) 0x0,(byte) 0x7,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,
+};
+
+static final BitmapCharRec ch52 = new BitmapCharRec(10,17,-1,0,12,ch52data);
+
+/* char: 0x33 '3' */
+
+static final byte[] ch51data = {
+(byte) 0x78,(byte) 0x0,(byte) 0xe6,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x3,(byte) 0x80,
+(byte) 0x7,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x83,(byte) 0x0,(byte) 0x83,(byte) 0x0,(byte) 0x47,(byte) 0x0,(byte) 0x7e,(byte) 0x0,
+(byte) 0x1c,(byte) 0x0,
+};
+
+static final BitmapCharRec ch51 = new BitmapCharRec(9,17,-1,0,12,ch51data);
+
+/* char: 0x32 '2' */
+
+static final byte[] ch50data = {
+(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0xc0,(byte) 0x60,(byte) 0x40,(byte) 0x30,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x81,(byte) 0x80,(byte) 0x81,(byte) 0x80,(byte) 0x43,(byte) 0x80,(byte) 0x7f,(byte) 0x0,
+(byte) 0x1c,(byte) 0x0,
+};
+
+static final BitmapCharRec ch50 = new BitmapCharRec(10,17,-1,0,12,ch50data);
+
+/* char: 0x31 '1' */
+
+static final byte[] ch49data = {
+(byte) 0xff,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x78,(byte) 0x18,
+(byte) 0x8,
+};
+
+static final BitmapCharRec ch49 = new BitmapCharRec(8,17,-2,0,12,ch49data);
+
+/* char: 0x30 '0' */
+
+static final byte[] ch48data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xe1,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x33,(byte) 0x0,
+(byte) 0x1e,(byte) 0x0,
+};
+
+static final BitmapCharRec ch48 = new BitmapCharRec(10,17,-1,0,12,ch48data);
+
+/* char: 0x2f '/' */
+
+static final byte[] ch47data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0x60,(byte) 0x20,(byte) 0x30,(byte) 0x30,(byte) 0x10,(byte) 0x18,(byte) 0x18,(byte) 0x8,(byte) 0xc,(byte) 0xc,(byte) 0x4,(byte) 0x6,
+(byte) 0x6,(byte) 0x3,(byte) 0x3,(byte) 0x3,
+};
+
+static final BitmapCharRec ch47 = new BitmapCharRec(8,20,1,3,7,ch47data);
+
+/* char: 0x2e '.' */
+
+static final byte[] ch46data = {
+(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch46 = new BitmapCharRec(2,2,-2,0,6,ch46data);
+
+/* char: 0x2d '-' */
+
+static final byte[] ch45data = {
+(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch45 = new BitmapCharRec(12,2,-1,-6,14,ch45data);
+
+/* char: 0x2c ',' */
+
+static final byte[] ch44data = {
+(byte) 0xc0,(byte) 0x60,(byte) 0x20,(byte) 0xe0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch44 = new BitmapCharRec(3,5,-2,3,7,ch44data);
+
+/* char: 0x2b '+' */
+
+static final byte[] ch43data = {
+(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,(byte) 0x6,(byte) 0x0,
+(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+};
+
+static final BitmapCharRec ch43 = new BitmapCharRec(12,12,-1,-1,14,ch43data);
+
+/* char: 0x2a '*' */
+
+static final byte[] ch42data = {
+(byte) 0x8,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0xc9,(byte) 0x80,(byte) 0xeb,(byte) 0x80,(byte) 0x1c,(byte) 0x0,(byte) 0xeb,(byte) 0x80,(byte) 0xc9,(byte) 0x80,(byte) 0x1c,(byte) 0x0,
+(byte) 0x8,(byte) 0x0,
+};
+
+static final BitmapCharRec ch42 = new BitmapCharRec(9,9,-2,-8,12,ch42data);
+
+/* char: 0x29 ')' */
+
+static final byte[] ch41data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x30,(byte) 0x10,(byte) 0x18,(byte) 0x18,(byte) 0xc,(byte) 0xc,(byte) 0xc,(byte) 0xc,(byte) 0xc,(byte) 0xc,(byte) 0xc,(byte) 0xc,(byte) 0x18,
+(byte) 0x18,(byte) 0x10,(byte) 0x30,(byte) 0x20,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch41 = new BitmapCharRec(6,22,-1,5,8,ch41data);
+
+/* char: 0x28 '(' */
+
+static final byte[] ch40data = {
+(byte) 0x4,(byte) 0x8,(byte) 0x10,(byte) 0x30,(byte) 0x20,(byte) 0x60,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,
+(byte) 0x60,(byte) 0x20,(byte) 0x30,(byte) 0x10,(byte) 0x8,(byte) 0x4,
+};
+
+static final BitmapCharRec ch40 = new BitmapCharRec(6,22,-1,5,8,ch40data);
+
+/* char: 0x27 ''' */
+
+static final byte[] ch39data = {
+(byte) 0xc0,(byte) 0x60,(byte) 0x20,(byte) 0xe0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch39 = new BitmapCharRec(3,5,-3,-12,8,ch39data);
+
+/* char: 0x26 '&' */
+
+static final byte[] ch38data = {
+(byte) 0x3c,(byte) 0x3c,(byte) 0x7f,(byte) 0x7e,(byte) 0xe1,(byte) 0xe1,(byte) 0xc0,(byte) 0xc0,(byte) 0xc1,(byte) 0xc0,(byte) 0xc1,(byte) 0xa0,(byte) 0x63,(byte) 0x20,(byte) 0x37,(byte) 0x10,
+(byte) 0x1e,(byte) 0x18,(byte) 0xe,(byte) 0x3e,(byte) 0xf,(byte) 0x0,(byte) 0x1d,(byte) 0x80,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0x40,(byte) 0x18,(byte) 0x40,(byte) 0xc,(byte) 0xc0,
+(byte) 0x7,(byte) 0x80,
+};
+
+static final BitmapCharRec ch38 = new BitmapCharRec(16,17,-1,0,18,ch38data);
+
+/* char: 0x25 '%' */
+
+static final byte[] ch37data = {
+(byte) 0x30,(byte) 0x3c,(byte) 0x0,(byte) 0x18,(byte) 0x72,(byte) 0x0,(byte) 0xc,(byte) 0x61,(byte) 0x0,(byte) 0x4,(byte) 0x60,(byte) 0x80,(byte) 0x6,(byte) 0x60,(byte) 0x80,(byte) 0x3,
+(byte) 0x30,(byte) 0x80,(byte) 0x1,(byte) 0x19,(byte) 0x80,(byte) 0x1,(byte) 0x8f,(byte) 0x0,(byte) 0x78,(byte) 0xc0,(byte) 0x0,(byte) 0xe4,(byte) 0x40,(byte) 0x0,(byte) 0xc2,(byte) 0x60,
+(byte) 0x0,(byte) 0xc1,(byte) 0x30,(byte) 0x0,(byte) 0xc1,(byte) 0x10,(byte) 0x0,(byte) 0x61,(byte) 0x18,(byte) 0x0,(byte) 0x33,(byte) 0xfc,(byte) 0x0,(byte) 0x1e,(byte) 0xc,(byte) 0x0,
+};
+
+static final BitmapCharRec ch37 = new BitmapCharRec(17,16,-1,0,19,ch37data);
+
+/* char: 0x24 '$' */
+
+static final byte[] ch36data = {
+(byte) 0x4,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0x3f,(byte) 0x0,(byte) 0xe5,(byte) 0xc0,(byte) 0xc4,(byte) 0xc0,(byte) 0x84,(byte) 0x60,(byte) 0x84,(byte) 0x60,(byte) 0x4,(byte) 0x60,
+(byte) 0x4,(byte) 0xe0,(byte) 0x7,(byte) 0xc0,(byte) 0x7,(byte) 0x80,(byte) 0x1e,(byte) 0x0,(byte) 0x3c,(byte) 0x0,(byte) 0x74,(byte) 0x0,(byte) 0x64,(byte) 0x0,(byte) 0x64,(byte) 0x20,
+(byte) 0x64,(byte) 0x60,(byte) 0x34,(byte) 0xe0,(byte) 0x1f,(byte) 0x80,(byte) 0x4,(byte) 0x0,(byte) 0x4,(byte) 0x0,
+};
+
+static final BitmapCharRec ch36 = new BitmapCharRec(11,21,0,2,12,ch36data);
+
+/* char: 0x23 '#' */
+
+static final byte[] ch35data = {
+(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0xff,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,(byte) 0x11,(byte) 0x0,
+(byte) 0x11,(byte) 0x0,(byte) 0x11,(byte) 0x0,(byte) 0x7f,(byte) 0xe0,(byte) 0x7f,(byte) 0xe0,(byte) 0x8,(byte) 0x80,(byte) 0x8,(byte) 0x80,(byte) 0x8,(byte) 0x80,(byte) 0x8,(byte) 0x80,
+(byte) 0x8,(byte) 0x80,
+};
+
+static final BitmapCharRec ch35 = new BitmapCharRec(11,17,-1,0,13,ch35data);
+
+/* char: 0x22 '"' */
+
+static final byte[] ch34data = {
+(byte) 0x88,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,
+};
+
+static final BitmapCharRec ch34 = new BitmapCharRec(6,5,-1,-12,10,ch34data);
+
+/* char: 0x21 '!' */
+
+static final byte[] ch33data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,
+};
+
+static final BitmapCharRec ch33 = new BitmapCharRec(2,17,-3,0,8,ch33data);
+
+/* char: 0x20 ' ' */
+
+static final BitmapCharRec ch32 = new BitmapCharRec(0,0,0,0,6,null);
+
+static final BitmapCharRec[] chars = {
+ch32,
+ch33,
+ch34,
+ch35,
+ch36,
+ch37,
+ch38,
+ch39,
+ch40,
+ch41,
+ch42,
+ch43,
+ch44,
+ch45,
+ch46,
+ch47,
+ch48,
+ch49,
+ch50,
+ch51,
+ch52,
+ch53,
+ch54,
+ch55,
+ch56,
+ch57,
+ch58,
+ch59,
+ch60,
+ch61,
+ch62,
+ch63,
+ch64,
+ch65,
+ch66,
+ch67,
+ch68,
+ch69,
+ch70,
+ch71,
+ch72,
+ch73,
+ch74,
+ch75,
+ch76,
+ch77,
+ch78,
+ch79,
+ch80,
+ch81,
+ch82,
+ch83,
+ch84,
+ch85,
+ch86,
+ch87,
+ch88,
+ch89,
+ch90,
+ch91,
+ch92,
+ch93,
+ch94,
+ch95,
+ch96,
+ch97,
+ch98,
+ch99,
+ch100,
+ch101,
+ch102,
+ch103,
+ch104,
+ch105,
+ch106,
+ch107,
+ch108,
+ch109,
+ch110,
+ch111,
+ch112,
+ch113,
+ch114,
+ch115,
+ch116,
+ch117,
+ch118,
+ch119,
+ch120,
+ch121,
+ch122,
+ch123,
+ch124,
+ch125,
+ch126,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+ch160,
+ch161,
+ch162,
+ch163,
+ch164,
+ch165,
+ch166,
+ch167,
+ch168,
+ch169,
+ch170,
+ch171,
+ch172,
+ch173,
+ch174,
+ch175,
+ch176,
+ch177,
+ch178,
+ch179,
+ch180,
+ch181,
+ch182,
+ch183,
+ch184,
+ch185,
+ch186,
+ch187,
+ch188,
+ch189,
+ch190,
+ch191,
+ch192,
+ch193,
+ch194,
+ch195,
+ch196,
+ch197,
+ch198,
+ch199,
+ch200,
+ch201,
+ch202,
+ch203,
+ch204,
+ch205,
+ch206,
+ch207,
+ch208,
+ch209,
+ch210,
+ch211,
+ch212,
+ch213,
+ch214,
+ch215,
+ch216,
+ch217,
+ch218,
+ch219,
+ch220,
+ch221,
+ch222,
+ch223,
+ch224,
+ch225,
+ch226,
+ch227,
+ch228,
+ch229,
+ch230,
+ch231,
+ch232,
+ch233,
+ch234,
+ch235,
+ch236,
+ch237,
+ch238,
+ch239,
+ch240,
+ch241,
+ch242,
+ch243,
+ch244,
+ch245,
+ch246,
+ch247,
+ch248,
+ch249,
+ch250,
+ch251,
+ch252,
+ch253,
+ch254,
+ch255,
+};
+
+ public static final BitmapFontRec glutBitmapTimesRoman24 = new BitmapFontRec("-adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1",
+ 224,
+ 32,
+ chars);
+}
diff --git a/src/classes/com/sun/opengl/util/glut/fonts/GLUTStrokeMonoRoman.java b/src/classes/com/sun/opengl/util/glut/fonts/GLUTStrokeMonoRoman.java
new file mode 100644
index 000000000..9abe353cf
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/glut/fonts/GLUTStrokeMonoRoman.java
@@ -0,0 +1,2493 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.glut.fonts;
+
+import com.sun.opengl.util.glut.rec.*;
+
+public class GLUTStrokeMonoRoman {
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+/* char: 33 '!' */
+
+static final CoordRec char33_stroke0[] = {
+ new CoordRec((float) 52.381, (float) 100 ),
+ new CoordRec((float) 52.381, (float) 33.3333 ),
+};
+
+static final CoordRec char33_stroke1[] = {
+ new CoordRec((float) 52.381, (float) 9.5238 ),
+ new CoordRec((float) 47.6191, (float) 4.7619 ),
+ new CoordRec((float) 52.381, (float) 0 ),
+ new CoordRec((float) 57.1429, (float) 4.7619 ),
+ new CoordRec((float) 52.381, (float) 9.5238 ),
+};
+
+static final StrokeRec char33[] = {
+ new StrokeRec( 2, char33_stroke0 ),
+ new StrokeRec( 5, char33_stroke1 ),
+};
+
+/* char: 34 '"' */
+
+static final CoordRec char34_stroke0[] = {
+ new CoordRec((float) 33.3334, (float) 100 ),
+ new CoordRec((float) 33.3334, (float) 66.6667 ),
+};
+
+static final CoordRec char34_stroke1[] = {
+ new CoordRec((float) 71.4286, (float) 100 ),
+ new CoordRec((float) 71.4286, (float) 66.6667 ),
+};
+
+static final StrokeRec char34[] = {
+ new StrokeRec( 2, char34_stroke0 ),
+ new StrokeRec( 2, char34_stroke1 ),
+};
+
+/* char: 35 '#' */
+
+static final CoordRec char35_stroke0[] = {
+ new CoordRec((float) 54.7619, (float) 119.048 ),
+ new CoordRec((float) 21.4286, (float) -33.3333 ),
+};
+
+static final CoordRec char35_stroke1[] = {
+ new CoordRec((float) 83.3334, (float) 119.048 ),
+ new CoordRec((float) 50, (float) -33.3333 ),
+};
+
+static final CoordRec char35_stroke2[] = {
+ new CoordRec((float) 21.4286, (float) 57.1429 ),
+ new CoordRec((float) 88.0952, (float) 57.1429 ),
+};
+
+static final CoordRec char35_stroke3[] = {
+ new CoordRec((float) 16.6667, (float) 28.5714 ),
+ new CoordRec((float) 83.3334, (float) 28.5714 ),
+};
+
+static final StrokeRec char35[] = {
+ new StrokeRec( 2, char35_stroke0 ),
+ new StrokeRec( 2, char35_stroke1 ),
+ new StrokeRec( 2, char35_stroke2 ),
+ new StrokeRec( 2, char35_stroke3 ),
+};
+
+/* char: 36 '$' */
+
+static final CoordRec char36_stroke0[] = {
+ new CoordRec((float) 42.8571, (float) 119.048 ),
+ new CoordRec((float) 42.8571, (float) -19.0476 ),
+};
+
+static final CoordRec char36_stroke1[] = {
+ new CoordRec((float) 61.9047, (float) 119.048 ),
+ new CoordRec((float) 61.9047, (float) -19.0476 ),
+};
+
+static final CoordRec char36_stroke2[] = {
+ new CoordRec((float) 85.7143, (float) 85.7143 ),
+ new CoordRec((float) 76.1905, (float) 95.2381 ),
+ new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 42.8571, (float) 100 ),
+ new CoordRec((float) 28.5714, (float) 95.2381 ),
+ new CoordRec((float) 19.0476, (float) 85.7143 ),
+ new CoordRec((float) 19.0476, (float) 76.1905 ),
+ new CoordRec((float) 23.8095, (float) 66.6667 ),
+ new CoordRec((float) 28.5714, (float) 61.9048 ),
+ new CoordRec((float) 38.0952, (float) 57.1429 ),
+ new CoordRec((float) 66.6666, (float) 47.619 ),
+ new CoordRec((float) 76.1905, (float) 42.8571 ),
+ new CoordRec((float) 80.9524, (float) 38.0952 ),
+ new CoordRec((float) 85.7143, (float) 28.5714 ),
+ new CoordRec((float) 85.7143, (float) 14.2857 ),
+ new CoordRec((float) 76.1905, (float) 4.7619 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 42.8571, (float) 0 ),
+ new CoordRec((float) 28.5714, (float) 4.7619 ),
+ new CoordRec((float) 19.0476, (float) 14.2857 ),
+};
+
+static final StrokeRec char36[] = {
+ new StrokeRec( 2, char36_stroke0 ),
+ new StrokeRec( 2, char36_stroke1 ),
+ new StrokeRec( 20, char36_stroke2 ),
+};
+
+/* char: 37 '%' */
+
+static final CoordRec char37_stroke0[] = {
+ new CoordRec((float) 95.2381, (float) 100 ),
+ new CoordRec((float) 9.5238, (float) 0 ),
+};
+
+static final CoordRec char37_stroke1[] = {
+ new CoordRec((float) 33.3333, (float) 100 ),
+ new CoordRec((float) 42.8571, (float) 90.4762 ),
+ new CoordRec((float) 42.8571, (float) 80.9524 ),
+ new CoordRec((float) 38.0952, (float) 71.4286 ),
+ new CoordRec((float) 28.5714, (float) 66.6667 ),
+ new CoordRec((float) 19.0476, (float) 66.6667 ),
+ new CoordRec((float) 9.5238, (float) 76.1905 ),
+ new CoordRec((float) 9.5238, (float) 85.7143 ),
+ new CoordRec((float) 14.2857, (float) 95.2381 ),
+ new CoordRec((float) 23.8095, (float) 100 ),
+ new CoordRec((float) 33.3333, (float) 100 ),
+ new CoordRec((float) 42.8571, (float) 95.2381 ),
+ new CoordRec((float) 57.1428, (float) 90.4762 ),
+ new CoordRec((float) 71.4286, (float) 90.4762 ),
+ new CoordRec((float) 85.7143, (float) 95.2381 ),
+ new CoordRec((float) 95.2381, (float) 100 ),
+};
+
+static final CoordRec char37_stroke2[] = {
+ new CoordRec((float) 76.1905, (float) 33.3333 ),
+ new CoordRec((float) 66.6667, (float) 28.5714 ),
+ new CoordRec((float) 61.9048, (float) 19.0476 ),
+ new CoordRec((float) 61.9048, (float) 9.5238 ),
+ new CoordRec((float) 71.4286, (float) 0 ),
+ new CoordRec((float) 80.9524, (float) 0 ),
+ new CoordRec((float) 90.4762, (float) 4.7619 ),
+ new CoordRec((float) 95.2381, (float) 14.2857 ),
+ new CoordRec((float) 95.2381, (float) 23.8095 ),
+ new CoordRec((float) 85.7143, (float) 33.3333 ),
+ new CoordRec((float) 76.1905, (float) 33.3333 ),
+};
+
+static final StrokeRec char37[] = {
+ new StrokeRec( 2, char37_stroke0 ),
+ new StrokeRec( 16, char37_stroke1 ),
+ new StrokeRec( 11, char37_stroke2 ),
+};
+
+/* char: 38 '&' */
+
+static final CoordRec char38_stroke0[] = {
+ new CoordRec((float) 100, (float) 57.1429 ),
+ new CoordRec((float) 100, (float) 61.9048 ),
+ new CoordRec((float) 95.2381, (float) 66.6667 ),
+ new CoordRec((float) 90.4762, (float) 66.6667 ),
+ new CoordRec((float) 85.7143, (float) 61.9048 ),
+ new CoordRec((float) 80.9524, (float) 52.381 ),
+ new CoordRec((float) 71.4286, (float) 28.5714 ),
+ new CoordRec((float) 61.9048, (float) 14.2857 ),
+ new CoordRec((float) 52.3809, (float) 4.7619 ),
+ new CoordRec((float) 42.8571, (float) 0 ),
+ new CoordRec((float) 23.8095, (float) 0 ),
+ new CoordRec((float) 14.2857, (float) 4.7619 ),
+ new CoordRec((float) 9.5238, (float) 9.5238 ),
+ new CoordRec((float) 4.7619, (float) 19.0476 ),
+ new CoordRec((float) 4.7619, (float) 28.5714 ),
+ new CoordRec((float) 9.5238, (float) 38.0952 ),
+ new CoordRec((float) 14.2857, (float) 42.8571 ),
+ new CoordRec((float) 47.619, (float) 61.9048 ),
+ new CoordRec((float) 52.3809, (float) 66.6667 ),
+ new CoordRec((float) 57.1429, (float) 76.1905 ),
+ new CoordRec((float) 57.1429, (float) 85.7143 ),
+ new CoordRec((float) 52.3809, (float) 95.2381 ),
+ new CoordRec((float) 42.8571, (float) 100 ),
+ new CoordRec((float) 33.3333, (float) 95.2381 ),
+ new CoordRec((float) 28.5714, (float) 85.7143 ),
+ new CoordRec((float) 28.5714, (float) 76.1905 ),
+ new CoordRec((float) 33.3333, (float) 61.9048 ),
+ new CoordRec((float) 42.8571, (float) 47.619 ),
+ new CoordRec((float) 66.6667, (float) 14.2857 ),
+ new CoordRec((float) 76.1905, (float) 4.7619 ),
+ new CoordRec((float) 85.7143, (float) 0 ),
+ new CoordRec((float) 95.2381, (float) 0 ),
+ new CoordRec((float) 100, (float) 4.7619 ),
+ new CoordRec((float) 100, (float) 9.5238 ),
+};
+
+static final StrokeRec char38[] = {
+ new StrokeRec( 34, char38_stroke0 ),
+};
+
+/* char: 39 ''' */
+
+static final CoordRec char39_stroke0[] = {
+ new CoordRec((float) 52.381, (float) 100 ),
+ new CoordRec((float) 52.381, (float) 66.6667 ),
+};
+
+static final StrokeRec char39[] = {
+ new StrokeRec( 2, char39_stroke0 ),
+};
+
+/* char: 40 '(' */
+
+static final CoordRec char40_stroke0[] = {
+ new CoordRec((float) 69.0476, (float) 119.048 ),
+ new CoordRec((float) 59.5238, (float) 109.524 ),
+ new CoordRec((float) 50, (float) 95.2381 ),
+ new CoordRec((float) 40.4762, (float) 76.1905 ),
+ new CoordRec((float) 35.7143, (float) 52.381 ),
+ new CoordRec((float) 35.7143, (float) 33.3333 ),
+ new CoordRec((float) 40.4762, (float) 9.5238 ),
+ new CoordRec((float) 50, (float) -9.5238 ),
+ new CoordRec((float) 59.5238, (float) -23.8095 ),
+ new CoordRec((float) 69.0476, (float) -33.3333 ),
+};
+
+static final StrokeRec char40[] = {
+ new StrokeRec( 10, char40_stroke0 ),
+};
+
+/* char: 41 ')' */
+
+static final CoordRec char41_stroke0[] = {
+ new CoordRec((float) 35.7143, (float) 119.048 ),
+ new CoordRec((float) 45.2381, (float) 109.524 ),
+ new CoordRec((float) 54.7619, (float) 95.2381 ),
+ new CoordRec((float) 64.2857, (float) 76.1905 ),
+ new CoordRec((float) 69.0476, (float) 52.381 ),
+ new CoordRec((float) 69.0476, (float) 33.3333 ),
+ new CoordRec((float) 64.2857, (float) 9.5238 ),
+ new CoordRec((float) 54.7619, (float) -9.5238 ),
+ new CoordRec((float) 45.2381, (float) -23.8095 ),
+ new CoordRec((float) 35.7143, (float) -33.3333 ),
+};
+
+static final StrokeRec char41[] = {
+ new StrokeRec( 10, char41_stroke0 ),
+};
+
+/* char: 42 '*' */
+
+static final CoordRec char42_stroke0[] = {
+ new CoordRec((float) 52.381, (float) 71.4286 ),
+ new CoordRec((float) 52.381, (float) 14.2857 ),
+};
+
+static final CoordRec char42_stroke1[] = {
+ new CoordRec((float) 28.5715, (float) 57.1429 ),
+ new CoordRec((float) 76.1905, (float) 28.5714 ),
+};
+
+static final CoordRec char42_stroke2[] = {
+ new CoordRec((float) 76.1905, (float) 57.1429 ),
+ new CoordRec((float) 28.5715, (float) 28.5714 ),
+};
+
+static final StrokeRec char42[] = {
+ new StrokeRec( 2, char42_stroke0 ),
+ new StrokeRec( 2, char42_stroke1 ),
+ new StrokeRec( 2, char42_stroke2 ),
+};
+
+/* char: 43 '+' */
+
+static final CoordRec char43_stroke0[] = {
+ new CoordRec((float) 52.3809, (float) 85.7143 ),
+ new CoordRec((float) 52.3809, (float) 0 ),
+};
+
+static final CoordRec char43_stroke1[] = {
+ new CoordRec((float) 9.5238, (float) 42.8571 ),
+ new CoordRec((float) 95.2381, (float) 42.8571 ),
+};
+
+static final StrokeRec char43[] = {
+ new StrokeRec( 2, char43_stroke0 ),
+ new StrokeRec( 2, char43_stroke1 ),
+};
+
+/* char: 44 ',' */
+
+static final CoordRec char44_stroke0[] = {
+ new CoordRec((float) 57.1429, (float) 4.7619 ),
+ new CoordRec((float) 52.381, (float) 0 ),
+ new CoordRec((float) 47.6191, (float) 4.7619 ),
+ new CoordRec((float) 52.381, (float) 9.5238 ),
+ new CoordRec((float) 57.1429, (float) 4.7619 ),
+ new CoordRec((float) 57.1429, (float) -4.7619 ),
+ new CoordRec((float) 52.381, (float) -14.2857 ),
+ new CoordRec((float) 47.6191, (float) -19.0476 ),
+};
+
+static final StrokeRec char44[] = {
+ new StrokeRec( 8, char44_stroke0 ),
+};
+
+/* char: 45 '-' */
+
+static final CoordRec char45_stroke0[] = {
+ new CoordRec((float) 9.5238, (float) 42.8571 ),
+ new CoordRec((float) 95.2381, (float) 42.8571 ),
+};
+
+static final StrokeRec char45[] = {
+ new StrokeRec( 2, char45_stroke0 ),
+};
+
+/* char: 46 '.' */
+
+static final CoordRec char46_stroke0[] = {
+ new CoordRec((float) 52.381, (float) 9.5238 ),
+ new CoordRec((float) 47.6191, (float) 4.7619 ),
+ new CoordRec((float) 52.381, (float) 0 ),
+ new CoordRec((float) 57.1429, (float) 4.7619 ),
+ new CoordRec((float) 52.381, (float) 9.5238 ),
+};
+
+static final StrokeRec char46[] = {
+ new StrokeRec( 5, char46_stroke0 ),
+};
+
+/* char: 47 '/' */
+
+static final CoordRec char47_stroke0[] = {
+ new CoordRec((float) 19.0476, (float) -14.2857 ),
+ new CoordRec((float) 85.7143, (float) 100 ),
+};
+
+static final StrokeRec char47[] = {
+ new StrokeRec( 2, char47_stroke0 ),
+};
+
+/* char: 48 '0' */
+
+static final CoordRec char48_stroke0[] = {
+ new CoordRec((float) 47.619, (float) 100 ),
+ new CoordRec((float) 33.3333, (float) 95.2381 ),
+ new CoordRec((float) 23.8095, (float) 80.9524 ),
+ new CoordRec((float) 19.0476, (float) 57.1429 ),
+ new CoordRec((float) 19.0476, (float) 42.8571 ),
+ new CoordRec((float) 23.8095, (float) 19.0476 ),
+ new CoordRec((float) 33.3333, (float) 4.7619 ),
+ new CoordRec((float) 47.619, (float) 0 ),
+ new CoordRec((float) 57.1428, (float) 0 ),
+ new CoordRec((float) 71.4286, (float) 4.7619 ),
+ new CoordRec((float) 80.9524, (float) 19.0476 ),
+ new CoordRec((float) 85.7143, (float) 42.8571 ),
+ new CoordRec((float) 85.7143, (float) 57.1429 ),
+ new CoordRec((float) 80.9524, (float) 80.9524 ),
+ new CoordRec((float) 71.4286, (float) 95.2381 ),
+ new CoordRec((float) 57.1428, (float) 100 ),
+ new CoordRec((float) 47.619, (float) 100 ),
+};
+
+static final StrokeRec char48[] = {
+ new StrokeRec( 17, char48_stroke0 ),
+};
+
+/* char: 49 '1' */
+
+static final CoordRec char49_stroke0[] = {
+ new CoordRec((float) 40.4762, (float) 80.9524 ),
+ new CoordRec((float) 50, (float) 85.7143 ),
+ new CoordRec((float) 64.2857, (float) 100 ),
+ new CoordRec((float) 64.2857, (float) 0 ),
+};
+
+static final StrokeRec char49[] = {
+ new StrokeRec( 4, char49_stroke0 ),
+};
+
+/* char: 50 '2' */
+
+static final CoordRec char50_stroke0[] = {
+ new CoordRec((float) 23.8095, (float) 76.1905 ),
+ new CoordRec((float) 23.8095, (float) 80.9524 ),
+ new CoordRec((float) 28.5714, (float) 90.4762 ),
+ new CoordRec((float) 33.3333, (float) 95.2381 ),
+ new CoordRec((float) 42.8571, (float) 100 ),
+ new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 71.4286, (float) 95.2381 ),
+ new CoordRec((float) 76.1905, (float) 90.4762 ),
+ new CoordRec((float) 80.9524, (float) 80.9524 ),
+ new CoordRec((float) 80.9524, (float) 71.4286 ),
+ new CoordRec((float) 76.1905, (float) 61.9048 ),
+ new CoordRec((float) 66.6666, (float) 47.619 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+ new CoordRec((float) 85.7143, (float) 0 ),
+};
+
+static final StrokeRec char50[] = {
+ new StrokeRec( 14, char50_stroke0 ),
+};
+
+/* char: 51 '3' */
+
+static final CoordRec char51_stroke0[] = {
+ new CoordRec((float) 28.5714, (float) 100 ),
+ new CoordRec((float) 80.9524, (float) 100 ),
+ new CoordRec((float) 52.3809, (float) 61.9048 ),
+ new CoordRec((float) 66.6666, (float) 61.9048 ),
+ new CoordRec((float) 76.1905, (float) 57.1429 ),
+ new CoordRec((float) 80.9524, (float) 52.381 ),
+ new CoordRec((float) 85.7143, (float) 38.0952 ),
+ new CoordRec((float) 85.7143, (float) 28.5714 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+ new CoordRec((float) 71.4286, (float) 4.7619 ),
+ new CoordRec((float) 57.1428, (float) 0 ),
+ new CoordRec((float) 42.8571, (float) 0 ),
+ new CoordRec((float) 28.5714, (float) 4.7619 ),
+ new CoordRec((float) 23.8095, (float) 9.5238 ),
+ new CoordRec((float) 19.0476, (float) 19.0476 ),
+};
+
+static final StrokeRec char51[] = {
+ new StrokeRec( 15, char51_stroke0 ),
+};
+
+/* char: 52 '4' */
+
+static final CoordRec char52_stroke0[] = {
+ new CoordRec((float) 64.2857, (float) 100 ),
+ new CoordRec((float) 16.6667, (float) 33.3333 ),
+ new CoordRec((float) 88.0952, (float) 33.3333 ),
+};
+
+static final CoordRec char52_stroke1[] = {
+ new CoordRec((float) 64.2857, (float) 100 ),
+ new CoordRec((float) 64.2857, (float) 0 ),
+};
+
+static final StrokeRec char52[] = {
+ new StrokeRec( 3, char52_stroke0 ),
+ new StrokeRec( 2, char52_stroke1 ),
+};
+
+/* char: 53 '5' */
+
+static final CoordRec char53_stroke0[] = {
+ new CoordRec((float) 76.1905, (float) 100 ),
+ new CoordRec((float) 28.5714, (float) 100 ),
+ new CoordRec((float) 23.8095, (float) 57.1429 ),
+ new CoordRec((float) 28.5714, (float) 61.9048 ),
+ new CoordRec((float) 42.8571, (float) 66.6667 ),
+ new CoordRec((float) 57.1428, (float) 66.6667 ),
+ new CoordRec((float) 71.4286, (float) 61.9048 ),
+ new CoordRec((float) 80.9524, (float) 52.381 ),
+ new CoordRec((float) 85.7143, (float) 38.0952 ),
+ new CoordRec((float) 85.7143, (float) 28.5714 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+ new CoordRec((float) 71.4286, (float) 4.7619 ),
+ new CoordRec((float) 57.1428, (float) 0 ),
+ new CoordRec((float) 42.8571, (float) 0 ),
+ new CoordRec((float) 28.5714, (float) 4.7619 ),
+ new CoordRec((float) 23.8095, (float) 9.5238 ),
+ new CoordRec((float) 19.0476, (float) 19.0476 ),
+};
+
+static final StrokeRec char53[] = {
+ new StrokeRec( 17, char53_stroke0 ),
+};
+
+/* char: 54 '6' */
+
+static final CoordRec char54_stroke0[] = {
+ new CoordRec((float) 78.5714, (float) 85.7143 ),
+ new CoordRec((float) 73.8096, (float) 95.2381 ),
+ new CoordRec((float) 59.5238, (float) 100 ),
+ new CoordRec((float) 50, (float) 100 ),
+ new CoordRec((float) 35.7143, (float) 95.2381 ),
+ new CoordRec((float) 26.1905, (float) 80.9524 ),
+ new CoordRec((float) 21.4286, (float) 57.1429 ),
+ new CoordRec((float) 21.4286, (float) 33.3333 ),
+ new CoordRec((float) 26.1905, (float) 14.2857 ),
+ new CoordRec((float) 35.7143, (float) 4.7619 ),
+ new CoordRec((float) 50, (float) 0 ),
+ new CoordRec((float) 54.7619, (float) 0 ),
+ new CoordRec((float) 69.0476, (float) 4.7619 ),
+ new CoordRec((float) 78.5714, (float) 14.2857 ),
+ new CoordRec((float) 83.3334, (float) 28.5714 ),
+ new CoordRec((float) 83.3334, (float) 33.3333 ),
+ new CoordRec((float) 78.5714, (float) 47.619 ),
+ new CoordRec((float) 69.0476, (float) 57.1429 ),
+ new CoordRec((float) 54.7619, (float) 61.9048 ),
+ new CoordRec((float) 50, (float) 61.9048 ),
+ new CoordRec((float) 35.7143, (float) 57.1429 ),
+ new CoordRec((float) 26.1905, (float) 47.619 ),
+ new CoordRec((float) 21.4286, (float) 33.3333 ),
+};
+
+static final StrokeRec char54[] = {
+ new StrokeRec( 23, char54_stroke0 ),
+};
+
+/* char: 55 '7' */
+
+static final CoordRec char55_stroke0[] = {
+ new CoordRec((float) 85.7143, (float) 100 ),
+ new CoordRec((float) 38.0952, (float) 0 ),
+};
+
+static final CoordRec char55_stroke1[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 85.7143, (float) 100 ),
+};
+
+static final StrokeRec char55[] = {
+ new StrokeRec( 2, char55_stroke0 ),
+ new StrokeRec( 2, char55_stroke1 ),
+};
+
+/* char: 56 '8' */
+
+static final CoordRec char56_stroke0[] = {
+ new CoordRec((float) 42.8571, (float) 100 ),
+ new CoordRec((float) 28.5714, (float) 95.2381 ),
+ new CoordRec((float) 23.8095, (float) 85.7143 ),
+ new CoordRec((float) 23.8095, (float) 76.1905 ),
+ new CoordRec((float) 28.5714, (float) 66.6667 ),
+ new CoordRec((float) 38.0952, (float) 61.9048 ),
+ new CoordRec((float) 57.1428, (float) 57.1429 ),
+ new CoordRec((float) 71.4286, (float) 52.381 ),
+ new CoordRec((float) 80.9524, (float) 42.8571 ),
+ new CoordRec((float) 85.7143, (float) 33.3333 ),
+ new CoordRec((float) 85.7143, (float) 19.0476 ),
+ new CoordRec((float) 80.9524, (float) 9.5238 ),
+ new CoordRec((float) 76.1905, (float) 4.7619 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 42.8571, (float) 0 ),
+ new CoordRec((float) 28.5714, (float) 4.7619 ),
+ new CoordRec((float) 23.8095, (float) 9.5238 ),
+ new CoordRec((float) 19.0476, (float) 19.0476 ),
+ new CoordRec((float) 19.0476, (float) 33.3333 ),
+ new CoordRec((float) 23.8095, (float) 42.8571 ),
+ new CoordRec((float) 33.3333, (float) 52.381 ),
+ new CoordRec((float) 47.619, (float) 57.1429 ),
+ new CoordRec((float) 66.6666, (float) 61.9048 ),
+ new CoordRec((float) 76.1905, (float) 66.6667 ),
+ new CoordRec((float) 80.9524, (float) 76.1905 ),
+ new CoordRec((float) 80.9524, (float) 85.7143 ),
+ new CoordRec((float) 76.1905, (float) 95.2381 ),
+ new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 42.8571, (float) 100 ),
+};
+
+static final StrokeRec char56[] = {
+ new StrokeRec( 29, char56_stroke0 ),
+};
+
+/* char: 57 '9' */
+
+static final CoordRec char57_stroke0[] = {
+ new CoordRec((float) 83.3334, (float) 66.6667 ),
+ new CoordRec((float) 78.5714, (float) 52.381 ),
+ new CoordRec((float) 69.0476, (float) 42.8571 ),
+ new CoordRec((float) 54.7619, (float) 38.0952 ),
+ new CoordRec((float) 50, (float) 38.0952 ),
+ new CoordRec((float) 35.7143, (float) 42.8571 ),
+ new CoordRec((float) 26.1905, (float) 52.381 ),
+ new CoordRec((float) 21.4286, (float) 66.6667 ),
+ new CoordRec((float) 21.4286, (float) 71.4286 ),
+ new CoordRec((float) 26.1905, (float) 85.7143 ),
+ new CoordRec((float) 35.7143, (float) 95.2381 ),
+ new CoordRec((float) 50, (float) 100 ),
+ new CoordRec((float) 54.7619, (float) 100 ),
+ new CoordRec((float) 69.0476, (float) 95.2381 ),
+ new CoordRec((float) 78.5714, (float) 85.7143 ),
+ new CoordRec((float) 83.3334, (float) 66.6667 ),
+ new CoordRec((float) 83.3334, (float) 42.8571 ),
+ new CoordRec((float) 78.5714, (float) 19.0476 ),
+ new CoordRec((float) 69.0476, (float) 4.7619 ),
+ new CoordRec((float) 54.7619, (float) 0 ),
+ new CoordRec((float) 45.2381, (float) 0 ),
+ new CoordRec((float) 30.9524, (float) 4.7619 ),
+ new CoordRec((float) 26.1905, (float) 14.2857 ),
+};
+
+static final StrokeRec char57[] = {
+ new StrokeRec( 23, char57_stroke0 ),
+};
+
+/* char: 58 ':' */
+
+static final CoordRec char58_stroke0[] = {
+ new CoordRec((float) 52.381, (float) 66.6667 ),
+ new CoordRec((float) 47.6191, (float) 61.9048 ),
+ new CoordRec((float) 52.381, (float) 57.1429 ),
+ new CoordRec((float) 57.1429, (float) 61.9048 ),
+ new CoordRec((float) 52.381, (float) 66.6667 ),
+};
+
+static final CoordRec char58_stroke1[] = {
+ new CoordRec((float) 52.381, (float) 9.5238 ),
+ new CoordRec((float) 47.6191, (float) 4.7619 ),
+ new CoordRec((float) 52.381, (float) 0 ),
+ new CoordRec((float) 57.1429, (float) 4.7619 ),
+ new CoordRec((float) 52.381, (float) 9.5238 ),
+};
+
+static final StrokeRec char58[] = {
+ new StrokeRec( 5, char58_stroke0 ),
+ new StrokeRec( 5, char58_stroke1 ),
+};
+
+/* char: 59 ';' */
+
+static final CoordRec char59_stroke0[] = {
+ new CoordRec((float) 52.381, (float) 66.6667 ),
+ new CoordRec((float) 47.6191, (float) 61.9048 ),
+ new CoordRec((float) 52.381, (float) 57.1429 ),
+ new CoordRec((float) 57.1429, (float) 61.9048 ),
+ new CoordRec((float) 52.381, (float) 66.6667 ),
+};
+
+static final CoordRec char59_stroke1[] = {
+ new CoordRec((float) 57.1429, (float) 4.7619 ),
+ new CoordRec((float) 52.381, (float) 0 ),
+ new CoordRec((float) 47.6191, (float) 4.7619 ),
+ new CoordRec((float) 52.381, (float) 9.5238 ),
+ new CoordRec((float) 57.1429, (float) 4.7619 ),
+ new CoordRec((float) 57.1429, (float) -4.7619 ),
+ new CoordRec((float) 52.381, (float) -14.2857 ),
+ new CoordRec((float) 47.6191, (float) -19.0476 ),
+};
+
+static final StrokeRec char59[] = {
+ new StrokeRec( 5, char59_stroke0 ),
+ new StrokeRec( 8, char59_stroke1 ),
+};
+
+/* char: 60 '<' */
+
+static final CoordRec char60_stroke0[] = {
+ new CoordRec((float) 90.4762, (float) 85.7143 ),
+ new CoordRec((float) 14.2857, (float) 42.8571 ),
+ new CoordRec((float) 90.4762, (float) 0 ),
+};
+
+static final StrokeRec char60[] = {
+ new StrokeRec( 3, char60_stroke0 ),
+};
+
+/* char: 61 '=' */
+
+static final CoordRec char61_stroke0[] = {
+ new CoordRec((float) 9.5238, (float) 57.1429 ),
+ new CoordRec((float) 95.2381, (float) 57.1429 ),
+};
+
+static final CoordRec char61_stroke1[] = {
+ new CoordRec((float) 9.5238, (float) 28.5714 ),
+ new CoordRec((float) 95.2381, (float) 28.5714 ),
+};
+
+static final StrokeRec char61[] = {
+ new StrokeRec( 2, char61_stroke0 ),
+ new StrokeRec( 2, char61_stroke1 ),
+};
+
+/* char: 62 '>' */
+
+static final CoordRec char62_stroke0[] = {
+ new CoordRec((float) 14.2857, (float) 85.7143 ),
+ new CoordRec((float) 90.4762, (float) 42.8571 ),
+ new CoordRec((float) 14.2857, (float) 0 ),
+};
+
+static final StrokeRec char62[] = {
+ new StrokeRec( 3, char62_stroke0 ),
+};
+
+/* char: 63 '?' */
+
+static final CoordRec char63_stroke0[] = {
+ new CoordRec((float) 23.8095, (float) 76.1905 ),
+ new CoordRec((float) 23.8095, (float) 80.9524 ),
+ new CoordRec((float) 28.5714, (float) 90.4762 ),
+ new CoordRec((float) 33.3333, (float) 95.2381 ),
+ new CoordRec((float) 42.8571, (float) 100 ),
+ new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 71.4285, (float) 95.2381 ),
+ new CoordRec((float) 76.1905, (float) 90.4762 ),
+ new CoordRec((float) 80.9524, (float) 80.9524 ),
+ new CoordRec((float) 80.9524, (float) 71.4286 ),
+ new CoordRec((float) 76.1905, (float) 61.9048 ),
+ new CoordRec((float) 71.4285, (float) 57.1429 ),
+ new CoordRec((float) 52.3809, (float) 47.619 ),
+ new CoordRec((float) 52.3809, (float) 33.3333 ),
+};
+
+static final CoordRec char63_stroke1[] = {
+ new CoordRec((float) 52.3809, (float) 9.5238 ),
+ new CoordRec((float) 47.619, (float) 4.7619 ),
+ new CoordRec((float) 52.3809, (float) 0 ),
+ new CoordRec((float) 57.1428, (float) 4.7619 ),
+ new CoordRec((float) 52.3809, (float) 9.5238 ),
+};
+
+static final StrokeRec char63[] = {
+ new StrokeRec( 14, char63_stroke0 ),
+ new StrokeRec( 5, char63_stroke1 ),
+};
+
+/* char: 64 '@' */
+
+static final CoordRec char64_stroke0[] = {
+ new CoordRec((float) 64.2857, (float) 52.381 ),
+ new CoordRec((float) 54.7619, (float) 57.1429 ),
+ new CoordRec((float) 45.2381, (float) 57.1429 ),
+ new CoordRec((float) 40.4762, (float) 47.619 ),
+ new CoordRec((float) 40.4762, (float) 42.8571 ),
+ new CoordRec((float) 45.2381, (float) 33.3333 ),
+ new CoordRec((float) 54.7619, (float) 33.3333 ),
+ new CoordRec((float) 64.2857, (float) 38.0952 ),
+};
+
+static final CoordRec char64_stroke1[] = {
+ new CoordRec((float) 64.2857, (float) 57.1429 ),
+ new CoordRec((float) 64.2857, (float) 38.0952 ),
+ new CoordRec((float) 69.0476, (float) 33.3333 ),
+ new CoordRec((float) 78.5714, (float) 33.3333 ),
+ new CoordRec((float) 83.3334, (float) 42.8571 ),
+ new CoordRec((float) 83.3334, (float) 47.619 ),
+ new CoordRec((float) 78.5714, (float) 61.9048 ),
+ new CoordRec((float) 69.0476, (float) 71.4286 ),
+ new CoordRec((float) 54.7619, (float) 76.1905 ),
+ new CoordRec((float) 50, (float) 76.1905 ),
+ new CoordRec((float) 35.7143, (float) 71.4286 ),
+ new CoordRec((float) 26.1905, (float) 61.9048 ),
+ new CoordRec((float) 21.4286, (float) 47.619 ),
+ new CoordRec((float) 21.4286, (float) 42.8571 ),
+ new CoordRec((float) 26.1905, (float) 28.5714 ),
+ new CoordRec((float) 35.7143, (float) 19.0476 ),
+ new CoordRec((float) 50, (float) 14.2857 ),
+ new CoordRec((float) 54.7619, (float) 14.2857 ),
+ new CoordRec((float) 69.0476, (float) 19.0476 ),
+};
+
+static final StrokeRec char64[] = {
+ new StrokeRec( 8, char64_stroke0 ),
+ new StrokeRec( 19, char64_stroke1 ),
+};
+
+/* char: 65 'A' */
+
+static final CoordRec char65_stroke0[] = {
+ new CoordRec((float) 52.3809, (float) 100 ),
+ new CoordRec((float) 14.2857, (float) 0 ),
+};
+
+static final CoordRec char65_stroke1[] = {
+ new CoordRec((float) 52.3809, (float) 100 ),
+ new CoordRec((float) 90.4762, (float) 0 ),
+};
+
+static final CoordRec char65_stroke2[] = {
+ new CoordRec((float) 28.5714, (float) 33.3333 ),
+ new CoordRec((float) 76.1905, (float) 33.3333 ),
+};
+
+static final StrokeRec char65[] = {
+ new StrokeRec( 2, char65_stroke0 ),
+ new StrokeRec( 2, char65_stroke1 ),
+ new StrokeRec( 2, char65_stroke2 ),
+};
+
+/* char: 66 'B' */
+
+static final CoordRec char66_stroke0[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+};
+
+static final CoordRec char66_stroke1[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 76.1905, (float) 95.2381 ),
+ new CoordRec((float) 80.9524, (float) 90.4762 ),
+ new CoordRec((float) 85.7143, (float) 80.9524 ),
+ new CoordRec((float) 85.7143, (float) 71.4286 ),
+ new CoordRec((float) 80.9524, (float) 61.9048 ),
+ new CoordRec((float) 76.1905, (float) 57.1429 ),
+ new CoordRec((float) 61.9047, (float) 52.381 ),
+};
+
+static final CoordRec char66_stroke2[] = {
+ new CoordRec((float) 19.0476, (float) 52.381 ),
+ new CoordRec((float) 61.9047, (float) 52.381 ),
+ new CoordRec((float) 76.1905, (float) 47.619 ),
+ new CoordRec((float) 80.9524, (float) 42.8571 ),
+ new CoordRec((float) 85.7143, (float) 33.3333 ),
+ new CoordRec((float) 85.7143, (float) 19.0476 ),
+ new CoordRec((float) 80.9524, (float) 9.5238 ),
+ new CoordRec((float) 76.1905, (float) 4.7619 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+};
+
+static final StrokeRec char66[] = {
+ new StrokeRec( 2, char66_stroke0 ),
+ new StrokeRec( 9, char66_stroke1 ),
+ new StrokeRec( 10, char66_stroke2 ),
+};
+
+/* char: 67 'C' */
+
+static final CoordRec char67_stroke0[] = {
+ new CoordRec((float) 88.0952, (float) 76.1905 ),
+ new CoordRec((float) 83.3334, (float) 85.7143 ),
+ new CoordRec((float) 73.8096, (float) 95.2381 ),
+ new CoordRec((float) 64.2857, (float) 100 ),
+ new CoordRec((float) 45.2381, (float) 100 ),
+ new CoordRec((float) 35.7143, (float) 95.2381 ),
+ new CoordRec((float) 26.1905, (float) 85.7143 ),
+ new CoordRec((float) 21.4286, (float) 76.1905 ),
+ new CoordRec((float) 16.6667, (float) 61.9048 ),
+ new CoordRec((float) 16.6667, (float) 38.0952 ),
+ new CoordRec((float) 21.4286, (float) 23.8095 ),
+ new CoordRec((float) 26.1905, (float) 14.2857 ),
+ new CoordRec((float) 35.7143, (float) 4.7619 ),
+ new CoordRec((float) 45.2381, (float) 0 ),
+ new CoordRec((float) 64.2857, (float) 0 ),
+ new CoordRec((float) 73.8096, (float) 4.7619 ),
+ new CoordRec((float) 83.3334, (float) 14.2857 ),
+ new CoordRec((float) 88.0952, (float) 23.8095 ),
+};
+
+static final StrokeRec char67[] = {
+ new StrokeRec( 18, char67_stroke0 ),
+};
+
+/* char: 68 'D' */
+
+static final CoordRec char68_stroke0[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+};
+
+static final CoordRec char68_stroke1[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 52.3809, (float) 100 ),
+ new CoordRec((float) 66.6666, (float) 95.2381 ),
+ new CoordRec((float) 76.1905, (float) 85.7143 ),
+ new CoordRec((float) 80.9524, (float) 76.1905 ),
+ new CoordRec((float) 85.7143, (float) 61.9048 ),
+ new CoordRec((float) 85.7143, (float) 38.0952 ),
+ new CoordRec((float) 80.9524, (float) 23.8095 ),
+ new CoordRec((float) 76.1905, (float) 14.2857 ),
+ new CoordRec((float) 66.6666, (float) 4.7619 ),
+ new CoordRec((float) 52.3809, (float) 0 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+};
+
+static final StrokeRec char68[] = {
+ new StrokeRec( 2, char68_stroke0 ),
+ new StrokeRec( 12, char68_stroke1 ),
+};
+
+/* char: 69 'E' */
+
+static final CoordRec char69_stroke0[] = {
+ new CoordRec((float) 21.4286, (float) 100 ),
+ new CoordRec((float) 21.4286, (float) 0 ),
+};
+
+static final CoordRec char69_stroke1[] = {
+ new CoordRec((float) 21.4286, (float) 100 ),
+ new CoordRec((float) 83.3334, (float) 100 ),
+};
+
+static final CoordRec char69_stroke2[] = {
+ new CoordRec((float) 21.4286, (float) 52.381 ),
+ new CoordRec((float) 59.5238, (float) 52.381 ),
+};
+
+static final CoordRec char69_stroke3[] = {
+ new CoordRec((float) 21.4286, (float) 0 ),
+ new CoordRec((float) 83.3334, (float) 0 ),
+};
+
+static final StrokeRec char69[] = {
+ new StrokeRec( 2, char69_stroke0 ),
+ new StrokeRec( 2, char69_stroke1 ),
+ new StrokeRec( 2, char69_stroke2 ),
+ new StrokeRec( 2, char69_stroke3 ),
+};
+
+/* char: 70 'F' */
+
+static final CoordRec char70_stroke0[] = {
+ new CoordRec((float) 21.4286, (float) 100 ),
+ new CoordRec((float) 21.4286, (float) 0 ),
+};
+
+static final CoordRec char70_stroke1[] = {
+ new CoordRec((float) 21.4286, (float) 100 ),
+ new CoordRec((float) 83.3334, (float) 100 ),
+};
+
+static final CoordRec char70_stroke2[] = {
+ new CoordRec((float) 21.4286, (float) 52.381 ),
+ new CoordRec((float) 59.5238, (float) 52.381 ),
+};
+
+static final StrokeRec char70[] = {
+ new StrokeRec( 2, char70_stroke0 ),
+ new StrokeRec( 2, char70_stroke1 ),
+ new StrokeRec( 2, char70_stroke2 ),
+};
+
+/* char: 71 'G' */
+
+static final CoordRec char71_stroke0[] = {
+ new CoordRec((float) 88.0952, (float) 76.1905 ),
+ new CoordRec((float) 83.3334, (float) 85.7143 ),
+ new CoordRec((float) 73.8096, (float) 95.2381 ),
+ new CoordRec((float) 64.2857, (float) 100 ),
+ new CoordRec((float) 45.2381, (float) 100 ),
+ new CoordRec((float) 35.7143, (float) 95.2381 ),
+ new CoordRec((float) 26.1905, (float) 85.7143 ),
+ new CoordRec((float) 21.4286, (float) 76.1905 ),
+ new CoordRec((float) 16.6667, (float) 61.9048 ),
+ new CoordRec((float) 16.6667, (float) 38.0952 ),
+ new CoordRec((float) 21.4286, (float) 23.8095 ),
+ new CoordRec((float) 26.1905, (float) 14.2857 ),
+ new CoordRec((float) 35.7143, (float) 4.7619 ),
+ new CoordRec((float) 45.2381, (float) 0 ),
+ new CoordRec((float) 64.2857, (float) 0 ),
+ new CoordRec((float) 73.8096, (float) 4.7619 ),
+ new CoordRec((float) 83.3334, (float) 14.2857 ),
+ new CoordRec((float) 88.0952, (float) 23.8095 ),
+ new CoordRec((float) 88.0952, (float) 38.0952 ),
+};
+
+static final CoordRec char71_stroke1[] = {
+ new CoordRec((float) 64.2857, (float) 38.0952 ),
+ new CoordRec((float) 88.0952, (float) 38.0952 ),
+};
+
+static final StrokeRec char71[] = {
+ new StrokeRec( 19, char71_stroke0 ),
+ new StrokeRec( 2, char71_stroke1 ),
+};
+
+/* char: 72 'H' */
+
+static final CoordRec char72_stroke0[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+};
+
+static final CoordRec char72_stroke1[] = {
+ new CoordRec((float) 85.7143, (float) 100 ),
+ new CoordRec((float) 85.7143, (float) 0 ),
+};
+
+static final CoordRec char72_stroke2[] = {
+ new CoordRec((float) 19.0476, (float) 52.381 ),
+ new CoordRec((float) 85.7143, (float) 52.381 ),
+};
+
+static final StrokeRec char72[] = {
+ new StrokeRec( 2, char72_stroke0 ),
+ new StrokeRec( 2, char72_stroke1 ),
+ new StrokeRec( 2, char72_stroke2 ),
+};
+
+/* char: 73 'I' */
+
+static final CoordRec char73_stroke0[] = {
+ new CoordRec((float) 52.381, (float) 100 ),
+ new CoordRec((float) 52.381, (float) 0 ),
+};
+
+static final StrokeRec char73[] = {
+ new StrokeRec( 2, char73_stroke0 ),
+};
+
+/* char: 74 'J' */
+
+static final CoordRec char74_stroke0[] = {
+ new CoordRec((float) 76.1905, (float) 100 ),
+ new CoordRec((float) 76.1905, (float) 23.8095 ),
+ new CoordRec((float) 71.4286, (float) 9.5238 ),
+ new CoordRec((float) 66.6667, (float) 4.7619 ),
+ new CoordRec((float) 57.1429, (float) 0 ),
+ new CoordRec((float) 47.6191, (float) 0 ),
+ new CoordRec((float) 38.0953, (float) 4.7619 ),
+ new CoordRec((float) 33.3334, (float) 9.5238 ),
+ new CoordRec((float) 28.5715, (float) 23.8095 ),
+ new CoordRec((float) 28.5715, (float) 33.3333 ),
+};
+
+static final StrokeRec char74[] = {
+ new StrokeRec( 10, char74_stroke0 ),
+};
+
+/* char: 75 'K' */
+
+static final CoordRec char75_stroke0[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+};
+
+static final CoordRec char75_stroke1[] = {
+ new CoordRec((float) 85.7143, (float) 100 ),
+ new CoordRec((float) 19.0476, (float) 33.3333 ),
+};
+
+static final CoordRec char75_stroke2[] = {
+ new CoordRec((float) 42.8571, (float) 57.1429 ),
+ new CoordRec((float) 85.7143, (float) 0 ),
+};
+
+static final StrokeRec char75[] = {
+ new StrokeRec( 2, char75_stroke0 ),
+ new StrokeRec( 2, char75_stroke1 ),
+ new StrokeRec( 2, char75_stroke2 ),
+};
+
+/* char: 76 'L' */
+
+static final CoordRec char76_stroke0[] = {
+ new CoordRec((float) 23.8095, (float) 100 ),
+ new CoordRec((float) 23.8095, (float) 0 ),
+};
+
+static final CoordRec char76_stroke1[] = {
+ new CoordRec((float) 23.8095, (float) 0 ),
+ new CoordRec((float) 80.9524, (float) 0 ),
+};
+
+static final StrokeRec char76[] = {
+ new StrokeRec( 2, char76_stroke0 ),
+ new StrokeRec( 2, char76_stroke1 ),
+};
+
+/* char: 77 'M' */
+
+static final CoordRec char77_stroke0[] = {
+ new CoordRec((float) 14.2857, (float) 100 ),
+ new CoordRec((float) 14.2857, (float) 0 ),
+};
+
+static final CoordRec char77_stroke1[] = {
+ new CoordRec((float) 14.2857, (float) 100 ),
+ new CoordRec((float) 52.3809, (float) 0 ),
+};
+
+static final CoordRec char77_stroke2[] = {
+ new CoordRec((float) 90.4762, (float) 100 ),
+ new CoordRec((float) 52.3809, (float) 0 ),
+};
+
+static final CoordRec char77_stroke3[] = {
+ new CoordRec((float) 90.4762, (float) 100 ),
+ new CoordRec((float) 90.4762, (float) 0 ),
+};
+
+static final StrokeRec char77[] = {
+ new StrokeRec( 2, char77_stroke0 ),
+ new StrokeRec( 2, char77_stroke1 ),
+ new StrokeRec( 2, char77_stroke2 ),
+ new StrokeRec( 2, char77_stroke3 ),
+};
+
+/* char: 78 'N' */
+
+static final CoordRec char78_stroke0[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+};
+
+static final CoordRec char78_stroke1[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 85.7143, (float) 0 ),
+};
+
+static final CoordRec char78_stroke2[] = {
+ new CoordRec((float) 85.7143, (float) 100 ),
+ new CoordRec((float) 85.7143, (float) 0 ),
+};
+
+static final StrokeRec char78[] = {
+ new StrokeRec( 2, char78_stroke0 ),
+ new StrokeRec( 2, char78_stroke1 ),
+ new StrokeRec( 2, char78_stroke2 ),
+};
+
+/* char: 79 'O' */
+
+static final CoordRec char79_stroke0[] = {
+ new CoordRec((float) 42.8571, (float) 100 ),
+ new CoordRec((float) 33.3333, (float) 95.2381 ),
+ new CoordRec((float) 23.8095, (float) 85.7143 ),
+ new CoordRec((float) 19.0476, (float) 76.1905 ),
+ new CoordRec((float) 14.2857, (float) 61.9048 ),
+ new CoordRec((float) 14.2857, (float) 38.0952 ),
+ new CoordRec((float) 19.0476, (float) 23.8095 ),
+ new CoordRec((float) 23.8095, (float) 14.2857 ),
+ new CoordRec((float) 33.3333, (float) 4.7619 ),
+ new CoordRec((float) 42.8571, (float) 0 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 71.4286, (float) 4.7619 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+ new CoordRec((float) 85.7143, (float) 23.8095 ),
+ new CoordRec((float) 90.4762, (float) 38.0952 ),
+ new CoordRec((float) 90.4762, (float) 61.9048 ),
+ new CoordRec((float) 85.7143, (float) 76.1905 ),
+ new CoordRec((float) 80.9524, (float) 85.7143 ),
+ new CoordRec((float) 71.4286, (float) 95.2381 ),
+ new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 42.8571, (float) 100 ),
+};
+
+static final StrokeRec char79[] = {
+ new StrokeRec( 21, char79_stroke0 ),
+};
+
+/* char: 80 'P' */
+
+static final CoordRec char80_stroke0[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+};
+
+static final CoordRec char80_stroke1[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 76.1905, (float) 95.2381 ),
+ new CoordRec((float) 80.9524, (float) 90.4762 ),
+ new CoordRec((float) 85.7143, (float) 80.9524 ),
+ new CoordRec((float) 85.7143, (float) 66.6667 ),
+ new CoordRec((float) 80.9524, (float) 57.1429 ),
+ new CoordRec((float) 76.1905, (float) 52.381 ),
+ new CoordRec((float) 61.9047, (float) 47.619 ),
+ new CoordRec((float) 19.0476, (float) 47.619 ),
+};
+
+static final StrokeRec char80[] = {
+ new StrokeRec( 2, char80_stroke0 ),
+ new StrokeRec( 10, char80_stroke1 ),
+};
+
+/* char: 81 'Q' */
+
+static final CoordRec char81_stroke0[] = {
+ new CoordRec((float) 42.8571, (float) 100 ),
+ new CoordRec((float) 33.3333, (float) 95.2381 ),
+ new CoordRec((float) 23.8095, (float) 85.7143 ),
+ new CoordRec((float) 19.0476, (float) 76.1905 ),
+ new CoordRec((float) 14.2857, (float) 61.9048 ),
+ new CoordRec((float) 14.2857, (float) 38.0952 ),
+ new CoordRec((float) 19.0476, (float) 23.8095 ),
+ new CoordRec((float) 23.8095, (float) 14.2857 ),
+ new CoordRec((float) 33.3333, (float) 4.7619 ),
+ new CoordRec((float) 42.8571, (float) 0 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 71.4286, (float) 4.7619 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+ new CoordRec((float) 85.7143, (float) 23.8095 ),
+ new CoordRec((float) 90.4762, (float) 38.0952 ),
+ new CoordRec((float) 90.4762, (float) 61.9048 ),
+ new CoordRec((float) 85.7143, (float) 76.1905 ),
+ new CoordRec((float) 80.9524, (float) 85.7143 ),
+ new CoordRec((float) 71.4286, (float) 95.2381 ),
+ new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 42.8571, (float) 100 ),
+};
+
+static final CoordRec char81_stroke1[] = {
+ new CoordRec((float) 57.1428, (float) 19.0476 ),
+ new CoordRec((float) 85.7143, (float) -9.5238 ),
+};
+
+static final StrokeRec char81[] = {
+ new StrokeRec( 21, char81_stroke0 ),
+ new StrokeRec( 2, char81_stroke1 ),
+};
+
+/* char: 82 'R' */
+
+static final CoordRec char82_stroke0[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+};
+
+static final CoordRec char82_stroke1[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 76.1905, (float) 95.2381 ),
+ new CoordRec((float) 80.9524, (float) 90.4762 ),
+ new CoordRec((float) 85.7143, (float) 80.9524 ),
+ new CoordRec((float) 85.7143, (float) 71.4286 ),
+ new CoordRec((float) 80.9524, (float) 61.9048 ),
+ new CoordRec((float) 76.1905, (float) 57.1429 ),
+ new CoordRec((float) 61.9047, (float) 52.381 ),
+ new CoordRec((float) 19.0476, (float) 52.381 ),
+};
+
+static final CoordRec char82_stroke2[] = {
+ new CoordRec((float) 52.3809, (float) 52.381 ),
+ new CoordRec((float) 85.7143, (float) 0 ),
+};
+
+static final StrokeRec char82[] = {
+ new StrokeRec( 2, char82_stroke0 ),
+ new StrokeRec( 10, char82_stroke1 ),
+ new StrokeRec( 2, char82_stroke2 ),
+};
+
+/* char: 83 'S' */
+
+static final CoordRec char83_stroke0[] = {
+ new CoordRec((float) 85.7143, (float) 85.7143 ),
+ new CoordRec((float) 76.1905, (float) 95.2381 ),
+ new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 42.8571, (float) 100 ),
+ new CoordRec((float) 28.5714, (float) 95.2381 ),
+ new CoordRec((float) 19.0476, (float) 85.7143 ),
+ new CoordRec((float) 19.0476, (float) 76.1905 ),
+ new CoordRec((float) 23.8095, (float) 66.6667 ),
+ new CoordRec((float) 28.5714, (float) 61.9048 ),
+ new CoordRec((float) 38.0952, (float) 57.1429 ),
+ new CoordRec((float) 66.6666, (float) 47.619 ),
+ new CoordRec((float) 76.1905, (float) 42.8571 ),
+ new CoordRec((float) 80.9524, (float) 38.0952 ),
+ new CoordRec((float) 85.7143, (float) 28.5714 ),
+ new CoordRec((float) 85.7143, (float) 14.2857 ),
+ new CoordRec((float) 76.1905, (float) 4.7619 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 42.8571, (float) 0 ),
+ new CoordRec((float) 28.5714, (float) 4.7619 ),
+ new CoordRec((float) 19.0476, (float) 14.2857 ),
+};
+
+static final StrokeRec char83[] = {
+ new StrokeRec( 20, char83_stroke0 ),
+};
+
+/* char: 84 'T' */
+
+static final CoordRec char84_stroke0[] = {
+ new CoordRec((float) 52.3809, (float) 100 ),
+ new CoordRec((float) 52.3809, (float) 0 ),
+};
+
+static final CoordRec char84_stroke1[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 85.7143, (float) 100 ),
+};
+
+static final StrokeRec char84[] = {
+ new StrokeRec( 2, char84_stroke0 ),
+ new StrokeRec( 2, char84_stroke1 ),
+};
+
+/* char: 85 'U' */
+
+static final CoordRec char85_stroke0[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 19.0476, (float) 28.5714 ),
+ new CoordRec((float) 23.8095, (float) 14.2857 ),
+ new CoordRec((float) 33.3333, (float) 4.7619 ),
+ new CoordRec((float) 47.619, (float) 0 ),
+ new CoordRec((float) 57.1428, (float) 0 ),
+ new CoordRec((float) 71.4286, (float) 4.7619 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+ new CoordRec((float) 85.7143, (float) 28.5714 ),
+ new CoordRec((float) 85.7143, (float) 100 ),
+};
+
+static final StrokeRec char85[] = {
+ new StrokeRec( 10, char85_stroke0 ),
+};
+
+/* char: 86 'V' */
+
+static final CoordRec char86_stroke0[] = {
+ new CoordRec((float) 14.2857, (float) 100 ),
+ new CoordRec((float) 52.3809, (float) 0 ),
+};
+
+static final CoordRec char86_stroke1[] = {
+ new CoordRec((float) 90.4762, (float) 100 ),
+ new CoordRec((float) 52.3809, (float) 0 ),
+};
+
+static final StrokeRec char86[] = {
+ new StrokeRec( 2, char86_stroke0 ),
+ new StrokeRec( 2, char86_stroke1 ),
+};
+
+/* char: 87 'W' */
+
+static final CoordRec char87_stroke0[] = {
+ new CoordRec((float) 4.7619, (float) 100 ),
+ new CoordRec((float) 28.5714, (float) 0 ),
+};
+
+static final CoordRec char87_stroke1[] = {
+ new CoordRec((float) 52.3809, (float) 100 ),
+ new CoordRec((float) 28.5714, (float) 0 ),
+};
+
+static final CoordRec char87_stroke2[] = {
+ new CoordRec((float) 52.3809, (float) 100 ),
+ new CoordRec((float) 76.1905, (float) 0 ),
+};
+
+static final CoordRec char87_stroke3[] = {
+ new CoordRec((float) 100, (float) 100 ),
+ new CoordRec((float) 76.1905, (float) 0 ),
+};
+
+static final StrokeRec char87[] = {
+ new StrokeRec( 2, char87_stroke0 ),
+ new StrokeRec( 2, char87_stroke1 ),
+ new StrokeRec( 2, char87_stroke2 ),
+ new StrokeRec( 2, char87_stroke3 ),
+};
+
+/* char: 88 'X' */
+
+static final CoordRec char88_stroke0[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 85.7143, (float) 0 ),
+};
+
+static final CoordRec char88_stroke1[] = {
+ new CoordRec((float) 85.7143, (float) 100 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+};
+
+static final StrokeRec char88[] = {
+ new StrokeRec( 2, char88_stroke0 ),
+ new StrokeRec( 2, char88_stroke1 ),
+};
+
+/* char: 89 'Y' */
+
+static final CoordRec char89_stroke0[] = {
+ new CoordRec((float) 14.2857, (float) 100 ),
+ new CoordRec((float) 52.3809, (float) 52.381 ),
+ new CoordRec((float) 52.3809, (float) 0 ),
+};
+
+static final CoordRec char89_stroke1[] = {
+ new CoordRec((float) 90.4762, (float) 100 ),
+ new CoordRec((float) 52.3809, (float) 52.381 ),
+};
+
+static final StrokeRec char89[] = {
+ new StrokeRec( 3, char89_stroke0 ),
+ new StrokeRec( 2, char89_stroke1 ),
+};
+
+/* char: 90 'Z' */
+
+static final CoordRec char90_stroke0[] = {
+ new CoordRec((float) 85.7143, (float) 100 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+};
+
+static final CoordRec char90_stroke1[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 85.7143, (float) 100 ),
+};
+
+static final CoordRec char90_stroke2[] = {
+ new CoordRec((float) 19.0476, (float) 0 ),
+ new CoordRec((float) 85.7143, (float) 0 ),
+};
+
+static final StrokeRec char90[] = {
+ new StrokeRec( 2, char90_stroke0 ),
+ new StrokeRec( 2, char90_stroke1 ),
+ new StrokeRec( 2, char90_stroke2 ),
+};
+
+/* char: 91 '[' */
+
+static final CoordRec char91_stroke0[] = {
+ new CoordRec((float) 35.7143, (float) 119.048 ),
+ new CoordRec((float) 35.7143, (float) -33.3333 ),
+};
+
+static final CoordRec char91_stroke1[] = {
+ new CoordRec((float) 40.4762, (float) 119.048 ),
+ new CoordRec((float) 40.4762, (float) -33.3333 ),
+};
+
+static final CoordRec char91_stroke2[] = {
+ new CoordRec((float) 35.7143, (float) 119.048 ),
+ new CoordRec((float) 69.0476, (float) 119.048 ),
+};
+
+static final CoordRec char91_stroke3[] = {
+ new CoordRec((float) 35.7143, (float) -33.3333 ),
+ new CoordRec((float) 69.0476, (float) -33.3333 ),
+};
+
+static final StrokeRec char91[] = {
+ new StrokeRec( 2, char91_stroke0 ),
+ new StrokeRec( 2, char91_stroke1 ),
+ new StrokeRec( 2, char91_stroke2 ),
+ new StrokeRec( 2, char91_stroke3 ),
+};
+
+/* char: 92 '\' */
+
+static final CoordRec char92_stroke0[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 85.7143, (float) -14.2857 ),
+};
+
+static final StrokeRec char92[] = {
+ new StrokeRec( 2, char92_stroke0 ),
+};
+
+/* char: 93 ']' */
+
+static final CoordRec char93_stroke0[] = {
+ new CoordRec((float) 64.2857, (float) 119.048 ),
+ new CoordRec((float) 64.2857, (float) -33.3333 ),
+};
+
+static final CoordRec char93_stroke1[] = {
+ new CoordRec((float) 69.0476, (float) 119.048 ),
+ new CoordRec((float) 69.0476, (float) -33.3333 ),
+};
+
+static final CoordRec char93_stroke2[] = {
+ new CoordRec((float) 35.7143, (float) 119.048 ),
+ new CoordRec((float) 69.0476, (float) 119.048 ),
+};
+
+static final CoordRec char93_stroke3[] = {
+ new CoordRec((float) 35.7143, (float) -33.3333 ),
+ new CoordRec((float) 69.0476, (float) -33.3333 ),
+};
+
+static final StrokeRec char93[] = {
+ new StrokeRec( 2, char93_stroke0 ),
+ new StrokeRec( 2, char93_stroke1 ),
+ new StrokeRec( 2, char93_stroke2 ),
+ new StrokeRec( 2, char93_stroke3 ),
+};
+
+/* char: 94 '^' */
+
+static final CoordRec char94_stroke0[] = {
+ new CoordRec((float) 52.3809, (float) 109.524 ),
+ new CoordRec((float) 14.2857, (float) 42.8571 ),
+};
+
+static final CoordRec char94_stroke1[] = {
+ new CoordRec((float) 52.3809, (float) 109.524 ),
+ new CoordRec((float) 90.4762, (float) 42.8571 ),
+};
+
+static final StrokeRec char94[] = {
+ new StrokeRec( 2, char94_stroke0 ),
+ new StrokeRec( 2, char94_stroke1 ),
+};
+
+/* char: 95 '_' */
+
+static final CoordRec char95_stroke0[] = {
+ new CoordRec((float) 0, (float) -33.3333 ),
+ new CoordRec((float) 104.762, (float) -33.3333 ),
+ new CoordRec((float) 104.762, (float) -28.5714 ),
+ new CoordRec((float) 0, (float) -28.5714 ),
+ new CoordRec((float) 0, (float) -33.3333 ),
+};
+
+static final StrokeRec char95[] = {
+ new StrokeRec( 5, char95_stroke0 ),
+};
+
+/* char: 96 '`' */
+
+static final CoordRec char96_stroke0[] = {
+ new CoordRec((float) 42.8572, (float) 100 ),
+ new CoordRec((float) 66.6667, (float) 71.4286 ),
+};
+
+static final CoordRec char96_stroke1[] = {
+ new CoordRec((float) 42.8572, (float) 100 ),
+ new CoordRec((float) 38.0953, (float) 95.2381 ),
+ new CoordRec((float) 66.6667, (float) 71.4286 ),
+};
+
+static final StrokeRec char96[] = {
+ new StrokeRec( 2, char96_stroke0 ),
+ new StrokeRec( 3, char96_stroke1 ),
+};
+
+/* char: 97 'a' */
+
+static final CoordRec char97_stroke0[] = {
+ new CoordRec((float) 80.9524, (float) 66.6667 ),
+ new CoordRec((float) 80.9524, (float) 0 ),
+};
+
+static final CoordRec char97_stroke1[] = {
+ new CoordRec((float) 80.9524, (float) 52.381 ),
+ new CoordRec((float) 71.4285, (float) 61.9048 ),
+ new CoordRec((float) 61.9047, (float) 66.6667 ),
+ new CoordRec((float) 47.619, (float) 66.6667 ),
+ new CoordRec((float) 38.0952, (float) 61.9048 ),
+ new CoordRec((float) 28.5714, (float) 52.381 ),
+ new CoordRec((float) 23.8095, (float) 38.0952 ),
+ new CoordRec((float) 23.8095, (float) 28.5714 ),
+ new CoordRec((float) 28.5714, (float) 14.2857 ),
+ new CoordRec((float) 38.0952, (float) 4.7619 ),
+ new CoordRec((float) 47.619, (float) 0 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 71.4285, (float) 4.7619 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+};
+
+static final StrokeRec char97[] = {
+ new StrokeRec( 2, char97_stroke0 ),
+ new StrokeRec( 14, char97_stroke1 ),
+};
+
+/* char: 98 'b' */
+
+static final CoordRec char98_stroke0[] = {
+ new CoordRec((float) 23.8095, (float) 100 ),
+ new CoordRec((float) 23.8095, (float) 0 ),
+};
+
+static final CoordRec char98_stroke1[] = {
+ new CoordRec((float) 23.8095, (float) 52.381 ),
+ new CoordRec((float) 33.3333, (float) 61.9048 ),
+ new CoordRec((float) 42.8571, (float) 66.6667 ),
+ new CoordRec((float) 57.1428, (float) 66.6667 ),
+ new CoordRec((float) 66.6666, (float) 61.9048 ),
+ new CoordRec((float) 76.1905, (float) 52.381 ),
+ new CoordRec((float) 80.9524, (float) 38.0952 ),
+ new CoordRec((float) 80.9524, (float) 28.5714 ),
+ new CoordRec((float) 76.1905, (float) 14.2857 ),
+ new CoordRec((float) 66.6666, (float) 4.7619 ),
+ new CoordRec((float) 57.1428, (float) 0 ),
+ new CoordRec((float) 42.8571, (float) 0 ),
+ new CoordRec((float) 33.3333, (float) 4.7619 ),
+ new CoordRec((float) 23.8095, (float) 14.2857 ),
+};
+
+static final StrokeRec char98[] = {
+ new StrokeRec( 2, char98_stroke0 ),
+ new StrokeRec( 14, char98_stroke1 ),
+};
+
+/* char: 99 'c' */
+
+static final CoordRec char99_stroke0[] = {
+ new CoordRec((float) 80.9524, (float) 52.381 ),
+ new CoordRec((float) 71.4285, (float) 61.9048 ),
+ new CoordRec((float) 61.9047, (float) 66.6667 ),
+ new CoordRec((float) 47.619, (float) 66.6667 ),
+ new CoordRec((float) 38.0952, (float) 61.9048 ),
+ new CoordRec((float) 28.5714, (float) 52.381 ),
+ new CoordRec((float) 23.8095, (float) 38.0952 ),
+ new CoordRec((float) 23.8095, (float) 28.5714 ),
+ new CoordRec((float) 28.5714, (float) 14.2857 ),
+ new CoordRec((float) 38.0952, (float) 4.7619 ),
+ new CoordRec((float) 47.619, (float) 0 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 71.4285, (float) 4.7619 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+};
+
+static final StrokeRec char99[] = {
+ new StrokeRec( 14, char99_stroke0 ),
+};
+
+/* char: 100 'd' */
+
+static final CoordRec char100_stroke0[] = {
+ new CoordRec((float) 80.9524, (float) 100 ),
+ new CoordRec((float) 80.9524, (float) 0 ),
+};
+
+static final CoordRec char100_stroke1[] = {
+ new CoordRec((float) 80.9524, (float) 52.381 ),
+ new CoordRec((float) 71.4285, (float) 61.9048 ),
+ new CoordRec((float) 61.9047, (float) 66.6667 ),
+ new CoordRec((float) 47.619, (float) 66.6667 ),
+ new CoordRec((float) 38.0952, (float) 61.9048 ),
+ new CoordRec((float) 28.5714, (float) 52.381 ),
+ new CoordRec((float) 23.8095, (float) 38.0952 ),
+ new CoordRec((float) 23.8095, (float) 28.5714 ),
+ new CoordRec((float) 28.5714, (float) 14.2857 ),
+ new CoordRec((float) 38.0952, (float) 4.7619 ),
+ new CoordRec((float) 47.619, (float) 0 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 71.4285, (float) 4.7619 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+};
+
+static final StrokeRec char100[] = {
+ new StrokeRec( 2, char100_stroke0 ),
+ new StrokeRec( 14, char100_stroke1 ),
+};
+
+/* char: 101 'e' */
+
+static final CoordRec char101_stroke0[] = {
+ new CoordRec((float) 23.8095, (float) 38.0952 ),
+ new CoordRec((float) 80.9524, (float) 38.0952 ),
+ new CoordRec((float) 80.9524, (float) 47.619 ),
+ new CoordRec((float) 76.1905, (float) 57.1429 ),
+ new CoordRec((float) 71.4285, (float) 61.9048 ),
+ new CoordRec((float) 61.9047, (float) 66.6667 ),
+ new CoordRec((float) 47.619, (float) 66.6667 ),
+ new CoordRec((float) 38.0952, (float) 61.9048 ),
+ new CoordRec((float) 28.5714, (float) 52.381 ),
+ new CoordRec((float) 23.8095, (float) 38.0952 ),
+ new CoordRec((float) 23.8095, (float) 28.5714 ),
+ new CoordRec((float) 28.5714, (float) 14.2857 ),
+ new CoordRec((float) 38.0952, (float) 4.7619 ),
+ new CoordRec((float) 47.619, (float) 0 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 71.4285, (float) 4.7619 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+};
+
+static final StrokeRec char101[] = {
+ new StrokeRec( 17, char101_stroke0 ),
+};
+
+/* char: 102 'f' */
+
+static final CoordRec char102_stroke0[] = {
+ new CoordRec((float) 71.4286, (float) 100 ),
+ new CoordRec((float) 61.9048, (float) 100 ),
+ new CoordRec((float) 52.381, (float) 95.2381 ),
+ new CoordRec((float) 47.6191, (float) 80.9524 ),
+ new CoordRec((float) 47.6191, (float) 0 ),
+};
+
+static final CoordRec char102_stroke1[] = {
+ new CoordRec((float) 33.3334, (float) 66.6667 ),
+ new CoordRec((float) 66.6667, (float) 66.6667 ),
+};
+
+static final StrokeRec char102[] = {
+ new StrokeRec( 5, char102_stroke0 ),
+ new StrokeRec( 2, char102_stroke1 ),
+};
+
+/* char: 103 'g' */
+
+static final CoordRec char103_stroke0[] = {
+ new CoordRec((float) 80.9524, (float) 66.6667 ),
+ new CoordRec((float) 80.9524, (float) -9.5238 ),
+ new CoordRec((float) 76.1905, (float) -23.8095 ),
+ new CoordRec((float) 71.4285, (float) -28.5714 ),
+ new CoordRec((float) 61.9047, (float) -33.3333 ),
+ new CoordRec((float) 47.619, (float) -33.3333 ),
+ new CoordRec((float) 38.0952, (float) -28.5714 ),
+};
+
+static final CoordRec char103_stroke1[] = {
+ new CoordRec((float) 80.9524, (float) 52.381 ),
+ new CoordRec((float) 71.4285, (float) 61.9048 ),
+ new CoordRec((float) 61.9047, (float) 66.6667 ),
+ new CoordRec((float) 47.619, (float) 66.6667 ),
+ new CoordRec((float) 38.0952, (float) 61.9048 ),
+ new CoordRec((float) 28.5714, (float) 52.381 ),
+ new CoordRec((float) 23.8095, (float) 38.0952 ),
+ new CoordRec((float) 23.8095, (float) 28.5714 ),
+ new CoordRec((float) 28.5714, (float) 14.2857 ),
+ new CoordRec((float) 38.0952, (float) 4.7619 ),
+ new CoordRec((float) 47.619, (float) 0 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 71.4285, (float) 4.7619 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+};
+
+static final StrokeRec char103[] = {
+ new StrokeRec( 7, char103_stroke0 ),
+ new StrokeRec( 14, char103_stroke1 ),
+};
+
+/* char: 104 'h' */
+
+static final CoordRec char104_stroke0[] = {
+ new CoordRec((float) 26.1905, (float) 100 ),
+ new CoordRec((float) 26.1905, (float) 0 ),
+};
+
+static final CoordRec char104_stroke1[] = {
+ new CoordRec((float) 26.1905, (float) 47.619 ),
+ new CoordRec((float) 40.4762, (float) 61.9048 ),
+ new CoordRec((float) 50, (float) 66.6667 ),
+ new CoordRec((float) 64.2857, (float) 66.6667 ),
+ new CoordRec((float) 73.8095, (float) 61.9048 ),
+ new CoordRec((float) 78.5715, (float) 47.619 ),
+ new CoordRec((float) 78.5715, (float) 0 ),
+};
+
+static final StrokeRec char104[] = {
+ new StrokeRec( 2, char104_stroke0 ),
+ new StrokeRec( 7, char104_stroke1 ),
+};
+
+/* char: 105 'i' */
+
+static final CoordRec char105_stroke0[] = {
+ new CoordRec((float) 47.6191, (float) 100 ),
+ new CoordRec((float) 52.381, (float) 95.2381 ),
+ new CoordRec((float) 57.1429, (float) 100 ),
+ new CoordRec((float) 52.381, (float) 104.762 ),
+ new CoordRec((float) 47.6191, (float) 100 ),
+};
+
+static final CoordRec char105_stroke1[] = {
+ new CoordRec((float) 52.381, (float) 66.6667 ),
+ new CoordRec((float) 52.381, (float) 0 ),
+};
+
+static final StrokeRec char105[] = {
+ new StrokeRec( 5, char105_stroke0 ),
+ new StrokeRec( 2, char105_stroke1 ),
+};
+
+/* char: 106 'j' */
+
+static final CoordRec char106_stroke0[] = {
+ new CoordRec((float) 57.1429, (float) 100 ),
+ new CoordRec((float) 61.9048, (float) 95.2381 ),
+ new CoordRec((float) 66.6667, (float) 100 ),
+ new CoordRec((float) 61.9048, (float) 104.762 ),
+ new CoordRec((float) 57.1429, (float) 100 ),
+};
+
+static final CoordRec char106_stroke1[] = {
+ new CoordRec((float) 61.9048, (float) 66.6667 ),
+ new CoordRec((float) 61.9048, (float) -14.2857 ),
+ new CoordRec((float) 57.1429, (float) -28.5714 ),
+ new CoordRec((float) 47.6191, (float) -33.3333 ),
+ new CoordRec((float) 38.0953, (float) -33.3333 ),
+};
+
+static final StrokeRec char106[] = {
+ new StrokeRec( 5, char106_stroke0 ),
+ new StrokeRec( 5, char106_stroke1 ),
+};
+
+/* char: 107 'k' */
+
+static final CoordRec char107_stroke0[] = {
+ new CoordRec((float) 26.1905, (float) 100 ),
+ new CoordRec((float) 26.1905, (float) 0 ),
+};
+
+static final CoordRec char107_stroke1[] = {
+ new CoordRec((float) 73.8095, (float) 66.6667 ),
+ new CoordRec((float) 26.1905, (float) 19.0476 ),
+};
+
+static final CoordRec char107_stroke2[] = {
+ new CoordRec((float) 45.2381, (float) 38.0952 ),
+ new CoordRec((float) 78.5715, (float) 0 ),
+};
+
+static final StrokeRec char107[] = {
+ new StrokeRec( 2, char107_stroke0 ),
+ new StrokeRec( 2, char107_stroke1 ),
+ new StrokeRec( 2, char107_stroke2 ),
+};
+
+/* char: 108 'l' */
+
+static final CoordRec char108_stroke0[] = {
+ new CoordRec((float) 52.381, (float) 100 ),
+ new CoordRec((float) 52.381, (float) 0 ),
+};
+
+static final StrokeRec char108[] = {
+ new StrokeRec( 2, char108_stroke0 ),
+};
+
+/* char: 109 'm' */
+
+static final CoordRec char109_stroke0[] = {
+ new CoordRec((float) 0, (float) 66.6667 ),
+ new CoordRec((float) 0, (float) 0 ),
+};
+
+static final CoordRec char109_stroke1[] = {
+ new CoordRec((float) 0, (float) 47.619 ),
+ new CoordRec((float) 14.2857, (float) 61.9048 ),
+ new CoordRec((float) 23.8095, (float) 66.6667 ),
+ new CoordRec((float) 38.0952, (float) 66.6667 ),
+ new CoordRec((float) 47.619, (float) 61.9048 ),
+ new CoordRec((float) 52.381, (float) 47.619 ),
+ new CoordRec((float) 52.381, (float) 0 ),
+};
+
+static final CoordRec char109_stroke2[] = {
+ new CoordRec((float) 52.381, (float) 47.619 ),
+ new CoordRec((float) 66.6667, (float) 61.9048 ),
+ new CoordRec((float) 76.1905, (float) 66.6667 ),
+ new CoordRec((float) 90.4762, (float) 66.6667 ),
+ new CoordRec((float) 100, (float) 61.9048 ),
+ new CoordRec((float) 104.762, (float) 47.619 ),
+ new CoordRec((float) 104.762, (float) 0 ),
+};
+
+static final StrokeRec char109[] = {
+ new StrokeRec( 2, char109_stroke0 ),
+ new StrokeRec( 7, char109_stroke1 ),
+ new StrokeRec( 7, char109_stroke2 ),
+};
+
+/* char: 110 'n' */
+
+static final CoordRec char110_stroke0[] = {
+ new CoordRec((float) 26.1905, (float) 66.6667 ),
+ new CoordRec((float) 26.1905, (float) 0 ),
+};
+
+static final CoordRec char110_stroke1[] = {
+ new CoordRec((float) 26.1905, (float) 47.619 ),
+ new CoordRec((float) 40.4762, (float) 61.9048 ),
+ new CoordRec((float) 50, (float) 66.6667 ),
+ new CoordRec((float) 64.2857, (float) 66.6667 ),
+ new CoordRec((float) 73.8095, (float) 61.9048 ),
+ new CoordRec((float) 78.5715, (float) 47.619 ),
+ new CoordRec((float) 78.5715, (float) 0 ),
+};
+
+static final StrokeRec char110[] = {
+ new StrokeRec( 2, char110_stroke0 ),
+ new StrokeRec( 7, char110_stroke1 ),
+};
+
+/* char: 111 'o' */
+
+static final CoordRec char111_stroke0[] = {
+ new CoordRec((float) 45.2381, (float) 66.6667 ),
+ new CoordRec((float) 35.7143, (float) 61.9048 ),
+ new CoordRec((float) 26.1905, (float) 52.381 ),
+ new CoordRec((float) 21.4286, (float) 38.0952 ),
+ new CoordRec((float) 21.4286, (float) 28.5714 ),
+ new CoordRec((float) 26.1905, (float) 14.2857 ),
+ new CoordRec((float) 35.7143, (float) 4.7619 ),
+ new CoordRec((float) 45.2381, (float) 0 ),
+ new CoordRec((float) 59.5238, (float) 0 ),
+ new CoordRec((float) 69.0476, (float) 4.7619 ),
+ new CoordRec((float) 78.5714, (float) 14.2857 ),
+ new CoordRec((float) 83.3334, (float) 28.5714 ),
+ new CoordRec((float) 83.3334, (float) 38.0952 ),
+ new CoordRec((float) 78.5714, (float) 52.381 ),
+ new CoordRec((float) 69.0476, (float) 61.9048 ),
+ new CoordRec((float) 59.5238, (float) 66.6667 ),
+ new CoordRec((float) 45.2381, (float) 66.6667 ),
+};
+
+static final StrokeRec char111[] = {
+ new StrokeRec( 17, char111_stroke0 ),
+};
+
+/* char: 112 'p' */
+
+static final CoordRec char112_stroke0[] = {
+ new CoordRec((float) 23.8095, (float) 66.6667 ),
+ new CoordRec((float) 23.8095, (float) -33.3333 ),
+};
+
+static final CoordRec char112_stroke1[] = {
+ new CoordRec((float) 23.8095, (float) 52.381 ),
+ new CoordRec((float) 33.3333, (float) 61.9048 ),
+ new CoordRec((float) 42.8571, (float) 66.6667 ),
+ new CoordRec((float) 57.1428, (float) 66.6667 ),
+ new CoordRec((float) 66.6666, (float) 61.9048 ),
+ new CoordRec((float) 76.1905, (float) 52.381 ),
+ new CoordRec((float) 80.9524, (float) 38.0952 ),
+ new CoordRec((float) 80.9524, (float) 28.5714 ),
+ new CoordRec((float) 76.1905, (float) 14.2857 ),
+ new CoordRec((float) 66.6666, (float) 4.7619 ),
+ new CoordRec((float) 57.1428, (float) 0 ),
+ new CoordRec((float) 42.8571, (float) 0 ),
+ new CoordRec((float) 33.3333, (float) 4.7619 ),
+ new CoordRec((float) 23.8095, (float) 14.2857 ),
+};
+
+static final StrokeRec char112[] = {
+ new StrokeRec( 2, char112_stroke0 ),
+ new StrokeRec( 14, char112_stroke1 ),
+};
+
+/* char: 113 'q' */
+
+static final CoordRec char113_stroke0[] = {
+ new CoordRec((float) 80.9524, (float) 66.6667 ),
+ new CoordRec((float) 80.9524, (float) -33.3333 ),
+};
+
+static final CoordRec char113_stroke1[] = {
+ new CoordRec((float) 80.9524, (float) 52.381 ),
+ new CoordRec((float) 71.4285, (float) 61.9048 ),
+ new CoordRec((float) 61.9047, (float) 66.6667 ),
+ new CoordRec((float) 47.619, (float) 66.6667 ),
+ new CoordRec((float) 38.0952, (float) 61.9048 ),
+ new CoordRec((float) 28.5714, (float) 52.381 ),
+ new CoordRec((float) 23.8095, (float) 38.0952 ),
+ new CoordRec((float) 23.8095, (float) 28.5714 ),
+ new CoordRec((float) 28.5714, (float) 14.2857 ),
+ new CoordRec((float) 38.0952, (float) 4.7619 ),
+ new CoordRec((float) 47.619, (float) 0 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 71.4285, (float) 4.7619 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+};
+
+static final StrokeRec char113[] = {
+ new StrokeRec( 2, char113_stroke0 ),
+ new StrokeRec( 14, char113_stroke1 ),
+};
+
+/* char: 114 'r' */
+
+static final CoordRec char114_stroke0[] = {
+ new CoordRec((float) 33.3334, (float) 66.6667 ),
+ new CoordRec((float) 33.3334, (float) 0 ),
+};
+
+static final CoordRec char114_stroke1[] = {
+ new CoordRec((float) 33.3334, (float) 38.0952 ),
+ new CoordRec((float) 38.0953, (float) 52.381 ),
+ new CoordRec((float) 47.6191, (float) 61.9048 ),
+ new CoordRec((float) 57.1429, (float) 66.6667 ),
+ new CoordRec((float) 71.4286, (float) 66.6667 ),
+};
+
+static final StrokeRec char114[] = {
+ new StrokeRec( 2, char114_stroke0 ),
+ new StrokeRec( 5, char114_stroke1 ),
+};
+
+/* char: 115 's' */
+
+static final CoordRec char115_stroke0[] = {
+ new CoordRec((float) 78.5715, (float) 52.381 ),
+ new CoordRec((float) 73.8095, (float) 61.9048 ),
+ new CoordRec((float) 59.5238, (float) 66.6667 ),
+ new CoordRec((float) 45.2381, (float) 66.6667 ),
+ new CoordRec((float) 30.9524, (float) 61.9048 ),
+ new CoordRec((float) 26.1905, (float) 52.381 ),
+ new CoordRec((float) 30.9524, (float) 42.8571 ),
+ new CoordRec((float) 40.4762, (float) 38.0952 ),
+ new CoordRec((float) 64.2857, (float) 33.3333 ),
+ new CoordRec((float) 73.8095, (float) 28.5714 ),
+ new CoordRec((float) 78.5715, (float) 19.0476 ),
+ new CoordRec((float) 78.5715, (float) 14.2857 ),
+ new CoordRec((float) 73.8095, (float) 4.7619 ),
+ new CoordRec((float) 59.5238, (float) 0 ),
+ new CoordRec((float) 45.2381, (float) 0 ),
+ new CoordRec((float) 30.9524, (float) 4.7619 ),
+ new CoordRec((float) 26.1905, (float) 14.2857 ),
+};
+
+static final StrokeRec char115[] = {
+ new StrokeRec( 17, char115_stroke0 ),
+};
+
+/* char: 116 't' */
+
+static final CoordRec char116_stroke0[] = {
+ new CoordRec((float) 47.6191, (float) 100 ),
+ new CoordRec((float) 47.6191, (float) 19.0476 ),
+ new CoordRec((float) 52.381, (float) 4.7619 ),
+ new CoordRec((float) 61.9048, (float) 0 ),
+ new CoordRec((float) 71.4286, (float) 0 ),
+};
+
+static final CoordRec char116_stroke1[] = {
+ new CoordRec((float) 33.3334, (float) 66.6667 ),
+ new CoordRec((float) 66.6667, (float) 66.6667 ),
+};
+
+static final StrokeRec char116[] = {
+ new StrokeRec( 5, char116_stroke0 ),
+ new StrokeRec( 2, char116_stroke1 ),
+};
+
+/* char: 117 'u' */
+
+static final CoordRec char117_stroke0[] = {
+ new CoordRec((float) 26.1905, (float) 66.6667 ),
+ new CoordRec((float) 26.1905, (float) 19.0476 ),
+ new CoordRec((float) 30.9524, (float) 4.7619 ),
+ new CoordRec((float) 40.4762, (float) 0 ),
+ new CoordRec((float) 54.7619, (float) 0 ),
+ new CoordRec((float) 64.2857, (float) 4.7619 ),
+ new CoordRec((float) 78.5715, (float) 19.0476 ),
+};
+
+static final CoordRec char117_stroke1[] = {
+ new CoordRec((float) 78.5715, (float) 66.6667 ),
+ new CoordRec((float) 78.5715, (float) 0 ),
+};
+
+static final StrokeRec char117[] = {
+ new StrokeRec( 7, char117_stroke0 ),
+ new StrokeRec( 2, char117_stroke1 ),
+};
+
+/* char: 118 'v' */
+
+static final CoordRec char118_stroke0[] = {
+ new CoordRec((float) 23.8095, (float) 66.6667 ),
+ new CoordRec((float) 52.3809, (float) 0 ),
+};
+
+static final CoordRec char118_stroke1[] = {
+ new CoordRec((float) 80.9524, (float) 66.6667 ),
+ new CoordRec((float) 52.3809, (float) 0 ),
+};
+
+static final StrokeRec char118[] = {
+ new StrokeRec( 2, char118_stroke0 ),
+ new StrokeRec( 2, char118_stroke1 ),
+};
+
+/* char: 119 'w' */
+
+static final CoordRec char119_stroke0[] = {
+ new CoordRec((float) 14.2857, (float) 66.6667 ),
+ new CoordRec((float) 33.3333, (float) 0 ),
+};
+
+static final CoordRec char119_stroke1[] = {
+ new CoordRec((float) 52.3809, (float) 66.6667 ),
+ new CoordRec((float) 33.3333, (float) 0 ),
+};
+
+static final CoordRec char119_stroke2[] = {
+ new CoordRec((float) 52.3809, (float) 66.6667 ),
+ new CoordRec((float) 71.4286, (float) 0 ),
+};
+
+static final CoordRec char119_stroke3[] = {
+ new CoordRec((float) 90.4762, (float) 66.6667 ),
+ new CoordRec((float) 71.4286, (float) 0 ),
+};
+
+static final StrokeRec char119[] = {
+ new StrokeRec( 2, char119_stroke0 ),
+ new StrokeRec( 2, char119_stroke1 ),
+ new StrokeRec( 2, char119_stroke2 ),
+ new StrokeRec( 2, char119_stroke3 ),
+};
+
+/* char: 120 'x' */
+
+static final CoordRec char120_stroke0[] = {
+ new CoordRec((float) 26.1905, (float) 66.6667 ),
+ new CoordRec((float) 78.5715, (float) 0 ),
+};
+
+static final CoordRec char120_stroke1[] = {
+ new CoordRec((float) 78.5715, (float) 66.6667 ),
+ new CoordRec((float) 26.1905, (float) 0 ),
+};
+
+static final StrokeRec char120[] = {
+ new StrokeRec( 2, char120_stroke0 ),
+ new StrokeRec( 2, char120_stroke1 ),
+};
+
+/* char: 121 'y' */
+
+static final CoordRec char121_stroke0[] = {
+ new CoordRec((float) 26.1905, (float) 66.6667 ),
+ new CoordRec((float) 54.7619, (float) 0 ),
+};
+
+static final CoordRec char121_stroke1[] = {
+ new CoordRec((float) 83.3334, (float) 66.6667 ),
+ new CoordRec((float) 54.7619, (float) 0 ),
+ new CoordRec((float) 45.2381, (float) -19.0476 ),
+ new CoordRec((float) 35.7143, (float) -28.5714 ),
+ new CoordRec((float) 26.1905, (float) -33.3333 ),
+ new CoordRec((float) 21.4286, (float) -33.3333 ),
+};
+
+static final StrokeRec char121[] = {
+ new StrokeRec( 2, char121_stroke0 ),
+ new StrokeRec( 6, char121_stroke1 ),
+};
+
+/* char: 122 'z' */
+
+static final CoordRec char122_stroke0[] = {
+ new CoordRec((float) 78.5715, (float) 66.6667 ),
+ new CoordRec((float) 26.1905, (float) 0 ),
+};
+
+static final CoordRec char122_stroke1[] = {
+ new CoordRec((float) 26.1905, (float) 66.6667 ),
+ new CoordRec((float) 78.5715, (float) 66.6667 ),
+};
+
+static final CoordRec char122_stroke2[] = {
+ new CoordRec((float) 26.1905, (float) 0 ),
+ new CoordRec((float) 78.5715, (float) 0 ),
+};
+
+static final StrokeRec char122[] = {
+ new StrokeRec( 2, char122_stroke0 ),
+ new StrokeRec( 2, char122_stroke1 ),
+ new StrokeRec( 2, char122_stroke2 ),
+};
+
+/* char: 123 '{' */
+
+static final CoordRec char123_stroke0[] = {
+ new CoordRec((float) 64.2857, (float) 119.048 ),
+ new CoordRec((float) 54.7619, (float) 114.286 ),
+ new CoordRec((float) 50, (float) 109.524 ),
+ new CoordRec((float) 45.2381, (float) 100 ),
+ new CoordRec((float) 45.2381, (float) 90.4762 ),
+ new CoordRec((float) 50, (float) 80.9524 ),
+ new CoordRec((float) 54.7619, (float) 76.1905 ),
+ new CoordRec((float) 59.5238, (float) 66.6667 ),
+ new CoordRec((float) 59.5238, (float) 57.1429 ),
+ new CoordRec((float) 50, (float) 47.619 ),
+};
+
+static final CoordRec char123_stroke1[] = {
+ new CoordRec((float) 54.7619, (float) 114.286 ),
+ new CoordRec((float) 50, (float) 104.762 ),
+ new CoordRec((float) 50, (float) 95.2381 ),
+ new CoordRec((float) 54.7619, (float) 85.7143 ),
+ new CoordRec((float) 59.5238, (float) 80.9524 ),
+ new CoordRec((float) 64.2857, (float) 71.4286 ),
+ new CoordRec((float) 64.2857, (float) 61.9048 ),
+ new CoordRec((float) 59.5238, (float) 52.381 ),
+ new CoordRec((float) 40.4762, (float) 42.8571 ),
+ new CoordRec((float) 59.5238, (float) 33.3333 ),
+ new CoordRec((float) 64.2857, (float) 23.8095 ),
+ new CoordRec((float) 64.2857, (float) 14.2857 ),
+ new CoordRec((float) 59.5238, (float) 4.7619 ),
+ new CoordRec((float) 54.7619, (float) 0 ),
+ new CoordRec((float) 50, (float) -9.5238 ),
+ new CoordRec((float) 50, (float) -19.0476 ),
+ new CoordRec((float) 54.7619, (float) -28.5714 ),
+};
+
+static final CoordRec char123_stroke2[] = {
+ new CoordRec((float) 50, (float) 38.0952 ),
+ new CoordRec((float) 59.5238, (float) 28.5714 ),
+ new CoordRec((float) 59.5238, (float) 19.0476 ),
+ new CoordRec((float) 54.7619, (float) 9.5238 ),
+ new CoordRec((float) 50, (float) 4.7619 ),
+ new CoordRec((float) 45.2381, (float) -4.7619 ),
+ new CoordRec((float) 45.2381, (float) -14.2857 ),
+ new CoordRec((float) 50, (float) -23.8095 ),
+ new CoordRec((float) 54.7619, (float) -28.5714 ),
+ new CoordRec((float) 64.2857, (float) -33.3333 ),
+};
+
+static final StrokeRec char123[] = {
+ new StrokeRec( 10, char123_stroke0 ),
+ new StrokeRec( 17, char123_stroke1 ),
+ new StrokeRec( 10, char123_stroke2 ),
+};
+
+/* char: 124 '|' */
+
+static final CoordRec char124_stroke0[] = {
+ new CoordRec((float) 52.381, (float) 119.048 ),
+ new CoordRec((float) 52.381, (float) -33.3333 ),
+};
+
+static final StrokeRec char124[] = {
+ new StrokeRec( 2, char124_stroke0 ),
+};
+
+/* char: 125 '}' */
+
+static final CoordRec char125_stroke0[] = {
+ new CoordRec((float) 40.4762, (float) 119.048 ),
+ new CoordRec((float) 50, (float) 114.286 ),
+ new CoordRec((float) 54.7619, (float) 109.524 ),
+ new CoordRec((float) 59.5238, (float) 100 ),
+ new CoordRec((float) 59.5238, (float) 90.4762 ),
+ new CoordRec((float) 54.7619, (float) 80.9524 ),
+ new CoordRec((float) 50, (float) 76.1905 ),
+ new CoordRec((float) 45.2381, (float) 66.6667 ),
+ new CoordRec((float) 45.2381, (float) 57.1429 ),
+ new CoordRec((float) 54.7619, (float) 47.619 ),
+};
+
+static final CoordRec char125_stroke1[] = {
+ new CoordRec((float) 50, (float) 114.286 ),
+ new CoordRec((float) 54.7619, (float) 104.762 ),
+ new CoordRec((float) 54.7619, (float) 95.2381 ),
+ new CoordRec((float) 50, (float) 85.7143 ),
+ new CoordRec((float) 45.2381, (float) 80.9524 ),
+ new CoordRec((float) 40.4762, (float) 71.4286 ),
+ new CoordRec((float) 40.4762, (float) 61.9048 ),
+ new CoordRec((float) 45.2381, (float) 52.381 ),
+ new CoordRec((float) 64.2857, (float) 42.8571 ),
+ new CoordRec((float) 45.2381, (float) 33.3333 ),
+ new CoordRec((float) 40.4762, (float) 23.8095 ),
+ new CoordRec((float) 40.4762, (float) 14.2857 ),
+ new CoordRec((float) 45.2381, (float) 4.7619 ),
+ new CoordRec((float) 50, (float) 0 ),
+ new CoordRec((float) 54.7619, (float) -9.5238 ),
+ new CoordRec((float) 54.7619, (float) -19.0476 ),
+ new CoordRec((float) 50, (float) -28.5714 ),
+};
+
+static final CoordRec char125_stroke2[] = {
+ new CoordRec((float) 54.7619, (float) 38.0952 ),
+ new CoordRec((float) 45.2381, (float) 28.5714 ),
+ new CoordRec((float) 45.2381, (float) 19.0476 ),
+ new CoordRec((float) 50, (float) 9.5238 ),
+ new CoordRec((float) 54.7619, (float) 4.7619 ),
+ new CoordRec((float) 59.5238, (float) -4.7619 ),
+ new CoordRec((float) 59.5238, (float) -14.2857 ),
+ new CoordRec((float) 54.7619, (float) -23.8095 ),
+ new CoordRec((float) 50, (float) -28.5714 ),
+ new CoordRec((float) 40.4762, (float) -33.3333 ),
+};
+
+static final StrokeRec char125[] = {
+ new StrokeRec( 10, char125_stroke0 ),
+ new StrokeRec( 17, char125_stroke1 ),
+ new StrokeRec( 10, char125_stroke2 ),
+};
+
+/* char: 126 '~' */
+
+static final CoordRec char126_stroke0[] = {
+ new CoordRec((float) 9.5238, (float) 28.5714 ),
+ new CoordRec((float) 9.5238, (float) 38.0952 ),
+ new CoordRec((float) 14.2857, (float) 52.381 ),
+ new CoordRec((float) 23.8095, (float) 57.1429 ),
+ new CoordRec((float) 33.3333, (float) 57.1429 ),
+ new CoordRec((float) 42.8571, (float) 52.381 ),
+ new CoordRec((float) 61.9048, (float) 38.0952 ),
+ new CoordRec((float) 71.4286, (float) 33.3333 ),
+ new CoordRec((float) 80.9524, (float) 33.3333 ),
+ new CoordRec((float) 90.4762, (float) 38.0952 ),
+ new CoordRec((float) 95.2381, (float) 47.619 ),
+};
+
+static final CoordRec char126_stroke1[] = {
+ new CoordRec((float) 9.5238, (float) 38.0952 ),
+ new CoordRec((float) 14.2857, (float) 47.619 ),
+ new CoordRec((float) 23.8095, (float) 52.381 ),
+ new CoordRec((float) 33.3333, (float) 52.381 ),
+ new CoordRec((float) 42.8571, (float) 47.619 ),
+ new CoordRec((float) 61.9048, (float) 33.3333 ),
+ new CoordRec((float) 71.4286, (float) 28.5714 ),
+ new CoordRec((float) 80.9524, (float) 28.5714 ),
+ new CoordRec((float) 90.4762, (float) 33.3333 ),
+ new CoordRec((float) 95.2381, (float) 47.619 ),
+ new CoordRec((float) 95.2381, (float) 57.1429 ),
+};
+
+static final StrokeRec char126[] = {
+ new StrokeRec( 11, char126_stroke0 ),
+ new StrokeRec( 11, char126_stroke1 ),
+};
+
+/* char: 127 */
+
+static final CoordRec char127_stroke0[] = {
+ new CoordRec((float) 71.4286, (float) 100 ),
+ new CoordRec((float) 33.3333, (float) -33.3333 ),
+};
+
+static final CoordRec char127_stroke1[] = {
+ new CoordRec((float) 47.619, (float) 66.6667 ),
+ new CoordRec((float) 33.3333, (float) 61.9048 ),
+ new CoordRec((float) 23.8095, (float) 52.381 ),
+ new CoordRec((float) 19.0476, (float) 38.0952 ),
+ new CoordRec((float) 19.0476, (float) 23.8095 ),
+ new CoordRec((float) 23.8095, (float) 14.2857 ),
+ new CoordRec((float) 33.3333, (float) 4.7619 ),
+ new CoordRec((float) 47.619, (float) 0 ),
+ new CoordRec((float) 57.1428, (float) 0 ),
+ new CoordRec((float) 71.4286, (float) 4.7619 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+ new CoordRec((float) 85.7143, (float) 28.5714 ),
+ new CoordRec((float) 85.7143, (float) 42.8571 ),
+ new CoordRec((float) 80.9524, (float) 52.381 ),
+ new CoordRec((float) 71.4286, (float) 61.9048 ),
+ new CoordRec((float) 57.1428, (float) 66.6667 ),
+ new CoordRec((float) 47.619, (float) 66.6667 ),
+};
+
+static final StrokeRec char127[] = {
+ new StrokeRec( 2, char127_stroke0 ),
+ new StrokeRec( 17, char127_stroke1 ),
+};
+
+static final StrokeCharRec chars[] = {
+ new StrokeCharRec(0, /* char0 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char1 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char2 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char3 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char4 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char5 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char6 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char7 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char8 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char9 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char10 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char11 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char12 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char13 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char14 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char15 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char16 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char17 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char18 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char19 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char20 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char21 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char22 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char23 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char24 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char25 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char26 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char27 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char28 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char29 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char30 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char31 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char32 */ null, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char33, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char34, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(4, char35, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char36, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char37, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char38, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char39, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char40, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char41, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char42, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char43, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char44, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char45, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char46, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char47, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char48, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char49, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char50, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char51, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char52, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char53, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char54, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char55, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char56, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char57, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char58, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char59, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char60, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char61, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char62, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char63, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char64, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char65, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char66, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char67, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char68, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(4, char69, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char70, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char71, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char72, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char73, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char74, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char75, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char76, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(4, char77, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char78, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char79, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char80, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char81, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char82, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char83, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char84, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char85, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char86, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(4, char87, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char88, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char89, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char90, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(4, char91, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char92, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(4, char93, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char94, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char95, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char96, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char97, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char98, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char99, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char100, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char101, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char102, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char103, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char104, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char105, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char106, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char107, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char108, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char109, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char110, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char111, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char112, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char113, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char114, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char115, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char116, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char117, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char118, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(4, char119, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char120, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char121, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char122, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char123, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char124, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char125, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char126, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char127, (float) 52.381, (float) 104.762 ),
+};
+
+public static final StrokeFontRec glutStrokeMonoRoman = new StrokeFontRec( "Roman", 128, chars, (float) 119.048, (float) -33.3333 );
+}
diff --git a/src/classes/com/sun/opengl/util/glut/fonts/GLUTStrokeRoman.java b/src/classes/com/sun/opengl/util/glut/fonts/GLUTStrokeRoman.java
new file mode 100644
index 000000000..83049d99b
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/glut/fonts/GLUTStrokeRoman.java
@@ -0,0 +1,2493 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.glut.fonts;
+
+import com.sun.opengl.util.glut.rec.*;
+
+public class GLUTStrokeRoman {
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+/* char: 33 '!' */
+
+static final CoordRec char33_stroke0[] = {
+ new CoordRec((float) 13.3819, (float) 100),
+ new CoordRec((float) 13.3819, (float) 33.3333),
+};
+
+static final CoordRec char33_stroke1[] = {
+ new CoordRec((float) 13.3819, (float) 9.5238),
+ new CoordRec((float) 8.62, (float) 4.7619),
+ new CoordRec((float) 13.3819, (float) 0),
+ new CoordRec((float) 18.1438, (float) 4.7619),
+ new CoordRec((float) 13.3819, (float) 9.5238),
+};
+
+static final StrokeRec char33[] = {
+ new StrokeRec(2, char33_stroke0),
+ new StrokeRec(5, char33_stroke1),
+};
+
+/* char: 34 '"' */
+
+static final CoordRec char34_stroke0[] = {
+ new CoordRec((float) 4.02, (float) 100),
+ new CoordRec((float) 4.02, (float) 66.6667),
+};
+
+static final CoordRec char34_stroke1[] = {
+ new CoordRec((float) 42.1152, (float) 100),
+ new CoordRec((float) 42.1152, (float) 66.6667),
+};
+
+static final StrokeRec char34[] = {
+ new StrokeRec(2, char34_stroke0),
+ new StrokeRec(2, char34_stroke1),
+};
+
+/* char: 35 '#' */
+
+static final CoordRec char35_stroke0[] = {
+ new CoordRec((float) 41.2952, (float) 119.048),
+ new CoordRec((float) 7.9619, (float) -33.3333),
+};
+
+static final CoordRec char35_stroke1[] = {
+ new CoordRec((float) 69.8667, (float) 119.048),
+ new CoordRec((float) 36.5333, (float) -33.3333),
+};
+
+static final CoordRec char35_stroke2[] = {
+ new CoordRec((float) 7.9619, (float) 57.1429),
+ new CoordRec((float) 74.6286, (float) 57.1429),
+};
+
+static final CoordRec char35_stroke3[] = {
+ new CoordRec((float) 3.2, (float) 28.5714),
+ new CoordRec((float) 69.8667, (float) 28.5714),
+};
+
+static final StrokeRec char35[] = {
+ new StrokeRec(2, char35_stroke0),
+ new StrokeRec(2, char35_stroke1),
+ new StrokeRec(2, char35_stroke2),
+ new StrokeRec(2, char35_stroke3),
+};
+
+/* char: 36 '$' */
+
+static final CoordRec char36_stroke0[] = {
+ new CoordRec((float) 28.6295, (float) 119.048),
+ new CoordRec((float) 28.6295, (float) -19.0476),
+};
+
+static final CoordRec char36_stroke1[] = {
+ new CoordRec((float) 47.6771, (float) 119.048),
+ new CoordRec((float) 47.6771, (float) -19.0476),
+};
+
+static final CoordRec char36_stroke2[] = {
+ new CoordRec((float) 71.4867, (float) 85.7143),
+ new CoordRec((float) 61.9629, (float) 95.2381),
+ new CoordRec((float) 47.6771, (float) 100),
+ new CoordRec((float) 28.6295, (float) 100),
+ new CoordRec((float) 14.3438, (float) 95.2381),
+ new CoordRec((float) 4.82, (float) 85.7143),
+ new CoordRec((float) 4.82, (float) 76.1905),
+ new CoordRec((float) 9.5819, (float) 66.6667),
+ new CoordRec((float) 14.3438, (float) 61.9048),
+ new CoordRec((float) 23.8676, (float) 57.1429),
+ new CoordRec((float) 52.439, (float) 47.619),
+ new CoordRec((float) 61.9629, (float) 42.8571),
+ new CoordRec((float) 66.7248, (float) 38.0952),
+ new CoordRec((float) 71.4867, (float) 28.5714),
+ new CoordRec((float) 71.4867, (float) 14.2857),
+ new CoordRec((float) 61.9629, (float) 4.7619),
+ new CoordRec((float) 47.6771, (float) 0),
+ new CoordRec((float) 28.6295, (float) 0),
+ new CoordRec((float) 14.3438, (float) 4.7619),
+ new CoordRec((float) 4.82, (float) 14.2857),
+};
+
+static final StrokeRec char36[] = {
+ new StrokeRec(2, char36_stroke0),
+ new StrokeRec(2, char36_stroke1),
+ new StrokeRec(20, char36_stroke2),
+};
+
+/* char: 37 '%' */
+
+static final CoordRec char37_stroke0[] = {
+ new CoordRec((float) 92.0743, (float) 100),
+ new CoordRec((float) 6.36, (float) 0),
+};
+
+static final CoordRec char37_stroke1[] = {
+ new CoordRec((float) 30.1695, (float) 100),
+ new CoordRec((float) 39.6933, (float) 90.4762),
+ new CoordRec((float) 39.6933, (float) 80.9524),
+ new CoordRec((float) 34.9314, (float) 71.4286),
+ new CoordRec((float) 25.4076, (float) 66.6667),
+ new CoordRec((float) 15.8838, (float) 66.6667),
+ new CoordRec((float) 6.36, (float) 76.1905),
+ new CoordRec((float) 6.36, (float) 85.7143),
+ new CoordRec((float) 11.1219, (float) 95.2381),
+ new CoordRec((float) 20.6457, (float) 100),
+ new CoordRec((float) 30.1695, (float) 100),
+ new CoordRec((float) 39.6933, (float) 95.2381),
+ new CoordRec((float) 53.979, (float) 90.4762),
+ new CoordRec((float) 68.2648, (float) 90.4762),
+ new CoordRec((float) 82.5505, (float) 95.2381),
+ new CoordRec((float) 92.0743, (float) 100),
+};
+
+static final CoordRec char37_stroke2[] = {
+ new CoordRec((float) 73.0267, (float) 33.3333),
+ new CoordRec((float) 63.5029, (float) 28.5714),
+ new CoordRec((float) 58.741, (float) 19.0476),
+ new CoordRec((float) 58.741, (float) 9.5238),
+ new CoordRec((float) 68.2648, (float) 0),
+ new CoordRec((float) 77.7886, (float) 0),
+ new CoordRec((float) 87.3124, (float) 4.7619),
+ new CoordRec((float) 92.0743, (float) 14.2857),
+ new CoordRec((float) 92.0743, (float) 23.8095),
+ new CoordRec((float) 82.5505, (float) 33.3333),
+ new CoordRec((float) 73.0267, (float) 33.3333),
+};
+
+static final StrokeRec char37[] = {
+ new StrokeRec(2, char37_stroke0),
+ new StrokeRec(16, char37_stroke1),
+ new StrokeRec(11, char37_stroke2),
+};
+
+/* char: 38 '&' */
+
+static final CoordRec char38_stroke0[] = {
+ new CoordRec((float) 101.218, (float) 57.1429),
+ new CoordRec((float) 101.218, (float) 61.9048),
+ new CoordRec((float) 96.4562, (float) 66.6667),
+ new CoordRec((float) 91.6943, (float) 66.6667),
+ new CoordRec((float) 86.9324, (float) 61.9048),
+ new CoordRec((float) 82.1705, (float) 52.381),
+ new CoordRec((float) 72.6467, (float) 28.5714),
+ new CoordRec((float) 63.1229, (float) 14.2857),
+ new CoordRec((float) 53.599, (float) 4.7619),
+ new CoordRec((float) 44.0752, (float) 0),
+ new CoordRec((float) 25.0276, (float) 0),
+ new CoordRec((float) 15.5038, (float) 4.7619),
+ new CoordRec((float) 10.7419, (float) 9.5238),
+ new CoordRec((float) 5.98, (float) 19.0476),
+ new CoordRec((float) 5.98, (float) 28.5714),
+ new CoordRec((float) 10.7419, (float) 38.0952),
+ new CoordRec((float) 15.5038, (float) 42.8571),
+ new CoordRec((float) 48.8371, (float) 61.9048),
+ new CoordRec((float) 53.599, (float) 66.6667),
+ new CoordRec((float) 58.361, (float) 76.1905),
+ new CoordRec((float) 58.361, (float) 85.7143),
+ new CoordRec((float) 53.599, (float) 95.2381),
+ new CoordRec((float) 44.0752, (float) 100),
+ new CoordRec((float) 34.5514, (float) 95.2381),
+ new CoordRec((float) 29.7895, (float) 85.7143),
+ new CoordRec((float) 29.7895, (float) 76.1905),
+ new CoordRec((float) 34.5514, (float) 61.9048),
+ new CoordRec((float) 44.0752, (float) 47.619),
+ new CoordRec((float) 67.8848, (float) 14.2857),
+ new CoordRec((float) 77.4086, (float) 4.7619),
+ new CoordRec((float) 86.9324, (float) 0),
+ new CoordRec((float) 96.4562, (float) 0),
+ new CoordRec((float) 101.218, (float) 4.7619),
+ new CoordRec((float) 101.218, (float) 9.5238),
+};
+
+static final StrokeRec char38[] = {
+ new StrokeRec(34, char38_stroke0),
+};
+
+/* char: 39 ''' */
+
+static final CoordRec char39_stroke0[] = {
+ new CoordRec((float) 4.44, (float) 100),
+ new CoordRec((float) 4.44, (float) 66.6667),
+};
+
+static final StrokeRec char39[] = {
+ new StrokeRec(2, char39_stroke0),
+};
+
+/* char: 40 '(' */
+
+static final CoordRec char40_stroke0[] = {
+ new CoordRec((float) 40.9133, (float) 119.048),
+ new CoordRec((float) 31.3895, (float) 109.524),
+ new CoordRec((float) 21.8657, (float) 95.2381),
+ new CoordRec((float) 12.3419, (float) 76.1905),
+ new CoordRec((float) 7.58, (float) 52.381),
+ new CoordRec((float) 7.58, (float) 33.3333),
+ new CoordRec((float) 12.3419, (float) 9.5238),
+ new CoordRec((float) 21.8657, (float) -9.5238),
+ new CoordRec((float) 31.3895, (float) -23.8095),
+ new CoordRec((float) 40.9133, (float) -33.3333),
+};
+
+static final StrokeRec char40[] = {
+ new StrokeRec(10, char40_stroke0),
+};
+
+/* char: 41 ')' */
+
+static final CoordRec char41_stroke0[] = {
+ new CoordRec((float) 5.28, (float) 119.048),
+ new CoordRec((float) 14.8038, (float) 109.524),
+ new CoordRec((float) 24.3276, (float) 95.2381),
+ new CoordRec((float) 33.8514, (float) 76.1905),
+ new CoordRec((float) 38.6133, (float) 52.381),
+ new CoordRec((float) 38.6133, (float) 33.3333),
+ new CoordRec((float) 33.8514, (float) 9.5238),
+ new CoordRec((float) 24.3276, (float) -9.5238),
+ new CoordRec((float) 14.8038, (float) -23.8095),
+ new CoordRec((float) 5.28, (float) -33.3333),
+};
+
+static final StrokeRec char41[] = {
+ new StrokeRec(10, char41_stroke0),
+};
+
+/* char: 42 '*' */
+
+static final CoordRec char42_stroke0[] = {
+ new CoordRec((float) 30.7695, (float) 71.4286),
+ new CoordRec((float) 30.7695, (float) 14.2857),
+};
+
+static final CoordRec char42_stroke1[] = {
+ new CoordRec((float) 6.96, (float) 57.1429),
+ new CoordRec((float) 54.579, (float) 28.5714),
+};
+
+static final CoordRec char42_stroke2[] = {
+ new CoordRec((float) 54.579, (float) 57.1429),
+ new CoordRec((float) 6.96, (float) 28.5714),
+};
+
+static final StrokeRec char42[] = {
+ new StrokeRec(2, char42_stroke0),
+ new StrokeRec(2, char42_stroke1),
+ new StrokeRec(2, char42_stroke2),
+};
+
+/* char: 43 '+' */
+
+static final CoordRec char43_stroke0[] = {
+ new CoordRec((float) 48.8371, (float) 85.7143),
+ new CoordRec((float) 48.8371, (float) 0),
+};
+
+static final CoordRec char43_stroke1[] = {
+ new CoordRec((float) 5.98, (float) 42.8571),
+ new CoordRec((float) 91.6943, (float) 42.8571),
+};
+
+static final StrokeRec char43[] = {
+ new StrokeRec(2, char43_stroke0),
+ new StrokeRec(2, char43_stroke1),
+};
+
+/* char: 44 ',' */
+
+static final CoordRec char44_stroke0[] = {
+ new CoordRec((float) 18.2838, (float) 4.7619),
+ new CoordRec((float) 13.5219, (float) 0),
+ new CoordRec((float) 8.76, (float) 4.7619),
+ new CoordRec((float) 13.5219, (float) 9.5238),
+ new CoordRec((float) 18.2838, (float) 4.7619),
+ new CoordRec((float) 18.2838, (float) -4.7619),
+ new CoordRec((float) 13.5219, (float) -14.2857),
+ new CoordRec((float) 8.76, (float) -19.0476),
+};
+
+static final StrokeRec char44[] = {
+ new StrokeRec(8, char44_stroke0),
+};
+
+/* char: 45 '-' */
+
+static final CoordRec char45_stroke0[] = {
+ new CoordRec((float) 7.38, (float) 42.8571),
+ new CoordRec((float) 93.0943, (float) 42.8571),
+};
+
+static final StrokeRec char45[] = {
+ new StrokeRec(2, char45_stroke0),
+};
+
+/* char: 46 '.' */
+
+static final CoordRec char46_stroke0[] = {
+ new CoordRec((float) 13.1019, (float) 9.5238),
+ new CoordRec((float) 8.34, (float) 4.7619),
+ new CoordRec((float) 13.1019, (float) 0),
+ new CoordRec((float) 17.8638, (float) 4.7619),
+ new CoordRec((float) 13.1019, (float) 9.5238),
+};
+
+static final StrokeRec char46[] = {
+ new StrokeRec(5, char46_stroke0),
+};
+
+/* char: 47 '/' */
+
+static final CoordRec char47_stroke0[] = {
+ new CoordRec((float) 7.24, (float) -14.2857),
+ new CoordRec((float) 73.9067, (float) 100),
+};
+
+static final StrokeRec char47[] = {
+ new StrokeRec(2, char47_stroke0),
+};
+
+/* char: 48 '0' */
+
+static final CoordRec char48_stroke0[] = {
+ new CoordRec((float) 33.5514, (float) 100),
+ new CoordRec((float) 19.2657, (float) 95.2381),
+ new CoordRec((float) 9.7419, (float) 80.9524),
+ new CoordRec((float) 4.98, (float) 57.1429),
+ new CoordRec((float) 4.98, (float) 42.8571),
+ new CoordRec((float) 9.7419, (float) 19.0476),
+ new CoordRec((float) 19.2657, (float) 4.7619),
+ new CoordRec((float) 33.5514, (float) 0),
+ new CoordRec((float) 43.0752, (float) 0),
+ new CoordRec((float) 57.361, (float) 4.7619),
+ new CoordRec((float) 66.8848, (float) 19.0476),
+ new CoordRec((float) 71.6467, (float) 42.8571),
+ new CoordRec((float) 71.6467, (float) 57.1429),
+ new CoordRec((float) 66.8848, (float) 80.9524),
+ new CoordRec((float) 57.361, (float) 95.2381),
+ new CoordRec((float) 43.0752, (float) 100),
+ new CoordRec((float) 33.5514, (float) 100),
+};
+
+static final StrokeRec char48[] = {
+ new StrokeRec(17, char48_stroke0),
+};
+
+/* char: 49 '1' */
+
+static final CoordRec char49_stroke0[] = {
+ new CoordRec((float) 11.82, (float) 80.9524),
+ new CoordRec((float) 21.3438, (float) 85.7143),
+ new CoordRec((float) 35.6295, (float) 100),
+ new CoordRec((float) 35.6295, (float) 0),
+};
+
+static final StrokeRec char49[] = {
+ new StrokeRec(4, char49_stroke0),
+};
+
+/* char: 50 '2' */
+
+static final CoordRec char50_stroke0[] = {
+ new CoordRec((float) 10.1819, (float) 76.1905),
+ new CoordRec((float) 10.1819, (float) 80.9524),
+ new CoordRec((float) 14.9438, (float) 90.4762),
+ new CoordRec((float) 19.7057, (float) 95.2381),
+ new CoordRec((float) 29.2295, (float) 100),
+ new CoordRec((float) 48.2771, (float) 100),
+ new CoordRec((float) 57.801, (float) 95.2381),
+ new CoordRec((float) 62.5629, (float) 90.4762),
+ new CoordRec((float) 67.3248, (float) 80.9524),
+ new CoordRec((float) 67.3248, (float) 71.4286),
+ new CoordRec((float) 62.5629, (float) 61.9048),
+ new CoordRec((float) 53.039, (float) 47.619),
+ new CoordRec((float) 5.42, (float) 0),
+ new CoordRec((float) 72.0867, (float) 0),
+};
+
+static final StrokeRec char50[] = {
+ new StrokeRec(14, char50_stroke0),
+};
+
+/* char: 51 '3' */
+
+static final CoordRec char51_stroke0[] = {
+ new CoordRec((float) 14.5238, (float) 100),
+ new CoordRec((float) 66.9048, (float) 100),
+ new CoordRec((float) 38.3333, (float) 61.9048),
+ new CoordRec((float) 52.619, (float) 61.9048),
+ new CoordRec((float) 62.1429, (float) 57.1429),
+ new CoordRec((float) 66.9048, (float) 52.381),
+ new CoordRec((float) 71.6667, (float) 38.0952),
+ new CoordRec((float) 71.6667, (float) 28.5714),
+ new CoordRec((float) 66.9048, (float) 14.2857),
+ new CoordRec((float) 57.381, (float) 4.7619),
+ new CoordRec((float) 43.0952, (float) 0),
+ new CoordRec((float) 28.8095, (float) 0),
+ new CoordRec((float) 14.5238, (float) 4.7619),
+ new CoordRec((float) 9.7619, (float) 9.5238),
+ new CoordRec((float) 5, (float) 19.0476),
+};
+
+static final StrokeRec char51[] = {
+ new StrokeRec(15, char51_stroke0),
+};
+
+/* char: 52 '4' */
+
+static final CoordRec char52_stroke0[] = {
+ new CoordRec((float) 51.499, (float) 100),
+ new CoordRec((float) 3.88, (float) 33.3333),
+ new CoordRec((float) 75.3086, (float) 33.3333),
+};
+
+static final CoordRec char52_stroke1[] = {
+ new CoordRec((float) 51.499, (float) 100),
+ new CoordRec((float) 51.499, (float) 0),
+};
+
+static final StrokeRec char52[] = {
+ new StrokeRec(3, char52_stroke0),
+ new StrokeRec(2, char52_stroke1),
+};
+
+/* char: 53 '5' */
+
+static final CoordRec char53_stroke0[] = {
+ new CoordRec((float) 62.0029, (float) 100),
+ new CoordRec((float) 14.3838, (float) 100),
+ new CoordRec((float) 9.6219, (float) 57.1429),
+ new CoordRec((float) 14.3838, (float) 61.9048),
+ new CoordRec((float) 28.6695, (float) 66.6667),
+ new CoordRec((float) 42.9552, (float) 66.6667),
+ new CoordRec((float) 57.241, (float) 61.9048),
+ new CoordRec((float) 66.7648, (float) 52.381),
+ new CoordRec((float) 71.5267, (float) 38.0952),
+ new CoordRec((float) 71.5267, (float) 28.5714),
+ new CoordRec((float) 66.7648, (float) 14.2857),
+ new CoordRec((float) 57.241, (float) 4.7619),
+ new CoordRec((float) 42.9552, (float) 0),
+ new CoordRec((float) 28.6695, (float) 0),
+ new CoordRec((float) 14.3838, (float) 4.7619),
+ new CoordRec((float) 9.6219, (float) 9.5238),
+ new CoordRec((float) 4.86, (float) 19.0476),
+};
+
+static final StrokeRec char53[] = {
+ new StrokeRec(17, char53_stroke0),
+};
+
+/* char: 54 '6' */
+
+static final CoordRec char54_stroke0[] = {
+ new CoordRec((float) 62.7229, (float) 85.7143),
+ new CoordRec((float) 57.961, (float) 95.2381),
+ new CoordRec((float) 43.6752, (float) 100),
+ new CoordRec((float) 34.1514, (float) 100),
+ new CoordRec((float) 19.8657, (float) 95.2381),
+ new CoordRec((float) 10.3419, (float) 80.9524),
+ new CoordRec((float) 5.58, (float) 57.1429),
+ new CoordRec((float) 5.58, (float) 33.3333),
+ new CoordRec((float) 10.3419, (float) 14.2857),
+ new CoordRec((float) 19.8657, (float) 4.7619),
+ new CoordRec((float) 34.1514, (float) 0),
+ new CoordRec((float) 38.9133, (float) 0),
+ new CoordRec((float) 53.199, (float) 4.7619),
+ new CoordRec((float) 62.7229, (float) 14.2857),
+ new CoordRec((float) 67.4848, (float) 28.5714),
+ new CoordRec((float) 67.4848, (float) 33.3333),
+ new CoordRec((float) 62.7229, (float) 47.619),
+ new CoordRec((float) 53.199, (float) 57.1429),
+ new CoordRec((float) 38.9133, (float) 61.9048),
+ new CoordRec((float) 34.1514, (float) 61.9048),
+ new CoordRec((float) 19.8657, (float) 57.1429),
+ new CoordRec((float) 10.3419, (float) 47.619),
+ new CoordRec((float) 5.58, (float) 33.3333),
+};
+
+static final StrokeRec char54[] = {
+ new StrokeRec(23, char54_stroke0),
+};
+
+/* char: 55 '7' */
+
+static final CoordRec char55_stroke0[] = {
+ new CoordRec((float) 72.2267, (float) 100),
+ new CoordRec((float) 24.6076, (float) 0),
+};
+
+static final CoordRec char55_stroke1[] = {
+ new CoordRec((float) 5.56, (float) 100),
+ new CoordRec((float) 72.2267, (float) 100),
+};
+
+static final StrokeRec char55[] = {
+ new StrokeRec(2, char55_stroke0),
+ new StrokeRec(2, char55_stroke1),
+};
+
+/* char: 56 '8' */
+
+static final CoordRec char56_stroke0[] = {
+ new CoordRec((float) 29.4095, (float) 100),
+ new CoordRec((float) 15.1238, (float) 95.2381),
+ new CoordRec((float) 10.3619, (float) 85.7143),
+ new CoordRec((float) 10.3619, (float) 76.1905),
+ new CoordRec((float) 15.1238, (float) 66.6667),
+ new CoordRec((float) 24.6476, (float) 61.9048),
+ new CoordRec((float) 43.6952, (float) 57.1429),
+ new CoordRec((float) 57.981, (float) 52.381),
+ new CoordRec((float) 67.5048, (float) 42.8571),
+ new CoordRec((float) 72.2667, (float) 33.3333),
+ new CoordRec((float) 72.2667, (float) 19.0476),
+ new CoordRec((float) 67.5048, (float) 9.5238),
+ new CoordRec((float) 62.7429, (float) 4.7619),
+ new CoordRec((float) 48.4571, (float) 0),
+ new CoordRec((float) 29.4095, (float) 0),
+ new CoordRec((float) 15.1238, (float) 4.7619),
+ new CoordRec((float) 10.3619, (float) 9.5238),
+ new CoordRec((float) 5.6, (float) 19.0476),
+ new CoordRec((float) 5.6, (float) 33.3333),
+ new CoordRec((float) 10.3619, (float) 42.8571),
+ new CoordRec((float) 19.8857, (float) 52.381),
+ new CoordRec((float) 34.1714, (float) 57.1429),
+ new CoordRec((float) 53.219, (float) 61.9048),
+ new CoordRec((float) 62.7429, (float) 66.6667),
+ new CoordRec((float) 67.5048, (float) 76.1905),
+ new CoordRec((float) 67.5048, (float) 85.7143),
+ new CoordRec((float) 62.7429, (float) 95.2381),
+ new CoordRec((float) 48.4571, (float) 100),
+ new CoordRec((float) 29.4095, (float) 100),
+};
+
+static final StrokeRec char56[] = {
+ new StrokeRec(29, char56_stroke0),
+};
+
+/* char: 57 '9' */
+
+static final CoordRec char57_stroke0[] = {
+ new CoordRec((float) 68.5048, (float) 66.6667),
+ new CoordRec((float) 63.7429, (float) 52.381),
+ new CoordRec((float) 54.219, (float) 42.8571),
+ new CoordRec((float) 39.9333, (float) 38.0952),
+ new CoordRec((float) 35.1714, (float) 38.0952),
+ new CoordRec((float) 20.8857, (float) 42.8571),
+ new CoordRec((float) 11.3619, (float) 52.381),
+ new CoordRec((float) 6.6, (float) 66.6667),
+ new CoordRec((float) 6.6, (float) 71.4286),
+ new CoordRec((float) 11.3619, (float) 85.7143),
+ new CoordRec((float) 20.8857, (float) 95.2381),
+ new CoordRec((float) 35.1714, (float) 100),
+ new CoordRec((float) 39.9333, (float) 100),
+ new CoordRec((float) 54.219, (float) 95.2381),
+ new CoordRec((float) 63.7429, (float) 85.7143),
+ new CoordRec((float) 68.5048, (float) 66.6667),
+ new CoordRec((float) 68.5048, (float) 42.8571),
+ new CoordRec((float) 63.7429, (float) 19.0476),
+ new CoordRec((float) 54.219, (float) 4.7619),
+ new CoordRec((float) 39.9333, (float) 0),
+ new CoordRec((float) 30.4095, (float) 0),
+ new CoordRec((float) 16.1238, (float) 4.7619),
+ new CoordRec((float) 11.3619, (float) 14.2857),
+};
+
+static final StrokeRec char57[] = {
+ new StrokeRec(23, char57_stroke0),
+};
+
+/* char: 58 ':' */
+
+static final CoordRec char58_stroke0[] = {
+ new CoordRec((float) 14.0819, (float) 66.6667),
+ new CoordRec((float) 9.32, (float) 61.9048),
+ new CoordRec((float) 14.0819, (float) 57.1429),
+ new CoordRec((float) 18.8438, (float) 61.9048),
+ new CoordRec((float) 14.0819, (float) 66.6667),
+};
+
+static final CoordRec char58_stroke1[] = {
+ new CoordRec((float) 14.0819, (float) 9.5238),
+ new CoordRec((float) 9.32, (float) 4.7619),
+ new CoordRec((float) 14.0819, (float) 0),
+ new CoordRec((float) 18.8438, (float) 4.7619),
+ new CoordRec((float) 14.0819, (float) 9.5238),
+};
+
+static final StrokeRec char58[] = {
+ new StrokeRec(5, char58_stroke0),
+ new StrokeRec(5, char58_stroke1),
+};
+
+/* char: 59 ';' */
+
+static final CoordRec char59_stroke0[] = {
+ new CoordRec((float) 12.9619, (float) 66.6667),
+ new CoordRec((float) 8.2, (float) 61.9048),
+ new CoordRec((float) 12.9619, (float) 57.1429),
+ new CoordRec((float) 17.7238, (float) 61.9048),
+ new CoordRec((float) 12.9619, (float) 66.6667),
+};
+
+static final CoordRec char59_stroke1[] = {
+ new CoordRec((float) 17.7238, (float) 4.7619),
+ new CoordRec((float) 12.9619, (float) 0),
+ new CoordRec((float) 8.2, (float) 4.7619),
+ new CoordRec((float) 12.9619, (float) 9.5238),
+ new CoordRec((float) 17.7238, (float) 4.7619),
+ new CoordRec((float) 17.7238, (float) -4.7619),
+ new CoordRec((float) 12.9619, (float) -14.2857),
+ new CoordRec((float) 8.2, (float) -19.0476),
+};
+
+static final StrokeRec char59[] = {
+ new StrokeRec(5, char59_stroke0),
+ new StrokeRec(8, char59_stroke1),
+};
+
+/* char: 60 '<' */
+
+static final CoordRec char60_stroke0[] = {
+ new CoordRec((float) 79.2505, (float) 85.7143),
+ new CoordRec((float) 3.06, (float) 42.8571),
+ new CoordRec((float) 79.2505, (float) 0),
+};
+
+static final StrokeRec char60[] = {
+ new StrokeRec(3, char60_stroke0),
+};
+
+/* char: 61 '=' */
+
+static final CoordRec char61_stroke0[] = {
+ new CoordRec((float) 5.7, (float) 57.1429),
+ new CoordRec((float) 91.4143, (float) 57.1429),
+};
+
+static final CoordRec char61_stroke1[] = {
+ new CoordRec((float) 5.7, (float) 28.5714),
+ new CoordRec((float) 91.4143, (float) 28.5714),
+};
+
+static final StrokeRec char61[] = {
+ new StrokeRec(2, char61_stroke0),
+ new StrokeRec(2, char61_stroke1),
+};
+
+/* char: 62 '>' */
+
+static final CoordRec char62_stroke0[] = {
+ new CoordRec((float) 2.78, (float) 85.7143),
+ new CoordRec((float) 78.9705, (float) 42.8571),
+ new CoordRec((float) 2.78, (float) 0),
+};
+
+static final StrokeRec char62[] = {
+ new StrokeRec(3, char62_stroke0),
+};
+
+/* char: 63 '?' */
+
+static final CoordRec char63_stroke0[] = {
+ new CoordRec((float) 8.42, (float) 76.1905),
+ new CoordRec((float) 8.42, (float) 80.9524),
+ new CoordRec((float) 13.1819, (float) 90.4762),
+ new CoordRec((float) 17.9438, (float) 95.2381),
+ new CoordRec((float) 27.4676, (float) 100),
+ new CoordRec((float) 46.5152, (float) 100),
+ new CoordRec((float) 56.039, (float) 95.2381),
+ new CoordRec((float) 60.801, (float) 90.4762),
+ new CoordRec((float) 65.5629, (float) 80.9524),
+ new CoordRec((float) 65.5629, (float) 71.4286),
+ new CoordRec((float) 60.801, (float) 61.9048),
+ new CoordRec((float) 56.039, (float) 57.1429),
+ new CoordRec((float) 36.9914, (float) 47.619),
+ new CoordRec((float) 36.9914, (float) 33.3333),
+};
+
+static final CoordRec char63_stroke1[] = {
+ new CoordRec((float) 36.9914, (float) 9.5238),
+ new CoordRec((float) 32.2295, (float) 4.7619),
+ new CoordRec((float) 36.9914, (float) 0),
+ new CoordRec((float) 41.7533, (float) 4.7619),
+ new CoordRec((float) 36.9914, (float) 9.5238),
+};
+
+static final StrokeRec char63[] = {
+ new StrokeRec(14, char63_stroke0),
+ new StrokeRec(5, char63_stroke1),
+};
+
+/* char: 64 '@' */
+
+static final CoordRec char64_stroke0[] = {
+ new CoordRec((float) 49.2171, (float) 52.381),
+ new CoordRec((float) 39.6933, (float) 57.1429),
+ new CoordRec((float) 30.1695, (float) 57.1429),
+ new CoordRec((float) 25.4076, (float) 47.619),
+ new CoordRec((float) 25.4076, (float) 42.8571),
+ new CoordRec((float) 30.1695, (float) 33.3333),
+ new CoordRec((float) 39.6933, (float) 33.3333),
+ new CoordRec((float) 49.2171, (float) 38.0952),
+};
+
+static final CoordRec char64_stroke1[] = {
+ new CoordRec((float) 49.2171, (float) 57.1429),
+ new CoordRec((float) 49.2171, (float) 38.0952),
+ new CoordRec((float) 53.979, (float) 33.3333),
+ new CoordRec((float) 63.5029, (float) 33.3333),
+ new CoordRec((float) 68.2648, (float) 42.8571),
+ new CoordRec((float) 68.2648, (float) 47.619),
+ new CoordRec((float) 63.5029, (float) 61.9048),
+ new CoordRec((float) 53.979, (float) 71.4286),
+ new CoordRec((float) 39.6933, (float) 76.1905),
+ new CoordRec((float) 34.9314, (float) 76.1905),
+ new CoordRec((float) 20.6457, (float) 71.4286),
+ new CoordRec((float) 11.1219, (float) 61.9048),
+ new CoordRec((float) 6.36, (float) 47.619),
+ new CoordRec((float) 6.36, (float) 42.8571),
+ new CoordRec((float) 11.1219, (float) 28.5714),
+ new CoordRec((float) 20.6457, (float) 19.0476),
+ new CoordRec((float) 34.9314, (float) 14.2857),
+ new CoordRec((float) 39.6933, (float) 14.2857),
+ new CoordRec((float) 53.979, (float) 19.0476),
+};
+
+static final StrokeRec char64[] = {
+ new StrokeRec(8, char64_stroke0),
+ new StrokeRec(19, char64_stroke1),
+};
+
+/* char: 65 'A' */
+
+static final CoordRec char65_stroke0[] = {
+ new CoordRec((float) 40.5952, (float) 100),
+ new CoordRec((float) 2.5, (float) 0),
+};
+
+static final CoordRec char65_stroke1[] = {
+ new CoordRec((float) 40.5952, (float) 100),
+ new CoordRec((float) 78.6905, (float) 0),
+};
+
+static final CoordRec char65_stroke2[] = {
+ new CoordRec((float) 16.7857, (float) 33.3333),
+ new CoordRec((float) 64.4048, (float) 33.3333),
+};
+
+static final StrokeRec char65[] = {
+ new StrokeRec(2, char65_stroke0),
+ new StrokeRec(2, char65_stroke1),
+ new StrokeRec(2, char65_stroke2),
+};
+
+/* char: 66 'B' */
+
+static final CoordRec char66_stroke0[] = {
+ new CoordRec((float) 11.42, (float) 100),
+ new CoordRec((float) 11.42, (float) 0),
+};
+
+static final CoordRec char66_stroke1[] = {
+ new CoordRec((float) 11.42, (float) 100),
+ new CoordRec((float) 54.2771, (float) 100),
+ new CoordRec((float) 68.5629, (float) 95.2381),
+ new CoordRec((float) 73.3248, (float) 90.4762),
+ new CoordRec((float) 78.0867, (float) 80.9524),
+ new CoordRec((float) 78.0867, (float) 71.4286),
+ new CoordRec((float) 73.3248, (float) 61.9048),
+ new CoordRec((float) 68.5629, (float) 57.1429),
+ new CoordRec((float) 54.2771, (float) 52.381),
+};
+
+static final CoordRec char66_stroke2[] = {
+ new CoordRec((float) 11.42, (float) 52.381),
+ new CoordRec((float) 54.2771, (float) 52.381),
+ new CoordRec((float) 68.5629, (float) 47.619),
+ new CoordRec((float) 73.3248, (float) 42.8571),
+ new CoordRec((float) 78.0867, (float) 33.3333),
+ new CoordRec((float) 78.0867, (float) 19.0476),
+ new CoordRec((float) 73.3248, (float) 9.5238),
+ new CoordRec((float) 68.5629, (float) 4.7619),
+ new CoordRec((float) 54.2771, (float) 0),
+ new CoordRec((float) 11.42, (float) 0),
+};
+
+static final StrokeRec char66[] = {
+ new StrokeRec(2, char66_stroke0),
+ new StrokeRec(9, char66_stroke1),
+ new StrokeRec(10, char66_stroke2),
+};
+
+/* char: 67 'C' */
+
+static final CoordRec char67_stroke0[] = {
+ new CoordRec((float) 78.0886, (float) 76.1905),
+ new CoordRec((float) 73.3267, (float) 85.7143),
+ new CoordRec((float) 63.8029, (float) 95.2381),
+ new CoordRec((float) 54.279, (float) 100),
+ new CoordRec((float) 35.2314, (float) 100),
+ new CoordRec((float) 25.7076, (float) 95.2381),
+ new CoordRec((float) 16.1838, (float) 85.7143),
+ new CoordRec((float) 11.4219, (float) 76.1905),
+ new CoordRec((float) 6.66, (float) 61.9048),
+ new CoordRec((float) 6.66, (float) 38.0952),
+ new CoordRec((float) 11.4219, (float) 23.8095),
+ new CoordRec((float) 16.1838, (float) 14.2857),
+ new CoordRec((float) 25.7076, (float) 4.7619),
+ new CoordRec((float) 35.2314, (float) 0),
+ new CoordRec((float) 54.279, (float) 0),
+ new CoordRec((float) 63.8029, (float) 4.7619),
+ new CoordRec((float) 73.3267, (float) 14.2857),
+ new CoordRec((float) 78.0886, (float) 23.8095),
+};
+
+static final StrokeRec char67[] = {
+ new StrokeRec(18, char67_stroke0),
+};
+
+/* char: 68 'D' */
+
+static final CoordRec char68_stroke0[] = {
+ new CoordRec((float) 11.96, (float) 100),
+ new CoordRec((float) 11.96, (float) 0),
+};
+
+static final CoordRec char68_stroke1[] = {
+ new CoordRec((float) 11.96, (float) 100),
+ new CoordRec((float) 45.2933, (float) 100),
+ new CoordRec((float) 59.579, (float) 95.2381),
+ new CoordRec((float) 69.1029, (float) 85.7143),
+ new CoordRec((float) 73.8648, (float) 76.1905),
+ new CoordRec((float) 78.6267, (float) 61.9048),
+ new CoordRec((float) 78.6267, (float) 38.0952),
+ new CoordRec((float) 73.8648, (float) 23.8095),
+ new CoordRec((float) 69.1029, (float) 14.2857),
+ new CoordRec((float) 59.579, (float) 4.7619),
+ new CoordRec((float) 45.2933, (float) 0),
+ new CoordRec((float) 11.96, (float) 0),
+};
+
+static final StrokeRec char68[] = {
+ new StrokeRec(2, char68_stroke0),
+ new StrokeRec(12, char68_stroke1),
+};
+
+/* char: 69 'E' */
+
+static final CoordRec char69_stroke0[] = {
+ new CoordRec((float) 11.42, (float) 100),
+ new CoordRec((float) 11.42, (float) 0),
+};
+
+static final CoordRec char69_stroke1[] = {
+ new CoordRec((float) 11.42, (float) 100),
+ new CoordRec((float) 73.3248, (float) 100),
+};
+
+static final CoordRec char69_stroke2[] = {
+ new CoordRec((float) 11.42, (float) 52.381),
+ new CoordRec((float) 49.5152, (float) 52.381),
+};
+
+static final CoordRec char69_stroke3[] = {
+ new CoordRec((float) 11.42, (float) 0),
+ new CoordRec((float) 73.3248, (float) 0),
+};
+
+static final StrokeRec char69[] = {
+ new StrokeRec(2, char69_stroke0),
+ new StrokeRec(2, char69_stroke1),
+ new StrokeRec(2, char69_stroke2),
+ new StrokeRec(2, char69_stroke3),
+};
+
+/* char: 70 'F' */
+
+static final CoordRec char70_stroke0[] = {
+ new CoordRec((float) 11.42, (float) 100),
+ new CoordRec((float) 11.42, (float) 0),
+};
+
+static final CoordRec char70_stroke1[] = {
+ new CoordRec((float) 11.42, (float) 100),
+ new CoordRec((float) 73.3248, (float) 100),
+};
+
+static final CoordRec char70_stroke2[] = {
+ new CoordRec((float) 11.42, (float) 52.381),
+ new CoordRec((float) 49.5152, (float) 52.381),
+};
+
+static final StrokeRec char70[] = {
+ new StrokeRec(2, char70_stroke0),
+ new StrokeRec(2, char70_stroke1),
+ new StrokeRec(2, char70_stroke2),
+};
+
+/* char: 71 'G' */
+
+static final CoordRec char71_stroke0[] = {
+ new CoordRec((float) 78.4886, (float) 76.1905),
+ new CoordRec((float) 73.7267, (float) 85.7143),
+ new CoordRec((float) 64.2029, (float) 95.2381),
+ new CoordRec((float) 54.679, (float) 100),
+ new CoordRec((float) 35.6314, (float) 100),
+ new CoordRec((float) 26.1076, (float) 95.2381),
+ new CoordRec((float) 16.5838, (float) 85.7143),
+ new CoordRec((float) 11.8219, (float) 76.1905),
+ new CoordRec((float) 7.06, (float) 61.9048),
+ new CoordRec((float) 7.06, (float) 38.0952),
+ new CoordRec((float) 11.8219, (float) 23.8095),
+ new CoordRec((float) 16.5838, (float) 14.2857),
+ new CoordRec((float) 26.1076, (float) 4.7619),
+ new CoordRec((float) 35.6314, (float) 0),
+ new CoordRec((float) 54.679, (float) 0),
+ new CoordRec((float) 64.2029, (float) 4.7619),
+ new CoordRec((float) 73.7267, (float) 14.2857),
+ new CoordRec((float) 78.4886, (float) 23.8095),
+ new CoordRec((float) 78.4886, (float) 38.0952),
+};
+
+static final CoordRec char71_stroke1[] = {
+ new CoordRec((float) 54.679, (float) 38.0952),
+ new CoordRec((float) 78.4886, (float) 38.0952),
+};
+
+static final StrokeRec char71[] = {
+ new StrokeRec(19, char71_stroke0),
+ new StrokeRec(2, char71_stroke1),
+};
+
+/* char: 72 'H' */
+
+static final CoordRec char72_stroke0[] = {
+ new CoordRec((float) 11.42, (float) 100),
+ new CoordRec((float) 11.42, (float) 0),
+};
+
+static final CoordRec char72_stroke1[] = {
+ new CoordRec((float) 78.0867, (float) 100),
+ new CoordRec((float) 78.0867, (float) 0),
+};
+
+static final CoordRec char72_stroke2[] = {
+ new CoordRec((float) 11.42, (float) 52.381),
+ new CoordRec((float) 78.0867, (float) 52.381),
+};
+
+static final StrokeRec char72[] = {
+ new StrokeRec(2, char72_stroke0),
+ new StrokeRec(2, char72_stroke1),
+ new StrokeRec(2, char72_stroke2),
+};
+
+/* char: 73 'I' */
+
+static final CoordRec char73_stroke0[] = {
+ new CoordRec((float) 10.86, (float) 100),
+ new CoordRec((float) 10.86, (float) 0),
+};
+
+static final StrokeRec char73[] = {
+ new StrokeRec(2, char73_stroke0),
+};
+
+/* char: 74 'J' */
+
+static final CoordRec char74_stroke0[] = {
+ new CoordRec((float) 50.119, (float) 100),
+ new CoordRec((float) 50.119, (float) 23.8095),
+ new CoordRec((float) 45.3571, (float) 9.5238),
+ new CoordRec((float) 40.5952, (float) 4.7619),
+ new CoordRec((float) 31.0714, (float) 0),
+ new CoordRec((float) 21.5476, (float) 0),
+ new CoordRec((float) 12.0238, (float) 4.7619),
+ new CoordRec((float) 7.2619, (float) 9.5238),
+ new CoordRec((float) 2.5, (float) 23.8095),
+ new CoordRec((float) 2.5, (float) 33.3333),
+};
+
+static final StrokeRec char74[] = {
+ new StrokeRec(10, char74_stroke0),
+};
+
+/* char: 75 'K' */
+
+static final CoordRec char75_stroke0[] = {
+ new CoordRec((float) 11.28, (float) 100),
+ new CoordRec((float) 11.28, (float) 0),
+};
+
+static final CoordRec char75_stroke1[] = {
+ new CoordRec((float) 77.9467, (float) 100),
+ new CoordRec((float) 11.28, (float) 33.3333),
+};
+
+static final CoordRec char75_stroke2[] = {
+ new CoordRec((float) 35.0895, (float) 57.1429),
+ new CoordRec((float) 77.9467, (float) 0),
+};
+
+static final StrokeRec char75[] = {
+ new StrokeRec(2, char75_stroke0),
+ new StrokeRec(2, char75_stroke1),
+ new StrokeRec(2, char75_stroke2),
+};
+
+/* char: 76 'L' */
+
+static final CoordRec char76_stroke0[] = {
+ new CoordRec((float) 11.68, (float) 100),
+ new CoordRec((float) 11.68, (float) 0),
+};
+
+static final CoordRec char76_stroke1[] = {
+ new CoordRec((float) 11.68, (float) 0),
+ new CoordRec((float) 68.8229, (float) 0),
+};
+
+static final StrokeRec char76[] = {
+ new StrokeRec(2, char76_stroke0),
+ new StrokeRec(2, char76_stroke1),
+};
+
+/* char: 77 'M' */
+
+static final CoordRec char77_stroke0[] = {
+ new CoordRec((float) 10.86, (float) 100),
+ new CoordRec((float) 10.86, (float) 0),
+};
+
+static final CoordRec char77_stroke1[] = {
+ new CoordRec((float) 10.86, (float) 100),
+ new CoordRec((float) 48.9552, (float) 0),
+};
+
+static final CoordRec char77_stroke2[] = {
+ new CoordRec((float) 87.0505, (float) 100),
+ new CoordRec((float) 48.9552, (float) 0),
+};
+
+static final CoordRec char77_stroke3[] = {
+ new CoordRec((float) 87.0505, (float) 100),
+ new CoordRec((float) 87.0505, (float) 0),
+};
+
+static final StrokeRec char77[] = {
+ new StrokeRec(2, char77_stroke0),
+ new StrokeRec(2, char77_stroke1),
+ new StrokeRec(2, char77_stroke2),
+ new StrokeRec(2, char77_stroke3),
+};
+
+/* char: 78 'N' */
+
+static final CoordRec char78_stroke0[] = {
+ new CoordRec((float) 11.14, (float) 100),
+ new CoordRec((float) 11.14, (float) 0),
+};
+
+static final CoordRec char78_stroke1[] = {
+ new CoordRec((float) 11.14, (float) 100),
+ new CoordRec((float) 77.8067, (float) 0),
+};
+
+static final CoordRec char78_stroke2[] = {
+ new CoordRec((float) 77.8067, (float) 100),
+ new CoordRec((float) 77.8067, (float) 0),
+};
+
+static final StrokeRec char78[] = {
+ new StrokeRec(2, char78_stroke0),
+ new StrokeRec(2, char78_stroke1),
+ new StrokeRec(2, char78_stroke2),
+};
+
+/* char: 79 'O' */
+
+static final CoordRec char79_stroke0[] = {
+ new CoordRec((float) 34.8114, (float) 100),
+ new CoordRec((float) 25.2876, (float) 95.2381),
+ new CoordRec((float) 15.7638, (float) 85.7143),
+ new CoordRec((float) 11.0019, (float) 76.1905),
+ new CoordRec((float) 6.24, (float) 61.9048),
+ new CoordRec((float) 6.24, (float) 38.0952),
+ new CoordRec((float) 11.0019, (float) 23.8095),
+ new CoordRec((float) 15.7638, (float) 14.2857),
+ new CoordRec((float) 25.2876, (float) 4.7619),
+ new CoordRec((float) 34.8114, (float) 0),
+ new CoordRec((float) 53.859, (float) 0),
+ new CoordRec((float) 63.3829, (float) 4.7619),
+ new CoordRec((float) 72.9067, (float) 14.2857),
+ new CoordRec((float) 77.6686, (float) 23.8095),
+ new CoordRec((float) 82.4305, (float) 38.0952),
+ new CoordRec((float) 82.4305, (float) 61.9048),
+ new CoordRec((float) 77.6686, (float) 76.1905),
+ new CoordRec((float) 72.9067, (float) 85.7143),
+ new CoordRec((float) 63.3829, (float) 95.2381),
+ new CoordRec((float) 53.859, (float) 100),
+ new CoordRec((float) 34.8114, (float) 100),
+};
+
+static final StrokeRec char79[] = {
+ new StrokeRec(21, char79_stroke0),
+};
+
+/* char: 80 'P' */
+
+static final CoordRec char80_stroke0[] = {
+ new CoordRec((float) 12.1, (float) 100),
+ new CoordRec((float) 12.1, (float) 0),
+};
+
+static final CoordRec char80_stroke1[] = {
+ new CoordRec((float) 12.1, (float) 100),
+ new CoordRec((float) 54.9571, (float) 100),
+ new CoordRec((float) 69.2429, (float) 95.2381),
+ new CoordRec((float) 74.0048, (float) 90.4762),
+ new CoordRec((float) 78.7667, (float) 80.9524),
+ new CoordRec((float) 78.7667, (float) 66.6667),
+ new CoordRec((float) 74.0048, (float) 57.1429),
+ new CoordRec((float) 69.2429, (float) 52.381),
+ new CoordRec((float) 54.9571, (float) 47.619),
+ new CoordRec((float) 12.1, (float) 47.619),
+};
+
+static final StrokeRec char80[] = {
+ new StrokeRec(2, char80_stroke0),
+ new StrokeRec(10, char80_stroke1),
+};
+
+/* char: 81 'Q' */
+
+static final CoordRec char81_stroke0[] = {
+ new CoordRec((float) 33.8714, (float) 100),
+ new CoordRec((float) 24.3476, (float) 95.2381),
+ new CoordRec((float) 14.8238, (float) 85.7143),
+ new CoordRec((float) 10.0619, (float) 76.1905),
+ new CoordRec((float) 5.3, (float) 61.9048),
+ new CoordRec((float) 5.3, (float) 38.0952),
+ new CoordRec((float) 10.0619, (float) 23.8095),
+ new CoordRec((float) 14.8238, (float) 14.2857),
+ new CoordRec((float) 24.3476, (float) 4.7619),
+ new CoordRec((float) 33.8714, (float) 0),
+ new CoordRec((float) 52.919, (float) 0),
+ new CoordRec((float) 62.4429, (float) 4.7619),
+ new CoordRec((float) 71.9667, (float) 14.2857),
+ new CoordRec((float) 76.7286, (float) 23.8095),
+ new CoordRec((float) 81.4905, (float) 38.0952),
+ new CoordRec((float) 81.4905, (float) 61.9048),
+ new CoordRec((float) 76.7286, (float) 76.1905),
+ new CoordRec((float) 71.9667, (float) 85.7143),
+ new CoordRec((float) 62.4429, (float) 95.2381),
+ new CoordRec((float) 52.919, (float) 100),
+ new CoordRec((float) 33.8714, (float) 100),
+};
+
+static final CoordRec char81_stroke1[] = {
+ new CoordRec((float) 48.1571, (float) 19.0476),
+ new CoordRec((float) 76.7286, (float) -9.5238),
+};
+
+static final StrokeRec char81[] = {
+ new StrokeRec(21, char81_stroke0),
+ new StrokeRec(2, char81_stroke1),
+};
+
+/* char: 82 'R' */
+
+static final CoordRec char82_stroke0[] = {
+ new CoordRec((float) 11.68, (float) 100),
+ new CoordRec((float) 11.68, (float) 0),
+};
+
+static final CoordRec char82_stroke1[] = {
+ new CoordRec((float) 11.68, (float) 100),
+ new CoordRec((float) 54.5371, (float) 100),
+ new CoordRec((float) 68.8229, (float) 95.2381),
+ new CoordRec((float) 73.5848, (float) 90.4762),
+ new CoordRec((float) 78.3467, (float) 80.9524),
+ new CoordRec((float) 78.3467, (float) 71.4286),
+ new CoordRec((float) 73.5848, (float) 61.9048),
+ new CoordRec((float) 68.8229, (float) 57.1429),
+ new CoordRec((float) 54.5371, (float) 52.381),
+ new CoordRec((float) 11.68, (float) 52.381),
+};
+
+static final CoordRec char82_stroke2[] = {
+ new CoordRec((float) 45.0133, (float) 52.381),
+ new CoordRec((float) 78.3467, (float) 0),
+};
+
+static final StrokeRec char82[] = {
+ new StrokeRec(2, char82_stroke0),
+ new StrokeRec(10, char82_stroke1),
+ new StrokeRec(2, char82_stroke2),
+};
+
+/* char: 83 'S' */
+
+static final CoordRec char83_stroke0[] = {
+ new CoordRec((float) 74.6667, (float) 85.7143),
+ new CoordRec((float) 65.1429, (float) 95.2381),
+ new CoordRec((float) 50.8571, (float) 100),
+ new CoordRec((float) 31.8095, (float) 100),
+ new CoordRec((float) 17.5238, (float) 95.2381),
+ new CoordRec((float) 8, (float) 85.7143),
+ new CoordRec((float) 8, (float) 76.1905),
+ new CoordRec((float) 12.7619, (float) 66.6667),
+ new CoordRec((float) 17.5238, (float) 61.9048),
+ new CoordRec((float) 27.0476, (float) 57.1429),
+ new CoordRec((float) 55.619, (float) 47.619),
+ new CoordRec((float) 65.1429, (float) 42.8571),
+ new CoordRec((float) 69.9048, (float) 38.0952),
+ new CoordRec((float) 74.6667, (float) 28.5714),
+ new CoordRec((float) 74.6667, (float) 14.2857),
+ new CoordRec((float) 65.1429, (float) 4.7619),
+ new CoordRec((float) 50.8571, (float) 0),
+ new CoordRec((float) 31.8095, (float) 0),
+ new CoordRec((float) 17.5238, (float) 4.7619),
+ new CoordRec((float) 8, (float) 14.2857),
+};
+
+static final StrokeRec char83[] = {
+ new StrokeRec(20, char83_stroke0),
+};
+
+/* char: 84 'T' */
+
+static final CoordRec char84_stroke0[] = {
+ new CoordRec((float) 35.6933, (float) 100),
+ new CoordRec((float) 35.6933, (float) 0),
+};
+
+static final CoordRec char84_stroke1[] = {
+ new CoordRec((float) 2.36, (float) 100),
+ new CoordRec((float) 69.0267, (float) 100),
+};
+
+static final StrokeRec char84[] = {
+ new StrokeRec(2, char84_stroke0),
+ new StrokeRec(2, char84_stroke1),
+};
+
+/* char: 85 'U' */
+
+static final CoordRec char85_stroke0[] = {
+ new CoordRec((float) 11.54, (float) 100),
+ new CoordRec((float) 11.54, (float) 28.5714),
+ new CoordRec((float) 16.3019, (float) 14.2857),
+ new CoordRec((float) 25.8257, (float) 4.7619),
+ new CoordRec((float) 40.1114, (float) 0),
+ new CoordRec((float) 49.6352, (float) 0),
+ new CoordRec((float) 63.921, (float) 4.7619),
+ new CoordRec((float) 73.4448, (float) 14.2857),
+ new CoordRec((float) 78.2067, (float) 28.5714),
+ new CoordRec((float) 78.2067, (float) 100),
+};
+
+static final StrokeRec char85[] = {
+ new StrokeRec(10, char85_stroke0),
+};
+
+/* char: 86 'V' */
+
+static final CoordRec char86_stroke0[] = {
+ new CoordRec((float) 2.36, (float) 100),
+ new CoordRec((float) 40.4552, (float) 0),
+};
+
+static final CoordRec char86_stroke1[] = {
+ new CoordRec((float) 78.5505, (float) 100),
+ new CoordRec((float) 40.4552, (float) 0),
+};
+
+static final StrokeRec char86[] = {
+ new StrokeRec(2, char86_stroke0),
+ new StrokeRec(2, char86_stroke1),
+};
+
+/* char: 87 'W' */
+
+static final CoordRec char87_stroke0[] = {
+ new CoordRec((float) 2.22, (float) 100),
+ new CoordRec((float) 26.0295, (float) 0),
+};
+
+static final CoordRec char87_stroke1[] = {
+ new CoordRec((float) 49.839, (float) 100),
+ new CoordRec((float) 26.0295, (float) 0),
+};
+
+static final CoordRec char87_stroke2[] = {
+ new CoordRec((float) 49.839, (float) 100),
+ new CoordRec((float) 73.6486, (float) 0),
+};
+
+static final CoordRec char87_stroke3[] = {
+ new CoordRec((float) 97.4581, (float) 100),
+ new CoordRec((float) 73.6486, (float) 0),
+};
+
+static final StrokeRec char87[] = {
+ new StrokeRec(2, char87_stroke0),
+ new StrokeRec(2, char87_stroke1),
+ new StrokeRec(2, char87_stroke2),
+ new StrokeRec(2, char87_stroke3),
+};
+
+/* char: 88 'X' */
+
+static final CoordRec char88_stroke0[] = {
+ new CoordRec((float) 2.5, (float) 100),
+ new CoordRec((float) 69.1667, (float) 0),
+};
+
+static final CoordRec char88_stroke1[] = {
+ new CoordRec((float) 69.1667, (float) 100),
+ new CoordRec((float) 2.5, (float) 0),
+};
+
+static final StrokeRec char88[] = {
+ new StrokeRec(2, char88_stroke0),
+ new StrokeRec(2, char88_stroke1),
+};
+
+/* char: 89 'Y' */
+
+static final CoordRec char89_stroke0[] = {
+ new CoordRec((float) 1.52, (float) 100),
+ new CoordRec((float) 39.6152, (float) 52.381),
+ new CoordRec((float) 39.6152, (float) 0),
+};
+
+static final CoordRec char89_stroke1[] = {
+ new CoordRec((float) 77.7105, (float) 100),
+ new CoordRec((float) 39.6152, (float) 52.381),
+};
+
+static final StrokeRec char89[] = {
+ new StrokeRec(3, char89_stroke0),
+ new StrokeRec(2, char89_stroke1),
+};
+
+/* char: 90 'Z' */
+
+static final CoordRec char90_stroke0[] = {
+ new CoordRec((float) 69.1667, (float) 100),
+ new CoordRec((float) 2.5, (float) 0),
+};
+
+static final CoordRec char90_stroke1[] = {
+ new CoordRec((float) 2.5, (float) 100),
+ new CoordRec((float) 69.1667, (float) 100),
+};
+
+static final CoordRec char90_stroke2[] = {
+ new CoordRec((float) 2.5, (float) 0),
+ new CoordRec((float) 69.1667, (float) 0),
+};
+
+static final StrokeRec char90[] = {
+ new StrokeRec(2, char90_stroke0),
+ new StrokeRec(2, char90_stroke1),
+ new StrokeRec(2, char90_stroke2),
+};
+
+/* char: 91 '[' */
+
+static final CoordRec char91_stroke0[] = {
+ new CoordRec((float) 7.78, (float) 119.048),
+ new CoordRec((float) 7.78, (float) -33.3333),
+};
+
+static final CoordRec char91_stroke1[] = {
+ new CoordRec((float) 12.5419, (float) 119.048),
+ new CoordRec((float) 12.5419, (float) -33.3333),
+};
+
+static final CoordRec char91_stroke2[] = {
+ new CoordRec((float) 7.78, (float) 119.048),
+ new CoordRec((float) 41.1133, (float) 119.048),
+};
+
+static final CoordRec char91_stroke3[] = {
+ new CoordRec((float) 7.78, (float) -33.3333),
+ new CoordRec((float) 41.1133, (float) -33.3333),
+};
+
+static final StrokeRec char91[] = {
+ new StrokeRec(2, char91_stroke0),
+ new StrokeRec(2, char91_stroke1),
+ new StrokeRec(2, char91_stroke2),
+ new StrokeRec(2, char91_stroke3),
+};
+
+/* char: 92 '\' */
+
+static final CoordRec char92_stroke0[] = {
+ new CoordRec((float) 5.84, (float) 100),
+ new CoordRec((float) 72.5067, (float) -14.2857),
+};
+
+static final StrokeRec char92[] = {
+ new StrokeRec(2, char92_stroke0),
+};
+
+/* char: 93 ']' */
+
+static final CoordRec char93_stroke0[] = {
+ new CoordRec((float) 33.0114, (float) 119.048),
+ new CoordRec((float) 33.0114, (float) -33.3333),
+};
+
+static final CoordRec char93_stroke1[] = {
+ new CoordRec((float) 37.7733, (float) 119.048),
+ new CoordRec((float) 37.7733, (float) -33.3333),
+};
+
+static final CoordRec char93_stroke2[] = {
+ new CoordRec((float) 4.44, (float) 119.048),
+ new CoordRec((float) 37.7733, (float) 119.048),
+};
+
+static final CoordRec char93_stroke3[] = {
+ new CoordRec((float) 4.44, (float) -33.3333),
+ new CoordRec((float) 37.7733, (float) -33.3333),
+};
+
+static final StrokeRec char93[] = {
+ new StrokeRec(2, char93_stroke0),
+ new StrokeRec(2, char93_stroke1),
+ new StrokeRec(2, char93_stroke2),
+ new StrokeRec(2, char93_stroke3),
+};
+
+/* char: 94 '^' */
+
+static final CoordRec char94_stroke0[] = {
+ new CoordRec((float) 44.0752, (float) 109.524),
+ new CoordRec((float) 5.98, (float) 42.8571),
+};
+
+static final CoordRec char94_stroke1[] = {
+ new CoordRec((float) 44.0752, (float) 109.524),
+ new CoordRec((float) 82.1705, (float) 42.8571),
+};
+
+static final StrokeRec char94[] = {
+ new StrokeRec(2, char94_stroke0),
+ new StrokeRec(2, char94_stroke1),
+};
+
+/* char: 95 '_' */
+
+static final CoordRec char95_stroke0[] = {
+ new CoordRec((float)-1.1, (float) -33.3333),
+ new CoordRec((float) 103.662, (float) -33.3333),
+ new CoordRec((float) 103.662, (float) -28.5714),
+ new CoordRec((float)-1.1, (float) -28.5714),
+ new CoordRec((float)-1.1, (float) -33.3333),
+};
+
+static final StrokeRec char95[] = {
+ new StrokeRec(5, char95_stroke0),
+};
+
+/* char: 96 '`' */
+
+static final CoordRec char96_stroke0[] = {
+ new CoordRec((float) 33.0219, (float) 100),
+ new CoordRec((float) 56.8314, (float) 71.4286),
+};
+
+static final CoordRec char96_stroke1[] = {
+ new CoordRec((float) 33.0219, (float) 100),
+ new CoordRec((float) 28.26, (float) 95.2381),
+ new CoordRec((float) 56.8314, (float) 71.4286),
+};
+
+static final StrokeRec char96[] = {
+ new StrokeRec(2, char96_stroke0),
+ new StrokeRec(3, char96_stroke1),
+};
+
+/* char: 97 'a' */
+
+static final CoordRec char97_stroke0[] = {
+ new CoordRec((float) 63.8229, (float) 66.6667),
+ new CoordRec((float) 63.8229, (float) 0),
+};
+
+static final CoordRec char97_stroke1[] = {
+ new CoordRec((float) 63.8229, (float) 52.381),
+ new CoordRec((float) 54.299, (float) 61.9048),
+ new CoordRec((float) 44.7752, (float) 66.6667),
+ new CoordRec((float) 30.4895, (float) 66.6667),
+ new CoordRec((float) 20.9657, (float) 61.9048),
+ new CoordRec((float) 11.4419, (float) 52.381),
+ new CoordRec((float) 6.68, (float) 38.0952),
+ new CoordRec((float) 6.68, (float) 28.5714),
+ new CoordRec((float) 11.4419, (float) 14.2857),
+ new CoordRec((float) 20.9657, (float) 4.7619),
+ new CoordRec((float) 30.4895, (float) 0),
+ new CoordRec((float) 44.7752, (float) 0),
+ new CoordRec((float) 54.299, (float) 4.7619),
+ new CoordRec((float) 63.8229, (float) 14.2857),
+};
+
+static final StrokeRec char97[] = {
+ new StrokeRec(2, char97_stroke0),
+ new StrokeRec(14, char97_stroke1),
+};
+
+/* char: 98 'b' */
+
+static final CoordRec char98_stroke0[] = {
+ new CoordRec((float) 8.76, (float) 100),
+ new CoordRec((float) 8.76, (float) 0),
+};
+
+static final CoordRec char98_stroke1[] = {
+ new CoordRec((float) 8.76, (float) 52.381),
+ new CoordRec((float) 18.2838, (float) 61.9048),
+ new CoordRec((float) 27.8076, (float) 66.6667),
+ new CoordRec((float) 42.0933, (float) 66.6667),
+ new CoordRec((float) 51.6171, (float) 61.9048),
+ new CoordRec((float) 61.141, (float) 52.381),
+ new CoordRec((float) 65.9029, (float) 38.0952),
+ new CoordRec((float) 65.9029, (float) 28.5714),
+ new CoordRec((float) 61.141, (float) 14.2857),
+ new CoordRec((float) 51.6171, (float) 4.7619),
+ new CoordRec((float) 42.0933, (float) 0),
+ new CoordRec((float) 27.8076, (float) 0),
+ new CoordRec((float) 18.2838, (float) 4.7619),
+ new CoordRec((float) 8.76, (float) 14.2857),
+};
+
+static final StrokeRec char98[] = {
+ new StrokeRec(2, char98_stroke0),
+ new StrokeRec(14, char98_stroke1),
+};
+
+/* char: 99 'c' */
+
+static final CoordRec char99_stroke0[] = {
+ new CoordRec((float) 62.6629, (float) 52.381),
+ new CoordRec((float) 53.139, (float) 61.9048),
+ new CoordRec((float) 43.6152, (float) 66.6667),
+ new CoordRec((float) 29.3295, (float) 66.6667),
+ new CoordRec((float) 19.8057, (float) 61.9048),
+ new CoordRec((float) 10.2819, (float) 52.381),
+ new CoordRec((float) 5.52, (float) 38.0952),
+ new CoordRec((float) 5.52, (float) 28.5714),
+ new CoordRec((float) 10.2819, (float) 14.2857),
+ new CoordRec((float) 19.8057, (float) 4.7619),
+ new CoordRec((float) 29.3295, (float) 0),
+ new CoordRec((float) 43.6152, (float) 0),
+ new CoordRec((float) 53.139, (float) 4.7619),
+ new CoordRec((float) 62.6629, (float) 14.2857),
+};
+
+static final StrokeRec char99[] = {
+ new StrokeRec(14, char99_stroke0),
+};
+
+/* char: 100 'd' */
+
+static final CoordRec char100_stroke0[] = {
+ new CoordRec((float) 61.7829, (float) 100),
+ new CoordRec((float) 61.7829, (float) 0),
+};
+
+static final CoordRec char100_stroke1[] = {
+ new CoordRec((float) 61.7829, (float) 52.381),
+ new CoordRec((float) 52.259, (float) 61.9048),
+ new CoordRec((float) 42.7352, (float) 66.6667),
+ new CoordRec((float) 28.4495, (float) 66.6667),
+ new CoordRec((float) 18.9257, (float) 61.9048),
+ new CoordRec((float) 9.4019, (float) 52.381),
+ new CoordRec((float) 4.64, (float) 38.0952),
+ new CoordRec((float) 4.64, (float) 28.5714),
+ new CoordRec((float) 9.4019, (float) 14.2857),
+ new CoordRec((float) 18.9257, (float) 4.7619),
+ new CoordRec((float) 28.4495, (float) 0),
+ new CoordRec((float) 42.7352, (float) 0),
+ new CoordRec((float) 52.259, (float) 4.7619),
+ new CoordRec((float) 61.7829, (float) 14.2857),
+};
+
+static final StrokeRec char100[] = {
+ new StrokeRec(2, char100_stroke0),
+ new StrokeRec(14, char100_stroke1),
+};
+
+/* char: 101 'e' */
+
+static final CoordRec char101_stroke0[] = {
+ new CoordRec((float) 5.72, (float) 38.0952),
+ new CoordRec((float) 62.8629, (float) 38.0952),
+ new CoordRec((float) 62.8629, (float) 47.619),
+ new CoordRec((float) 58.101, (float) 57.1429),
+ new CoordRec((float) 53.339, (float) 61.9048),
+ new CoordRec((float) 43.8152, (float) 66.6667),
+ new CoordRec((float) 29.5295, (float) 66.6667),
+ new CoordRec((float) 20.0057, (float) 61.9048),
+ new CoordRec((float) 10.4819, (float) 52.381),
+ new CoordRec((float) 5.72, (float) 38.0952),
+ new CoordRec((float) 5.72, (float) 28.5714),
+ new CoordRec((float) 10.4819, (float) 14.2857),
+ new CoordRec((float) 20.0057, (float) 4.7619),
+ new CoordRec((float) 29.5295, (float) 0),
+ new CoordRec((float) 43.8152, (float) 0),
+ new CoordRec((float) 53.339, (float) 4.7619),
+ new CoordRec((float) 62.8629, (float) 14.2857),
+};
+
+static final StrokeRec char101[] = {
+ new StrokeRec(17, char101_stroke0),
+};
+
+/* char: 102 'f' */
+
+static final CoordRec char102_stroke0[] = {
+ new CoordRec((float) 38.7752, (float) 100),
+ new CoordRec((float) 29.2514, (float) 100),
+ new CoordRec((float) 19.7276, (float) 95.2381),
+ new CoordRec((float) 14.9657, (float) 80.9524),
+ new CoordRec((float) 14.9657, (float) 0),
+};
+
+static final CoordRec char102_stroke1[] = {
+ new CoordRec((float) 0.68, (float) 66.6667),
+ new CoordRec((float) 34.0133, (float) 66.6667),
+};
+
+static final StrokeRec char102[] = {
+ new StrokeRec(5, char102_stroke0),
+ new StrokeRec(2, char102_stroke1),
+};
+
+/* char: 103 'g' */
+
+static final CoordRec char103_stroke0[] = {
+ new CoordRec((float) 62.5029, (float) 66.6667),
+ new CoordRec((float) 62.5029, (float) -9.5238),
+ new CoordRec((float) 57.741, (float) -23.8095),
+ new CoordRec((float) 52.979, (float) -28.5714),
+ new CoordRec((float) 43.4552, (float) -33.3333),
+ new CoordRec((float) 29.1695, (float) -33.3333),
+ new CoordRec((float) 19.6457, (float) -28.5714),
+};
+
+static final CoordRec char103_stroke1[] = {
+ new CoordRec((float) 62.5029, (float) 52.381),
+ new CoordRec((float) 52.979, (float) 61.9048),
+ new CoordRec((float) 43.4552, (float) 66.6667),
+ new CoordRec((float) 29.1695, (float) 66.6667),
+ new CoordRec((float) 19.6457, (float) 61.9048),
+ new CoordRec((float) 10.1219, (float) 52.381),
+ new CoordRec((float) 5.36, (float) 38.0952),
+ new CoordRec((float) 5.36, (float) 28.5714),
+ new CoordRec((float) 10.1219, (float) 14.2857),
+ new CoordRec((float) 19.6457, (float) 4.7619),
+ new CoordRec((float) 29.1695, (float) 0),
+ new CoordRec((float) 43.4552, (float) 0),
+ new CoordRec((float) 52.979, (float) 4.7619),
+ new CoordRec((float) 62.5029, (float) 14.2857),
+};
+
+static final StrokeRec char103[] = {
+ new StrokeRec(7, char103_stroke0),
+ new StrokeRec(14, char103_stroke1),
+};
+
+/* char: 104 'h' */
+
+static final CoordRec char104_stroke0[] = {
+ new CoordRec((float) 9.6, (float) 100),
+ new CoordRec((float) 9.6, (float) 0),
+};
+
+static final CoordRec char104_stroke1[] = {
+ new CoordRec((float) 9.6, (float) 47.619),
+ new CoordRec((float) 23.8857, (float) 61.9048),
+ new CoordRec((float) 33.4095, (float) 66.6667),
+ new CoordRec((float) 47.6952, (float) 66.6667),
+ new CoordRec((float) 57.219, (float) 61.9048),
+ new CoordRec((float) 61.981, (float) 47.619),
+ new CoordRec((float) 61.981, (float) 0),
+};
+
+static final StrokeRec char104[] = {
+ new StrokeRec(2, char104_stroke0),
+ new StrokeRec(7, char104_stroke1),
+};
+
+/* char: 105 'i' */
+
+static final CoordRec char105_stroke0[] = {
+ new CoordRec((float) 10.02, (float) 100),
+ new CoordRec((float) 14.7819, (float) 95.2381),
+ new CoordRec((float) 19.5438, (float) 100),
+ new CoordRec((float) 14.7819, (float) 104.762),
+ new CoordRec((float) 10.02, (float) 100),
+};
+
+static final CoordRec char105_stroke1[] = {
+ new CoordRec((float) 14.7819, (float) 66.6667),
+ new CoordRec((float) 14.7819, (float) 0),
+};
+
+static final StrokeRec char105[] = {
+ new StrokeRec(5, char105_stroke0),
+ new StrokeRec(2, char105_stroke1),
+};
+
+/* char: 106 'j' */
+
+static final CoordRec char106_stroke0[] = {
+ new CoordRec((float) 17.3876, (float) 100),
+ new CoordRec((float) 22.1495, (float) 95.2381),
+ new CoordRec((float) 26.9114, (float) 100),
+ new CoordRec((float) 22.1495, (float) 104.762),
+ new CoordRec((float) 17.3876, (float) 100),
+};
+
+static final CoordRec char106_stroke1[] = {
+ new CoordRec((float) 22.1495, (float) 66.6667),
+ new CoordRec((float) 22.1495, (float) -14.2857),
+ new CoordRec((float) 17.3876, (float) -28.5714),
+ new CoordRec((float) 7.8638, (float) -33.3333),
+ new CoordRec((float)-1.66, (float) -33.3333),
+};
+
+static final StrokeRec char106[] = {
+ new StrokeRec(5, char106_stroke0),
+ new StrokeRec(5, char106_stroke1),
+};
+
+/* char: 107 'k' */
+
+static final CoordRec char107_stroke0[] = {
+ new CoordRec((float) 9.6, (float) 100),
+ new CoordRec((float) 9.6, (float) 0),
+};
+
+static final CoordRec char107_stroke1[] = {
+ new CoordRec((float) 57.219, (float) 66.6667),
+ new CoordRec((float) 9.6, (float) 19.0476),
+};
+
+static final CoordRec char107_stroke2[] = {
+ new CoordRec((float) 28.6476, (float) 38.0952),
+ new CoordRec((float) 61.981, (float) 0),
+};
+
+static final StrokeRec char107[] = {
+ new StrokeRec(2, char107_stroke0),
+ new StrokeRec(2, char107_stroke1),
+ new StrokeRec(2, char107_stroke2),
+};
+
+/* char: 108 'l' */
+
+static final CoordRec char108_stroke0[] = {
+ new CoordRec((float) 10.02, (float) 100),
+ new CoordRec((float) 10.02, (float) 0),
+};
+
+static final StrokeRec char108[] = {
+ new StrokeRec(2, char108_stroke0),
+};
+
+/* char: 109 'm' */
+
+static final CoordRec char109_stroke0[] = {
+ new CoordRec((float) 9.6, (float) 66.6667),
+ new CoordRec((float) 9.6, (float) 0),
+};
+
+static final CoordRec char109_stroke1[] = {
+ new CoordRec((float) 9.6, (float) 47.619),
+ new CoordRec((float) 23.8857, (float) 61.9048),
+ new CoordRec((float) 33.4095, (float) 66.6667),
+ new CoordRec((float) 47.6952, (float) 66.6667),
+ new CoordRec((float) 57.219, (float) 61.9048),
+ new CoordRec((float) 61.981, (float) 47.619),
+ new CoordRec((float) 61.981, (float) 0),
+};
+
+static final CoordRec char109_stroke2[] = {
+ new CoordRec((float) 61.981, (float) 47.619),
+ new CoordRec((float) 76.2667, (float) 61.9048),
+ new CoordRec((float) 85.7905, (float) 66.6667),
+ new CoordRec((float) 100.076, (float) 66.6667),
+ new CoordRec((float) 109.6, (float) 61.9048),
+ new CoordRec((float) 114.362, (float) 47.619),
+ new CoordRec((float) 114.362, (float) 0),
+};
+
+static final StrokeRec char109[] = {
+ new StrokeRec(2, char109_stroke0),
+ new StrokeRec(7, char109_stroke1),
+ new StrokeRec(7, char109_stroke2),
+};
+
+/* char: 110 'n' */
+
+static final CoordRec char110_stroke0[] = {
+ new CoordRec((float) 9.18, (float) 66.6667),
+ new CoordRec((float) 9.18, (float) 0),
+};
+
+static final CoordRec char110_stroke1[] = {
+ new CoordRec((float) 9.18, (float) 47.619),
+ new CoordRec((float) 23.4657, (float) 61.9048),
+ new CoordRec((float) 32.9895, (float) 66.6667),
+ new CoordRec((float) 47.2752, (float) 66.6667),
+ new CoordRec((float) 56.799, (float) 61.9048),
+ new CoordRec((float) 61.561, (float) 47.619),
+ new CoordRec((float) 61.561, (float) 0),
+};
+
+static final StrokeRec char110[] = {
+ new StrokeRec(2, char110_stroke0),
+ new StrokeRec(7, char110_stroke1),
+};
+
+/* char: 111 'o' */
+
+static final CoordRec char111_stroke0[] = {
+ new CoordRec((float) 28.7895, (float) 66.6667),
+ new CoordRec((float) 19.2657, (float) 61.9048),
+ new CoordRec((float) 9.7419, (float) 52.381),
+ new CoordRec((float) 4.98, (float) 38.0952),
+ new CoordRec((float) 4.98, (float) 28.5714),
+ new CoordRec((float) 9.7419, (float) 14.2857),
+ new CoordRec((float) 19.2657, (float) 4.7619),
+ new CoordRec((float) 28.7895, (float) 0),
+ new CoordRec((float) 43.0752, (float) 0),
+ new CoordRec((float) 52.599, (float) 4.7619),
+ new CoordRec((float) 62.1229, (float) 14.2857),
+ new CoordRec((float) 66.8848, (float) 28.5714),
+ new CoordRec((float) 66.8848, (float) 38.0952),
+ new CoordRec((float) 62.1229, (float) 52.381),
+ new CoordRec((float) 52.599, (float) 61.9048),
+ new CoordRec((float) 43.0752, (float) 66.6667),
+ new CoordRec((float) 28.7895, (float) 66.6667),
+};
+
+static final StrokeRec char111[] = {
+ new StrokeRec(17, char111_stroke0),
+};
+
+/* char: 112 'p' */
+
+static final CoordRec char112_stroke0[] = {
+ new CoordRec((float) 9.46, (float) 66.6667),
+ new CoordRec((float) 9.46, (float) -33.3333),
+};
+
+static final CoordRec char112_stroke1[] = {
+ new CoordRec((float) 9.46, (float) 52.381),
+ new CoordRec((float) 18.9838, (float) 61.9048),
+ new CoordRec((float) 28.5076, (float) 66.6667),
+ new CoordRec((float) 42.7933, (float) 66.6667),
+ new CoordRec((float) 52.3171, (float) 61.9048),
+ new CoordRec((float) 61.841, (float) 52.381),
+ new CoordRec((float) 66.6029, (float) 38.0952),
+ new CoordRec((float) 66.6029, (float) 28.5714),
+ new CoordRec((float) 61.841, (float) 14.2857),
+ new CoordRec((float) 52.3171, (float) 4.7619),
+ new CoordRec((float) 42.7933, (float) 0),
+ new CoordRec((float) 28.5076, (float) 0),
+ new CoordRec((float) 18.9838, (float) 4.7619),
+ new CoordRec((float) 9.46, (float) 14.2857),
+};
+
+static final StrokeRec char112[] = {
+ new StrokeRec(2, char112_stroke0),
+ new StrokeRec(14, char112_stroke1),
+};
+
+/* char: 113 'q' */
+
+static final CoordRec char113_stroke0[] = {
+ new CoordRec((float) 61.9829, (float) 66.6667),
+ new CoordRec((float) 61.9829, (float) -33.3333),
+};
+
+static final CoordRec char113_stroke1[] = {
+ new CoordRec((float) 61.9829, (float) 52.381),
+ new CoordRec((float) 52.459, (float) 61.9048),
+ new CoordRec((float) 42.9352, (float) 66.6667),
+ new CoordRec((float) 28.6495, (float) 66.6667),
+ new CoordRec((float) 19.1257, (float) 61.9048),
+ new CoordRec((float) 9.6019, (float) 52.381),
+ new CoordRec((float) 4.84, (float) 38.0952),
+ new CoordRec((float) 4.84, (float) 28.5714),
+ new CoordRec((float) 9.6019, (float) 14.2857),
+ new CoordRec((float) 19.1257, (float) 4.7619),
+ new CoordRec((float) 28.6495, (float) 0),
+ new CoordRec((float) 42.9352, (float) 0),
+ new CoordRec((float) 52.459, (float) 4.7619),
+ new CoordRec((float) 61.9829, (float) 14.2857),
+};
+
+static final StrokeRec char113[] = {
+ new StrokeRec(2, char113_stroke0),
+ new StrokeRec(14, char113_stroke1),
+};
+
+/* char: 114 'r' */
+
+static final CoordRec char114_stroke0[] = {
+ new CoordRec((float) 9.46, (float) 66.6667),
+ new CoordRec((float) 9.46, (float) 0),
+};
+
+static final CoordRec char114_stroke1[] = {
+ new CoordRec((float) 9.46, (float) 38.0952),
+ new CoordRec((float) 14.2219, (float) 52.381),
+ new CoordRec((float) 23.7457, (float) 61.9048),
+ new CoordRec((float) 33.2695, (float) 66.6667),
+ new CoordRec((float) 47.5552, (float) 66.6667),
+};
+
+static final StrokeRec char114[] = {
+ new StrokeRec(2, char114_stroke0),
+ new StrokeRec(5, char114_stroke1),
+};
+
+/* char: 115 's' */
+
+static final CoordRec char115_stroke0[] = {
+ new CoordRec((float) 57.081, (float) 52.381),
+ new CoordRec((float) 52.319, (float) 61.9048),
+ new CoordRec((float) 38.0333, (float) 66.6667),
+ new CoordRec((float) 23.7476, (float) 66.6667),
+ new CoordRec((float) 9.4619, (float) 61.9048),
+ new CoordRec((float) 4.7, (float) 52.381),
+ new CoordRec((float) 9.4619, (float) 42.8571),
+ new CoordRec((float) 18.9857, (float) 38.0952),
+ new CoordRec((float) 42.7952, (float) 33.3333),
+ new CoordRec((float) 52.319, (float) 28.5714),
+ new CoordRec((float) 57.081, (float) 19.0476),
+ new CoordRec((float) 57.081, (float) 14.2857),
+ new CoordRec((float) 52.319, (float) 4.7619),
+ new CoordRec((float) 38.0333, (float) 0),
+ new CoordRec((float) 23.7476, (float) 0),
+ new CoordRec((float) 9.4619, (float) 4.7619),
+ new CoordRec((float) 4.7, (float) 14.2857),
+};
+
+static final StrokeRec char115[] = {
+ new StrokeRec(17, char115_stroke0),
+};
+
+/* char: 116 't' */
+
+static final CoordRec char116_stroke0[] = {
+ new CoordRec((float) 14.8257, (float) 100),
+ new CoordRec((float) 14.8257, (float) 19.0476),
+ new CoordRec((float) 19.5876, (float) 4.7619),
+ new CoordRec((float) 29.1114, (float) 0),
+ new CoordRec((float) 38.6352, (float) 0),
+};
+
+static final CoordRec char116_stroke1[] = {
+ new CoordRec((float) 0.54, (float) 66.6667),
+ new CoordRec((float) 33.8733, (float) 66.6667),
+};
+
+static final StrokeRec char116[] = {
+ new StrokeRec(5, char116_stroke0),
+ new StrokeRec(2, char116_stroke1),
+};
+
+/* char: 117 'u' */
+
+static final CoordRec char117_stroke0[] = {
+ new CoordRec((float) 9.46, (float) 66.6667),
+ new CoordRec((float) 9.46, (float) 19.0476),
+ new CoordRec((float) 14.2219, (float) 4.7619),
+ new CoordRec((float) 23.7457, (float) 0),
+ new CoordRec((float) 38.0314, (float) 0),
+ new CoordRec((float) 47.5552, (float) 4.7619),
+ new CoordRec((float) 61.841, (float) 19.0476),
+};
+
+static final CoordRec char117_stroke1[] = {
+ new CoordRec((float) 61.841, (float) 66.6667),
+ new CoordRec((float) 61.841, (float) 0),
+};
+
+static final StrokeRec char117[] = {
+ new StrokeRec(7, char117_stroke0),
+ new StrokeRec(2, char117_stroke1),
+};
+
+/* char: 118 'v' */
+
+static final CoordRec char118_stroke0[] = {
+ new CoordRec((float) 1.8, (float) 66.6667),
+ new CoordRec((float) 30.3714, (float) 0),
+};
+
+static final CoordRec char118_stroke1[] = {
+ new CoordRec((float) 58.9429, (float) 66.6667),
+ new CoordRec((float) 30.3714, (float) 0),
+};
+
+static final StrokeRec char118[] = {
+ new StrokeRec(2, char118_stroke0),
+ new StrokeRec(2, char118_stroke1),
+};
+
+/* char: 119 'w' */
+
+static final CoordRec char119_stroke0[] = {
+ new CoordRec((float) 2.5, (float) 66.6667),
+ new CoordRec((float) 21.5476, (float) 0),
+};
+
+static final CoordRec char119_stroke1[] = {
+ new CoordRec((float) 40.5952, (float) 66.6667),
+ new CoordRec((float) 21.5476, (float) 0),
+};
+
+static final CoordRec char119_stroke2[] = {
+ new CoordRec((float) 40.5952, (float) 66.6667),
+ new CoordRec((float) 59.6429, (float) 0),
+};
+
+static final CoordRec char119_stroke3[] = {
+ new CoordRec((float) 78.6905, (float) 66.6667),
+ new CoordRec((float) 59.6429, (float) 0),
+};
+
+static final StrokeRec char119[] = {
+ new StrokeRec(2, char119_stroke0),
+ new StrokeRec(2, char119_stroke1),
+ new StrokeRec(2, char119_stroke2),
+ new StrokeRec(2, char119_stroke3),
+};
+
+/* char: 120 'x' */
+
+static final CoordRec char120_stroke0[] = {
+ new CoordRec((float) 1.66, (float) 66.6667),
+ new CoordRec((float) 54.041, (float) 0),
+};
+
+static final CoordRec char120_stroke1[] = {
+ new CoordRec((float) 54.041, (float) 66.6667),
+ new CoordRec((float) 1.66, (float) 0),
+};
+
+static final StrokeRec char120[] = {
+ new StrokeRec(2, char120_stroke0),
+ new StrokeRec(2, char120_stroke1),
+};
+
+/* char: 121 'y' */
+
+static final CoordRec char121_stroke0[] = {
+ new CoordRec((float) 6.5619, (float) 66.6667),
+ new CoordRec((float) 35.1333, (float) 0),
+};
+
+static final CoordRec char121_stroke1[] = {
+ new CoordRec((float) 63.7048, (float) 66.6667),
+ new CoordRec((float) 35.1333, (float) 0),
+ new CoordRec((float) 25.6095, (float) -19.0476),
+ new CoordRec((float) 16.0857, (float) -28.5714),
+ new CoordRec((float) 6.5619, (float) -33.3333),
+ new CoordRec((float) 1.8, (float) -33.3333),
+};
+
+static final StrokeRec char121[] = {
+ new StrokeRec(2, char121_stroke0),
+ new StrokeRec(6, char121_stroke1),
+};
+
+/* char: 122 'z' */
+
+static final CoordRec char122_stroke0[] = {
+ new CoordRec((float) 56.821, (float) 66.6667),
+ new CoordRec((float) 4.44, (float) 0),
+};
+
+static final CoordRec char122_stroke1[] = {
+ new CoordRec((float) 4.44, (float) 66.6667),
+ new CoordRec((float) 56.821, (float) 66.6667),
+};
+
+static final CoordRec char122_stroke2[] = {
+ new CoordRec((float) 4.44, (float) 0),
+ new CoordRec((float) 56.821, (float) 0),
+};
+
+static final StrokeRec char122[] = {
+ new StrokeRec(2, char122_stroke0),
+ new StrokeRec(2, char122_stroke1),
+ new StrokeRec(2, char122_stroke2),
+};
+
+/* char: 123 '{' */
+
+static final CoordRec char123_stroke0[] = {
+ new CoordRec((float) 31.1895, (float) 119.048),
+ new CoordRec((float) 21.6657, (float) 114.286),
+ new CoordRec((float) 16.9038, (float) 109.524),
+ new CoordRec((float) 12.1419, (float) 100),
+ new CoordRec((float) 12.1419, (float) 90.4762),
+ new CoordRec((float) 16.9038, (float) 80.9524),
+ new CoordRec((float) 21.6657, (float) 76.1905),
+ new CoordRec((float) 26.4276, (float) 66.6667),
+ new CoordRec((float) 26.4276, (float) 57.1429),
+ new CoordRec((float) 16.9038, (float) 47.619),
+};
+
+static final CoordRec char123_stroke1[] = {
+ new CoordRec((float) 21.6657, (float) 114.286),
+ new CoordRec((float) 16.9038, (float) 104.762),
+ new CoordRec((float) 16.9038, (float) 95.2381),
+ new CoordRec((float) 21.6657, (float) 85.7143),
+ new CoordRec((float) 26.4276, (float) 80.9524),
+ new CoordRec((float) 31.1895, (float) 71.4286),
+ new CoordRec((float) 31.1895, (float) 61.9048),
+ new CoordRec((float) 26.4276, (float) 52.381),
+ new CoordRec((float) 7.38, (float) 42.8571),
+ new CoordRec((float) 26.4276, (float) 33.3333),
+ new CoordRec((float) 31.1895, (float) 23.8095),
+ new CoordRec((float) 31.1895, (float) 14.2857),
+ new CoordRec((float) 26.4276, (float) 4.7619),
+ new CoordRec((float) 21.6657, (float) 0),
+ new CoordRec((float) 16.9038, (float) -9.5238),
+ new CoordRec((float) 16.9038, (float) -19.0476),
+ new CoordRec((float) 21.6657, (float) -28.5714),
+};
+
+static final CoordRec char123_stroke2[] = {
+ new CoordRec((float) 16.9038, (float) 38.0952),
+ new CoordRec((float) 26.4276, (float) 28.5714),
+ new CoordRec((float) 26.4276, (float) 19.0476),
+ new CoordRec((float) 21.6657, (float) 9.5238),
+ new CoordRec((float) 16.9038, (float) 4.7619),
+ new CoordRec((float) 12.1419, (float) -4.7619),
+ new CoordRec((float) 12.1419, (float) -14.2857),
+ new CoordRec((float) 16.9038, (float) -23.8095),
+ new CoordRec((float) 21.6657, (float) -28.5714),
+ new CoordRec((float) 31.1895, (float) -33.3333),
+};
+
+static final StrokeRec char123[] = {
+ new StrokeRec(10, char123_stroke0),
+ new StrokeRec(17, char123_stroke1),
+ new StrokeRec(10, char123_stroke2),
+};
+
+/* char: 124 '|' */
+
+static final CoordRec char124_stroke0[] = {
+ new CoordRec((float) 11.54, (float) 119.048),
+ new CoordRec((float) 11.54, (float) -33.3333),
+};
+
+static final StrokeRec char124[] = {
+ new StrokeRec(2, char124_stroke0),
+};
+
+/* char: 125 '}' */
+
+static final CoordRec char125_stroke0[] = {
+ new CoordRec((float) 9.18, (float) 119.048),
+ new CoordRec((float) 18.7038, (float) 114.286),
+ new CoordRec((float) 23.4657, (float) 109.524),
+ new CoordRec((float) 28.2276, (float) 100),
+ new CoordRec((float) 28.2276, (float) 90.4762),
+ new CoordRec((float) 23.4657, (float) 80.9524),
+ new CoordRec((float) 18.7038, (float) 76.1905),
+ new CoordRec((float) 13.9419, (float) 66.6667),
+ new CoordRec((float) 13.9419, (float) 57.1429),
+ new CoordRec((float) 23.4657, (float) 47.619),
+};
+
+static final CoordRec char125_stroke1[] = {
+ new CoordRec((float) 18.7038, (float) 114.286),
+ new CoordRec((float) 23.4657, (float) 104.762),
+ new CoordRec((float) 23.4657, (float) 95.2381),
+ new CoordRec((float) 18.7038, (float) 85.7143),
+ new CoordRec((float) 13.9419, (float) 80.9524),
+ new CoordRec((float) 9.18, (float) 71.4286),
+ new CoordRec((float) 9.18, (float) 61.9048),
+ new CoordRec((float) 13.9419, (float) 52.381),
+ new CoordRec((float) 32.9895, (float) 42.8571),
+ new CoordRec((float) 13.9419, (float) 33.3333),
+ new CoordRec((float) 9.18, (float) 23.8095),
+ new CoordRec((float) 9.18, (float) 14.2857),
+ new CoordRec((float) 13.9419, (float) 4.7619),
+ new CoordRec((float) 18.7038, (float) 0),
+ new CoordRec((float) 23.4657, (float) -9.5238),
+ new CoordRec((float) 23.4657, (float) -19.0476),
+ new CoordRec((float) 18.7038, (float) -28.5714),
+};
+
+static final CoordRec char125_stroke2[] = {
+ new CoordRec((float) 23.4657, (float) 38.0952),
+ new CoordRec((float) 13.9419, (float) 28.5714),
+ new CoordRec((float) 13.9419, (float) 19.0476),
+ new CoordRec((float) 18.7038, (float) 9.5238),
+ new CoordRec((float) 23.4657, (float) 4.7619),
+ new CoordRec((float) 28.2276, (float) -4.7619),
+ new CoordRec((float) 28.2276, (float) -14.2857),
+ new CoordRec((float) 23.4657, (float) -23.8095),
+ new CoordRec((float) 18.7038, (float) -28.5714),
+ new CoordRec((float) 9.18, (float) -33.3333),
+};
+
+static final StrokeRec char125[] = {
+ new StrokeRec(10, char125_stroke0),
+ new StrokeRec(17, char125_stroke1),
+ new StrokeRec(10, char125_stroke2),
+};
+
+/* char: 126 '~' */
+
+static final CoordRec char126_stroke0[] = {
+ new CoordRec((float) 2.92, (float) 28.5714),
+ new CoordRec((float) 2.92, (float) 38.0952),
+ new CoordRec((float) 7.6819, (float) 52.381),
+ new CoordRec((float) 17.2057, (float) 57.1429),
+ new CoordRec((float) 26.7295, (float) 57.1429),
+ new CoordRec((float) 36.2533, (float) 52.381),
+ new CoordRec((float) 55.301, (float) 38.0952),
+ new CoordRec((float) 64.8248, (float) 33.3333),
+ new CoordRec((float) 74.3486, (float) 33.3333),
+ new CoordRec((float) 83.8724, (float) 38.0952),
+ new CoordRec((float) 88.6343, (float) 47.619),
+};
+
+static final CoordRec char126_stroke1[] = {
+ new CoordRec((float) 2.92, (float) 38.0952),
+ new CoordRec((float) 7.6819, (float) 47.619),
+ new CoordRec((float) 17.2057, (float) 52.381),
+ new CoordRec((float) 26.7295, (float) 52.381),
+ new CoordRec((float) 36.2533, (float) 47.619),
+ new CoordRec((float) 55.301, (float) 33.3333),
+ new CoordRec((float) 64.8248, (float) 28.5714),
+ new CoordRec((float) 74.3486, (float) 28.5714),
+ new CoordRec((float) 83.8724, (float) 33.3333),
+ new CoordRec((float) 88.6343, (float) 47.619),
+ new CoordRec((float) 88.6343, (float) 57.1429),
+};
+
+static final StrokeRec char126[] = {
+ new StrokeRec(11, char126_stroke0),
+ new StrokeRec(11, char126_stroke1),
+};
+
+/* char: 127 */
+
+static final CoordRec char127_stroke0[] = {
+ new CoordRec((float) 52.381, (float) 100),
+ new CoordRec((float) 14.2857, (float) -33.3333),
+};
+
+static final CoordRec char127_stroke1[] = {
+ new CoordRec((float) 28.5714, (float) 66.6667),
+ new CoordRec((float) 14.2857, (float) 61.9048),
+ new CoordRec((float) 4.7619, (float) 52.381),
+ new CoordRec((float) 0, (float) 38.0952),
+ new CoordRec((float) 0, (float) 23.8095),
+ new CoordRec((float) 4.7619, (float) 14.2857),
+ new CoordRec((float) 14.2857, (float) 4.7619),
+ new CoordRec((float) 28.5714, (float) 0),
+ new CoordRec((float) 38.0952, (float) 0),
+ new CoordRec((float) 52.381, (float) 4.7619),
+ new CoordRec((float) 61.9048, (float) 14.2857),
+ new CoordRec((float) 66.6667, (float) 28.5714),
+ new CoordRec((float) 66.6667, (float) 42.8571),
+ new CoordRec((float) 61.9048, (float) 52.381),
+ new CoordRec((float) 52.381, (float) 61.9048),
+ new CoordRec((float) 38.0952, (float) 66.6667),
+ new CoordRec((float) 28.5714, (float) 66.6667),
+};
+
+static final StrokeRec char127[] = {
+ new StrokeRec(2, char127_stroke0),
+ new StrokeRec(17, char127_stroke1),
+};
+
+static final StrokeCharRec chars[] = {
+ new StrokeCharRec( 0, /* char0 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char1 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char2 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char3 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char4 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char5 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char6 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char7 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char8 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char9 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char10 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char11 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char12 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char13 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char14 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char15 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char16 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char17 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char18 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char19 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char20 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char21 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char22 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char23 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char24 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char25 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char26 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char27 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char28 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char29 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char30 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char31 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char32 */ null, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec( 2, char33, (float) 13.3819, (float) 26.6238 ),
+ new StrokeCharRec( 2, char34, (float) 23.0676, (float) 51.4352 ),
+ new StrokeCharRec( 4, char35, (float) 36.5333, (float) 79.4886 ),
+ new StrokeCharRec( 3, char36, (float) 38.1533, (float) 76.2067 ),
+ new StrokeCharRec( 3, char37, (float) 49.2171, (float) 96.5743 ),
+ new StrokeCharRec( 1, char38, (float) 53.599, (float) 101.758 ),
+ new StrokeCharRec( 1, char39, (float) 4.44, (float) 13.62 ),
+ new StrokeCharRec( 1, char40, (float) 21.8657, (float) 47.1733 ),
+ new StrokeCharRec( 1, char41, (float) 24.3276, (float) 47.5333 ),
+ new StrokeCharRec( 3, char42, (float) 30.7695, (float) 59.439 ),
+ new StrokeCharRec( 2, char43, (float) 48.8371, (float) 97.2543 ),
+ new StrokeCharRec( 1, char44, (float) 13.5219, (float) 26.0638 ),
+ new StrokeCharRec( 1, char45, (float) 50.2371, (float) 100.754 ),
+ new StrokeCharRec( 1, char46, (float) 13.1019, (float) 26.4838 ),
+ new StrokeCharRec( 1, char47, (float) 40.5733, (float) 82.1067 ),
+ new StrokeCharRec( 1, char48, (float) 38.3133, (float) 77.0667 ),
+ new StrokeCharRec( 1, char49, (float) 30.8676, (float) 66.5295 ),
+ new StrokeCharRec( 1, char50, (float) 38.7533, (float) 77.6467 ),
+ new StrokeCharRec( 1, char51, (float) 38.3333, (float) 77.0467 ),
+ new StrokeCharRec( 2, char52, (float) 37.2133, (float) 80.1686 ),
+ new StrokeCharRec( 1, char53, (float) 38.1933, (float) 77.6867 ),
+ new StrokeCharRec( 1, char54, (float) 34.1514, (float) 73.8048 ),
+ new StrokeCharRec( 2, char55, (float) 38.8933, (float) 77.2267 ),
+ new StrokeCharRec( 1, char56, (float) 38.9333, (float) 77.6667 ),
+ new StrokeCharRec( 1, char57, (float) 39.9333, (float) 74.0648 ),
+ new StrokeCharRec( 2, char58, (float) 14.0819, (float) 26.2238 ),
+ new StrokeCharRec( 2, char59, (float) 12.9619, (float) 26.3038 ),
+ new StrokeCharRec( 1, char60, (float) 41.1552, (float) 81.6105 ),
+ new StrokeCharRec( 2, char61, (float) 48.5571, (float) 97.2543 ),
+ new StrokeCharRec( 1, char62, (float) 40.8752, (float) 81.6105 ),
+ new StrokeCharRec( 2, char63, (float) 36.9914, (float) 73.9029 ),
+ new StrokeCharRec( 2, char64, (float) 34.9314, (float) 74.3648 ),
+ new StrokeCharRec( 3, char65, (float) 40.5952, (float) 80.4905 ),
+ new StrokeCharRec( 3, char66, (float) 44.7533, (float) 83.6267 ),
+ new StrokeCharRec( 1, char67, (float) 39.9933, (float) 84.4886 ),
+ new StrokeCharRec( 2, char68, (float) 45.2933, (float) 85.2867 ),
+ new StrokeCharRec( 4, char69, (float) 39.9914, (float) 78.1848 ),
+ new StrokeCharRec( 3, char70, (float) 39.9914, (float) 78.7448 ),
+ new StrokeCharRec( 2, char71, (float) 40.3933, (float) 89.7686 ),
+ new StrokeCharRec( 3, char72, (float) 44.7533, (float) 89.0867 ),
+ new StrokeCharRec( 1, char73, (float) 10.86, (float) 21.3 ),
+ new StrokeCharRec( 1, char74, (float) 31.0714, (float) 59.999 ),
+ new StrokeCharRec( 3, char75, (float) 44.6133, (float) 79.3267 ),
+ new StrokeCharRec( 2, char76, (float) 40.2514, (float) 71.3229 ),
+ new StrokeCharRec( 4, char77, (float) 48.9552, (float) 97.2105 ),
+ new StrokeCharRec( 3, char78, (float) 44.4733, (float) 88.8067 ),
+ new StrokeCharRec( 1, char79, (float) 44.3352, (float) 88.8305 ),
+ new StrokeCharRec( 2, char80, (float) 45.4333, (float) 85.6667 ),
+ new StrokeCharRec( 2, char81, (float) 43.3952, (float) 88.0905 ),
+ new StrokeCharRec( 3, char82, (float) 45.0133, (float) 82.3667 ),
+ new StrokeCharRec( 1, char83, (float) 41.3333, (float) 80.8267 ),
+ new StrokeCharRec( 2, char84, (float) 35.6933, (float) 71.9467 ),
+ new StrokeCharRec( 1, char85, (float) 44.8733, (float) 89.4867 ),
+ new StrokeCharRec( 2, char86, (float) 40.4552, (float) 81.6105 ),
+ new StrokeCharRec( 4, char87, (float) 49.839, (float) 100.518 ),
+ new StrokeCharRec( 2, char88, (float) 35.8333, (float) 72.3667 ),
+ new StrokeCharRec( 2, char89, (float) 39.6152, (float) 79.6505 ),
+ new StrokeCharRec( 3, char90, (float) 35.8333, (float) 73.7467 ),
+ new StrokeCharRec( 4, char91, (float) 22.0657, (float) 46.1133 ),
+ new StrokeCharRec( 1, char92, (float) 39.1733, (float) 78.2067 ),
+ new StrokeCharRec( 4, char93, (float) 23.4876, (float) 46.3933 ),
+ new StrokeCharRec( 2, char94, (float) 44.0752, (float) 90.2305 ),
+ new StrokeCharRec( 1, char95, (float) 51.281, (float) 104.062 ),
+ new StrokeCharRec( 2, char96, (float) 42.5457, (float) 83.5714 ),
+ new StrokeCharRec( 2, char97, (float) 35.2514, (float) 66.6029 ),
+ new StrokeCharRec( 2, char98, (float) 37.3314, (float) 70.4629 ),
+ new StrokeCharRec( 1, char99, (float) 34.0914, (float) 68.9229 ),
+ new StrokeCharRec( 2, char100, (float) 33.2114, (float) 70.2629 ),
+ new StrokeCharRec( 1, char101, (float) 34.2914, (float) 68.5229 ),
+ new StrokeCharRec( 2, char102, (float) 14.9657, (float) 38.6552 ),
+ new StrokeCharRec( 2, char103, (float) 33.9314, (float) 70.9829 ),
+ new StrokeCharRec( 2, char104, (float) 33.4095, (float) 71.021 ),
+ new StrokeCharRec( 2, char105, (float) 14.7819, (float) 28.8638 ),
+ new StrokeCharRec( 2, char106, (float) 17.3876, (float) 36.2314 ),
+ new StrokeCharRec( 3, char107, (float) 33.4095, (float) 62.521 ),
+ new StrokeCharRec( 1, char108, (float) 10.02, (float) 19.34 ),
+ new StrokeCharRec( 3, char109, (float) 61.981, (float) 123.962 ),
+ new StrokeCharRec( 2, char110, (float) 32.9895, (float) 70.881 ),
+ new StrokeCharRec( 1, char111, (float) 33.5514, (float) 71.7448 ),
+ new StrokeCharRec( 2, char112, (float) 38.0314, (float) 70.8029 ),
+ new StrokeCharRec( 2, char113, (float) 33.4114, (float) 70.7429 ),
+ new StrokeCharRec( 2, char114, (float) 23.7457, (float) 49.4952 ),
+ new StrokeCharRec( 1, char115, (float) 28.5095, (float) 62.321 ),
+ new StrokeCharRec( 2, char116, (float) 14.8257, (float) 39.3152 ),
+ new StrokeCharRec( 2, char117, (float) 33.2695, (float) 71.161 ),
+ new StrokeCharRec( 2, char118, (float) 30.3714, (float) 60.6029 ),
+ new StrokeCharRec( 4, char119, (float) 40.5952, (float) 80.4905 ),
+ new StrokeCharRec( 2, char120, (float) 25.4695, (float) 56.401 ),
+ new StrokeCharRec( 2, char121, (float) 35.1333, (float) 66.0648 ),
+ new StrokeCharRec( 3, char122, (float) 28.2495, (float) 61.821 ),
+ new StrokeCharRec( 3, char123, (float) 21.6657, (float) 41.6295 ),
+ new StrokeCharRec( 1, char124, (float) 11.54, (float) 23.78 ),
+ new StrokeCharRec( 3, char125, (float) 18.7038, (float) 41.4695 ),
+ new StrokeCharRec( 2, char126, (float) 45.7771, (float) 91.2743 ),
+ new StrokeCharRec( 2, char127, (float) 33.3333, (float) 66.6667 ),
+};
+
+public static final StrokeFontRec glutStrokeRoman = new StrokeFontRec( "Roman", 128, chars, (float) 119.048, (float) -33.3333 );
+}
diff --git a/src/classes/com/sun/opengl/util/glut/gl2/GLUTgl2.java b/src/classes/com/sun/opengl/util/glut/gl2/GLUTgl2.java
new file mode 100644
index 000000000..7b23c27db
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/glut/gl2/GLUTgl2.java
@@ -0,0 +1,1345 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.glut.gl2;
+
+import javax.media.opengl.*;
+import javax.media.opengl.glu.*;
+import javax.media.opengl.glu.gl2.*;
+import com.sun.opengl.util.glut.*;
+import com.sun.opengl.util.glut.rec.*;
+import com.sun.opengl.util.glut.fonts.*;
+
+/** Subset of the routines provided by the GLUT interface. Note the
+ signatures of many of the methods are necessarily different than
+ the corresponding C version. A GLUT object must only be used from
+ one particular thread at a time. <P>
+
+ Copyright (c) Mark J. Kilgard, 1994, 1997. <P>
+
+ (c) Copyright 1993, Silicon Graphics, Inc. <P>
+
+ ALL RIGHTS RESERVED <P>
+
+ Permission to use, copy, modify, and distribute this software
+ for any purpose and without fee is hereby granted, provided
+ that the above copyright notice appear in all copies and that
+ both the copyright notice and this permission notice appear in
+ supporting documentation, and that the name of Silicon
+ Graphics, Inc. not be used in advertising or publicity
+ pertaining to distribution of the software without specific,
+ written prior permission. <P>
+
+ THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU
+ "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR
+ OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO
+ EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE
+ ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR
+ CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER,
+ INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE,
+ SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR
+ NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY
+ OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR
+ PERFORMANCE OF THIS SOFTWARE. <P>
+
+ US Government Users Restricted Rights <P>
+
+ Use, duplication, or disclosure by the Government is subject to
+ restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
+ (c)(1)(ii) of the Rights in Technical Data and Computer
+ Software clause at DFARS 252.227-7013 and/or in similar or
+ successor clauses in the FAR or the DOD or NASA FAR
+ Supplement. Unpublished-- rights reserved under the copyright
+ laws of the United States. Contractor/manufacturer is Silicon
+ Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA
+ 94039-7311. <P>
+
+ OpenGL(TM) is a trademark of Silicon Graphics, Inc. <P>
+*/
+
+public class GLUTgl2 {
+ public static final int STROKE_ROMAN = 0;
+ public static final int STROKE_MONO_ROMAN = 1;
+ public static final int BITMAP_9_BY_15 = 2;
+ public static final int BITMAP_8_BY_13 = 3;
+ public static final int BITMAP_TIMES_ROMAN_10 = 4;
+ public static final int BITMAP_TIMES_ROMAN_24 = 5;
+ public static final int BITMAP_HELVETICA_10 = 6;
+ public static final int BITMAP_HELVETICA_12 = 7;
+ public static final int BITMAP_HELVETICA_18 = 8;
+
+ private GLUgl2 glu = new GLUgl2();
+
+ //----------------------------------------------------------------------
+ // Shapes
+ //
+
+ public void glutWireSphere(double radius, int slices, int stacks) {
+ quadObjInit(glu);
+ glu.gluQuadricDrawStyle(quadObj, GLU.GLU_LINE);
+ glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
+ /* If we ever changed/used the texture or orientation state
+ of quadObj, we'd need to change it to the defaults here
+ with gluQuadricTexture and/or gluQuadricOrientation. */
+ glu.gluSphere(quadObj, radius, slices, stacks);
+ }
+
+ public void glutSolidSphere(double radius, int slices, int stacks) {
+ quadObjInit(glu);
+ glu.gluQuadricDrawStyle(quadObj, GLU.GLU_FILL);
+ glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
+ /* If we ever changed/used the texture or orientation state
+ of quadObj, we'd need to change it to the defaults here
+ with gluQuadricTexture and/or gluQuadricOrientation. */
+ glu.gluSphere(quadObj, radius, slices, stacks);
+ }
+
+ public void glutWireCone(double base, double height,
+ int slices, int stacks) {
+ quadObjInit(glu);
+ glu.gluQuadricDrawStyle(quadObj, GLU.GLU_LINE);
+ glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
+ /* If we ever changed/used the texture or orientation state
+ of quadObj, we'd need to change it to the defaults here
+ with gluQuadricTexture and/or gluQuadricOrientation. */
+ glu.gluCylinder(quadObj, base, 0.0, height, slices, stacks);
+ }
+
+ public void glutSolidCone(double base, double height,
+ int slices, int stacks) {
+ quadObjInit(glu);
+ glu.gluQuadricDrawStyle(quadObj, GLU.GLU_FILL);
+ glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
+ /* If we ever changed/used the texture or orientation state
+ of quadObj, we'd need to change it to the defaults here
+ with gluQuadricTexture and/or gluQuadricOrientation. */
+ glu.gluCylinder(quadObj, base, 0.0, height, slices, stacks);
+ }
+
+ public void glutWireCylinder(double radius, double height, int slices, int stacks) {
+ quadObjInit(glu);
+ glu.gluQuadricDrawStyle(quadObj, GLU.GLU_LINE);
+ glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
+ /* If we ever changed/used the texture or orientation state
+ of quadObj, we'd need to change it to the defaults here
+ with gluQuadricTexture and/or gluQuadricOrientation. */
+ glu.gluCylinder(quadObj, radius, radius, height, slices, stacks);
+ }
+
+ public void glutSolidCylinder(double radius, double height, int slices, int stacks) {
+ GL2 gl = GLUgl2.getCurrentGL2();
+
+ // Prepare table of points for drawing end caps
+ double [] x = new double[slices];
+ double [] y = new double[slices];
+ double angleDelta = Math.PI * 2 / slices;
+ double angle = 0;
+ for (int i = 0 ; i < slices ; i ++) {
+ angle = i * angleDelta;
+ x[i] = Math.cos(angle) * radius;
+ y[i] = Math.sin(angle) * radius;
+ }
+
+ // Draw bottom cap
+ gl.glBegin(GL2.GL_TRIANGLE_FAN);
+ gl.glNormal3d(0,0,-1);
+ gl.glVertex3d(0,0,0);
+ for (int i = 0 ; i < slices ; i ++) {
+ gl.glVertex3d(x[i], y[i], 0);
+ }
+ gl.glVertex3d(x[0], y[0], 0);
+ gl.glEnd();
+
+ // Draw top cap
+ gl.glBegin(GL2.GL_TRIANGLE_FAN);
+ gl.glNormal3d(0,0,1);
+ gl.glVertex3d(0,0,height);
+ for (int i = 0 ; i < slices ; i ++) {
+ gl.glVertex3d(x[i], y[i], height);
+ }
+ gl.glVertex3d(x[0], y[0], height);
+ gl.glEnd();
+
+ // Draw walls
+ quadObjInit(glu);
+ glu.gluQuadricDrawStyle(quadObj, GLU.GLU_FILL);
+ glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
+ /* If we ever changed/used the texture or orientation state
+ of quadObj, we'd need to change it to the defaults here
+ with gluQuadricTexture and/or gluQuadricOrientation. */
+ glu.gluCylinder(quadObj, radius, radius, height, slices, stacks);
+ }
+
+ public void glutWireCube(float size) {
+ drawBox(GLUgl2.getCurrentGL2(), size, GL2.GL_LINE_LOOP);
+ }
+
+ public void glutSolidCube(float size) {
+ drawBox(GLUgl2.getCurrentGL2(), size, GL2.GL_QUADS);
+ }
+
+ public void glutWireTorus(double innerRadius, double outerRadius,
+ int nsides, int rings) {
+ GL2 gl = GLUgl2.getCurrentGL2();
+ gl.glPushAttrib(GL2.GL_POLYGON_BIT);
+ gl.glPolygonMode(GL2.GL_FRONT_AND_BACK, GL2.GL_LINE);
+ doughnut(gl, innerRadius, outerRadius, nsides, rings);
+ gl.glPopAttrib();
+ }
+
+ public void glutSolidTorus(double innerRadius, double outerRadius,
+ int nsides, int rings) {
+ doughnut(GLUgl2.getCurrentGL2(), innerRadius, outerRadius, nsides, rings);
+ }
+
+ public void glutWireDodecahedron() {
+ dodecahedron(GLUgl2.getCurrentGL2(), GL2.GL_LINE_LOOP);
+ }
+
+ public void glutSolidDodecahedron() {
+ dodecahedron(GLUgl2.getCurrentGL2(), GL2.GL_TRIANGLE_FAN);
+ }
+
+ public void glutWireOctahedron() {
+ octahedron(GLUgl2.getCurrentGL2(), GL2.GL_LINE_LOOP);
+ }
+
+ public void glutSolidOctahedron() {
+ octahedron(GLUgl2.getCurrentGL2(), GL2.GL_TRIANGLES);
+ }
+
+ public void glutWireIcosahedron() {
+ icosahedron(GLUgl2.getCurrentGL2(), GL2.GL_LINE_LOOP);
+ }
+
+ public void glutSolidIcosahedron() {
+ icosahedron(GLUgl2.getCurrentGL2(), GL2.GL_TRIANGLES);
+ }
+
+ public void glutWireTetrahedron() {
+ tetrahedron(GLUgl2.getCurrentGL2(), GL2.GL_LINE_LOOP);
+ }
+
+ public void glutSolidTetrahedron() {
+ tetrahedron(GLUgl2.getCurrentGL2(), GL2.GL_TRIANGLES);
+ }
+
+/**
+ * Renders the teapot as a solid shape of the specified size. The teapot is
+ * created in a way that replicates the C GLUT implementation.
+ *
+ * @param scale
+ * the factor by which to scale the teapot
+ */
+ public void glutSolidTeapot(double scale) {
+ glutSolidTeapot(scale, true);
+ }
+
+ /**
+ * Renders the teapot as a solid shape of the specified size. The teapot can
+ * either be created in a way that is backward-compatible with the standard
+ * C glut library (i.e. broken), or in a more pleasing way (i.e. with
+ * surfaces whose front-faces point outwards and standing on the z=0 plane,
+ * instead of the y=-1 plane). Both surface normals and texture coordinates
+ * for the teapot are generated. The teapot is generated with OpenGL
+ * evaluators.
+ *
+ * @param scale
+ * the factor by which to scale the teapot
+ * @param cStyle
+ * whether to create the teapot in exactly the same way as in the C
+ * implementation of GLUT
+ */
+ public void glutSolidTeapot(double scale, boolean cStyle) {
+ teapot(GLUgl2.getCurrentGL2(), 14, scale, GL2.GL_FILL, cStyle);
+ }
+
+ /**
+ * Renders the teapot as a wireframe shape of the specified size. The teapot
+ * is created in a way that replicates the C GLUT implementation.
+ *
+ * @param scale
+ * the factor by which to scale the teapot
+ */
+ public void glutWireTeapot(double scale) {
+ glutWireTeapot(scale, true);
+ }
+
+ /**
+ * Renders the teapot as a wireframe shape of the specified size. The teapot
+ * can either be created in a way that is backward-compatible with the
+ * standard C glut library (i.e. broken), or in a more pleasing way (i.e.
+ * with surfaces whose front-faces point outwards and standing on the z=0
+ * plane, instead of the y=-1 plane). Both surface normals and texture
+ * coordinates for the teapot are generated. The teapot is generated with
+ * OpenGL evaluators.
+ *
+ * @param scale
+ * the factor by which to scale the teapot
+ * @param cStyle
+ * whether to create the teapot in exactly the same way as in the C
+ * implementation of GLUT
+ */
+ public void glutWireTeapot(double scale, boolean cStyle) {
+ teapot(GLUgl2.getCurrentGL2(), 10, scale, GL2.GL_LINE, cStyle);
+ }
+
+ //----------------------------------------------------------------------
+ // Fonts
+ //
+
+ public void glutBitmapCharacter(int font, char character) {
+ GL2 gl = GLUgl2.getCurrentGL2();
+ int[] swapbytes = new int[1];
+ int[] lsbfirst = new int[1];
+ int[] rowlength = new int[1];
+ int[] skiprows = new int[1];
+ int[] skippixels = new int[1];
+ int[] alignment = new int[1];
+ beginBitmap(gl,
+ swapbytes,
+ lsbfirst,
+ rowlength,
+ skiprows,
+ skippixels,
+ alignment);
+ bitmapCharacterImpl(gl, font, character);
+ endBitmap(gl,
+ swapbytes,
+ lsbfirst,
+ rowlength,
+ skiprows,
+ skippixels,
+ alignment);
+ }
+
+ public void glutBitmapString (int font, String string) {
+ GL2 gl = GLUgl2.getCurrentGL2();
+ int[] swapbytes = new int[1];
+ int[] lsbfirst = new int[1];
+ int[] rowlength = new int[1];
+ int[] skiprows = new int[1];
+ int[] skippixels = new int[1];
+ int[] alignment = new int[1];
+ beginBitmap(gl,
+ swapbytes,
+ lsbfirst,
+ rowlength,
+ skiprows,
+ skippixels,
+ alignment);
+ int len = string.length();
+ for (int i = 0; i < len; i++) {
+ bitmapCharacterImpl(gl, font, string.charAt(i));
+ }
+ endBitmap(gl,
+ swapbytes,
+ lsbfirst,
+ rowlength,
+ skiprows,
+ skippixels,
+ alignment);
+ }
+
+ public int glutBitmapWidth (int font, char character) {
+ BitmapFontRec fontinfo = getBitmapFont(font);
+ int c = character & 0xFFFF;
+ if (c < fontinfo.first || c >= fontinfo.first + fontinfo.num_chars)
+ return 0;
+ BitmapCharRec ch = fontinfo.ch[c - fontinfo.first];
+ if (ch != null)
+ return (int) ch.advance;
+ else
+ return 0;
+ }
+
+ public void glutStrokeCharacter(int font, char character) {
+ GL2 gl = GLUgl2.getCurrentGL2();
+ StrokeFontRec fontinfo = getStrokeFont(font);
+ int c = character & 0xFFFF;
+ if (c < 0 || c >= fontinfo.num_chars)
+ return;
+ StrokeCharRec ch = fontinfo.ch[c];
+ if (ch != null) {
+ for (int i = 0; i < ch.num_strokes; i++) {
+ StrokeRec stroke = ch.stroke[i];
+ gl.glBegin(GL2.GL_LINE_STRIP);
+ for (int j = 0; j < stroke.num_coords; j++) {
+ CoordRec coord = stroke.coord[j];
+ gl.glVertex2f(coord.x, coord.y);
+ }
+ gl.glEnd();
+ }
+ gl.glTranslatef(ch.right, 0.0f, 0.0f);
+ }
+ }
+
+ public void glutStrokeString(int font, String string) {
+ GL2 gl = GLUgl2.getCurrentGL2();
+ StrokeFontRec fontinfo = getStrokeFont(font);
+ int len = string.length();
+ for (int pos = 0; pos < len; pos++) {
+ int c = string.charAt(pos) & 0xFFFF;
+ if (c < 0 || c >= fontinfo.num_chars)
+ continue;
+ StrokeCharRec ch = fontinfo.ch[c];
+ if (ch != null) {
+ for (int i = 0; i < ch.num_strokes; i++) {
+ StrokeRec stroke = ch.stroke[i];
+ gl.glBegin(GL2.GL_LINE_STRIP);
+ for (int j = 0; j < stroke.num_coords; j++) {
+ CoordRec coord = stroke.coord[j];
+ gl.glVertex2f(coord.x, coord.y);
+ }
+ gl.glEnd();
+ }
+ gl.glTranslatef(ch.right, 0.0f, 0.0f);
+ }
+ }
+ }
+
+ public int glutStrokeWidth (int font, char character) {
+ return (int) glutStrokeWidthf(font, character);
+ }
+
+ public float glutStrokeWidthf (int font, char character) {
+ StrokeFontRec fontinfo = getStrokeFont(font);
+ int c = character & 0xFFFF;
+ if (c < 0 || c >= fontinfo.num_chars)
+ return 0;
+ StrokeCharRec ch = fontinfo.ch[c];
+ if (ch != null)
+ return ch.right;
+ else
+ return 0;
+ }
+
+ public int glutBitmapLength (int font, String string) {
+ BitmapFontRec fontinfo = getBitmapFont(font);
+ int length = 0;
+ int len = string.length();
+ for (int pos = 0; pos < len; pos++) {
+ int c = string.charAt(pos) & 0xFFFF;
+ if (c >= fontinfo.first && c < fontinfo.first + fontinfo.num_chars) {
+ BitmapCharRec ch = fontinfo.ch[c - fontinfo.first];
+ if (ch != null)
+ length += ch.advance;
+ }
+ }
+ return length;
+ }
+
+ public int glutStrokeLength (int font, String string) {
+ return (int) glutStrokeLengthf(font, string);
+ }
+
+ public float glutStrokeLengthf (int font, String string) {
+ StrokeFontRec fontinfo = getStrokeFont(font);
+ float length = 0;
+ int len = string.length();
+ for (int i = 0; i < len; i++) {
+ char c = string.charAt(i);
+ if (c >= 0 && c < fontinfo.num_chars) {
+ StrokeCharRec ch = fontinfo.ch[c];
+ if (ch != null)
+ length += ch.right;
+ }
+ }
+ return length;
+ }
+
+ /**
+ This function draws a wireframe dodecahedron whose
+ facets are rhombic and
+ whose vertices are at unit radius.
+ No facet lies normal to any coordinate axes.
+ The polyhedron is centered at the origin.
+ */
+ public void glutWireRhombicDodecahedron() {
+ GL2 gl = GLUgl2.getCurrentGL2();
+ for( int i = 0; i < 12; i++ ) {
+ gl.glBegin( GL2.GL_LINE_LOOP );
+ gl.glNormal3dv( rdod_n[ i ],0 );
+ gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 0 ] ],0 );
+ gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 1 ] ],0 );
+ gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 2 ] ],0 );
+ gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 3 ] ],0 );
+ gl.glEnd( );
+ }
+ }
+
+ /**
+ This function draws a solid-shaded dodecahedron
+ whose facets are rhombic and
+ whose vertices are at unit radius.
+ No facet lies normal to any coordinate axes.
+ The polyhedron is centered at the origin.
+ */
+ public void glutSolidRhombicDodecahedron() {
+ GL2 gl = GLUgl2.getCurrentGL2();
+ gl.glBegin( GL2.GL_QUADS );
+ for( int i = 0; i < 12; i++ ) {
+ gl.glNormal3dv( rdod_n[ i ],0 );
+ gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 0 ] ],0 );
+ gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 1 ] ],0 );
+ gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 2 ] ],0 );
+ gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 3 ] ],0 );
+ }
+ gl.glEnd( );
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ //----------------------------------------------------------------------
+ // Shape implementation
+ //
+
+ private GLUquadric quadObj;
+ private void quadObjInit(GLUgl2 glu) {
+ if (quadObj == null) {
+ quadObj = glu.gluNewQuadric();
+ }
+ if (quadObj == null) {
+ throw new GLException("Out of memory");
+ }
+ }
+
+ private static void doughnut(GL2 gl, double r, double R, int nsides, int rings) {
+ int i, j;
+ float theta, phi, theta1;
+ float cosTheta, sinTheta;
+ float cosTheta1, sinTheta1;
+ float ringDelta, sideDelta;
+
+ ringDelta = (float) (2.0 * Math.PI / rings);
+ sideDelta = (float) (2.0 * Math.PI / nsides);
+
+ theta = 0.0f;
+ cosTheta = 1.0f;
+ sinTheta = 0.0f;
+ for (i = rings - 1; i >= 0; i--) {
+ theta1 = theta + ringDelta;
+ cosTheta1 = (float) Math.cos(theta1);
+ sinTheta1 = (float) Math.sin(theta1);
+ gl.glBegin(GL2.GL_QUAD_STRIP);
+ phi = 0.0f;
+ for (j = nsides; j >= 0; j--) {
+ float cosPhi, sinPhi, dist;
+
+ phi += sideDelta;
+ cosPhi = (float) Math.cos(phi);
+ sinPhi = (float) Math.sin(phi);
+ dist = (float) (R + r * cosPhi);
+
+ gl.glNormal3f(cosTheta1 * cosPhi, -sinTheta1 * cosPhi, sinPhi);
+ gl.glVertex3f(cosTheta1 * dist, -sinTheta1 * dist, (float) r * sinPhi);
+ gl.glNormal3f(cosTheta * cosPhi, -sinTheta * cosPhi, sinPhi);
+ gl.glVertex3f(cosTheta * dist, -sinTheta * dist, (float) r * sinPhi);
+ }
+ gl.glEnd();
+ theta = theta1;
+ cosTheta = cosTheta1;
+ sinTheta = sinTheta1;
+ }
+ }
+
+ private static float[][] boxVertices;
+ private static final float[][] boxNormals = {
+ {-1.0f, 0.0f, 0.0f},
+ {0.0f, 1.0f, 0.0f},
+ {1.0f, 0.0f, 0.0f},
+ {0.0f, -1.0f, 0.0f},
+ {0.0f, 0.0f, 1.0f},
+ {0.0f, 0.0f, -1.0f}
+ };
+ private static final int[][] boxFaces = {
+ {0, 1, 2, 3},
+ {3, 2, 6, 7},
+ {7, 6, 5, 4},
+ {4, 5, 1, 0},
+ {5, 6, 2, 1},
+ {7, 4, 0, 3}
+ };
+ private void drawBox(GL2 gl, float size, int type) {
+ if (boxVertices == null) {
+ float[][] v = new float[8][];
+ for (int i = 0; i < 8; i++) {
+ v[i] = new float[3];
+ }
+ v[0][0] = v[1][0] = v[2][0] = v[3][0] = -0.5f;
+ v[4][0] = v[5][0] = v[6][0] = v[7][0] = 0.5f;
+ v[0][1] = v[1][1] = v[4][1] = v[5][1] = -0.5f;
+ v[2][1] = v[3][1] = v[6][1] = v[7][1] = 0.5f;
+ v[0][2] = v[3][2] = v[4][2] = v[7][2] = -0.5f;
+ v[1][2] = v[2][2] = v[5][2] = v[6][2] = 0.5f;
+ boxVertices = v;
+ }
+ float[][] v = boxVertices;
+ float[][] n = boxNormals;
+ int[][] faces = boxFaces;
+ for (int i = 5; i >= 0; i--) {
+ gl.glBegin(type);
+ gl.glNormal3fv(n[i], 0);
+ float[] vt = v[faces[i][0]];
+ gl.glVertex3f(vt[0] * size, vt[1] * size, vt[2] * size);
+ vt = v[faces[i][1]];
+ gl.glVertex3f(vt[0] * size, vt[1] * size, vt[2] * size);
+ vt = v[faces[i][2]];
+ gl.glVertex3f(vt[0] * size, vt[1] * size, vt[2] * size);
+ vt = v[faces[i][3]];
+ gl.glVertex3f(vt[0] * size, vt[1] * size, vt[2] * size);
+ gl.glEnd();
+ }
+ }
+
+ private float[][] dodec;
+
+ private void initDodecahedron() {
+ dodec = new float[20][];
+ for (int i = 0; i < dodec.length; i++) {
+ dodec[i] = new float[3];
+ }
+
+ float alpha, beta;
+
+ alpha = (float) Math.sqrt(2.0f / (3.0f + Math.sqrt(5.0)));
+ beta = 1.0f + (float) Math.sqrt(6.0 / (3.0 + Math.sqrt(5.0)) -
+ 2.0 + 2.0 * Math.sqrt(2.0 / (3.0 + Math.sqrt(5.0))));
+ dodec[0][0] = -alpha; dodec[0][1] = 0; dodec[0][2] = beta;
+ dodec[1][0] = alpha; dodec[1][1] = 0; dodec[1][2] = beta;
+ dodec[2][0] = -1; dodec[2][1] = -1; dodec[2][2] = -1;
+ dodec[3][0] = -1; dodec[3][1] = -1; dodec[3][2] = 1;
+ dodec[4][0] = -1; dodec[4][1] = 1; dodec[4][2] = -1;
+ dodec[5][0] = -1; dodec[5][1] = 1; dodec[5][2] = 1;
+ dodec[6][0] = 1; dodec[6][1] = -1; dodec[6][2] = -1;
+ dodec[7][0] = 1; dodec[7][1] = -1; dodec[7][2] = 1;
+ dodec[8][0] = 1; dodec[8][1] = 1; dodec[8][2] = -1;
+ dodec[9][0] = 1; dodec[9][1] = 1; dodec[9][2] = 1;
+ dodec[10][0] = beta; dodec[10][1] = alpha; dodec[10][2] = 0;
+ dodec[11][0] = beta; dodec[11][1] = -alpha; dodec[11][2] = 0;
+ dodec[12][0] = -beta; dodec[12][1] = alpha; dodec[12][2] = 0;
+ dodec[13][0] = -beta; dodec[13][1] = -alpha; dodec[13][2] = 0;
+ dodec[14][0] = -alpha; dodec[14][1] = 0; dodec[14][2] = -beta;
+ dodec[15][0] = alpha; dodec[15][1] = 0; dodec[15][2] = -beta;
+ dodec[16][0] = 0; dodec[16][1] = beta; dodec[16][2] = alpha;
+ dodec[17][0] = 0; dodec[17][1] = beta; dodec[17][2] = -alpha;
+ dodec[18][0] = 0; dodec[18][1] = -beta; dodec[18][2] = alpha;
+ dodec[19][0] = 0; dodec[19][1] = -beta; dodec[19][2] = -alpha;
+ }
+
+ private static void diff3(float[] a, float[] b, float[] c) {
+ c[0] = a[0] - b[0];
+ c[1] = a[1] - b[1];
+ c[2] = a[2] - b[2];
+ }
+
+ private static void crossprod(float[] v1, float[] v2, float[] prod) {
+ float[] p = new float[3]; /* in case prod == v1 or v2 */
+
+ p[0] = v1[1] * v2[2] - v2[1] * v1[2];
+ p[1] = v1[2] * v2[0] - v2[2] * v1[0];
+ p[2] = v1[0] * v2[1] - v2[0] * v1[1];
+ prod[0] = p[0];
+ prod[1] = p[1];
+ prod[2] = p[2];
+ }
+
+ private static void normalize(float[] v) {
+ float d;
+
+ d = (float) Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
+ if (d == 0.0) {
+ v[0] = d = 1.0f;
+ }
+ d = 1 / d;
+ v[0] *= d;
+ v[1] *= d;
+ v[2] *= d;
+ }
+
+ private void pentagon(GL2 gl, int a, int b, int c, int d, int e, int shadeType) {
+ float[] n0 = new float[3];
+ float[] d1 = new float[3];
+ float[] d2 = new float[3];
+
+ diff3(dodec[a], dodec[b], d1);
+ diff3(dodec[b], dodec[c], d2);
+ crossprod(d1, d2, n0);
+ normalize(n0);
+
+ gl.glBegin(shadeType);
+ gl.glNormal3fv(n0, 0);
+ gl.glVertex3fv(dodec[a], 0);
+ gl.glVertex3fv(dodec[b], 0);
+ gl.glVertex3fv(dodec[c], 0);
+ gl.glVertex3fv(dodec[d], 0);
+ gl.glVertex3fv(dodec[e], 0);
+ gl.glEnd();
+ }
+
+ private void dodecahedron(GL2 gl, int type) {
+ if (dodec == null) {
+ initDodecahedron();
+ }
+ pentagon(gl, 0, 1, 9, 16, 5, type);
+ pentagon(gl, 1, 0, 3, 18, 7, type);
+ pentagon(gl, 1, 7, 11, 10, 9, type);
+ pentagon(gl, 11, 7, 18, 19, 6, type);
+ pentagon(gl, 8, 17, 16, 9, 10, type);
+ pentagon(gl, 2, 14, 15, 6, 19, type);
+ pentagon(gl, 2, 13, 12, 4, 14, type);
+ pentagon(gl, 2, 19, 18, 3, 13, type);
+ pentagon(gl, 3, 0, 5, 12, 13, type);
+ pentagon(gl, 6, 15, 8, 10, 11, type);
+ pentagon(gl, 4, 17, 8, 15, 14, type);
+ pentagon(gl, 4, 12, 5, 16, 17, type);
+ }
+
+ private static void recorditem(GL2 gl, float[] n1, float[] n2, float[] n3, int shadeType) {
+ float[] q0 = new float[3];
+ float[] q1 = new float[3];
+
+ diff3(n1, n2, q0);
+ diff3(n2, n3, q1);
+ crossprod(q0, q1, q1);
+ normalize(q1);
+
+ gl.glBegin(shadeType);
+ gl.glNormal3fv(q1, 0);
+ gl.glVertex3fv(n1, 0);
+ gl.glVertex3fv(n2, 0);
+ gl.glVertex3fv(n3, 0);
+ gl.glEnd();
+ }
+
+ private static void subdivide(GL2 gl, float[] v0, float[] v1, float[] v2, int shadeType) {
+ int depth;
+ float[] w0 = new float[3];
+ float[] w1 = new float[3];
+ float[] w2 = new float[3];
+ float l;
+ int i, j, k, n;
+
+ depth = 1;
+ for (i = 0; i < depth; i++) {
+ for (j = 0; i + j < depth; j++) {
+ k = depth - i - j;
+ for (n = 0; n < 3; n++) {
+ w0[n] = (i * v0[n] + j * v1[n] + k * v2[n]) / depth;
+ w1[n] = ((i + 1) * v0[n] + j * v1[n] + (k - 1) * v2[n])
+ / depth;
+ w2[n] = (i * v0[n] + (j + 1) * v1[n] + (k - 1) * v2[n])
+ / depth;
+ }
+ l = (float) Math.sqrt(w0[0] * w0[0] + w0[1] * w0[1] + w0[2] * w0[2]);
+ w0[0] /= l;
+ w0[1] /= l;
+ w0[2] /= l;
+ l = (float) Math.sqrt(w1[0] * w1[0] + w1[1] * w1[1] + w1[2] * w1[2]);
+ w1[0] /= l;
+ w1[1] /= l;
+ w1[2] /= l;
+ l = (float) Math.sqrt(w2[0] * w2[0] + w2[1] * w2[1] + w2[2] * w2[2]);
+ w2[0] /= l;
+ w2[1] /= l;
+ w2[2] /= l;
+ recorditem(gl, w1, w0, w2, shadeType);
+ }
+ }
+ }
+
+ private static void drawtriangle(GL2 gl, int i, float[][] data, int[][] ndx, int shadeType) {
+ float[] x0 = data[ndx[i][0]];
+ float[] x1 = data[ndx[i][1]];
+ float[] x2 = data[ndx[i][2]];
+ subdivide(gl, x0, x1, x2, shadeType);
+ }
+
+ /* octahedron data: The octahedron produced is centered at the
+ origin and has radius 1.0 */
+ private static final float[][] odata =
+ {
+ {1.0f, 0.0f, 0.0f},
+ {-1.0f, 0.0f, 0.0f},
+ {0.0f, 1.0f, 0.0f},
+ {0.0f, -1.0f, 0.0f},
+ {0.0f, 0.0f, 1.0f},
+ {0.0f, 0.0f, -1.0f}
+ };
+
+ private static final int[][] ondex =
+ {
+ {0, 4, 2},
+ {1, 2, 4},
+ {0, 3, 4},
+ {1, 4, 3},
+ {0, 2, 5},
+ {1, 5, 2},
+ {0, 5, 3},
+ {1, 3, 5}
+ };
+
+ private static void octahedron(GL2 gl, int shadeType) {
+ int i;
+
+ for (i = 7; i >= 0; i--) {
+ drawtriangle(gl, i, odata, ondex, shadeType);
+ }
+ }
+
+ /* icosahedron data: These numbers are rigged to make an
+ icosahedron of radius 1.0 */
+
+ private static final float X = .525731112119133606f;
+ private static final float Z = .850650808352039932f;
+
+ private static final float[][] idata =
+ {
+ {-X, 0, Z},
+ {X, 0, Z},
+ {-X, 0, -Z},
+ {X, 0, -Z},
+ {0, Z, X},
+ {0, Z, -X},
+ {0, -Z, X},
+ {0, -Z, -X},
+ {Z, X, 0},
+ {-Z, X, 0},
+ {Z, -X, 0},
+ {-Z, -X, 0}
+ };
+
+ private static final int[][] index =
+ {
+ {0, 4, 1},
+ {0, 9, 4},
+ {9, 5, 4},
+ {4, 5, 8},
+ {4, 8, 1},
+ {8, 10, 1},
+ {8, 3, 10},
+ {5, 3, 8},
+ {5, 2, 3},
+ {2, 7, 3},
+ {7, 10, 3},
+ {7, 6, 10},
+ {7, 11, 6},
+ {11, 0, 6},
+ {0, 1, 6},
+ {6, 1, 10},
+ {9, 0, 11},
+ {9, 11, 2},
+ {9, 2, 5},
+ {7, 2, 11},
+ };
+
+ private static void icosahedron(GL2 gl, int shadeType) {
+ int i;
+
+ for (i = 19; i >= 0; i--) {
+ drawtriangle(gl, i, idata, index, shadeType);
+ }
+ }
+
+ /* rhombic dodecahedron data: */
+
+ private static final double rdod_r[][] =
+ {
+ { 0.0, 0.0, 1.0 },
+ { 0.707106781187, 0.000000000000, 0.5 },
+ { 0.000000000000, 0.707106781187, 0.5 },
+ { -0.707106781187, 0.000000000000, 0.5 },
+ { 0.000000000000, -0.707106781187, 0.5 },
+ { 0.707106781187, 0.707106781187, 0.0 },
+ { -0.707106781187, 0.707106781187, 0.0 },
+ { -0.707106781187, -0.707106781187, 0.0 },
+ { 0.707106781187, -0.707106781187, 0.0 },
+ { 0.707106781187, 0.000000000000, -0.5 },
+ { 0.000000000000, 0.707106781187, -0.5 },
+ { -0.707106781187, 0.000000000000, -0.5 },
+ { 0.000000000000, -0.707106781187, -0.5 },
+ { 0.0, 0.0, -1.0 }
+ };
+
+ private static final int rdod_v[][] =
+ {
+ { 0, 1, 5, 2 },
+ { 0, 2, 6, 3 },
+ { 0, 3, 7, 4 },
+ { 0, 4, 8, 1 },
+ { 5, 10, 6, 2 },
+ { 6, 11, 7, 3 },
+ { 7, 12, 8, 4 },
+ { 8, 9, 5, 1 },
+ { 5, 9, 13, 10 },
+ { 6, 10, 13, 11 },
+ { 7, 11, 13, 12 },
+ { 8, 12, 13, 9 }
+ };
+
+ private static final double rdod_n[][] =
+ {
+ { 0.353553390594, 0.353553390594, 0.5 },
+ { -0.353553390594, 0.353553390594, 0.5 },
+ { -0.353553390594, -0.353553390594, 0.5 },
+ { 0.353553390594, -0.353553390594, 0.5 },
+ { 0.000000000000, 1.000000000000, 0.0 },
+ { -1.000000000000, 0.000000000000, 0.0 },
+ { 0.000000000000, -1.000000000000, 0.0 },
+ { 1.000000000000, 0.000000000000, 0.0 },
+ { 0.353553390594, 0.353553390594, -0.5 },
+ { -0.353553390594, 0.353553390594, -0.5 },
+ { -0.353553390594, -0.353553390594, -0.5 },
+ { 0.353553390594, -0.353553390594, -0.5 }
+ };
+
+ /* tetrahedron data: */
+
+ private static final float T = 1.73205080756887729f;
+
+ private static final float[][] tdata =
+ {
+ {T, T, T},
+ {T, -T, -T},
+ {-T, T, -T},
+ {-T, -T, T}
+ };
+
+ private static final int[][] tndex =
+ {
+ {0, 1, 3},
+ {2, 1, 0},
+ {3, 2, 0},
+ {1, 2, 3}
+ };
+
+ private static final void tetrahedron(GL2 gl, int shadeType) {
+ for (int i = 3; i >= 0; i--)
+ drawtriangle(gl, i, tdata, tndex, shadeType);
+ }
+
+ // Teapot implementation (a modified port of glut_teapot.c)
+ //
+ // Rim, body, lid, and bottom data must be reflected in x and
+ // y; handle and spout data across the y axis only.
+ private static final int[][] teapotPatchData = {
+ /* rim */
+ {102, 103, 104, 105, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
+ /* body */
+ {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27},
+ {24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40},
+ /* lid */
+ {96, 96, 96, 96, 97, 98, 99, 100, 101, 101, 101, 101, 0, 1, 2, 3,},
+ {0, 1, 2, 3, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117},
+ /* bottom */
+ {118, 118, 118, 118, 124, 122, 119, 121, 123, 126, 125, 120, 40, 39, 38, 37},
+ /* handle */
+ {41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56},
+ {53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 28, 65, 66, 67},
+ /* spout */
+ {68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83},
+ {80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95}
+ };
+ private static final float[][] teapotCPData = {
+ {0.2f, 0f, 2.7f},
+ {0.2f, -0.112f, 2.7f},
+ {0.112f, -0.2f, 2.7f},
+ {0f, -0.2f, 2.7f},
+ {1.3375f, 0f, 2.53125f},
+ {1.3375f, -0.749f, 2.53125f},
+ {0.749f, -1.3375f, 2.53125f},
+ {0f, -1.3375f, 2.53125f},
+ {1.4375f, 0f, 2.53125f},
+ {1.4375f, -0.805f, 2.53125f},
+ {0.805f, -1.4375f, 2.53125f},
+ {0f, -1.4375f, 2.53125f},
+ {1.5f, 0f, 2.4f},
+ {1.5f, -0.84f, 2.4f},
+ {0.84f, -1.5f, 2.4f},
+ {0f, -1.5f, 2.4f},
+ {1.75f, 0f, 1.875f},
+ {1.75f, -0.98f, 1.875f},
+ {0.98f, -1.75f, 1.875f},
+ {0f, -1.75f, 1.875f},
+ {2f, 0f, 1.35f},
+ {2f, -1.12f, 1.35f},
+ {1.12f, -2f, 1.35f},
+ {0f, -2f, 1.35f},
+ {2f, 0f, 0.9f},
+ {2f, -1.12f, 0.9f},
+ {1.12f, -2f, 0.9f},
+ {0f, -2f, 0.9f},
+ {-2f, 0f, 0.9f},
+ {2f, 0f, 0.45f},
+ {2f, -1.12f, 0.45f},
+ {1.12f, -2f, 0.45f},
+ {0f, -2f, 0.45f},
+ {1.5f, 0f, 0.225f},
+ {1.5f, -0.84f, 0.225f},
+ {0.84f, -1.5f, 0.225f},
+ {0f, -1.5f, 0.225f},
+ {1.5f, 0f, 0.15f},
+ {1.5f, -0.84f, 0.15f},
+ {0.84f, -1.5f, 0.15f},
+ {0f, -1.5f, 0.15f},
+ {-1.6f, 0f, 2.025f},
+ {-1.6f, -0.3f, 2.025f},
+ {-1.5f, -0.3f, 2.25f},
+ {-1.5f, 0f, 2.25f},
+ {-2.3f, 0f, 2.025f},
+ {-2.3f, -0.3f, 2.025f},
+ {-2.5f, -0.3f, 2.25f},
+ {-2.5f, 0f, 2.25f},
+ {-2.7f, 0f, 2.025f},
+ {-2.7f, -0.3f, 2.025f},
+ {-3f, -0.3f, 2.25f},
+ {-3f, 0f, 2.25f},
+ {-2.7f, 0f, 1.8f},
+ {-2.7f, -0.3f, 1.8f},
+ {-3f, -0.3f, 1.8f},
+ {-3f, 0f, 1.8f},
+ {-2.7f, 0f, 1.575f},
+ {-2.7f, -0.3f, 1.575f},
+ {-3f, -0.3f, 1.35f},
+ {-3f, 0f, 1.35f},
+ {-2.5f, 0f, 1.125f},
+ {-2.5f, -0.3f, 1.125f},
+ {-2.65f, -0.3f, 0.9375f},
+ {-2.65f, 0f, 0.9375f},
+ {-2f, -0.3f, 0.9f},
+ {-1.9f, -0.3f, 0.6f},
+ {-1.9f, 0f, 0.6f},
+ {1.7f, 0f, 1.425f},
+ {1.7f, -0.66f, 1.425f},
+ {1.7f, -0.66f, 0.6f},
+ {1.7f, 0f, 0.6f},
+ {2.6f, 0f, 1.425f},
+ {2.6f, -0.66f, 1.425f},
+ {3.1f, -0.66f, 0.825f},
+ {3.1f, 0f, 0.825f},
+ {2.3f, 0f, 2.1f},
+ {2.3f, -0.25f, 2.1f},
+ {2.4f, -0.25f, 2.025f},
+ {2.4f, 0f, 2.025f},
+ {2.7f, 0f, 2.4f},
+ {2.7f, -0.25f, 2.4f},
+ {3.3f, -0.25f, 2.4f},
+ {3.3f, 0f, 2.4f},
+ {2.8f, 0f, 2.475f},
+ {2.8f, -0.25f, 2.475f},
+ {3.525f, -0.25f, 2.49375f},
+ {3.525f, 0f, 2.49375f},
+ {2.9f, 0f, 2.475f},
+ {2.9f, -0.15f, 2.475f},
+ {3.45f, -0.15f, 2.5125f},
+ {3.45f, 0f, 2.5125f},
+ {2.8f, 0f, 2.4f},
+ {2.8f, -0.15f, 2.4f},
+ {3.2f, -0.15f, 2.4f},
+ {3.2f, 0f, 2.4f},
+ {0f, 0f, 3.15f},
+ {0.8f, 0f, 3.15f},
+ {0.8f, -0.45f, 3.15f},
+ {0.45f, -0.8f, 3.15f},
+ {0f, -0.8f, 3.15f},
+ {0f, 0f, 2.85f},
+ {1.4f, 0f, 2.4f},
+ {1.4f, -0.784f, 2.4f},
+ {0.784f, -1.4f, 2.4f},
+ {0f, -1.4f, 2.4f},
+ {0.4f, 0f, 2.55f},
+ {0.4f, -0.224f, 2.55f},
+ {0.224f, -0.4f, 2.55f},
+ {0f, -0.4f, 2.55f},
+ {1.3f, 0f, 2.55f},
+ {1.3f, -0.728f, 2.55f},
+ {0.728f, -1.3f, 2.55f},
+ {0f, -1.3f, 2.55f},
+ {1.3f, 0f, 2.4f},
+ {1.3f, -0.728f, 2.4f},
+ {0.728f, -1.3f, 2.4f},
+ {0f, -1.3f, 2.4f},
+ {0f, 0f, 0f},
+ {1.425f, -0.798f, 0f},
+ {1.5f, 0f, 0.075f},
+ {1.425f, 0f, 0f},
+ {0.798f, -1.425f, 0f},
+ {0f, -1.5f, 0.075f},
+ {0f, -1.425f, 0f},
+ {1.5f, -0.84f, 0.075f},
+ {0.84f, -1.5f, 0.075f}
+ };
+ // Since GL2.glMap2f expects a packed array of floats, we must convert
+ // from a 3-dimensional array to a 1-dimensional array
+ private static final float[] teapotTex = {
+ 0, 0, 1, 0, 0, 1, 1, 1
+ };
+
+ private static void teapot(GL2 gl,
+ int grid,
+ double scale,
+ int type,
+ boolean backCompatible)
+ {
+ // As mentioned above, GL2.glMap2f expects a packed array of floats
+ float[] p = new float[4*4*3];
+ float[] q = new float[4*4*3];
+ float[] r = new float[4*4*3];
+ float[] s = new float[4*4*3];
+ int i, j, k, l;
+
+ gl.glPushAttrib(GL2.GL_ENABLE_BIT | GL2.GL_EVAL_BIT | GL2.GL_POLYGON_BIT);
+ gl.glEnable(GL2.GL_AUTO_NORMAL);
+ gl.glEnable(GL2.GL_NORMALIZE);
+ gl.glEnable(GL2.GL_MAP2_VERTEX_3);
+ gl.glEnable(GL2.GL_MAP2_TEXTURE_COORD_2);
+ gl.glPushMatrix();
+ if (!backCompatible) {
+ // The time has come to have the teapot no longer be inside out
+ gl.glFrontFace(GL2.GL_CW);
+ gl.glScaled(0.5*scale, 0.5*scale, 0.5*scale);
+ } else {
+ // We want the teapot in it's backward compatible position and
+ // orientation
+ gl.glRotatef(270.0f, 1, 0, 0);
+ gl.glScalef((float)(0.5 * scale),
+ (float)(0.5 * scale),
+ (float)(0.5 * scale));
+ gl.glTranslatef(0.0f, 0.0f, -1.5f);
+ }
+ for (i = 0; i < 10; i++) {
+ for (j = 0; j < 4; j++) {
+ for (k = 0; k < 4; k++) {
+ for (l = 0; l < 3; l++) {
+ p[(j*4+k)*3+l] = teapotCPData[teapotPatchData[i][j * 4 + k]][l];
+ q[(j*4+k)*3+l] =
+ teapotCPData[teapotPatchData[i][j * 4 + (3 - k)]][l];
+ if (l == 1)
+ q[(j*4+k)*3+l] *= -1.0;
+ if (i < 6) {
+ r[(j*4+k)*3+l] =
+ teapotCPData[teapotPatchData[i][j * 4 + (3 - k)]][l];
+ if (l == 0)
+ r[(j*4+k)*3+l] *= -1.0;
+ s[(j*4+k)*3+l] = teapotCPData[teapotPatchData[i][j * 4 + k]][l];
+ if (l == 0)
+ s[(j*4+k)*3+l] *= -1.0;
+ if (l == 1)
+ s[(j*4+k)*3+l] *= -1.0;
+ }
+ }
+ }
+ }
+ gl.glMap2f(GL2.GL_MAP2_TEXTURE_COORD_2, 0, 1, 2, 2, 0, 1, 4, 2, teapotTex, 0);
+ gl.glMap2f(GL2.GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, p, 0);
+ gl.glMapGrid2f(grid, 0.0f, 1.0f, grid, 0.0f, 1.0f);
+ evaluateTeapotMesh(gl, grid, type, i, !backCompatible);
+ gl.glMap2f(GL2.GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, q, 0);
+ evaluateTeapotMesh(gl, grid, type, i, !backCompatible);
+ if (i < 6) {
+ gl.glMap2f(GL2.GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, r, 0);
+ evaluateTeapotMesh(gl, grid, type, i, !backCompatible);
+ gl.glMap2f(GL2.GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, s, 0);
+ evaluateTeapotMesh(gl, grid, type, i, !backCompatible);
+ }
+ }
+ gl.glPopMatrix();
+ gl.glPopAttrib();
+ }
+
+ private static void evaluateTeapotMesh(GL2 gl,
+ int grid,
+ int type,
+ int partNum,
+ boolean repairSingularities)
+ {
+ if (repairSingularities && (partNum == 5 || partNum == 3)) {
+ // Instead of using evaluators that give bad results at singularities,
+ // evaluate by hand
+ gl.glPolygonMode(GL2.GL_FRONT_AND_BACK, type);
+ for (int nv = 0; nv < grid; nv++) {
+ if (nv == 0) {
+ // Draw a small triangle-fan to fill the hole
+ gl.glDisable(GL2.GL_AUTO_NORMAL);
+ gl.glNormal3f(0, 0, partNum == 3 ? 1 : -1);
+ gl.glBegin(GL2.GL_TRIANGLE_FAN);
+ {
+ gl.glEvalCoord2f(0, 0);
+ // Note that we draw in clock-wise order to match the evaluator
+ // method
+ for (int nu = 0; nu <= grid; nu++)
+ {
+ gl.glEvalCoord2f(nu / (float)grid, (1f / grid) / (float)grid);
+ }
+ }
+ gl.glEnd();
+ gl.glEnable(GL2.GL_AUTO_NORMAL);
+ }
+ // Draw the rest of the piece as an evaluated quad-strip
+ gl.glBegin(GL2.GL_QUAD_STRIP);
+ {
+ // Note that we draw in clock-wise order to match the evaluator method
+ for (int nu = grid; nu >= 0; nu--) {
+ gl.glEvalCoord2f(nu / (float)grid, (nv + 1) / (float)grid);
+ gl.glEvalCoord2f(nu / (float)grid, Math.max(nv, 1f / grid)
+ / (float)grid);
+ }
+ }
+ gl.glEnd();
+ }
+ } else {
+ gl.glEvalMesh2(type, 0, grid, 0, grid);
+ }
+ }
+
+ //----------------------------------------------------------------------
+ // Font implementation
+ //
+
+ private static void bitmapCharacterImpl(GL2 gl, int font, char cin) {
+ BitmapFontRec fontinfo = getBitmapFont(font);
+ int c = cin & 0xFFFF;
+ if (c < fontinfo.first ||
+ c >= fontinfo.first + fontinfo.num_chars)
+ return;
+ BitmapCharRec ch = fontinfo.ch[c - fontinfo.first];
+ if (ch != null) {
+ gl.glBitmap(ch.width, ch.height, ch.xorig, ch.yorig,
+ ch.advance, 0, ch.bitmap, 0);
+ }
+ }
+
+ private static final BitmapFontRec[] bitmapFonts = new BitmapFontRec[9];
+ private static final StrokeFontRec[] strokeFonts = new StrokeFontRec[9];
+
+ private static BitmapFontRec getBitmapFont(int font) {
+ BitmapFontRec rec = bitmapFonts[font];
+ if (rec == null) {
+ switch (font) {
+ case BITMAP_9_BY_15:
+ rec = GLUTBitmap9x15.glutBitmap9By15;
+ break;
+ case BITMAP_8_BY_13:
+ rec = GLUTBitmap8x13.glutBitmap8By13;
+ break;
+ case BITMAP_TIMES_ROMAN_10:
+ rec = GLUTBitmapTimesRoman10.glutBitmapTimesRoman10;
+ break;
+ case BITMAP_TIMES_ROMAN_24:
+ rec = GLUTBitmapTimesRoman24.glutBitmapTimesRoman24;
+ break;
+ case BITMAP_HELVETICA_10:
+ rec = GLUTBitmapHelvetica10.glutBitmapHelvetica10;
+ break;
+ case BITMAP_HELVETICA_12:
+ rec = GLUTBitmapHelvetica12.glutBitmapHelvetica12;
+ break;
+ case BITMAP_HELVETICA_18:
+ rec = GLUTBitmapHelvetica18.glutBitmapHelvetica18;
+ break;
+ default:
+ throw new GLException("Unknown bitmap font number " + font);
+ }
+ bitmapFonts[font] = rec;
+ }
+ return rec;
+ }
+
+ private static StrokeFontRec getStrokeFont(int font) {
+ StrokeFontRec rec = strokeFonts[font];
+ if (rec == null) {
+ switch (font) {
+ case STROKE_ROMAN:
+ rec = GLUTStrokeRoman.glutStrokeRoman;
+ break;
+ case STROKE_MONO_ROMAN:
+ rec = GLUTStrokeMonoRoman.glutStrokeMonoRoman;
+ break;
+ default:
+ throw new GLException("Unknown stroke font number " + font);
+ }
+ }
+ return rec;
+ }
+
+ private static void beginBitmap(GL2 gl,
+ int[] swapbytes,
+ int[] lsbfirst,
+ int[] rowlength,
+ int[] skiprows,
+ int[] skippixels,
+ int[] alignment) {
+ gl.glGetIntegerv(GL2.GL_UNPACK_SWAP_BYTES, swapbytes, 0);
+ gl.glGetIntegerv(GL2.GL_UNPACK_LSB_FIRST, lsbfirst, 0);
+ gl.glGetIntegerv(GL2.GL_UNPACK_ROW_LENGTH, rowlength, 0);
+ gl.glGetIntegerv(GL2.GL_UNPACK_SKIP_ROWS, skiprows, 0);
+ gl.glGetIntegerv(GL2.GL_UNPACK_SKIP_PIXELS, skippixels, 0);
+ gl.glGetIntegerv(GL2.GL_UNPACK_ALIGNMENT, alignment, 0);
+ /* Little endian machines (DEC Alpha for example) could
+ benefit from setting GL_UNPACK_LSB_FIRST to GL_TRUE
+ instead of GL_FALSE, but this would require changing the
+ generated bitmaps too. */
+ gl.glPixelStorei(GL2.GL_UNPACK_SWAP_BYTES, GL2.GL_FALSE);
+ gl.glPixelStorei(GL2.GL_UNPACK_LSB_FIRST, GL2.GL_FALSE);
+ gl.glPixelStorei(GL2.GL_UNPACK_ROW_LENGTH, 0);
+ gl.glPixelStorei(GL2.GL_UNPACK_SKIP_ROWS, 0);
+ gl.glPixelStorei(GL2.GL_UNPACK_SKIP_PIXELS, 0);
+ gl.glPixelStorei(GL2.GL_UNPACK_ALIGNMENT, 1);
+ }
+
+ private static void endBitmap(GL2 gl,
+ int[] swapbytes,
+ int[] lsbfirst,
+ int[] rowlength,
+ int[] skiprows,
+ int[] skippixels,
+ int[] alignment) {
+ /* Restore saved modes. */
+ gl.glPixelStorei(GL2.GL_UNPACK_SWAP_BYTES, swapbytes[0]);
+ gl.glPixelStorei(GL2.GL_UNPACK_LSB_FIRST, lsbfirst[0]);
+ gl.glPixelStorei(GL2.GL_UNPACK_ROW_LENGTH, rowlength[0]);
+ gl.glPixelStorei(GL2.GL_UNPACK_SKIP_ROWS, skiprows[0]);
+ gl.glPixelStorei(GL2.GL_UNPACK_SKIP_PIXELS, skippixels[0]);
+ gl.glPixelStorei(GL2.GL_UNPACK_ALIGNMENT, alignment[0]);
+ }
+}
diff --git a/src/classes/com/sun/opengl/util/glut/rec/BitmapCharRec.java b/src/classes/com/sun/opengl/util/glut/rec/BitmapCharRec.java
new file mode 100644
index 000000000..c040f418f
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/glut/rec/BitmapCharRec.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.glut.rec;
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1998. */
+
+/* This program is freely distributable without licensing fees
+ and is provided without guarantee or warrantee expressed or
+ implied. This program is -not- in the public domain. */
+
+public class BitmapCharRec {
+ public int width;
+ public int height;
+ public float xorig;
+ public float yorig;
+ public float advance;
+ public byte[] bitmap;
+
+ public BitmapCharRec(int width,
+ int height,
+ float xorig,
+ float yorig,
+ float advance,
+ byte[] bitmap) {
+ this.width = width;
+ this.height = height;
+ this.xorig = xorig;
+ this.yorig = yorig;
+ this.advance = advance;
+ this.bitmap = bitmap;
+ }
+}
diff --git a/src/classes/com/sun/opengl/util/glut/rec/BitmapFontRec.java b/src/classes/com/sun/opengl/util/glut/rec/BitmapFontRec.java
new file mode 100644
index 000000000..031ef0625
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/glut/rec/BitmapFontRec.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.glut.rec;
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1998. */
+
+/* This program is freely distributable without licensing fees
+ and is provided without guarantee or warrantee expressed or
+ implied. This program is -not- in the public domain. */
+
+public class BitmapFontRec {
+ public String name;
+ public int num_chars;
+ public int first;
+ public BitmapCharRec[] ch;
+
+ public BitmapFontRec(String name,
+ int num_chars,
+ int first,
+ BitmapCharRec[] ch) {
+ this.name = name;
+ this.num_chars = num_chars;
+ this.first = first;
+ this.ch = ch;
+ }
+}
diff --git a/src/classes/com/sun/opengl/util/glut/rec/CoordRec.java b/src/classes/com/sun/opengl/util/glut/rec/CoordRec.java
new file mode 100644
index 000000000..fdc50c5bc
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/glut/rec/CoordRec.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.glut.rec;
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1998. */
+
+/* This program is freely distributable without licensing fees
+ and is provided without guarantee or warrantee expressed or
+ implied. This program is -not- in the public domain. */
+
+public class CoordRec {
+ public float x;
+ public float y;
+
+ public CoordRec(float x, float y) {
+ this.x = x;
+ this.y = y;
+ }
+}
diff --git a/src/classes/com/sun/opengl/util/glut/rec/StrokeCharRec.java b/src/classes/com/sun/opengl/util/glut/rec/StrokeCharRec.java
new file mode 100644
index 000000000..96870fe96
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/glut/rec/StrokeCharRec.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.glut.rec;
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1998. */
+
+/* This program is freely distributable without licensing fees
+ and is provided without guarantee or warrantee expressed or
+ implied. This program is -not- in the public domain. */
+
+public class StrokeCharRec {
+ public int num_strokes;
+ public StrokeRec[] stroke;
+ public float center;
+ public float right;
+
+ public StrokeCharRec(int num_strokes,
+ StrokeRec[] stroke,
+ float center,
+ float right) {
+ this.num_strokes = num_strokes;
+ this.stroke = stroke;
+ this.center = center;
+ this.right = right;
+ }
+}
diff --git a/src/classes/com/sun/opengl/util/glut/rec/StrokeFontRec.java b/src/classes/com/sun/opengl/util/glut/rec/StrokeFontRec.java
new file mode 100644
index 000000000..4313c5873
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/glut/rec/StrokeFontRec.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.glut.rec;
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1998. */
+
+/* This program is freely distributable without licensing fees
+ and is provided without guarantee or warrantee expressed or
+ implied. This program is -not- in the public domain. */
+
+public class StrokeFontRec {
+ public String name;
+ public int num_chars;
+ public StrokeCharRec[] ch;
+ public float top;
+ public float bottom;
+
+ public StrokeFontRec(String name,
+ int num_chars,
+ StrokeCharRec[] ch,
+ float top,
+ float bottom) {
+ this.name = name;
+ this.num_chars = num_chars;
+ this.ch = ch;
+ this.top = top;
+ this.bottom = bottom;
+ }
+}
diff --git a/src/classes/com/sun/opengl/util/glut/rec/StrokeRec.java b/src/classes/com/sun/opengl/util/glut/rec/StrokeRec.java
new file mode 100644
index 000000000..82ddbab0b
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/glut/rec/StrokeRec.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.glut.rec;
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1998. */
+
+/* This program is freely distributable without licensing fees
+ and is provided without guarantee or warrantee expressed or
+ implied. This program is -not- in the public domain. */
+
+public class StrokeRec {
+ public int num_coords;
+ public CoordRec[] coord;
+
+ public StrokeRec(int num_coords,
+ CoordRec[] coord) {
+ this.num_coords = num_coords;
+ this.coord = coord;
+ }
+}
diff --git a/src/classes/com/sun/opengl/util/io/FileUtil.java b/src/classes/com/sun/opengl/util/io/FileUtil.java
new file mode 100755
index 000000000..65ef0f740
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/io/FileUtil.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.io;
+
+import java.io.*;
+
+/** Utilities for dealing with files. */
+
+public class FileUtil {
+ private FileUtil() {}
+
+ /**
+ * Returns the lowercase suffix of the given file name (the text
+ * after the last '.' in the file name). Returns null if the file
+ * name has no suffix. Only operates on the given file name;
+ * performs no I/O operations.
+ *
+ * @param file name of the file
+ * @return lowercase suffix of the file name
+ * @throws NullPointerException if file is null
+ */
+
+ public static String getFileSuffix(File file) {
+ return getFileSuffix(file.getName());
+ }
+
+ /**
+ * Returns the lowercase suffix of the given file name (the text
+ * after the last '.' in the file name). Returns null if the file
+ * name has no suffix. Only operates on the given file name;
+ * performs no I/O operations.
+ *
+ * @param filename name of the file
+ * @return lowercase suffix of the file name
+ * @throws NullPointerException if filename is null
+ */
+ public static String getFileSuffix(String filename) {
+ int lastDot = filename.lastIndexOf('.');
+ if (lastDot < 0) {
+ return null;
+ }
+ return toLowerCase(filename.substring(lastDot + 1));
+ }
+
+ private static String toLowerCase(String arg) {
+ if (arg == null) {
+ return null;
+ }
+
+ return arg.toLowerCase();
+ }
+}
diff --git a/src/classes/com/sun/opengl/util/io/StreamUtil.java b/src/classes/com/sun/opengl/util/io/StreamUtil.java
new file mode 100755
index 000000000..30cc0234a
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/io/StreamUtil.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.io;
+
+import java.io.*;
+
+/** Utilities for dealing with streams. */
+
+public class StreamUtil {
+ private StreamUtil() {}
+
+ public static byte[] readAll(InputStream in) throws IOException {
+ in = new BufferedInputStream(in);
+ int avail = in.available();
+ byte[] data = new byte[avail];
+ int numRead = 0;
+ int pos = 0;
+ do {
+ if (pos + avail > data.length) {
+ byte[] newData = new byte[pos + avail];
+ System.arraycopy(data, 0, newData, 0, pos);
+ data = newData;
+ }
+ numRead = in.read(data, pos, avail);
+ if (numRead >= 0) {
+ pos += numRead;
+ }
+ avail = in.available();
+ } while (avail > 0 && numRead >= 0);
+ if (pos != data.length) {
+ byte[] newData = new byte[pos];
+ System.arraycopy(data, 0, newData, 0, pos);
+ data = newData;
+ }
+ return data;
+ }
+}
diff --git a/src/classes/com/sun/opengl/util/io/TGAWriter.java b/src/classes/com/sun/opengl/util/io/TGAWriter.java
new file mode 100755
index 000000000..f6ae79049
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/io/TGAWriter.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ */
+
+package com.sun.opengl.util.io;
+
+import java.io.*;
+import java.nio.*;
+import java.nio.channels.*;
+
+/**
+ * Utility class which helps take fast screenshots of OpenGL rendering
+ * results into Targa-format files. Used by the {@link
+ * com.sun.opengl.util.Screenshot Screenshot} class; can also be used
+ * in conjunction with the {@link com.sun.opengl.util.TileRenderer
+ * TileRenderer} class. <P>
+ */
+
+public class TGAWriter {
+ private static final int TARGA_HEADER_SIZE = 18;
+
+ private FileChannel ch;
+ private ByteBuffer buf;
+
+ /** Constructor for the TGAWriter. */
+ public TGAWriter() {
+ }
+
+ /**
+ * Opens the specified Targa file for writing, overwriting any
+ * existing file, and sets up the header of the file expecting the
+ * data to be filled in before closing it.
+ *
+ * @param file the file to write containing the screenshot
+ * @param width the width of the current drawable
+ * @param height the height of the current drawable
+ * @param alpha whether the alpha channel should be saved. If true,
+ * requires GL_EXT_abgr extension to be present.
+ *
+ * @throws IOException if an I/O error occurred while writing the
+ * file
+ */
+ public void open(File file,
+ int width,
+ int height,
+ boolean alpha) throws IOException {
+ RandomAccessFile out = new RandomAccessFile(file, "rw");
+ ch = out.getChannel();
+ int pixelSize = (alpha ? 32 : 24);
+ int numChannels = (alpha ? 4 : 3);
+
+ int fileLength = TARGA_HEADER_SIZE + width * height * numChannels;
+ out.setLength(fileLength);
+ MappedByteBuffer image = ch.map(FileChannel.MapMode.READ_WRITE, 0, fileLength);
+
+ // write the TARGA header
+ image.put(0, (byte) 0).put(1, (byte) 0);
+ image.put(2, (byte) 2); // uncompressed type
+ image.put(12, (byte) (width & 0xFF)); // width
+ image.put(13, (byte) (width >> 8)); // width
+ image.put(14, (byte) (height & 0xFF)); // height
+ image.put(15, (byte) (height >> 8)); // height
+ image.put(16, (byte) pixelSize); // pixel size
+
+ // go to image data position
+ image.position(TARGA_HEADER_SIZE);
+ // jogl needs a sliced buffer
+ buf = image.slice();
+ }
+
+ /**
+ * Returns the ByteBuffer corresponding to the data for the image.
+ * This must be filled in with data in either BGR or BGRA format
+ * depending on whether an alpha channel was specified during
+ * open().
+ */
+ public ByteBuffer getImageData() {
+ return buf;
+ }
+
+ public void close() throws IOException {
+ // close the file channel
+ ch.close();
+ buf = null;
+ }
+}
diff --git a/src/classes/com/sun/opengl/util/j2d/gl2/GL2Overlay.java b/src/classes/com/sun/opengl/util/j2d/gl2/GL2Overlay.java
new file mode 100755
index 000000000..6ba14abe5
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/j2d/gl2/GL2Overlay.java
@@ -0,0 +1,216 @@
+/*
+ * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.j2d.gl2;
+
+import java.awt.Graphics2D;
+
+import javax.media.opengl.*;
+import com.sun.opengl.util.texture.*;
+
+import com.sun.opengl.util.awt.*;
+
+/** Provides a Java 2D overlay on top of an arbitrary GLDrawable,
+ making it easier to do things like draw text and images on top of
+ an OpenGL scene while still maintaining reasonably good
+ efficiency. */
+
+public class GL2Overlay {
+ private GLDrawable drawable;
+ private GL2TextureRenderer renderer;
+ private boolean contentsLost;
+
+ /** Creates a new Java 2D overlay on top of the specified
+ GLDrawable. */
+ public GL2Overlay(GLDrawable drawable) {
+ this.drawable = drawable;
+ }
+
+ /** Creates a {@link java.awt.Graphics2D Graphics2D} instance for
+ rendering into the overlay. The returned object should be
+ disposed of using the normal {@link java.awt.Graphics#dispose()
+ Graphics.dispose()} method once it is no longer being used.
+
+ @return a new {@link java.awt.Graphics2D Graphics2D} object for
+ rendering into the backing store of this renderer
+ */
+ public Graphics2D createGraphics() {
+ // Validate the size of the renderer against the current size of
+ // the drawable
+ validateRenderer();
+ return renderer.createGraphics();
+ }
+
+ /** Indicates whether the Java 2D contents of the overlay were lost
+ since the last time {@link #createGraphics} was called. This
+ method should be called immediately after calling {@link
+ #createGraphics} to see whether the entire contents of the
+ overlay need to be redrawn or just the region the application is
+ interested in updating.
+
+ @return whether the contents of the overlay were lost since the
+ last render
+ */
+ public boolean contentsLost() {
+ return contentsLost;
+ }
+
+ /** Marks the given region of the overlay as dirty. This region, and
+ any previously set dirty regions, will be automatically
+ synchronized with the underlying Texture during the next {@link
+ #draw draw} or {@link #drawAll drawAll} operation, at which
+ point the dirty region will be cleared. It is not necessary for
+ an OpenGL context to be current when this method is called.
+
+ @param x the x coordinate (in Java 2D coordinates -- relative to
+ upper left) of the region to update
+ @param y the y coordinate (in Java 2D coordinates -- relative to
+ upper left) of the region to update
+ @param width the width of the region to update
+ @param height the height of the region to update
+
+ @throws GLException If an OpenGL context is not current when this method is called */
+ public void markDirty(int x, int y, int width, int height) {
+ renderer.markDirty(x, y, width, height);
+ }
+
+ /** Draws the entire contents of the overlay on top of the OpenGL
+ drawable. This is a convenience method which encapsulates all
+ portions of the rendering process; if this method is used,
+ {@link #beginRendering}, {@link #endRendering}, etc. should not
+ be used. This method should be called while the OpenGL context
+ for the drawable is current, and after your OpenGL scene has
+ been rendered.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void drawAll() throws GLException {
+ beginRendering();
+ draw(0, 0, drawable.getWidth(), drawable.getHeight());
+ endRendering();
+ }
+
+ /** Begins the OpenGL rendering process for the overlay. This is
+ separated out so advanced applications can render independent
+ pieces of the overlay to different portions of the drawable.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void beginRendering() throws GLException {
+ renderer.beginOrthoRendering(drawable.getWidth(), drawable.getHeight());
+ }
+
+ /** Ends the OpenGL rendering process for the overlay. This is
+ separated out so advanced applications can render independent
+ pieces of the overlay to different portions of the drawable.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void endRendering() throws GLException {
+ renderer.endOrthoRendering();
+ }
+
+ /** Draws the specified sub-rectangle of the overlay on top of the
+ OpenGL drawable. {@link #beginRendering} and {@link
+ #endRendering} must be used in conjunction with this method to
+ achieve proper rendering results. This method should be called
+ while the OpenGL context for the drawable is current, and after
+ your OpenGL scene has been rendered.
+
+ @param x the lower-left x coordinate (relative to the lower left
+ of the overlay) of the rectangle to draw
+ @param y the lower-left y coordinate (relative to the lower left
+ of the overlay) of the rectangle to draw
+ @param width the width of the rectangle to draw
+ @param height the height of the rectangle to draw
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void draw(int x, int y, int width, int height) throws GLException {
+ draw(x, y, x, y, width, height);
+ }
+
+ /** Draws the specified sub-rectangle of the overlay at the
+ specified x and y coordinate on top of the OpenGL drawable.
+ {@link #beginRendering} and {@link #endRendering} must be used
+ in conjunction with this method to achieve proper rendering
+ results. This method should be called while the OpenGL context
+ for the drawable is current, and after your OpenGL scene has
+ been rendered.
+
+ @param screenx the on-screen x coordinate at which to draw the rectangle
+ @param screeny the on-screen y coordinate (relative to lower left) at
+ which to draw the rectangle
+ @param overlayx the x coordinate of the pixel in the overlay of
+ the lower left portion of the rectangle to draw
+ @param overlayy the y coordinate of the pixel in the overlay
+ (relative to lower left) of the lower left portion of the
+ rectangle to draw
+ @param width the width of the rectangle to draw
+ @param height the height of the rectangle to draw
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void draw(int screenx, int screeny,
+ int overlayx, int overlayy,
+ int width, int height) throws GLException {
+ renderer.drawOrthoRect(screenx, screeny,
+ overlayx, overlayy,
+ width, height);
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ private void validateRenderer() {
+ if (renderer == null) {
+ renderer = new GL2TextureRenderer(drawable.getWidth(),
+ drawable.getHeight(),
+ true);
+ contentsLost = true;
+ } else if (renderer.getWidth() != drawable.getWidth() ||
+ renderer.getHeight() != drawable.getHeight()) {
+ renderer.setSize(drawable.getWidth(), drawable.getHeight());
+ contentsLost = true;
+ } else {
+ contentsLost = false;
+ }
+ }
+}
diff --git a/src/classes/com/sun/opengl/util/j2d/gl2/GL2TextRenderer.java b/src/classes/com/sun/opengl/util/j2d/gl2/GL2TextRenderer.java
new file mode 100755
index 000000000..fa42009f9
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/j2d/gl2/GL2TextRenderer.java
@@ -0,0 +1,1939 @@
+/*
+ * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+package com.sun.opengl.util.j2d.gl2;
+
+import com.sun.opengl.impl.*;
+import com.sun.opengl.impl.packrect.*;
+import com.sun.opengl.util.*;
+import com.sun.opengl.util.io.*;
+import com.sun.opengl.util.texture.*;
+import com.sun.opengl.util.texture.awt.*;
+import com.sun.opengl.util.gl2.*;
+import com.sun.opengl.util.awt.*;
+import com.sun.opengl.util.awt.gl2.*;
+
+import java.awt.AlphaComposite;
+import java.awt.Color;
+import java.awt.Composite;
+
+// For debugging purposes
+import java.awt.EventQueue;
+import java.awt.Font;
+import java.awt.Frame;
+import java.awt.Graphics2D;
+import java.awt.Image;
+import java.awt.Point;
+import java.awt.RenderingHints;
+import java.awt.event.*;
+import java.awt.font.*;
+import java.awt.geom.*;
+
+import java.nio.*;
+
+import java.text.*;
+
+import java.util.*;
+
+import javax.media.opengl.*;
+import javax.media.opengl.glu.*;
+import javax.media.opengl.glu.gl2.*;
+import javax.media.opengl.awt.*;
+import javax.media.opengl.util.*;
+
+
+/** Renders bitmapped Java 2D text into an OpenGL window with high
+ performance, full Unicode support, and a simple API. Performs
+ appropriate caching of text rendering results in an OpenGL texture
+ internally to avoid repeated font rasterization. The caching is
+ completely automatic, does not require any user intervention, and
+ has no visible controls in the public API. <P>
+
+ Using the {@link TextRenderer TextRenderer} is simple. Add a
+ "<code>TextRenderer renderer;</code>" field to your {@link
+ javax.media.opengl.GLEventListener GLEventListener}. In your {@link
+ javax.media.opengl.GLEventListener#init init} method, add:
+
+ <PRE>
+ renderer = new TextRenderer(new Font("SansSerif", Font.BOLD, 36));
+ </PRE>
+
+ <P> In the {@link javax.media.opengl.GLEventListener#display display} method of your
+ {@link javax.media.opengl.GLEventListener GLEventListener}, add:
+ <PRE>
+ renderer.beginRendering(drawable.getWidth(), drawable.getHeight());
+ // optionally set the color
+ renderer.setColor(1.0f, 0.2f, 0.2f, 0.8f);
+ renderer.draw("Text to draw", xPosition, yPosition);
+ // ... more draw commands, color changes, etc.
+ renderer.endRendering();
+ </PRE>
+
+ Unless you are sharing textures and display lists between OpenGL
+ contexts, you do not need to call the {@link #dispose dispose}
+ method of the TextRenderer; the OpenGL resources it uses
+ internally will be cleaned up automatically when the OpenGL
+ context is destroyed. <P>
+
+ <b>Note</b> that the TextRenderer may cause the vertex and texture
+ coordinate array buffer bindings to change, or to be unbound. This
+ is important to note if you are using Vertex Buffer Objects (VBOs)
+ in your application. <P>
+
+ Internally, the renderer uses a rectangle packing algorithm to
+ pack both glyphs and full Strings' rendering results (which are
+ variable size) onto a larger OpenGL texture. The internal backing
+ store is maintained using a {@link
+ com.sun.opengl.util.j2d.TextureRenderer TextureRenderer}. A least
+ recently used (LRU) algorithm is used to discard previously
+ rendered strings; the specific algorithm is undefined, but is
+ currently implemented by flushing unused Strings' rendering
+ results every few hundred rendering cycles, where a rendering
+ cycle is defined as a pair of calls to {@link #beginRendering
+ beginRendering} / {@link #endRendering endRendering}.
+
+ @author John Burkey
+ @author Kenneth Russell
+*/
+public class GL2TextRenderer {
+ private static final boolean DEBUG = Debug.debug("TextRenderer");
+
+ // These are occasionally useful for more in-depth debugging
+ private static final boolean DISABLE_GLYPH_CACHE = false;
+ private static final boolean DRAW_BBOXES = false;
+
+ static final int kSize = 256;
+
+ // Every certain number of render cycles, flush the strings which
+ // haven't been used recently
+ private static final int CYCLES_PER_FLUSH = 100;
+
+ // The amount of vertical dead space on the backing store before we
+ // force a compaction
+ private static final float MAX_VERTICAL_FRAGMENTATION = 0.7f;
+ static final int kQuadsPerBuffer = 100;
+ static final int kCoordsPerVertVerts = 3;
+ static final int kCoordsPerVertTex = 2;
+ static final int kVertsPerQuad = 4;
+ static final int kTotalBufferSizeVerts = kQuadsPerBuffer * kVertsPerQuad;
+ static final int kTotalBufferSizeCoordsVerts = kQuadsPerBuffer * kVertsPerQuad * kCoordsPerVertVerts;
+ static final int kTotalBufferSizeCoordsTex = kQuadsPerBuffer * kVertsPerQuad * kCoordsPerVertTex;
+ static final int kTotalBufferSizeBytesVerts = kTotalBufferSizeCoordsVerts * 4;
+ static final int kTotalBufferSizeBytesTex = kTotalBufferSizeCoordsTex * 4;
+ static final int kSizeInBytes_OneVertices_VertexData = kCoordsPerVertVerts * 4;
+ static final int kSizeInBytes_OneVertices_TexData = kCoordsPerVertTex * 4;
+ private Font font;
+ private boolean antialiased;
+ private boolean useFractionalMetrics;
+
+ // Whether we're attempting to use automatic mipmap generation support
+ private boolean mipmap;
+ private RectanglePacker packer;
+ private boolean haveMaxSize;
+ private RenderDelegate renderDelegate;
+ private GL2TextureRenderer cachedBackingStore;
+ private Graphics2D cachedGraphics;
+ private FontRenderContext cachedFontRenderContext;
+ private Map /*<String,Rect>*/ stringLocations = new HashMap /*<String,Rect>*/();
+ private GlyphProducer mGlyphProducer;
+
+ private int numRenderCycles;
+
+ // Need to keep track of whether we're in a beginRendering() /
+ // endRendering() cycle so we can re-enter the exact same state if
+ // we have to reallocate the backing store
+ private boolean inBeginEndPair;
+ private boolean isOrthoMode;
+ private int beginRenderingWidth;
+ private int beginRenderingHeight;
+ private boolean beginRenderingDepthTestDisabled;
+
+ // For resetting the color after disposal of the old backing store
+ private boolean haveCachedColor;
+ private float cachedR;
+ private float cachedG;
+ private float cachedB;
+ private float cachedA;
+ private Color cachedColor;
+ private boolean needToResetColor;
+
+ // For debugging only
+ private Frame dbgFrame;
+
+ // Debugging purposes only
+ private boolean debugged;
+ Pipelined_QuadRenderer mPipelinedQuadRenderer;
+
+ //emzic: added boolean flag
+ private boolean useVertexArrays = true;
+
+ //emzic: added boolean flag
+ private boolean isExtensionAvailable_GL_VERSION_1_5;
+ private boolean checkFor_isExtensionAvailable_GL_VERSION_1_5;
+
+ // Whether GL_LINEAR filtering is enabled for the backing store
+ private boolean smoothing = true;
+
+ /** Creates a new TextRenderer with the given font, using no
+ antialiasing or fractional metrics, and the default
+ RenderDelegate. Equivalent to <code>TextRenderer(font, false,
+ false)</code>.
+
+ @param font the font to render with
+ */
+ public GL2TextRenderer(Font font) {
+ this(font, false, false, null, false);
+ }
+
+ /** Creates a new TextRenderer with the given font, using no
+ antialiasing or fractional metrics, and the default
+ RenderDelegate. If <CODE>mipmap</CODE> is true, attempts to use
+ OpenGL's automatic mipmap generation for better smoothing when
+ rendering the TextureRenderer's contents at a distance.
+ Equivalent to <code>TextRenderer(font, false, false)</code>.
+
+ @param font the font to render with
+ @param mipmap whether to attempt use of automatic mipmap generation
+ */
+ public GL2TextRenderer(Font font, boolean mipmap) {
+ this(font, false, false, null, mipmap);
+ }
+
+ /** Creates a new TextRenderer with the given Font, specified font
+ properties, and default RenderDelegate. The
+ <code>antialiased</code> and <code>useFractionalMetrics</code>
+ flags provide control over the same properties at the Java 2D
+ level. No mipmap support is requested. Equivalent to
+ <code>TextRenderer(font, antialiased, useFractionalMetrics,
+ null)</code>.
+
+ @param font the font to render with
+ @param antialiased whether to use antialiased fonts
+ @param useFractionalMetrics whether to use fractional font
+ metrics at the Java 2D level
+ */
+ public GL2TextRenderer(Font font, boolean antialiased,
+ boolean useFractionalMetrics) {
+ this(font, antialiased, useFractionalMetrics, null, false);
+ }
+
+ /** Creates a new TextRenderer with the given Font, specified font
+ properties, and given RenderDelegate. The
+ <code>antialiased</code> and <code>useFractionalMetrics</code>
+ flags provide control over the same properties at the Java 2D
+ level. The <code>renderDelegate</code> provides more control
+ over the text rendered. No mipmap support is requested.
+
+ @param font the font to render with
+ @param antialiased whether to use antialiased fonts
+ @param useFractionalMetrics whether to use fractional font
+ metrics at the Java 2D level
+ @param renderDelegate the render delegate to use to draw the
+ text's bitmap, or null to use the default one
+ */
+ public GL2TextRenderer(Font font, boolean antialiased,
+ boolean useFractionalMetrics, RenderDelegate renderDelegate) {
+ this(font, antialiased, useFractionalMetrics, renderDelegate, false);
+ }
+
+ /** Creates a new TextRenderer with the given Font, specified font
+ properties, and given RenderDelegate. The
+ <code>antialiased</code> and <code>useFractionalMetrics</code>
+ flags provide control over the same properties at the Java 2D
+ level. The <code>renderDelegate</code> provides more control
+ over the text rendered. If <CODE>mipmap</CODE> is true, attempts
+ to use OpenGL's automatic mipmap generation for better smoothing
+ when rendering the TextureRenderer's contents at a distance.
+
+ @param font the font to render with
+ @param antialiased whether to use antialiased fonts
+ @param useFractionalMetrics whether to use fractional font
+ metrics at the Java 2D level
+ @param renderDelegate the render delegate to use to draw the
+ text's bitmap, or null to use the default one
+ @param mipmap whether to attempt use of automatic mipmap generation
+ */
+ public GL2TextRenderer(Font font, boolean antialiased,
+ boolean useFractionalMetrics, RenderDelegate renderDelegate,
+ boolean mipmap) {
+ this.font = font;
+ this.antialiased = antialiased;
+ this.useFractionalMetrics = useFractionalMetrics;
+ this.mipmap = mipmap;
+
+ // FIXME: consider adjusting the size based on font size
+ // (it will already automatically resize if necessary)
+ packer = new RectanglePacker(new Manager(), kSize, kSize);
+
+ if (renderDelegate == null) {
+ renderDelegate = new DefaultRenderDelegate();
+ }
+
+ this.renderDelegate = renderDelegate;
+
+ mGlyphProducer = new GlyphProducer(font.getNumGlyphs());
+ }
+
+ /** Returns the bounding rectangle of the given String, assuming it
+ was rendered at the origin. See {@link #getBounds(CharSequence)
+ getBounds(CharSequence)}. */
+ public Rectangle2D getBounds(String str) {
+ return getBounds((CharSequence) str);
+ }
+
+ /** Returns the bounding rectangle of the given CharSequence,
+ assuming it was rendered at the origin. The coordinate system of
+ the returned rectangle is Java 2D's, with increasing Y
+ coordinates in the downward direction. The relative coordinate
+ (0, 0) in the returned rectangle corresponds to the baseline of
+ the leftmost character of the rendered string, in similar
+ fashion to the results returned by, for example, {@link
+ java.awt.font.GlyphVector#getVisualBounds}. Most applications
+ will use only the width and height of the returned Rectangle for
+ the purposes of centering or justifying the String. It is not
+ specified which Java 2D bounds ({@link
+ java.awt.font.GlyphVector#getVisualBounds getVisualBounds},
+ {@link java.awt.font.GlyphVector#getPixelBounds getPixelBounds},
+ etc.) the returned bounds correspond to, although every effort
+ is made to ensure an accurate bound. */
+ public Rectangle2D getBounds(CharSequence str) {
+ // FIXME: this should be more optimized and use the glyph cache
+ Rect r = null;
+
+ if ((r = (Rect) stringLocations.get(str)) != null) {
+ TextData data = (TextData) r.getUserData();
+
+ // Reconstitute the Java 2D results based on the cached values
+ return new Rectangle2D.Double(-data.origin().x, -data.origin().y,
+ r.w(), r.h());
+ }
+
+ // Must return a Rectangle compatible with the layout algorithm --
+ // must be idempotent
+ return normalize(renderDelegate.getBounds(str, font,
+ getFontRenderContext()));
+ }
+
+ /** Returns the Font this renderer is using. */
+ public Font getFont() {
+ return font;
+ }
+
+ /** Returns a FontRenderContext which can be used for external
+ text-related size computations. This object should be considered
+ transient and may become invalidated between {@link
+ #beginRendering beginRendering} / {@link #endRendering
+ endRendering} pairs. */
+ public FontRenderContext getFontRenderContext() {
+ if (cachedFontRenderContext == null) {
+ cachedFontRenderContext = getGraphics2D().getFontRenderContext();
+ }
+
+ return cachedFontRenderContext;
+ }
+
+ /** Begins rendering with this {@link TextRenderer TextRenderer}
+ into the current OpenGL drawable, pushing the projection and
+ modelview matrices and some state bits and setting up a
+ two-dimensional orthographic projection with (0, 0) as the
+ lower-left coordinate and (width, height) as the upper-right
+ coordinate. Binds and enables the internal OpenGL texture
+ object, sets the texture environment mode to GL_MODULATE, and
+ changes the current color to the last color set with this
+ TextRenderer via {@link #setColor setColor}. This method
+ disables the depth test and is equivalent to
+ beginRendering(width, height, true).
+
+ @param width the width of the current on-screen OpenGL drawable
+ @param height the height of the current on-screen OpenGL drawable
+ @throws javax.media.opengl.GLException If an OpenGL context is not current when this method is called
+ */
+ public void beginRendering(int width, int height) throws GLException {
+ beginRendering(width, height, true);
+ }
+
+ /** Begins rendering with this {@link TextRenderer TextRenderer}
+ into the current OpenGL drawable, pushing the projection and
+ modelview matrices and some state bits and setting up a
+ two-dimensional orthographic projection with (0, 0) as the
+ lower-left coordinate and (width, height) as the upper-right
+ coordinate. Binds and enables the internal OpenGL texture
+ object, sets the texture environment mode to GL_MODULATE, and
+ changes the current color to the last color set with this
+ TextRenderer via {@link #setColor setColor}. Disables the depth
+ test if the disableDepthTest argument is true.
+
+ @param width the width of the current on-screen OpenGL drawable
+ @param height the height of the current on-screen OpenGL drawable
+ @param disableDepthTest whether to disable the depth test
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void beginRendering(int width, int height, boolean disableDepthTest)
+ throws GLException {
+ beginRendering(true, width, height, disableDepthTest);
+ }
+
+ /** Begins rendering of 2D text in 3D with this {@link TextRenderer
+ TextRenderer} into the current OpenGL drawable. Assumes the end
+ user is responsible for setting up the modelview and projection
+ matrices, and will render text using the {@link #draw3D draw3D}
+ method. This method pushes some OpenGL state bits, binds and
+ enables the internal OpenGL texture object, sets the texture
+ environment mode to GL_MODULATE, and changes the current color
+ to the last color set with this TextRenderer via {@link
+ #setColor setColor}.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void begin3DRendering() throws GLException {
+ beginRendering(false, 0, 0, false);
+ }
+
+ /** Changes the current color of this TextRenderer to the supplied
+ one. The default color is opaque white.
+
+ @param color the new color to use for rendering text
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void setColor(Color color) throws GLException {
+ boolean noNeedForFlush = (haveCachedColor && (cachedColor != null) &&
+ color.equals(cachedColor));
+
+ if (!noNeedForFlush) {
+ flushGlyphPipeline();
+ }
+
+ getBackingStore().setColor(color);
+ haveCachedColor = true;
+ cachedColor = color;
+ }
+
+ /** Changes the current color of this TextRenderer to the supplied
+ one, where each component ranges from 0.0f - 1.0f. The alpha
+ component, if used, does not need to be premultiplied into the
+ color channels as described in the documentation for {@link
+ com.sun.opengl.util.texture.Texture Texture}, although
+ premultiplied colors are used internally. The default color is
+ opaque white.
+
+ @param r the red component of the new color
+ @param g the green component of the new color
+ @param b the blue component of the new color
+ @param a the alpha component of the new color, 0.0f = completely
+ transparent, 1.0f = completely opaque
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void setColor(float r, float g, float b, float a)
+ throws GLException {
+ boolean noNeedForFlush = (haveCachedColor && (cachedColor == null) &&
+ (r == cachedR) && (g == cachedG) && (b == cachedB) &&
+ (a == cachedA));
+
+ if (!noNeedForFlush) {
+ flushGlyphPipeline();
+ }
+
+ getBackingStore().setColor(r, g, b, a);
+ haveCachedColor = true;
+ cachedR = r;
+ cachedG = g;
+ cachedB = b;
+ cachedA = a;
+ cachedColor = null;
+ }
+
+ /** Draws the supplied CharSequence at the desired location using
+ the renderer's current color. The baseline of the leftmost
+ character is at position (x, y) specified in OpenGL coordinates,
+ where the origin is at the lower-left of the drawable and the Y
+ coordinate increases in the upward direction.
+
+ @param str the string to draw
+ @param x the x coordinate at which to draw
+ @param y the y coordinate at which to draw
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void draw(CharSequence str, int x, int y) throws GLException {
+ draw3D(str, x, y, 0, 1);
+ }
+
+ /** Draws the supplied String at the desired location using the
+ renderer's current color. See {@link #draw(CharSequence, int,
+ int) draw(CharSequence, int, int)}. */
+ public void draw(String str, int x, int y) throws GLException {
+ draw3D(str, x, y, 0, 1);
+ }
+
+ /** Draws the supplied CharSequence at the desired 3D location using
+ the renderer's current color. The baseline of the leftmost
+ character is placed at position (x, y, z) in the current
+ coordinate system.
+
+ @param str the string to draw
+ @param x the x coordinate at which to draw
+ @param y the y coordinate at which to draw
+ @param z the z coordinate at which to draw
+ @param scaleFactor a uniform scale factor applied to the width and height of the drawn rectangle
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void draw3D(CharSequence str, float x, float y, float z,
+ float scaleFactor) {
+ internal_draw3D(str, x, y, z, scaleFactor);
+ }
+
+ /** Draws the supplied String at the desired 3D location using the
+ renderer's current color. See {@link #draw3D(CharSequence,
+ float, float, float, float) draw3D(CharSequence, float, float,
+ float, float)}. */
+ public void draw3D(String str, float x, float y, float z, float scaleFactor) {
+ internal_draw3D(str, x, y, z, scaleFactor);
+ }
+
+ /** Returns the pixel width of the given character. */
+ public float getCharWidth(char inChar) {
+ return mGlyphProducer.getGlyphPixelWidth(inChar);
+ }
+
+ /** Causes the TextRenderer to flush any internal caches it may be
+ maintaining and draw its rendering results to the screen. This
+ should be called after each call to draw() if you are setting
+ OpenGL state such as the modelview matrix between calls to
+ draw(). */
+ public void flush() {
+ flushGlyphPipeline();
+ }
+
+ /** Ends a render cycle with this {@link TextRenderer TextRenderer}.
+ Restores the projection and modelview matrices as well as
+ several OpenGL state bits. Should be paired with {@link
+ #beginRendering beginRendering}.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void endRendering() throws GLException {
+ endRendering(true);
+ }
+
+ /** Ends a 3D render cycle with this {@link TextRenderer TextRenderer}.
+ Restores several OpenGL state bits. Should be paired with {@link
+ #begin3DRendering begin3DRendering}.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void end3DRendering() throws GLException {
+ endRendering(false);
+ }
+
+ /** Disposes of all resources this TextRenderer is using. It is not
+ valid to use the TextRenderer after this method is called.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void dispose() throws GLException {
+ packer.dispose();
+ packer = null;
+ cachedBackingStore = null;
+ cachedGraphics = null;
+ cachedFontRenderContext = null;
+
+ if (dbgFrame != null) {
+ dbgFrame.dispose();
+ }
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ private static Rectangle2D preNormalize(Rectangle2D src) {
+ // Need to round to integer coordinates
+ // Also give ourselves a little slop around the reported
+ // bounds of glyphs because it looks like neither the visual
+ // nor the pixel bounds works perfectly well
+ int minX = (int) Math.floor(src.getMinX()) - 1;
+ int minY = (int) Math.floor(src.getMinY()) - 1;
+ int maxX = (int) Math.ceil(src.getMaxX()) + 1;
+ int maxY = (int) Math.ceil(src.getMaxY()) + 1;
+ return new Rectangle2D.Double(minX, minY, maxX - minX, maxY - minY);
+ }
+
+
+ private Rectangle2D normalize(Rectangle2D src) {
+ // Give ourselves a boundary around each entity on the backing
+ // store in order to prevent bleeding of nearby Strings due to
+ // the fact that we use linear filtering
+
+ // NOTE that this boundary is quite heuristic and is related
+ // to how far away in 3D we may view the text --
+ // heuristically, 1.5% of the font's height
+ int boundary = (int) Math.max(1, 0.015 * font.getSize());
+
+ return new Rectangle2D.Double((int) Math.floor(src.getMinX() - boundary),
+ (int) Math.floor(src.getMinY() - boundary),
+ (int) Math.ceil(src.getWidth() + 2 * boundary),
+ (int) Math.ceil(src.getHeight()) + 2 * boundary);
+ }
+
+ private GL2TextureRenderer getBackingStore() {
+ GL2TextureRenderer renderer = (GL2TextureRenderer) packer.getBackingStore();
+
+ if (renderer != cachedBackingStore) {
+ // Backing store changed since last time; discard any cached Graphics2D
+ if (cachedGraphics != null) {
+ cachedGraphics.dispose();
+ cachedGraphics = null;
+ cachedFontRenderContext = null;
+ }
+
+ cachedBackingStore = renderer;
+ }
+
+ return cachedBackingStore;
+ }
+
+ private Graphics2D getGraphics2D() {
+ GL2TextureRenderer renderer = getBackingStore();
+
+ if (cachedGraphics == null) {
+ cachedGraphics = renderer.createGraphics();
+
+ // Set up composite, font and rendering hints
+ cachedGraphics.setComposite(AlphaComposite.Src);
+ cachedGraphics.setColor(Color.WHITE);
+ cachedGraphics.setFont(font);
+ cachedGraphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
+ (antialiased ? RenderingHints.VALUE_TEXT_ANTIALIAS_ON
+ : RenderingHints.VALUE_TEXT_ANTIALIAS_OFF));
+ cachedGraphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
+ (useFractionalMetrics
+ ? RenderingHints.VALUE_FRACTIONALMETRICS_ON
+ : RenderingHints.VALUE_FRACTIONALMETRICS_OFF));
+ }
+
+ return cachedGraphics;
+ }
+
+ private void beginRendering(boolean ortho, int width, int height,
+ boolean disableDepthTestForOrtho) {
+ if (DEBUG && !debugged) {
+ debug();
+ }
+
+ inBeginEndPair = true;
+ isOrthoMode = ortho;
+ beginRenderingWidth = width;
+ beginRenderingHeight = height;
+ beginRenderingDepthTestDisabled = disableDepthTestForOrtho;
+
+ if (ortho) {
+ getBackingStore().beginOrthoRendering(width, height,
+ disableDepthTestForOrtho);
+ } else {
+ getBackingStore().begin3DRendering();
+ }
+
+ GL2 gl = GLUgl2.getCurrentGL2();
+
+ // Push client attrib bits used by the pipelined quad renderer
+ gl.glPushClientAttrib((int) GL2.GL_ALL_CLIENT_ATTRIB_BITS);
+
+ if (!haveMaxSize) {
+ // Query OpenGL for the maximum texture size and set it in the
+ // RectanglePacker to keep it from expanding too large
+ int[] sz = new int[1];
+ gl.glGetIntegerv(GL2.GL_MAX_TEXTURE_SIZE, sz, 0);
+ packer.setMaxSize(sz[0], sz[0]);
+ haveMaxSize = true;
+ }
+
+ if (needToResetColor && haveCachedColor) {
+ if (cachedColor == null) {
+ getBackingStore().setColor(cachedR, cachedG, cachedB, cachedA);
+ } else {
+ getBackingStore().setColor(cachedColor);
+ }
+
+ needToResetColor = false;
+ }
+
+ // Disable future attempts to use mipmapping if TextureRenderer
+ // doesn't support it
+ if (mipmap && !getBackingStore().isUsingAutoMipmapGeneration()) {
+ if (DEBUG) {
+ System.err.println("Disabled mipmapping in TextRenderer");
+ }
+
+ mipmap = false;
+ }
+ }
+
+ /**
+ * emzic: here the call to glBindBuffer crashes on certain graphicscard/driver combinations
+ * this is why the ugly try-catch block has been added, which falls back to the old textrenderer
+ *
+ * @param ortho
+ * @throws GLException
+ */
+ private void endRendering(boolean ortho) throws GLException {
+ flushGlyphPipeline();
+
+ inBeginEndPair = false;
+
+ GL2 gl = GLUgl2.getCurrentGL2();
+
+ // Pop client attrib bits used by the pipelined quad renderer
+ gl.glPopClientAttrib();
+
+ // The OpenGL spec is unclear about whether this changes the
+ // buffer bindings, so preemptively zero out the GL_ARRAY_BUFFER
+ // binding
+ if (is15Available(gl)) {
+ try {
+ gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0);
+ } catch (Exception e) {
+ isExtensionAvailable_GL_VERSION_1_5 = false;
+ }
+ }
+
+ if (ortho) {
+ getBackingStore().endOrthoRendering();
+ } else {
+ getBackingStore().end3DRendering();
+ }
+
+ if (++numRenderCycles >= CYCLES_PER_FLUSH) {
+ numRenderCycles = 0;
+
+ if (DEBUG) {
+ System.err.println("Clearing unused entries in endRendering()");
+ }
+
+ clearUnusedEntries();
+ }
+ }
+
+ private void clearUnusedEntries() {
+ final java.util.List deadRects = new ArrayList /*<Rect>*/();
+
+ // Iterate through the contents of the backing store, removing
+ // text strings that haven't been used recently
+ packer.visit(new RectVisitor() {
+ public void visit(Rect rect) {
+ TextData data = (TextData) rect.getUserData();
+
+ if (data.used()) {
+ data.clearUsed();
+ } else {
+ deadRects.add(rect);
+ }
+ }
+ });
+
+ for (Iterator iter = deadRects.iterator(); iter.hasNext();) {
+ Rect r = (Rect) iter.next();
+ packer.remove(r);
+ stringLocations.remove(((TextData) r.getUserData()).string());
+
+ int unicodeToClearFromCache = ((TextData) r.getUserData()).unicodeID;
+
+ if (unicodeToClearFromCache > 0) {
+ mGlyphProducer.clearCacheEntry(unicodeToClearFromCache);
+ }
+
+ // if (DEBUG) {
+ // Graphics2D g = getGraphics2D();
+ // g.setComposite(AlphaComposite.Clear);
+ // g.fillRect(r.x(), r.y(), r.w(), r.h());
+ // g.setComposite(AlphaComposite.Src);
+ // }
+ }
+
+ // If we removed dead rectangles this cycle, try to do a compaction
+ float frag = packer.verticalFragmentationRatio();
+
+ if (!deadRects.isEmpty() && (frag > MAX_VERTICAL_FRAGMENTATION)) {
+ if (DEBUG) {
+ System.err.println(
+ "Compacting TextRenderer backing store due to vertical fragmentation " +
+ frag);
+ }
+
+ packer.compact();
+ }
+
+ if (DEBUG) {
+ getBackingStore().markDirty(0, 0, getBackingStore().getWidth(),
+ getBackingStore().getHeight());
+ }
+ }
+
+ private void internal_draw3D(CharSequence str, float x, float y, float z,
+ float scaleFactor) {
+ List/*<Glyph>*/ glyphs = mGlyphProducer.getGlyphs(str);
+ for (Iterator iter = glyphs.iterator(); iter.hasNext(); ) {
+ Glyph glyph = (Glyph) iter.next();
+ float advance = glyph.draw3D(x, y, z, scaleFactor);
+ x += advance * scaleFactor;
+ }
+ }
+
+ private void flushGlyphPipeline() {
+ if (mPipelinedQuadRenderer != null) {
+ mPipelinedQuadRenderer.draw();
+ }
+ }
+
+ private void draw3D_ROBUST(CharSequence str, float x, float y, float z,
+ float scaleFactor) {
+ String curStr;
+ if (str instanceof String) {
+ curStr = (String) str;
+ } else {
+ curStr = str.toString();
+ }
+
+ // Look up the string on the backing store
+ Rect rect = (Rect) stringLocations.get(curStr);
+
+ if (rect == null) {
+ // Rasterize this string and place it on the backing store
+ Graphics2D g = getGraphics2D();
+ Rectangle2D origBBox = preNormalize(renderDelegate.getBounds(curStr, font, getFontRenderContext()));
+ Rectangle2D bbox = normalize(origBBox);
+ Point origin = new Point((int) -bbox.getMinX(),
+ (int) -bbox.getMinY());
+ rect = new Rect(0, 0, (int) bbox.getWidth(),
+ (int) bbox.getHeight(),
+ new TextData(curStr, origin, origBBox, -1));
+
+ packer.add(rect);
+ stringLocations.put(curStr, rect);
+
+ // Re-fetch the Graphics2D in case the addition of the rectangle
+ // caused the old backing store to be thrown away
+ g = getGraphics2D();
+
+ // OK, should now have an (x, y) for this rectangle; rasterize
+ // the String
+ int strx = rect.x() + origin.x;
+ int stry = rect.y() + origin.y;
+
+ // Clear out the area we're going to draw into
+ g.setComposite(AlphaComposite.Clear);
+ g.fillRect(rect.x(), rect.y(), rect.w(), rect.h());
+ g.setComposite(AlphaComposite.Src);
+
+ // Draw the string
+ renderDelegate.draw(g, curStr, strx, stry);
+
+ if (DRAW_BBOXES) {
+ TextData data = (TextData) rect.getUserData();
+ // Draw a bounding box on the backing store
+ g.drawRect(strx - data.origOriginX(),
+ stry - data.origOriginY(),
+ (int) data.origRect().getWidth(),
+ (int) data.origRect().getHeight());
+ g.drawRect(strx - data.origin().x,
+ stry - data.origin().y,
+ rect.w(),
+ rect.h());
+ }
+
+ // Mark this region of the TextureRenderer as dirty
+ getBackingStore().markDirty(rect.x(), rect.y(), rect.w(),
+ rect.h());
+ }
+
+ // OK, now draw the portion of the backing store to the screen
+ GL2TextureRenderer renderer = getBackingStore();
+
+ // NOTE that the rectangles managed by the packer have their
+ // origin at the upper-left but the TextureRenderer's origin is
+ // at its lower left!!!
+ TextData data = (TextData) rect.getUserData();
+ data.markUsed();
+
+ Rectangle2D origRect = data.origRect();
+
+ // Align the leftmost point of the baseline to the (x, y, z) coordinate requested
+ renderer.draw3DRect(x - (scaleFactor * data.origOriginX()),
+ y - (scaleFactor * ((float) origRect.getHeight() - data.origOriginY())), z,
+ rect.x() + (data.origin().x - data.origOriginX()),
+ renderer.getHeight() - rect.y() - (int) origRect.getHeight() -
+ (data.origin().y - data.origOriginY()),
+ (int) origRect.getWidth(), (int) origRect.getHeight(), scaleFactor);
+ }
+
+ //----------------------------------------------------------------------
+ // Debugging functionality
+ //
+ private void debug() {
+ dbgFrame = new Frame("TextRenderer Debug Output");
+
+ GLCanvas dbgCanvas = new GLCanvas(new GLCapabilities(), null,
+ GLContext.getCurrent(), null);
+ dbgCanvas.addGLEventListener(new DebugListener(dbgFrame));
+ dbgFrame.add(dbgCanvas);
+
+ final FPSAnimator anim = new FPSAnimator(dbgCanvas, 10);
+ dbgFrame.addWindowListener(new WindowAdapter() {
+ public void windowClosing(WindowEvent e) {
+ // Run this on another thread than the AWT event queue to
+ // make sure the call to Animator.stop() completes before
+ // exiting
+ new Thread(new Runnable() {
+ public void run() {
+ anim.stop();
+ }
+ }).start();
+ }
+ });
+ dbgFrame.setSize(kSize, kSize);
+ dbgFrame.setVisible(true);
+ anim.start();
+ debugged = true;
+ }
+
+ /** Class supporting more full control over the process of rendering
+ the bitmapped text. Allows customization of whether the backing
+ store text bitmap is full-color or intensity only, the size of
+ each individual rendered text rectangle, and the contents of
+ each individual rendered text string. The default implementation
+ of this interface uses an intensity-only texture, a
+ closely-cropped rectangle around the text, and renders text
+ using the color white, which is modulated by the set color
+ during the rendering process. */
+ public static interface RenderDelegate {
+ /** Indicates whether the backing store of this TextRenderer
+ should be intensity-only (the default) or full-color. */
+ public boolean intensityOnly();
+
+ /** Computes the bounds of the given String relative to the
+ origin. */
+ public Rectangle2D getBounds(String str, Font font,
+ FontRenderContext frc);
+
+ /** Computes the bounds of the given character sequence relative
+ to the origin. */
+ public Rectangle2D getBounds(CharSequence str, Font font,
+ FontRenderContext frc);
+
+ /** Computes the bounds of the given GlyphVector, already
+ assumed to have been created for a particular Font,
+ relative to the origin. */
+ public Rectangle2D getBounds(GlyphVector gv, FontRenderContext frc);
+
+ /** Render the passed character sequence at the designated
+ location using the supplied Graphics2D instance. The
+ surrounding region will already have been cleared to the RGB
+ color (0, 0, 0) with zero alpha. The initial drawing context
+ of the passed Graphics2D will be set to use
+ AlphaComposite.Src, the color white, the Font specified in the
+ TextRenderer's constructor, and the rendering hints specified
+ in the TextRenderer constructor. Changes made by the end user
+ may be visible in successive calls to this method, but are not
+ guaranteed to be preserved. Implementors of this method
+ should reset the Graphics2D's state to that desired each time
+ this method is called, in particular those states which are
+ not the defaults. */
+ public void draw(Graphics2D graphics, String str, int x, int y);
+
+ /** Render the passed GlyphVector at the designated location using
+ the supplied Graphics2D instance. The surrounding region will
+ already have been cleared to the RGB color (0, 0, 0) with zero
+ alpha. The initial drawing context of the passed Graphics2D
+ will be set to use AlphaComposite.Src, the color white, the
+ Font specified in the TextRenderer's constructor, and the
+ rendering hints specified in the TextRenderer constructor.
+ Changes made by the end user may be visible in successive
+ calls to this method, but are not guaranteed to be preserved.
+ Implementors of this method should reset the Graphics2D's
+ state to that desired each time this method is called, in
+ particular those states which are not the defaults. */
+ public void drawGlyphVector(Graphics2D graphics, GlyphVector str,
+ int x, int y);
+ }
+
+ private static class CharSequenceIterator implements CharacterIterator {
+ CharSequence mSequence;
+ int mLength;
+ int mCurrentIndex;
+
+ CharSequenceIterator() {
+ }
+
+ CharSequenceIterator(CharSequence sequence) {
+ initFromCharSequence(sequence);
+ }
+
+ public void initFromCharSequence(CharSequence sequence) {
+ mSequence = sequence;
+ mLength = mSequence.length();
+ mCurrentIndex = 0;
+ }
+
+ public char last() {
+ mCurrentIndex = Math.max(0, mLength - 1);
+
+ return current();
+ }
+
+ public char current() {
+ if ((mLength == 0) || (mCurrentIndex >= mLength)) {
+ return CharacterIterator.DONE;
+ }
+
+ return mSequence.charAt(mCurrentIndex);
+ }
+
+ public char next() {
+ mCurrentIndex++;
+
+ return current();
+ }
+
+ public char previous() {
+ mCurrentIndex = Math.max(mCurrentIndex - 1, 0);
+
+ return current();
+ }
+
+ public char setIndex(int position) {
+ mCurrentIndex = position;
+
+ return current();
+ }
+
+ public int getBeginIndex() {
+ return 0;
+ }
+
+ public int getEndIndex() {
+ return mLength;
+ }
+
+ public int getIndex() {
+ return mCurrentIndex;
+ }
+
+ public Object clone() {
+ CharSequenceIterator iter = new CharSequenceIterator(mSequence);
+ iter.mCurrentIndex = mCurrentIndex;
+
+ return iter;
+ }
+
+ public char first() {
+ if (mLength == 0) {
+ return CharacterIterator.DONE;
+ }
+
+ mCurrentIndex = 0;
+
+ return current();
+ }
+ }
+
+ // Data associated with each rectangle of text
+ static class TextData {
+ // Back-pointer to String this TextData describes, if it
+ // represents a String rather than a single glyph
+ private String str;
+
+ // If this TextData represents a single glyph, this is its
+ // unicode ID
+ int unicodeID;
+
+ // The following must be defined and used VERY precisely. This is
+ // the offset from the upper-left corner of this rectangle (Java
+ // 2D coordinate system) at which the string must be rasterized in
+ // order to fit within the rectangle -- the leftmost point of the
+ // baseline.
+ private Point origin;
+
+ // This represents the pre-normalized rectangle, which fits
+ // within the rectangle on the backing store. We keep a
+ // one-pixel border around entries on the backing store to
+ // prevent bleeding of adjacent letters when using GL_LINEAR
+ // filtering for rendering. The origin of this rectangle is
+ // equivalent to the origin above.
+ private Rectangle2D origRect;
+
+ private boolean used; // Whether this text was used recently
+
+ TextData(String str, Point origin, Rectangle2D origRect, int unicodeID) {
+ this.str = str;
+ this.origin = origin;
+ this.origRect = origRect;
+ this.unicodeID = unicodeID;
+ }
+
+ String string() {
+ return str;
+ }
+
+ Point origin() {
+ return origin;
+ }
+
+ // The following three methods are used to locate the glyph
+ // within the expanded rectangle coming from normalize()
+ int origOriginX() {
+ return (int) -origRect.getMinX();
+ }
+
+ int origOriginY() {
+ return (int) -origRect.getMinY();
+ }
+
+ Rectangle2D origRect() {
+ return origRect;
+ }
+
+ boolean used() {
+ return used;
+ }
+
+ void markUsed() {
+ used = true;
+ }
+
+ void clearUsed() {
+ used = false;
+ }
+ }
+
+ class Manager implements BackingStoreManager {
+ private Graphics2D g;
+
+ public Object allocateBackingStore(int w, int h) {
+ // FIXME: should consider checking Font's attributes to see
+ // whether we're likely to need to support a full RGBA backing
+ // store (i.e., non-default Paint, foreground color, etc.), but
+ // for now, let's just be more efficient
+ GL2TextureRenderer renderer;
+
+ if (renderDelegate.intensityOnly()) {
+ renderer = GL2TextureRenderer.createAlphaOnlyRenderer(w, h, mipmap);
+ } else {
+ renderer = new GL2TextureRenderer(w, h, true, mipmap);
+ }
+ renderer.setSmoothing(smoothing);
+
+ if (DEBUG) {
+ System.err.println(" TextRenderer allocating backing store " +
+ w + " x " + h);
+ }
+
+ return renderer;
+ }
+
+ public void deleteBackingStore(Object backingStore) {
+ ((GL2TextureRenderer) backingStore).dispose();
+ }
+
+ public boolean preExpand(Rect cause, int attemptNumber) {
+ // Only try this one time; clear out potentially obsolete entries
+ // NOTE: this heuristic and the fact that it clears the used bit
+ // of all entries seems to cause cycling of entries in some
+ // situations, where the backing store becomes small compared to
+ // the amount of text on the screen (see the TextFlow demo) and
+ // the entries continually cycle in and out of the backing
+ // store, decreasing performance. If we added a little age
+ // information to the entries, and only cleared out entries
+ // above a certain age, this behavior would be eliminated.
+ // However, it seems the system usually stabilizes itself, so
+ // for now we'll just keep things simple. Note that if we don't
+ // clear the used bit here, the backing store tends to increase
+ // very quickly to its maximum size, at least with the TextFlow
+ // demo when the text is being continually re-laid out.
+ if (attemptNumber == 0) {
+ if (DEBUG) {
+ System.err.println(
+ "Clearing unused entries in preExpand(): attempt number " +
+ attemptNumber);
+ }
+
+ if (inBeginEndPair) {
+ // Draw any outstanding glyphs
+ flush();
+ }
+
+ clearUnusedEntries();
+
+ return true;
+ }
+
+ return false;
+ }
+
+ public void additionFailed(Rect cause, int attemptNumber) {
+ // Heavy hammer -- might consider doing something different
+ packer.clear();
+ stringLocations.clear();
+ mGlyphProducer.clearAllCacheEntries();
+
+ if (DEBUG) {
+ System.err.println(
+ " *** Cleared all text because addition failed ***");
+ }
+ }
+
+ public void beginMovement(Object oldBackingStore, Object newBackingStore) {
+ // Exit the begin / end pair if necessary
+ if (inBeginEndPair) {
+ // Draw any outstanding glyphs
+ flush();
+
+ GL2 gl = GLUgl2.getCurrentGL2();
+
+ // Pop client attrib bits used by the pipelined quad renderer
+ gl.glPopClientAttrib();
+
+ // The OpenGL spec is unclear about whether this changes the
+ // buffer bindings, so preemptively zero out the GL_ARRAY_BUFFER
+ // binding
+ if (is15Available(gl)) {
+ try {
+ gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0);
+ } catch (Exception e) {
+ isExtensionAvailable_GL_VERSION_1_5 = false;
+ }
+ }
+
+ if (isOrthoMode) {
+ ((GL2TextureRenderer) oldBackingStore).endOrthoRendering();
+ } else {
+ ((GL2TextureRenderer) oldBackingStore).end3DRendering();
+ }
+ }
+
+ GL2TextureRenderer newRenderer = (GL2TextureRenderer) newBackingStore;
+ g = newRenderer.createGraphics();
+ }
+
+ public void move(Object oldBackingStore, Rect oldLocation,
+ Object newBackingStore, Rect newLocation) {
+ GL2TextureRenderer oldRenderer = (GL2TextureRenderer) oldBackingStore;
+ GL2TextureRenderer newRenderer = (GL2TextureRenderer) newBackingStore;
+
+ if (oldRenderer == newRenderer) {
+ // Movement on the same backing store -- easy case
+ g.copyArea(oldLocation.x(), oldLocation.y(), oldLocation.w(),
+ oldLocation.h(), newLocation.x() - oldLocation.x(),
+ newLocation.y() - oldLocation.y());
+ } else {
+ // Need to draw from the old renderer's image into the new one
+ Image img = oldRenderer.getImage();
+ g.drawImage(img, newLocation.x(), newLocation.y(),
+ newLocation.x() + newLocation.w(),
+ newLocation.y() + newLocation.h(), oldLocation.x(),
+ oldLocation.y(), oldLocation.x() + oldLocation.w(),
+ oldLocation.y() + oldLocation.h(), null);
+ }
+ }
+
+ public void endMovement(Object oldBackingStore, Object newBackingStore) {
+ g.dispose();
+
+ // Sync the whole surface
+ GL2TextureRenderer newRenderer = (GL2TextureRenderer) newBackingStore;
+ newRenderer.markDirty(0, 0, newRenderer.getWidth(),
+ newRenderer.getHeight());
+
+ // Re-enter the begin / end pair if necessary
+ if (inBeginEndPair) {
+ if (isOrthoMode) {
+ ((GL2TextureRenderer) newBackingStore).beginOrthoRendering(beginRenderingWidth,
+ beginRenderingHeight, beginRenderingDepthTestDisabled);
+ } else {
+ ((GL2TextureRenderer) newBackingStore).begin3DRendering();
+ }
+
+ // Push client attrib bits used by the pipelined quad renderer
+ GL2 gl = GLUgl2.getCurrentGL2();
+ gl.glPushClientAttrib((int) GL2.GL_ALL_CLIENT_ATTRIB_BITS);
+
+ if (haveCachedColor) {
+ if (cachedColor == null) {
+ ((GL2TextureRenderer) newBackingStore).setColor(cachedR,
+ cachedG, cachedB, cachedA);
+ } else {
+ ((GL2TextureRenderer) newBackingStore).setColor(cachedColor);
+ }
+ }
+ } else {
+ needToResetColor = true;
+ }
+ }
+ }
+
+ public static class DefaultRenderDelegate implements RenderDelegate {
+ public boolean intensityOnly() {
+ return true;
+ }
+
+ public Rectangle2D getBounds(CharSequence str, Font font,
+ FontRenderContext frc) {
+ return getBounds(font.createGlyphVector(frc,
+ new CharSequenceIterator(str)),
+ frc);
+ }
+
+ public Rectangle2D getBounds(String str, Font font,
+ FontRenderContext frc) {
+ return getBounds(font.createGlyphVector(frc, str), frc);
+ }
+
+ public Rectangle2D getBounds(GlyphVector gv, FontRenderContext frc) {
+ return gv.getVisualBounds();
+ }
+
+ public void drawGlyphVector(Graphics2D graphics, GlyphVector str,
+ int x, int y) {
+ graphics.drawGlyphVector(str, x, y);
+ }
+
+ public void draw(Graphics2D graphics, String str, int x, int y) {
+ graphics.drawString(str, x, y);
+ }
+ }
+
+ //----------------------------------------------------------------------
+ // Glyph-by-glyph rendering support
+ //
+
+ // A temporary to prevent excessive garbage creation
+ private char[] singleUnicode = new char[1];
+
+ /** A Glyph represents either a single unicode glyph or a
+ substring of characters to be drawn. The reason for the dual
+ behavior is so that we can take in a sequence of unicode
+ characters and partition them into runs of individual glyphs,
+ but if we encounter complex text and/or unicode sequences we
+ don't understand, we can render them using the
+ string-by-string method. <P>
+
+ Glyphs need to be able to re-upload themselves to the backing
+ store on demand as we go along in the render sequence.
+ */
+
+ class Glyph {
+ // If this Glyph represents an individual unicode glyph, this
+ // is its unicode ID. If it represents a String, this is -1.
+ private int unicodeID;
+ // If the above field isn't -1, then these fields are used.
+ // The glyph code in the font
+ private int glyphCode;
+ // The GlyphProducer which created us
+ private GlyphProducer producer;
+ // The advance of this glyph
+ private float advance;
+ // The GlyphVector for this single character; this is passed
+ // in during construction but cleared during the upload
+ // process
+ private GlyphVector singleUnicodeGlyphVector;
+ // The rectangle of this glyph on the backing store, or null
+ // if it has been cleared due to space pressure
+ private Rect glyphRectForTextureMapping;
+ // If this Glyph represents a String, this is the sequence of
+ // characters
+ private String str;
+ // Whether we need a valid advance when rendering this string
+ // (i.e., whether it has other single glyphs coming after it)
+ private boolean needAdvance;
+
+ // Creates a Glyph representing an individual Unicode character
+ public Glyph(int unicodeID,
+ int glyphCode,
+ float advance,
+ GlyphVector singleUnicodeGlyphVector,
+ GlyphProducer producer) {
+ this.unicodeID = unicodeID;
+ this.glyphCode = glyphCode;
+ this.advance = advance;
+ this.singleUnicodeGlyphVector = singleUnicodeGlyphVector;
+ this.producer = producer;
+ }
+
+ // Creates a Glyph representing a sequence of characters, with
+ // an indication of whether additional single glyphs are being
+ // rendered after it
+ public Glyph(String str, boolean needAdvance) {
+ this.str = str;
+ this.needAdvance = needAdvance;
+ }
+
+ /** Returns this glyph's unicode ID */
+ public int getUnicodeID() {
+ return unicodeID;
+ }
+
+ /** Returns this glyph's (font-specific) glyph code */
+ public int getGlyphCode() {
+ return glyphCode;
+ }
+
+ /** Returns the advance for this glyph */
+ public float getAdvance() {
+ return advance;
+ }
+
+ /** Draws this glyph and returns the (x) advance for this glyph */
+ public float draw3D(float inX, float inY, float z, float scaleFactor) {
+ if (str != null) {
+ draw3D_ROBUST(str, inX, inY, z, scaleFactor);
+ if (!needAdvance) {
+ return 0;
+ }
+ // Compute and return the advance for this string
+ GlyphVector gv = font.createGlyphVector(getFontRenderContext(), str);
+ float totalAdvance = 0;
+ for (int i = 0; i < gv.getNumGlyphs(); i++) {
+ totalAdvance += gv.getGlyphMetrics(i).getAdvance();
+ }
+ return totalAdvance;
+ }
+
+ // This is the code path taken for individual glyphs
+ if (glyphRectForTextureMapping == null) {
+ upload();
+ }
+
+ try {
+ if (mPipelinedQuadRenderer == null) {
+ mPipelinedQuadRenderer = new Pipelined_QuadRenderer();
+ }
+
+ GL2TextureRenderer renderer = getBackingStore();
+ // Handles case where NPOT texture is used for backing store
+ TextureCoords wholeImageTexCoords = renderer.getTexture().getImageTexCoords();
+ float xScale = wholeImageTexCoords.right();
+ float yScale = wholeImageTexCoords.bottom();
+
+ Rect rect = glyphRectForTextureMapping;
+ TextData data = (TextData) rect.getUserData();
+ data.markUsed();
+
+ Rectangle2D origRect = data.origRect();
+
+ float x = inX - (scaleFactor * data.origOriginX());
+ float y = inY - (scaleFactor * ((float) origRect.getHeight() - data.origOriginY()));
+
+ int texturex = rect.x() + (data.origin().x - data.origOriginX());
+ int texturey = renderer.getHeight() - rect.y() - (int) origRect.getHeight() -
+ (data.origin().y - data.origOriginY());
+ int width = (int) origRect.getWidth();
+ int height = (int) origRect.getHeight();
+
+ float tx1 = xScale * (float) texturex / (float) renderer.getWidth();
+ float ty1 = yScale * (1.0f -
+ ((float) texturey / (float) renderer.getHeight()));
+ float tx2 = xScale * (float) (texturex + width) / (float) renderer.getWidth();
+ float ty2 = yScale * (1.0f -
+ ((float) (texturey + height) / (float) renderer.getHeight()));
+
+ mPipelinedQuadRenderer.glTexCoord2f(tx1, ty1);
+ mPipelinedQuadRenderer.glVertex3f(x, y, z);
+ mPipelinedQuadRenderer.glTexCoord2f(tx2, ty1);
+ mPipelinedQuadRenderer.glVertex3f(x + (width * scaleFactor), y,
+ z);
+ mPipelinedQuadRenderer.glTexCoord2f(tx2, ty2);
+ mPipelinedQuadRenderer.glVertex3f(x + (width * scaleFactor),
+ y + (height * scaleFactor), z);
+ mPipelinedQuadRenderer.glTexCoord2f(tx1, ty2);
+ mPipelinedQuadRenderer.glVertex3f(x,
+ y + (height * scaleFactor), z);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return advance;
+ }
+
+ /** Notifies this glyph that it's been cleared out of the cache */
+ public void clear() {
+ glyphRectForTextureMapping = null;
+ }
+
+ private void upload() {
+ GlyphVector gv = getGlyphVector();
+ Rectangle2D origBBox = preNormalize(renderDelegate.getBounds(gv, getFontRenderContext()));
+ Rectangle2D bbox = normalize(origBBox);
+ Point origin = new Point((int) -bbox.getMinX(),
+ (int) -bbox.getMinY());
+ Rect rect = new Rect(0, 0, (int) bbox.getWidth(),
+ (int) bbox.getHeight(),
+ new TextData(null, origin, origBBox, unicodeID));
+ packer.add(rect);
+ glyphRectForTextureMapping = rect;
+ Graphics2D g = getGraphics2D();
+ // OK, should now have an (x, y) for this rectangle; rasterize
+ // the glyph
+ int strx = rect.x() + origin.x;
+ int stry = rect.y() + origin.y;
+
+ // Clear out the area we're going to draw into
+ g.setComposite(AlphaComposite.Clear);
+ g.fillRect(rect.x(), rect.y(), rect.w(), rect.h());
+ g.setComposite(AlphaComposite.Src);
+
+ // Draw the string
+ renderDelegate.drawGlyphVector(g, gv, strx, stry);
+
+ if (DRAW_BBOXES) {
+ TextData data = (TextData) rect.getUserData();
+ // Draw a bounding box on the backing store
+ g.drawRect(strx - data.origOriginX(),
+ stry - data.origOriginY(),
+ (int) data.origRect().getWidth(),
+ (int) data.origRect().getHeight());
+ g.drawRect(strx - data.origin().x,
+ stry - data.origin().y,
+ rect.w(),
+ rect.h());
+ }
+
+ // Mark this region of the TextureRenderer as dirty
+ getBackingStore().markDirty(rect.x(), rect.y(), rect.w(),
+ rect.h());
+ // Re-register ourselves with our producer
+ producer.register(this);
+ }
+
+ private GlyphVector getGlyphVector() {
+ GlyphVector gv = singleUnicodeGlyphVector;
+ if (gv != null) {
+ singleUnicodeGlyphVector = null; // Don't need this anymore
+ return gv;
+ }
+ singleUnicode[0] = (char) unicodeID;
+ return font.createGlyphVector(getFontRenderContext(), singleUnicode);
+ }
+ }
+
+ class GlyphProducer {
+ final int undefined = -2;
+ FontRenderContext fontRenderContext;
+ List/*<Glyph>*/ glyphsOutput = new ArrayList/*<Glyph>*/();
+ // The mapping from unicode character to font-specific glyph ID
+ int[] unicodes2Glyphs;
+ // The mapping from glyph ID to Glyph
+ Glyph[] glyphCache;
+ // We re-use this for each incoming string
+ CharSequenceIterator iter = new CharSequenceIterator();
+
+ GlyphProducer(int fontLengthInGlyphs) {
+ unicodes2Glyphs = new int[512];
+ glyphCache = new Glyph[fontLengthInGlyphs];
+ clearAllCacheEntries();
+ }
+
+ public List/*<Glyph>*/ getGlyphs(CharSequence inString) {
+ glyphsOutput.clear();
+ iter.initFromCharSequence(inString);
+ GlyphVector fullRunGlyphVector = font.createGlyphVector(getFontRenderContext(),
+ iter);
+ boolean complex = (fullRunGlyphVector.getLayoutFlags() != 0);
+ if (complex || DISABLE_GLYPH_CACHE) {
+ // Punt to the robust version of the renderer
+ glyphsOutput.add(new Glyph(inString.toString(), false));
+ return glyphsOutput;
+ }
+
+ int lengthInGlyphs = fullRunGlyphVector.getNumGlyphs();
+ int i = 0;
+ while (i < lengthInGlyphs) {
+ Glyph glyph = getGlyph(inString, fullRunGlyphVector, i);
+ if (glyph != null) {
+ glyphsOutput.add(glyph);
+ i++;
+ } else {
+ // Assemble a run of characters that don't fit in
+ // the cache
+ StringBuffer buf = new StringBuffer();
+ while (i < lengthInGlyphs &&
+ getGlyph(inString, fullRunGlyphVector, i) == null) {
+ buf.append(inString.charAt(i++));
+ }
+ glyphsOutput.add(new Glyph(buf.toString(),
+ // Any more glyphs after this run?
+ i < lengthInGlyphs));
+ }
+ }
+ return glyphsOutput;
+ }
+
+ public void clearCacheEntry(int unicodeID) {
+ int glyphID = unicodes2Glyphs[unicodeID];
+ if (glyphID != undefined) {
+ Glyph glyph = glyphCache[glyphID];
+ if (glyph != null) {
+ glyph.clear();
+ }
+ glyphCache[glyphID] = null;
+ }
+ unicodes2Glyphs[unicodeID] = undefined;
+ }
+
+ public void clearAllCacheEntries() {
+ for (int i = 0; i < unicodes2Glyphs.length; i++) {
+ clearCacheEntry(i);
+ }
+ }
+
+ public void register(Glyph glyph) {
+ unicodes2Glyphs[glyph.getUnicodeID()] = glyph.getGlyphCode();
+ glyphCache[glyph.getGlyphCode()] = glyph;
+ }
+
+ public float getGlyphPixelWidth(char unicodeID) {
+ Glyph glyph = getGlyph(unicodeID);
+ if (glyph != null) {
+ return glyph.getAdvance();
+ }
+
+ // Have to do this the hard / uncached way
+ singleUnicode[0] = unicodeID;
+ GlyphVector gv = font.createGlyphVector(fontRenderContext,
+ singleUnicode);
+ return gv.getGlyphMetrics(0).getAdvance();
+ }
+
+ // Returns a glyph object for this single glyph. Returns null
+ // if the unicode or glyph ID would be out of bounds of the
+ // glyph cache.
+ private Glyph getGlyph(CharSequence inString,
+ GlyphVector fullRunGlyphVector,
+ int index) {
+ char unicodeID = inString.charAt(index);
+
+ if (unicodeID >= unicodes2Glyphs.length) {
+ return null;
+ }
+
+ int glyphID = unicodes2Glyphs[unicodeID];
+ if (glyphID != undefined) {
+ return glyphCache[glyphID];
+ }
+
+ // Must fabricate the glyph
+ singleUnicode[0] = unicodeID;
+ GlyphVector gv = font.createGlyphVector(getFontRenderContext(), singleUnicode);
+ return getGlyph(unicodeID, gv, fullRunGlyphVector.getGlyphMetrics(index));
+ }
+
+ // It's unclear whether this variant might produce less
+ // optimal results than if we can see the entire GlyphVector
+ // for the incoming string
+ private Glyph getGlyph(int unicodeID) {
+ if (unicodeID >= unicodes2Glyphs.length) {
+ return null;
+ }
+
+ int glyphID = unicodes2Glyphs[unicodeID];
+ if (glyphID != undefined) {
+ return glyphCache[glyphID];
+ }
+ singleUnicode[0] = (char) unicodeID;
+ GlyphVector gv = font.createGlyphVector(getFontRenderContext(), singleUnicode);
+ return getGlyph(unicodeID, gv, gv.getGlyphMetrics(0));
+ }
+
+ private Glyph getGlyph(int unicodeID,
+ GlyphVector singleUnicodeGlyphVector,
+ GlyphMetrics metrics) {
+ int glyphCode = singleUnicodeGlyphVector.getGlyphCode(0);
+ // Have seen huge glyph codes (65536) coming out of some fonts in some Unicode situations
+ if (glyphCode >= glyphCache.length) {
+ return null;
+ }
+ Glyph glyph = new Glyph(unicodeID,
+ glyphCode,
+ metrics.getAdvance(),
+ singleUnicodeGlyphVector,
+ this);
+ register(glyph);
+ return glyph;
+ }
+ }
+
+ class Pipelined_QuadRenderer {
+ int mOutstandingGlyphsVerticesPipeline = 0;
+ FloatBuffer mTexCoords;
+ FloatBuffer mVertCoords;
+ boolean usingVBOs;
+ int mVBO_For_ResuableTileVertices;
+ int mVBO_For_ResuableTileTexCoords;
+
+ Pipelined_QuadRenderer() {
+ GL2 gl = GLUgl2.getCurrentGL2();
+ mVertCoords = BufferUtil.newFloatBuffer(kTotalBufferSizeCoordsVerts);
+ mTexCoords = BufferUtil.newFloatBuffer(kTotalBufferSizeCoordsTex);
+
+ usingVBOs = is15Available(gl);
+
+ if (usingVBOs) {
+ try {
+ int[] vbos = new int[2];
+ gl.glGenBuffers(2, IntBuffer.wrap(vbos));
+
+ mVBO_For_ResuableTileVertices = vbos[0];
+ mVBO_For_ResuableTileTexCoords = vbos[1];
+
+ gl.glBindBuffer(GL2.GL_ARRAY_BUFFER,
+ mVBO_For_ResuableTileVertices);
+ gl.glBufferData(GL2.GL_ARRAY_BUFFER, kTotalBufferSizeBytesVerts,
+ null, GL2.GL_STREAM_DRAW); // stream draw because this is a single quad use pipeline
+
+ gl.glBindBuffer(GL2.GL_ARRAY_BUFFER,
+ mVBO_For_ResuableTileTexCoords);
+ gl.glBufferData(GL2.GL_ARRAY_BUFFER, kTotalBufferSizeBytesTex,
+ null, GL2.GL_STREAM_DRAW); // stream draw because this is a single quad use pipeline
+ } catch (Exception e) {
+ isExtensionAvailable_GL_VERSION_1_5 = false;
+ usingVBOs = false;
+ }
+ }
+ }
+
+ public void glTexCoord2f(float v, float v1) {
+ mTexCoords.put(v);
+ mTexCoords.put(v1);
+ }
+
+ public void glVertex3f(float inX, float inY, float inZ) {
+ mVertCoords.put(inX);
+ mVertCoords.put(inY);
+ mVertCoords.put(inZ);
+
+ mOutstandingGlyphsVerticesPipeline++;
+
+ if (mOutstandingGlyphsVerticesPipeline >= kTotalBufferSizeVerts) {
+ this.draw();
+ }
+ }
+
+ private void draw() {
+ if (useVertexArrays) {
+ drawVertexArrays();
+ } else {
+ drawIMMEDIATE();
+ }
+ }
+
+ private void drawVertexArrays() {
+ if (mOutstandingGlyphsVerticesPipeline > 0) {
+ GL2 gl = GLUgl2.getCurrentGL2();
+
+ GL2TextureRenderer renderer = getBackingStore();
+ Texture texture = renderer.getTexture(); // triggers texture uploads. Maybe this should be more obvious?
+
+ mVertCoords.rewind();
+ mTexCoords.rewind();
+
+ gl.glEnableClientState(GL2.GL_VERTEX_ARRAY);
+
+ if (usingVBOs) {
+ gl.glBindBuffer(GL2.GL_ARRAY_BUFFER,
+ mVBO_For_ResuableTileVertices);
+ gl.glBufferSubData(GL2.GL_ARRAY_BUFFER, 0,
+ mOutstandingGlyphsVerticesPipeline * kSizeInBytes_OneVertices_VertexData,
+ mVertCoords); // upload only the new stuff
+ gl.glVertexPointer(3, GL2.GL_FLOAT, 0, 0);
+ } else {
+ gl.glVertexPointer(3, GL2.GL_FLOAT, 0, mVertCoords);
+ }
+
+ gl.glEnableClientState(GL2.GL_TEXTURE_COORD_ARRAY);
+
+ if (usingVBOs) {
+ gl.glBindBuffer(GL2.GL_ARRAY_BUFFER,
+ mVBO_For_ResuableTileTexCoords);
+ gl.glBufferSubData(GL2.GL_ARRAY_BUFFER, 0,
+ mOutstandingGlyphsVerticesPipeline * kSizeInBytes_OneVertices_TexData,
+ mTexCoords); // upload only the new stuff
+ gl.glTexCoordPointer(2, GL2.GL_FLOAT, 0, 0);
+ } else {
+ gl.glTexCoordPointer(2, GL2.GL_FLOAT, 0, mTexCoords);
+ }
+
+ gl.glDrawArrays(GL2.GL_QUADS, 0,
+ mOutstandingGlyphsVerticesPipeline);
+
+ mVertCoords.rewind();
+ mTexCoords.rewind();
+ mOutstandingGlyphsVerticesPipeline = 0;
+ }
+ }
+
+ private void drawIMMEDIATE() {
+ if (mOutstandingGlyphsVerticesPipeline > 0) {
+ GL2TextureRenderer renderer = getBackingStore();
+ Texture texture = renderer.getTexture(); // triggers texture uploads. Maybe this should be more obvious?
+
+ GL2 gl = GLUgl2.getCurrentGL2();
+ gl.glBegin(GL2.GL_QUADS);
+
+ try {
+ int numberOfQuads = mOutstandingGlyphsVerticesPipeline / 4;
+ mVertCoords.rewind();
+ mTexCoords.rewind();
+
+ for (int i = 0; i < numberOfQuads; i++) {
+ gl.glTexCoord2f(mTexCoords.get(), mTexCoords.get());
+ gl.glVertex3f(mVertCoords.get(), mVertCoords.get(),
+ mVertCoords.get());
+
+ gl.glTexCoord2f(mTexCoords.get(), mTexCoords.get());
+ gl.glVertex3f(mVertCoords.get(), mVertCoords.get(),
+ mVertCoords.get());
+
+ gl.glTexCoord2f(mTexCoords.get(), mTexCoords.get());
+ gl.glVertex3f(mVertCoords.get(), mVertCoords.get(),
+ mVertCoords.get());
+
+ gl.glTexCoord2f(mTexCoords.get(), mTexCoords.get());
+ gl.glVertex3f(mVertCoords.get(), mVertCoords.get(),
+ mVertCoords.get());
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ gl.glEnd();
+ mVertCoords.rewind();
+ mTexCoords.rewind();
+ mOutstandingGlyphsVerticesPipeline = 0;
+ }
+ }
+ }
+ }
+
+ class DebugListener implements GLEventListener {
+ private GLU glu = GLU.createGLU();
+ private Frame frame;
+
+ DebugListener(Frame frame) {
+ this.frame = frame;
+ }
+
+ public void display(GLAutoDrawable drawable) {
+ GL2 gl = GLUgl2.getCurrentGL2();
+ gl.glClear(GL2.GL_DEPTH_BUFFER_BIT | GL2.GL_COLOR_BUFFER_BIT);
+
+ if (packer == null) {
+ return;
+ }
+
+ GL2TextureRenderer rend = getBackingStore();
+ final int w = rend.getWidth();
+ final int h = rend.getHeight();
+ rend.beginOrthoRendering(w, h);
+ rend.drawOrthoRect(0, 0);
+ rend.endOrthoRendering();
+
+ if ((frame.getWidth() != w) || (frame.getHeight() != h)) {
+ EventQueue.invokeLater(new Runnable() {
+ public void run() {
+ frame.setSize(w, h);
+ }
+ });
+ }
+ }
+
+ // Unused methods
+ public void init(GLAutoDrawable drawable) {
+ }
+
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width,
+ int height) {
+ }
+
+ public void displayChanged(GLAutoDrawable drawable,
+ boolean modeChanged, boolean deviceChanged) {
+ }
+ }
+
+ /**
+ * Sets whether vertex arrays are being used internally for
+ * rendering, or whether text is rendered using the OpenGL
+ * immediate mode commands. This is provided as a concession for
+ * certain graphics cards which have poor vertex array
+ * performance. Defaults to true.
+ */
+ public void setUseVertexArrays(boolean useVertexArrays) {
+ this.useVertexArrays = useVertexArrays;
+ }
+
+ /**
+ * Indicates whether vertex arrays are being used internally for
+ * rendering, or whether text is rendered using the OpenGL
+ * immediate mode commands. Defaults to true.
+ */
+ public boolean getUseVertexArrays() {
+ return useVertexArrays;
+ }
+
+ /**
+ * Sets whether smoothing (i.e., GL_LINEAR filtering) is enabled
+ * in the backing TextureRenderer of this TextRenderer. A few
+ * graphics cards do not behave well when this is enabled,
+ * resulting in fuzzy text. Defaults to true.
+ */
+ public void setSmoothing(boolean smoothing) {
+ this.smoothing = smoothing;
+ getBackingStore().setSmoothing(smoothing);
+ }
+
+ /**
+ * Indicates whether smoothing is enabled in the backing
+ * TextureRenderer of this TextRenderer. A few graphics cards do
+ * not behave well when this is enabled, resulting in fuzzy text.
+ * Defaults to true.
+ */
+ public boolean getSmoothing() {
+ return smoothing;
+ }
+
+ private boolean is15Available(GL gl) {
+ if (!checkFor_isExtensionAvailable_GL_VERSION_1_5) {
+ isExtensionAvailable_GL_VERSION_1_5 = gl.isExtensionAvailable("GL_VERSION_1_5");
+ checkFor_isExtensionAvailable_GL_VERSION_1_5 = true;
+ }
+ return isExtensionAvailable_GL_VERSION_1_5;
+ }
+}
diff --git a/src/classes/com/sun/opengl/util/j2d/gl2/GL2TextureRenderer.java b/src/classes/com/sun/opengl/util/j2d/gl2/GL2TextureRenderer.java
new file mode 100755
index 000000000..50877194a
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/j2d/gl2/GL2TextureRenderer.java
@@ -0,0 +1,701 @@
+/*
+ * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.j2d.gl2;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.Image;
+import java.awt.Rectangle;
+import java.awt.image.*;
+
+import javax.media.opengl.*;
+import javax.media.opengl.glu.*;
+import javax.media.opengl.glu.gl2.*;
+import com.sun.opengl.util.texture.*;
+import com.sun.opengl.util.texture.spi.*;
+import com.sun.opengl.util.texture.awt.*;
+import com.sun.opengl.util.gl2.*;
+import com.sun.opengl.util.awt.*;
+import com.sun.opengl.util.awt.gl2.*;
+
+/** Provides the ability to render into an OpenGL {@link
+ com.sun.opengl.util.texture.Texture Texture} using the Java 2D
+ APIs. This renderer class uses an internal Java 2D image (of
+ unspecified type) for its backing store and flushes portions of
+ that image to an OpenGL texture on demand. The resulting OpenGL
+ texture can then be mapped on to a polygon for display. */
+
+public class GL2TextureRenderer {
+ // For now, we supply only a BufferedImage back-end for this
+ // renderer. In theory we could use the Java 2D/JOGL bridge to fully
+ // accelerate the rendering paths, but there are restrictions on
+ // what work can be done where; for example, Graphics2D-related work
+ // must not be done on the Queue Flusher Thread, but JOGL's
+ // OpenGL-related work must be. This implies that the user's code
+ // would need to be split up into multiple callbacks run from the
+ // appropriate threads, which would be somewhat unfortunate.
+
+ // Whether we have an alpha channel in the (RGB/A) backing store
+ private boolean alpha;
+
+ // Whether we're using only a GL_INTENSITY backing store
+ private boolean intensity;
+
+ // Whether we're attempting to use automatic mipmap generation support
+ private boolean mipmap;
+
+ // Whether smoothing is enabled for the OpenGL texture (switching
+ // between GL_LINEAR and GL_NEAREST filtering)
+ private boolean smoothing = true;
+ private boolean smoothingChanged;
+
+ // The backing store itself
+ private BufferedImage image;
+
+ private Texture texture;
+ private AWTTextureData textureData;
+ private boolean mustReallocateTexture;
+ private Rectangle dirtyRegion;
+
+ private GLUgl2 glu = new GLUgl2();
+
+ // Current color
+ private float r = 1.0f;
+ private float g = 1.0f;
+ private float b = 1.0f;
+ private float a = 1.0f;
+
+ /** Creates a new renderer with backing store of the specified width
+ and height. If <CODE>alpha</CODE> is true, allocates an alpha
+ channel in the backing store image. No mipmap support is
+ requested.
+
+ @param width the width of the texture to render into
+ @param height the height of the texture to render into
+ @param alpha whether to allocate an alpha channel for the texture
+ */
+ public GL2TextureRenderer(int width, int height, boolean alpha) {
+ this(width, height, alpha, false);
+ }
+
+ /** Creates a new renderer with backing store of the specified width
+ and height. If <CODE>alpha</CODE> is true, allocates an alpha channel in the
+ backing store image. If <CODE>mipmap</CODE> is true, attempts to use OpenGL's
+ automatic mipmap generation for better smoothing when rendering
+ the TextureRenderer's contents at a distance.
+
+ @param width the width of the texture to render into
+ @param height the height of the texture to render into
+ @param alpha whether to allocate an alpha channel for the texture
+ @param mipmap whether to attempt use of automatic mipmap generation
+ */
+ public GL2TextureRenderer(int width, int height, boolean alpha, boolean mipmap) {
+ this(width, height, alpha, false, mipmap);
+ }
+
+ // Internal constructor to avoid confusion since alpha only makes
+ // sense when intensity is not set
+ private GL2TextureRenderer(int width, int height, boolean alpha, boolean intensity, boolean mipmap) {
+ this.alpha = alpha;
+ this.intensity = intensity;
+ this.mipmap = mipmap;
+ init(width, height);
+ }
+
+ /** Creates a new renderer with a special kind of backing store
+ which acts only as an alpha channel. No mipmap support is
+ requested. Internally, this associates a GL_INTENSITY OpenGL
+ texture with the backing store. */
+ public static GL2TextureRenderer createAlphaOnlyRenderer(int width, int height) {
+ return createAlphaOnlyRenderer(width, height, false);
+ }
+
+ /** Creates a new renderer with a special kind of backing store
+ which acts only as an alpha channel. If <CODE>mipmap</CODE> is
+ true, attempts to use OpenGL's automatic mipmap generation for
+ better smoothing when rendering the TextureRenderer's contents
+ at a distance. Internally, this associates a GL_INTENSITY OpenGL
+ texture with the backing store. */
+ public static GL2TextureRenderer createAlphaOnlyRenderer(int width, int height, boolean mipmap) {
+ return new GL2TextureRenderer(width, height, false, true, mipmap);
+ }
+
+ /** Returns the width of the backing store of this renderer.
+
+ @return the width of the backing store of this renderer
+ */
+ public int getWidth() {
+ return image.getWidth();
+ }
+
+ /** Returns the height of the backing store of this renderer.
+
+ @return the height of the backing store of this renderer
+ */
+ public int getHeight() {
+ return image.getHeight();
+ }
+
+ /** Returns the size of the backing store of this renderer in a
+ newly-allocated {@link java.awt.Dimension Dimension} object.
+
+ @return the size of the backing store of this renderer
+ */
+ public Dimension getSize() {
+ return getSize(null);
+ }
+
+ /** Returns the size of the backing store of this renderer. Uses the
+ {@link java.awt.Dimension Dimension} object if one is supplied,
+ or allocates a new one if null is passed.
+
+ @param d a {@link java.awt.Dimension Dimension} object in which
+ to store the results, or null to allocate a new one
+
+ @return the size of the backing store of this renderer
+ */
+ public Dimension getSize(Dimension d) {
+ if (d == null)
+ d = new Dimension();
+ d.setSize(image.getWidth(), image.getHeight());
+ return d;
+ }
+
+ /** Sets the size of the backing store of this renderer. This may
+ cause the OpenGL texture object associated with this renderer to
+ be invalidated; it is not recommended to cache this texture
+ object outside this class but to instead call {@link #getTexture
+ getTexture} when it is needed.
+
+ @param width the new width of the backing store of this renderer
+ @param height the new height of the backing store of this renderer
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void setSize(int width, int height) throws GLException {
+ init(width, height);
+ }
+
+ /** Sets the size of the backing store of this renderer. This may
+ cause the OpenGL texture object associated with this renderer to
+ be invalidated.
+
+ @param d the new size of the backing store of this renderer
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void setSize(Dimension d) throws GLException {
+ setSize(d.width, d.height);
+ }
+
+ /** Sets whether smoothing is enabled for the OpenGL texture; if so,
+ uses GL_LINEAR interpolation for the minification and
+ magnification filters. Defaults to true. Changes to this setting
+ will not take effect until the next call to {@link
+ #beginOrthoRendering beginOrthoRendering}.
+
+ @param smoothing whether smoothing is enabled for the OpenGL texture
+ */
+ public void setSmoothing(boolean smoothing) {
+ this.smoothing = smoothing;
+ smoothingChanged = true;
+ }
+
+ /** Returns whether smoothing is enabled for the OpenGL texture; see
+ {@link #setSmoothing setSmoothing}. Defaults to true.
+
+ @return whether smoothing is enabled for the OpenGL texture
+ */
+ public boolean getSmoothing() {
+ return smoothing;
+ }
+
+ /** Creates a {@link java.awt.Graphics2D Graphics2D} instance for
+ rendering to the backing store of this renderer. The returned
+ object should be disposed of using the normal {@link
+ java.awt.Graphics#dispose() Graphics.dispose()} method once it
+ is no longer being used.
+
+ @return a new {@link java.awt.Graphics2D Graphics2D} object for
+ rendering into the backing store of this renderer
+ */
+ public Graphics2D createGraphics() {
+ return image.createGraphics();
+ }
+
+ /** Returns the underlying Java 2D {@link java.awt.Image Image}
+ being rendered into. */
+ public Image getImage() {
+ return image;
+ }
+
+ /** Marks the given region of the TextureRenderer as dirty. This
+ region, and any previously set dirty regions, will be
+ automatically synchronized with the underlying Texture during
+ the next {@link #getTexture getTexture} operation, at which
+ point the dirty region will be cleared. It is not necessary for
+ an OpenGL context to be current when this method is called.
+
+ @param x the x coordinate (in Java 2D coordinates -- relative to
+ upper left) of the region to update
+ @param y the y coordinate (in Java 2D coordinates -- relative to
+ upper left) of the region to update
+ @param width the width of the region to update
+ @param height the height of the region to update
+ */
+ public void markDirty(int x, int y, int width, int height) {
+ Rectangle curRegion = new Rectangle(x, y, width, height);
+ if (dirtyRegion == null) {
+ dirtyRegion = curRegion;
+ } else {
+ dirtyRegion.add(curRegion);
+ }
+ }
+
+ /** Returns the underlying OpenGL Texture object associated with
+ this renderer, synchronizing any dirty regions of the
+ TextureRenderer with the underlying OpenGL texture.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public Texture getTexture() throws GLException {
+ if (dirtyRegion != null) {
+ sync(dirtyRegion.x, dirtyRegion.y, dirtyRegion.width, dirtyRegion.height);
+ dirtyRegion = null;
+ }
+
+ ensureTexture();
+ return texture;
+ }
+
+ /** Disposes all resources associated with this renderer. It is not
+ valid to use this renderer after calling this method.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void dispose() throws GLException {
+ if (texture != null) {
+ texture.dispose();
+ texture = null;
+ }
+ if (image != null) {
+ image.flush();
+ image = null;
+ }
+ }
+
+ /** Convenience method which assists in rendering portions of the
+ OpenGL texture to the screen, if the application intends to draw
+ them as a flat overlay on to the screen. Pushes OpenGL state
+ bits (GL_ENABLE_BIT, GL_DEPTH_BUFFER_BIT and GL_TRANSFORM_BIT);
+ disables the depth test, back-face culling, and lighting;
+ enables the texture in this renderer; and sets up the viewing
+ matrices for orthographic rendering where the coordinates go
+ from (0, 0) at the lower left to (width, height) at the upper
+ right. Equivalent to beginOrthoRendering(width, height, true).
+ {@link #endOrthoRendering} must be used in conjunction with this
+ method to restore all OpenGL states.
+
+ @param width the width of the current on-screen OpenGL drawable
+ @param height the height of the current on-screen OpenGL drawable
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void beginOrthoRendering(int width, int height) throws GLException {
+ beginOrthoRendering(width, height, true);
+ }
+
+ /** Convenience method which assists in rendering portions of the
+ OpenGL texture to the screen, if the application intends to draw
+ them as a flat overlay on to the screen. Pushes OpenGL state
+ bits (GL_ENABLE_BIT, GL_DEPTH_BUFFER_BIT and GL_TRANSFORM_BIT);
+ disables the depth test (if the "disableDepthTest" argument is
+ true), back-face culling, and lighting; enables the texture in
+ this renderer; and sets up the viewing matrices for orthographic
+ rendering where the coordinates go from (0, 0) at the lower left
+ to (width, height) at the upper right. {@link
+ #endOrthoRendering} must be used in conjunction with this method
+ to restore all OpenGL states.
+
+ @param width the width of the current on-screen OpenGL drawable
+ @param height the height of the current on-screen OpenGL drawable
+ @param disableDepthTest whether the depth test should be disabled
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void beginOrthoRendering(int width, int height, boolean disableDepthTest) throws GLException {
+ beginRendering(true, width, height, disableDepthTest);
+ }
+
+ /** Convenience method which assists in rendering portions of the
+ OpenGL texture to the screen as 2D quads in 3D space. Pushes
+ OpenGL state (GL_ENABLE_BIT); disables lighting; and enables the
+ texture in this renderer. Unlike {@link #beginOrthoRendering
+ beginOrthoRendering}, does not modify the depth test, back-face
+ culling, lighting, or the modelview or projection matrices. The
+ user is responsible for setting up the view matrices for correct
+ results of {@link #draw3DRect draw3DRect}. {@link
+ #end3DRendering} must be used in conjunction with this method to
+ restore all OpenGL states.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void begin3DRendering() throws GLException {
+ beginRendering(false, 0, 0, false);
+ }
+
+ /** Changes the color of the polygons, and therefore the drawn
+ images, this TextureRenderer produces. Use of this method is
+ optional. The TextureRenderer uses the GL_MODULATE texture
+ environment mode, which causes the portions of the rendered
+ texture to be multiplied by the color of the rendered
+ polygons. The polygon color can be varied to achieve effects
+ like tinting of the overall output or fading in and out by
+ changing the alpha of the color. <P>
+
+ Each component ranges from 0.0f - 1.0f. The alpha component, if
+ used, does not need to be premultiplied into the color channels
+ as described in the documentation for {@link
+ com.sun.opengl.util.texture.Texture Texture}, although
+ premultiplied colors are used internally. The default color is
+ opaque white.
+
+ @param r the red component of the new color
+ @param g the green component of the new color
+ @param b the blue component of the new color
+ @param a the alpha component of the new color, 0.0f = completely
+ transparent, 1.0f = completely opaque
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void setColor(float r, float g, float b, float a) throws GLException {
+ GL2 gl = GLUgl2.getCurrentGL2();
+ this.r = r * a;
+ this.g = g * a;
+ this.b = b * a;
+ this.a = a;
+
+ gl.glColor4f(this.r, this.g, this.b, this.a);
+ }
+
+ private float[] compArray;
+ /** Changes the current color of this TextureRenderer to the
+ supplied one. The default color is opaque white. See {@link
+ #setColor(float,float,float,float) setColor} for more details.
+
+ @param color the new color to use for rendering
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void setColor(Color color) throws GLException {
+ // Get color's RGBA components as floats in the range [0,1].
+ if (compArray == null) {
+ compArray = new float[4];
+ }
+ color.getRGBComponents(compArray);
+ setColor(compArray[0], compArray[1], compArray[2], compArray[3]);
+ }
+
+ /** Draws an orthographically projected rectangle containing all of
+ the underlying texture to the specified location on the
+ screen. All (x, y) coordinates are specified relative to the
+ lower left corner of either the texture image or the current
+ OpenGL drawable. This method is equivalent to
+ <code>drawOrthoRect(screenx, screeny, 0, 0, getWidth(),
+ getHeight());</code>.
+
+ @param screenx the on-screen x coordinate at which to draw the rectangle
+ @param screeny the on-screen y coordinate (relative to lower left) at
+ which to draw the rectangle
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void drawOrthoRect(int screenx, int screeny) throws GLException {
+ drawOrthoRect(screenx, screeny, 0, 0, getWidth(), getHeight());
+ }
+
+ /** Draws an orthographically projected rectangle of the underlying
+ texture to the specified location on the screen. All (x, y)
+ coordinates are specified relative to the lower left corner of
+ either the texture image or the current OpenGL drawable.
+
+ @param screenx the on-screen x coordinate at which to draw the rectangle
+ @param screeny the on-screen y coordinate (relative to lower left) at
+ which to draw the rectangle
+ @param texturex the x coordinate of the pixel in the texture of
+ the lower left portion of the rectangle to draw
+ @param texturey the y coordinate of the pixel in the texture
+ (relative to lower left) of the lower left portion of the
+ rectangle to draw
+ @param width the width of the rectangle to draw
+ @param height the height of the rectangle to draw
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void drawOrthoRect(int screenx, int screeny,
+ int texturex, int texturey,
+ int width, int height) throws GLException {
+ draw3DRect(screenx, screeny, 0, texturex, texturey, width, height, 1);
+ }
+
+ /** Draws a rectangle of the underlying texture to the specified 3D
+ location. In the current coordinate system, the lower left
+ corner of the rectangle is placed at (x, y, z), and the upper
+ right corner is placed at (x + width * scaleFactor, y + height *
+ scaleFactor, z). The lower left corner of the sub-rectangle of
+ the texture is (texturex, texturey) and the upper right corner
+ is (texturex + width, texturey + height). For back-face culling
+ purposes, the rectangle is drawn with counterclockwise
+ orientation of the vertices when viewed from the front.
+
+ @param x the x coordinate at which to draw the rectangle
+ @param y the y coordinate at which to draw the rectangle
+ @param z the z coordinate at which to draw the rectangle
+ @param texturex the x coordinate of the pixel in the texture of
+ the lower left portion of the rectangle to draw
+ @param texturey the y coordinate of the pixel in the texture
+ (relative to lower left) of the lower left portion of the
+ rectangle to draw
+ @param width the width in texels of the rectangle to draw
+ @param height the height in texels of the rectangle to draw
+ @param scaleFactor the scale factor to apply (multiplicatively)
+ to the size of the drawn rectangle
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void draw3DRect(float x, float y, float z,
+ int texturex, int texturey,
+ int width, int height,
+ float scaleFactor) throws GLException {
+ GL2 gl = GLUgl2.getCurrentGL2();
+ Texture texture = getTexture();
+ TextureCoords coords = texture.getSubImageTexCoords(texturex, texturey,
+ texturex + width,
+ texturey + height);
+ gl.glBegin(GL2.GL_QUADS);
+ gl.glTexCoord2f(coords.left(), coords.bottom());
+ gl.glVertex3f(x, y, z);
+ gl.glTexCoord2f(coords.right(), coords.bottom());
+ gl.glVertex3f(x + width * scaleFactor, y, z);
+ gl.glTexCoord2f(coords.right(), coords.top());
+ gl.glVertex3f(x + width * scaleFactor, y + height * scaleFactor, z);
+ gl.glTexCoord2f(coords.left(), coords.top());
+ gl.glVertex3f(x, y + height * scaleFactor, z);
+ gl.glEnd();
+ }
+
+ /** Convenience method which assists in rendering portions of the
+ OpenGL texture to the screen, if the application intends to draw
+ them as a flat overlay on to the screen. Must be used if {@link
+ #beginOrthoRendering} is used to set up the rendering stage for
+ this overlay.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void endOrthoRendering() throws GLException {
+ endRendering(true);
+ }
+
+ /** Convenience method which assists in rendering portions of the
+ OpenGL texture to the screen as 2D quads in 3D space. Must be
+ used if {@link #begin3DRendering} is used to set up the
+ rendering stage for this overlay.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void end3DRendering() throws GLException {
+ endRendering(false);
+ }
+
+ /** Indicates whether automatic mipmap generation is in use for this
+ TextureRenderer. The result of this method may change from true
+ to false if it is discovered during allocation of the
+ TextureRenderer's backing store that automatic mipmap generation
+ is not supported at the OpenGL level. */
+ public boolean isUsingAutoMipmapGeneration() {
+ return mipmap;
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ private void beginRendering(boolean ortho, int width, int height, boolean disableDepthTestForOrtho) {
+ GL2 gl = GLUgl2.getCurrentGL2();
+ int attribBits =
+ GL2.GL_ENABLE_BIT | GL2.GL_TEXTURE_BIT | GL2.GL_COLOR_BUFFER_BIT |
+ (ortho ? (GL2.GL_DEPTH_BUFFER_BIT | GL2.GL_TRANSFORM_BIT) : 0);
+ gl.glPushAttrib(attribBits);
+ gl.glDisable(GL2.GL_LIGHTING);
+ if (ortho) {
+ if (disableDepthTestForOrtho) {
+ gl.glDisable(GL2.GL_DEPTH_TEST);
+ }
+ gl.glDisable(GL2.GL_CULL_FACE);
+ gl.glMatrixMode(GL2.GL_PROJECTION);
+ gl.glPushMatrix();
+ gl.glLoadIdentity();
+ glu.gluOrtho2D(0, width, 0, height);
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
+ gl.glPushMatrix();
+ gl.glLoadIdentity();
+ gl.glMatrixMode(GL2.GL_TEXTURE);
+ gl.glPushMatrix();
+ gl.glLoadIdentity();
+ }
+ gl.glEnable(GL2.GL_BLEND);
+ gl.glBlendFunc(GL2.GL_ONE, GL2.GL_ONE_MINUS_SRC_ALPHA);
+ Texture texture = getTexture();
+ texture.enable();
+ texture.bind();
+ gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_MODULATE);
+ // Change polygon color to last saved
+ gl.glColor4f(r, g, b, a);
+ if (smoothingChanged) {
+ smoothingChanged = false;
+ if (smoothing) {
+ texture.setTexParameteri(GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR);
+ if (mipmap) {
+ texture.setTexParameteri(GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR_MIPMAP_LINEAR);
+ } else {
+ texture.setTexParameteri(GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR);
+ }
+ } else {
+ texture.setTexParameteri(GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST);
+ texture.setTexParameteri(GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST);
+ }
+ }
+ }
+
+ private void endRendering(boolean ortho) {
+ GL2 gl = GLUgl2.getCurrentGL2();
+ Texture texture = getTexture();
+ texture.disable();
+ if (ortho) {
+ gl.glMatrixMode(GL2.GL_PROJECTION);
+ gl.glPopMatrix();
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
+ gl.glPopMatrix();
+ gl.glMatrixMode(GL2.GL_TEXTURE);
+ gl.glPopMatrix();
+ }
+ gl.glPopAttrib();
+ }
+
+ private void init(int width, int height) {
+ // Discard previous BufferedImage if any
+ if (image != null) {
+ image.flush();
+ image = null;
+ }
+
+ // Infer the internal format if not an intensity texture
+ int internalFormat = (intensity ? GL2.GL_INTENSITY : 0);
+ int imageType =
+ (intensity ? BufferedImage.TYPE_BYTE_GRAY :
+ (alpha ? BufferedImage.TYPE_INT_ARGB_PRE : BufferedImage.TYPE_INT_RGB));
+ image = new BufferedImage(width, height, imageType);
+ // Always realllocate the TextureData associated with this
+ // BufferedImage; it's just a reference to the contents but we
+ // need it in order to update sub-regions of the underlying
+ // texture
+ textureData = new AWTTextureData(internalFormat, 0, mipmap, image);
+ // For now, always reallocate the underlying OpenGL texture when
+ // the backing store size changes
+ mustReallocateTexture = true;
+ }
+
+ /** Synchronizes the specified region of the backing store down to
+ the underlying OpenGL texture. If {@link #markDirty markDirty}
+ is used instead to indicate the regions that are out of sync,
+ this method does not need to be called.
+
+ @param x the x coordinate (in Java 2D coordinates -- relative to
+ upper left) of the region to update
+ @param y the y coordinate (in Java 2D coordinates -- relative to
+ upper left) of the region to update
+ @param width the width of the region to update
+ @param height the height of the region to update
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ private void sync(int x, int y, int width, int height) throws GLException {
+ // Force allocation if necessary
+ boolean canSkipUpdate = ensureTexture();
+
+ if (!canSkipUpdate) {
+ // Update specified region.
+ // NOTE that because BufferedImage-based TextureDatas now don't
+ // do anything to their contents, the coordinate systems for
+ // OpenGL and Java 2D actually line up correctly for
+ // updateSubImage calls, so we don't need to do any argument
+ // conversion here (i.e., flipping the Y coordinate).
+ texture.updateSubImage(textureData, 0, x, y, x, y, width, height);
+ }
+ }
+
+ // Returns true if the texture was newly allocated, false if not
+ private boolean ensureTexture() {
+ if (mustReallocateTexture) {
+ if (texture != null) {
+ texture.dispose();
+ texture = null;
+ }
+ mustReallocateTexture = false;
+ }
+
+ if (texture == null) {
+ texture = AWTTextureReader.newTexture(textureData);
+ if (mipmap && !texture.isUsingAutoMipmapGeneration()) {
+ // Only try this once
+ texture.dispose();
+ mipmap = false;
+ textureData.setMipmap(false);
+ texture = AWTTextureReader.newTexture(textureData);
+ }
+
+ if (!smoothing) {
+ // The TextureIO classes default to GL_LINEAR filtering
+ texture.setTexParameteri(GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST);
+ texture.setTexParameteri(GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST);
+ }
+ return true;
+ }
+
+ return false;
+ }
+}
diff --git a/src/classes/com/sun/opengl/util/texture/Texture.java b/src/classes/com/sun/opengl/util/texture/Texture.java
index f4a0a8be2..f5e599d4e 100755
--- a/src/classes/com/sun/opengl/util/texture/Texture.java
+++ b/src/classes/com/sun/opengl/util/texture/Texture.java
@@ -41,6 +41,7 @@ import java.nio.*;
import javax.media.opengl.*;
import javax.media.opengl.glu.*;
import com.sun.opengl.impl.*;
+import com.sun.opengl.util.texture.*;
import com.sun.opengl.util.texture.spi.*;
/**
@@ -173,9 +174,7 @@ public class Texture {
private static final boolean disableNPOT = Debug.isPropertyDefined("jogl.texture.nonpot");
private static final boolean disableTexRect = Debug.isPropertyDefined("jogl.texture.notexrect");
- // For now make Texture constructor package-private to limit the
- // number of public APIs we commit to
- Texture(TextureData data) throws GLException {
+ public Texture(TextureData data) throws GLException {
GL gl = GLU.getCurrentGL();
texID = createTextureID(gl);
@@ -184,7 +183,7 @@ public class Texture {
// Constructor for use when creating e.g. cube maps, where there is
// no initial texture data
- Texture(int target) throws GLException {
+ public Texture(int target) throws GLException {
GL gl = GLU.getCurrentGL();
texID = createTextureID(gl);
this.target = target;
@@ -259,7 +258,7 @@ public class Texture {
*
* @return the OpenGL target of this texture
* @see javax.media.opengl.GL#GL_TEXTURE_2D
- * @see javax.media.opengl.GL#GL_TEXTURE_RECTANGLE_ARB
+ * @see javax.media.opengl.GL2#GL_TEXTURE_RECTANGLE_ARB
*/
public int getTarget() {
return target;
@@ -350,7 +349,7 @@ public class Texture {
* @return the texture coordinates corresponding to the specified sub-image
*/
public TextureCoords getSubImageTexCoords(int x1, int y1, int x2, int y2) {
- if (target == GL.GL_TEXTURE_RECTANGLE_ARB) {
+ if (target == GL2.GL_TEXTURE_RECTANGLE_ARB) {
if (mustFlipVertically) {
return new TextureCoords(x1, texHeight - y1, x2, texHeight - y2);
} else {
@@ -452,7 +451,7 @@ public class Texture {
texWidth = imgWidth;
texHeight = imgHeight;
texTarget = GL.GL_TEXTURE_2D;
- } else if (haveTexRect(gl) && !data.isDataCompressed()) {
+ } else if (haveTexRect(gl) && !data.isDataCompressed() && !gl.isGL2()) {
// GL_ARB_texture_rectangle does not work for compressed textures
if (DEBUG) {
System.err.println("Using GL_ARB_texture_rectangle");
@@ -460,7 +459,7 @@ public class Texture {
texWidth = imgWidth;
texHeight = imgHeight;
- texTarget = GL.GL_TEXTURE_RECTANGLE_ARB;
+ texTarget = GL2.GL_TEXTURE_RECTANGLE_ARB;
} else {
// If we receive non-power-of-two compressed texture data and
// don't have true hardware support for compressed textures, we
@@ -519,7 +518,7 @@ public class Texture {
}
try {
- GLU glu = new GLU();
+ GLU glu = GLU.createGLU(gl);
glu.gluBuild2DMipmaps(texTarget, data.getInternalFormat(),
data.getWidth(), data.getHeight(),
data.getPixelFormat(), data.getPixelType(), data.getBuffer());
@@ -568,12 +567,12 @@ public class Texture {
updateSubImageImpl(data, texTarget, 0, 0, 0, 0, 0, data.getWidth(), data.getHeight());
}
} else {
- if (data.getMipmap() && haveAutoMipmapGeneration) {
+ if (data.getMipmap() && haveAutoMipmapGeneration && gl.isGL2ES1()) {
// For now, only use hardware mipmapping for uncompressed 2D
// textures where the user hasn't explicitly specified
// mipmap data; don't know about interactions between
// GL_GENERATE_MIPMAP and glCompressedTexImage2D
- gl.glTexParameteri(texParamTarget, GL.GL_GENERATE_MIPMAP, GL.GL_TRUE);
+ gl.glTexParameteri(texParamTarget, GL2ES1.GL_GENERATE_MIPMAP, GL.GL_TRUE);
usingAutoMipmapGeneration = true;
}
@@ -587,16 +586,16 @@ public class Texture {
int minFilter = (data.getMipmap() ? GL.GL_LINEAR_MIPMAP_LINEAR : GL.GL_LINEAR);
int magFilter = GL.GL_LINEAR;
- int wrapMode = (gl.isExtensionAvailable("GL_VERSION_1_2") ? GL.GL_CLAMP_TO_EDGE : GL.GL_CLAMP);
+ int wrapMode = (gl.isExtensionAvailable("GL_VERSION_1_2") || !gl.isGL2()) ? GL.GL_CLAMP_TO_EDGE : GL2.GL_CLAMP;
// REMIND: figure out what to do for GL_TEXTURE_RECTANGLE_ARB
- if (texTarget != GL.GL_TEXTURE_RECTANGLE_ARB) {
+ if (texTarget != GL2.GL_TEXTURE_RECTANGLE_ARB) {
gl.glTexParameteri(texParamTarget, GL.GL_TEXTURE_MIN_FILTER, minFilter);
gl.glTexParameteri(texParamTarget, GL.GL_TEXTURE_MAG_FILTER, magFilter);
gl.glTexParameteri(texParamTarget, GL.GL_TEXTURE_WRAP_S, wrapMode);
gl.glTexParameteri(texParamTarget, GL.GL_TEXTURE_WRAP_T, wrapMode);
- if (this.target == GL.GL_TEXTURE_CUBE_MAP) {
- gl.glTexParameteri(texParamTarget, GL.GL_TEXTURE_WRAP_R, wrapMode);
+ if (this.target == GL2.GL_TEXTURE_CUBE_MAP) {
+ gl.glTexParameteri(texParamTarget, GL2.GL_TEXTURE_WRAP_R, wrapMode);
}
}
@@ -604,7 +603,7 @@ public class Texture {
// map
if ((this.target == 0) ||
(this.target == GL.GL_TEXTURE_2D) ||
- (this.target == GL.GL_TEXTURE_RECTANGLE_ARB)) {
+ (this.target == GL2.GL_TEXTURE_RECTANGLE_ARB)) {
this.target = texTarget;
}
@@ -851,7 +850,7 @@ public class Texture {
private void setImageSize(int width, int height, int target) {
imgWidth = width;
imgHeight = height;
- if (target == GL.GL_TEXTURE_RECTANGLE_ARB) {
+ if (target == GL2.GL_TEXTURE_RECTANGLE_ARB) {
if (mustFlipVertically) {
coords = new TextureCoords(0, imgHeight, imgWidth, 0);
} else {
@@ -941,14 +940,16 @@ public class Texture {
data.getInternalFormat(),
buffer.remaining(), buffer);
} else {
- int[] align = new int[1];
- int[] rowLength = new int[1];
- int[] skipRows = new int[1];
- int[] skipPixels = new int[1];
+ int[] align = { 0 };
+ int[] rowLength = { 0 };
+ int[] skipRows = { 0 };
+ int[] skipPixels = { 0 };
gl.glGetIntegerv(GL.GL_UNPACK_ALIGNMENT, align, 0); // save alignment
- gl.glGetIntegerv(GL.GL_UNPACK_ROW_LENGTH, rowLength, 0); // save row length
- gl.glGetIntegerv(GL.GL_UNPACK_SKIP_ROWS, skipRows, 0); // save skipped rows
- gl.glGetIntegerv(GL.GL_UNPACK_SKIP_PIXELS, skipPixels, 0); // save skipped pixels
+ if(gl.isGL2()) {
+ gl.glGetIntegerv(GL2.GL_UNPACK_ROW_LENGTH, rowLength, 0); // save row length
+ gl.glGetIntegerv(GL2.GL_UNPACK_SKIP_ROWS, skipRows, 0); // save skipped rows
+ gl.glGetIntegerv(GL2.GL_UNPACK_SKIP_PIXELS, skipPixels, 0); // save skipped pixels
+ }
gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, data.getAlignment());
if (DEBUG && VERBOSE) {
System.out.println("Row length = " + rowlen);
@@ -959,18 +960,27 @@ public class Texture {
System.out.println("width = " + width);
System.out.println("height = " + height);
}
- gl.glPixelStorei(GL.GL_UNPACK_ROW_LENGTH, rowlen);
- gl.glPixelStorei(GL.GL_UNPACK_SKIP_ROWS, srcy);
- gl.glPixelStorei(GL.GL_UNPACK_SKIP_PIXELS, srcx);
+ if(gl.isGL2()) {
+ gl.glPixelStorei(GL2.GL_UNPACK_ROW_LENGTH, rowlen);
+ gl.glPixelStorei(GL2.GL_UNPACK_SKIP_ROWS, srcy);
+ gl.glPixelStorei(GL2.GL_UNPACK_SKIP_PIXELS, srcx);
+ } else {
+ if ( rowlen!=0 && rowlen!=width &&
+ srcy!=0 && srcx!=0 ) {
+ throw new GLException("rowlen and/or x/y offset only available for GL2");
+ }
+ }
gl.glTexSubImage2D(newTarget, mipmapLevel,
dstx, dsty, width, height,
data.getPixelFormat(), data.getPixelType(),
buffer);
gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, align[0]); // restore alignment
- gl.glPixelStorei(GL.GL_UNPACK_ROW_LENGTH, rowLength[0]); // restore row length
- gl.glPixelStorei(GL.GL_UNPACK_SKIP_ROWS, skipRows[0]); // restore skipped rows
- gl.glPixelStorei(GL.GL_UNPACK_SKIP_PIXELS, skipPixels[0]); // restore skipped pixels
+ if(gl.isGL2()) {
+ gl.glPixelStorei(GL2.GL_UNPACK_ROW_LENGTH, rowLength[0]); // restore row length
+ gl.glPixelStorei(GL2.GL_UNPACK_SKIP_ROWS, skipRows[0]); // restore skipped rows
+ gl.glPixelStorei(GL2.GL_UNPACK_SKIP_PIXELS, skipPixels[0]); // restore skipped pixels
+ }
}
}
@@ -988,7 +998,7 @@ public class Texture {
}
break;
default:
- // FIXME: should test availability of more texture
+ // FI1027GXME: should test availability of more texture
// compression extensions here
break;
}
@@ -1015,7 +1025,7 @@ public class Texture {
private static boolean haveTexRect(GL gl) {
return (!disableTexRect &&
- TextureIO.isTexRectEnabled() &&
+ TextureUtil.isTexRectEnabled() &&
gl.isExtensionAvailable("GL_ARB_texture_rectangle"));
}
}
diff --git a/src/classes/com/sun/opengl/util/texture/TextureData.java b/src/classes/com/sun/opengl/util/texture/TextureData.java
index 60e8c6d05..8cfd246b0 100755
--- a/src/classes/com/sun/opengl/util/texture/TextureData.java
+++ b/src/classes/com/sun/opengl/util/texture/TextureData.java
@@ -36,12 +36,6 @@
package com.sun.opengl.util.texture;
-import java.awt.AlphaComposite;
-import java.awt.Color;
-import java.awt.Graphics2D;
-import java.awt.Transparency;
-import java.awt.color.*;
-import java.awt.image.*;
import java.nio.*;
import javax.media.opengl.*;
@@ -57,339 +51,85 @@ import com.sun.opengl.util.*;
* @author Kenneth Russell
*/
-public class TextureData {
- private int width;
- private int height;
- private int border;
- private int pixelFormat;
- private int pixelType;
- private int internalFormat; // perhaps inferred from pixelFormat?
- private boolean mipmap; // indicates whether mipmaps should be generated
- // (ignored if mipmaps are supplied from the file)
- private boolean dataIsCompressed;
- private boolean mustFlipVertically; // Must flip texture coordinates
- // vertically to get OpenGL output
- // to look correct
- private Buffer buffer; // the actual data...
- private Buffer[] mipmapData; // ...or a series of mipmaps
- private Flusher flusher;
- private int rowLength;
- private int alignment; // 1, 2, or 4 bytes
- private int estimatedMemorySize;
-
- // Mechanism for lazily converting input BufferedImages with custom
- // ColorModels to standard ones for uploading to OpenGL, as well as
- // backing off from the optimizations of hoping that either
- // GL_EXT_abgr or OpenGL 1.2 are present
- private BufferedImage imageForLazyCustomConversion;
- private boolean expectingEXTABGR;
- private boolean haveEXTABGR;
- private boolean expectingGL12;
- private boolean haveGL12;
-
- private static final ColorModel rgbaColorModel =
- new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB),
- new int[] {8, 8, 8, 8}, true, true,
- Transparency.TRANSLUCENT,
- DataBuffer.TYPE_BYTE);
- private static final ColorModel rgbColorModel =
- new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB),
- new int[] {8, 8, 8, 0}, false, false,
- Transparency.OPAQUE,
- DataBuffer.TYPE_BYTE);
-
- /**
- * Constructs a new TextureData object with the specified parameters
- * and data contained in the given Buffer. The optional Flusher can
- * be used to clean up native resources associated with this
- * TextureData when processing is complete; for example, closing of
- * memory-mapped files that might otherwise require a garbage
- * collection to reclaim and close.
- *
- * @param internalFormat the OpenGL internal format for the
- * resulting texture; must be specified, may
- * not be 0
- * @param width the width in pixels of the texture
- * @param height the height in pixels of the texture
- * @param border the number of pixels of border this texture
- * data has (0 or 1)
- * @param pixelFormat the OpenGL pixel format for the
- * resulting texture; must be specified, may
- * not be 0
- * @param pixelType the OpenGL type of the pixels of the texture
- * @param mipmap indicates whether mipmaps should be
- * autogenerated (using GLU) for the resulting
- * texture. Currently if mipmap is true then
- * dataIsCompressed may not be true.
- * @param dataIsCompressed indicates whether the texture data is in
- * compressed form
- * (e.g. GL_COMPRESSED_RGB_S3TC_DXT1_EXT)
- * @param mustFlipVertically indicates whether the texture
- * coordinates must be flipped vertically
- * in order to properly display the
- * texture
- * @param buffer the buffer containing the texture data
- * @param flusher optional flusher to perform cleanup tasks
- * upon call to flush()
- *
- * @throws IllegalArgumentException if any parameters of the texture
- * data were invalid, such as requesting mipmap generation for a
- * compressed texture
- */
- public TextureData(int internalFormat,
- int width,
- int height,
- int border,
- int pixelFormat,
- int pixelType,
- boolean mipmap,
- boolean dataIsCompressed,
- boolean mustFlipVertically,
- Buffer buffer,
- Flusher flusher) throws IllegalArgumentException {
- if (mipmap && dataIsCompressed) {
- throw new IllegalArgumentException("Can not generate mipmaps for compressed textures");
- }
-
- this.width = width;
- this.height = height;
- this.border = border;
- this.pixelFormat = pixelFormat;
- this.pixelType = pixelType;
- this.internalFormat = internalFormat;
- this.mipmap = mipmap;
- this.dataIsCompressed = dataIsCompressed;
- this.mustFlipVertically = mustFlipVertically;
- this.buffer = buffer;
- this.flusher = flusher;
- alignment = 1; // FIXME: is this correct enough in all situations?
- estimatedMemorySize = estimatedMemorySize(buffer);
- }
-
- /**
- * Constructs a new TextureData object with the specified parameters
- * and data for multiple mipmap levels contained in the given array
- * of Buffers. The optional Flusher can be used to clean up native
- * resources associated with this TextureData when processing is
- * complete; for example, closing of memory-mapped files that might
- * otherwise require a garbage collection to reclaim and close.
- *
- * @param internalFormat the OpenGL internal format for the
- * resulting texture; must be specified, may
- * not be 0
- * @param width the width in pixels of the topmost mipmap
- * level of the texture
- * @param height the height in pixels of the topmost mipmap
- * level of the texture
- * @param border the number of pixels of border this texture
- * data has (0 or 1)
- * @param pixelFormat the OpenGL pixel format for the
- * resulting texture; must be specified, may
- * not be 0
- * @param pixelType the OpenGL type of the pixels of the texture
- * @param dataIsCompressed indicates whether the texture data is in
- * compressed form
- * (e.g. GL_COMPRESSED_RGB_S3TC_DXT1_EXT)
- * @param mustFlipVertically indicates whether the texture
- * coordinates must be flipped vertically
- * in order to properly display the
- * texture
- * @param mipmapData the buffers containing all mipmap levels
- * of the texture's data
- * @param flusher optional flusher to perform cleanup tasks
- * upon call to flush()
- *
- * @throws IllegalArgumentException if any parameters of the texture
- * data were invalid, such as requesting mipmap generation for a
- * compressed texture
- */
- public TextureData(int internalFormat,
- int width,
- int height,
- int border,
- int pixelFormat,
- int pixelType,
- boolean dataIsCompressed,
- boolean mustFlipVertically,
- Buffer[] mipmapData,
- Flusher flusher) throws IllegalArgumentException {
- this.width = width;
- this.height = height;
- this.border = border;
- this.pixelFormat = pixelFormat;
- this.pixelType = pixelType;
- this.internalFormat = internalFormat;
- this.dataIsCompressed = dataIsCompressed;
- this.mustFlipVertically = mustFlipVertically;
- this.mipmapData = (Buffer[]) mipmapData.clone();
- this.flusher = flusher;
- alignment = 1; // FIXME: is this correct enough in all situations?
- for (int i = 0; i < mipmapData.length; i++) {
- estimatedMemorySize += estimatedMemorySize(mipmapData[i]);
- }
- }
-
- /**
- * Constructs a new TextureData object with the specified parameters
- * and data contained in the given BufferedImage. The resulting
- * TextureData "wraps" the contents of the BufferedImage, so if a
- * modification is made to the BufferedImage between the time the
- * TextureData is constructed and when a Texture is made from the
- * TextureData, that modification will be visible in the resulting
- * Texture.
- *
- * @param internalFormat the OpenGL internal format for the
- * resulting texture; may be 0, in which case
- * it is inferred from the image's type
- * @param pixelFormat the OpenGL internal format for the
- * resulting texture; may be 0, in which case
- * it is inferred from the image's type (note:
- * this argument is currently always ignored)
- * @param mipmap indicates whether mipmaps should be
- * autogenerated (using GLU) for the resulting
- * texture
- * @param image the image containing the texture data
- */
- public TextureData(int internalFormat,
- int pixelFormat,
- boolean mipmap,
- BufferedImage image) {
- if (internalFormat == 0) {
- this.internalFormat = image.getColorModel().hasAlpha() ? GL.GL_RGBA : GL.GL_RGB;
- } else {
- this.internalFormat = internalFormat;
- }
- createFromImage(image);
- this.mipmap = mipmap;
- if (buffer != null) {
- estimatedMemorySize = estimatedMemorySize(buffer);
- } else {
- // In the lazy custom conversion case we don't yet have a buffer
- if (imageForLazyCustomConversion != null) {
- estimatedMemorySize = estimatedMemorySize(wrapImageDataBuffer(imageForLazyCustomConversion));
- }
- }
- }
-
+public interface TextureData {
/** Returns the width in pixels of the texture data. */
- public int getWidth() { return width; }
+ public int getWidth();
/** Returns the height in pixels of the texture data. */
- public int getHeight() { return height; }
+ public int getHeight();
/** Returns the border in pixels of the texture data. */
- public int getBorder() { return border; }
+ public int getBorder();
/** Returns the intended OpenGL pixel format of the texture data. */
- public int getPixelFormat() {
- if (imageForLazyCustomConversion != null) {
- if (!((expectingEXTABGR && haveEXTABGR) ||
- (expectingGL12 && haveGL12))) {
- revertPixelFormatAndType();
- }
- }
- return pixelFormat;
- }
+ public int getPixelFormat();
/** Returns the intended OpenGL pixel type of the texture data. */
- public int getPixelType() {
- if (imageForLazyCustomConversion != null) {
- if (!((expectingEXTABGR && haveEXTABGR) ||
- (expectingGL12 && haveGL12))) {
- revertPixelFormatAndType();
- }
- }
- return pixelType;
- }
+ public int getPixelType();
/** Returns the intended OpenGL internal format of the texture data. */
- public int getInternalFormat() { return internalFormat; }
+ public int getInternalFormat();
/** Returns whether mipmaps should be generated for the texture data. */
- public boolean getMipmap() { return mipmap; }
+ public boolean getMipmap();
/** Indicates whether the texture data is in compressed form. */
- public boolean isDataCompressed() { return dataIsCompressed; }
+ public boolean isDataCompressed();
/** Indicates whether the texture coordinates must be flipped
vertically for proper display. */
- public boolean getMustFlipVertically() { return mustFlipVertically; }
+ public boolean getMustFlipVertically();
/** Returns the texture data, or null if it is specified as a set of mipmaps. */
- public Buffer getBuffer() {
- if (imageForLazyCustomConversion != null) {
- if (!((expectingEXTABGR && haveEXTABGR) ||
- (expectingGL12 && haveGL12))) {
- revertPixelFormatAndType();
- // Must present the illusion to the end user that we are simply
- // wrapping the input BufferedImage
- createFromCustom(imageForLazyCustomConversion);
- }
- }
- return buffer;
- }
+ public Buffer getBuffer();
/** Returns all mipmap levels for the texture data, or null if it is
specified as a single image. */
- public Buffer[] getMipmapData() { return mipmapData; }
+ public Buffer[] getMipmapData();
/** Returns the required byte alignment for the texture data. */
- public int getAlignment() { return alignment; }
+ public int getAlignment();
/** Returns the row length needed for correct GL_UNPACK_ROW_LENGTH
specification. This is currently only supported for
non-mipmapped, non-compressed textures. */
- public int getRowLength() { return rowLength; }
+ public int getRowLength();
/** Sets the width in pixels of the texture data. */
- public void setWidth(int width) { this.width = width; }
+ public void setWidth(int width);
/** Sets the height in pixels of the texture data. */
- public void setHeight(int height) { this.height = height; }
+ public void setHeight(int height);
/** Sets the border in pixels of the texture data. */
- public void setBorder(int border) { this.border = border; }
+ public void setBorder(int border);
/** Sets the intended OpenGL pixel format of the texture data. */
- public void setPixelFormat(int pixelFormat) { this.pixelFormat = pixelFormat; }
+ public void setPixelFormat(int pixelFormat);
/** Sets the intended OpenGL pixel type of the texture data. */
- public void setPixelType(int pixelType) { this.pixelType = pixelType; }
+ public void setPixelType(int pixelType);
/** Sets the intended OpenGL internal format of the texture data. */
- public void setInternalFormat(int internalFormat) { this.internalFormat = internalFormat; }
+ public void setInternalFormat(int internalFormat);
/** Sets whether mipmaps should be generated for the texture data. */
- public void setMipmap(boolean mipmap) { this.mipmap = mipmap; }
+ public void setMipmap(boolean mipmap);
/** Sets whether the texture data is in compressed form. */
- public void setIsDataCompressed(boolean compressed) { this.dataIsCompressed = compressed; }
+ public void setIsDataCompressed(boolean compressed);
/** Sets whether the texture coordinates must be flipped vertically
for proper display. */
- public void setMustFlipVertically(boolean mustFlipVertically) { this.mustFlipVertically = mustFlipVertically; }
+ public void setMustFlipVertically(boolean mustFlipVertically);
/** Sets the texture data. */
- public void setBuffer(Buffer buffer) {
- this.buffer = buffer;
- estimatedMemorySize = estimatedMemorySize(buffer);
- }
+ public void setBuffer(Buffer buffer);
/** Sets the required byte alignment for the texture data. */
- public void setAlignment(int alignment) { this.alignment = alignment; }
+ public void setAlignment(int alignment) ;
/** Sets the row length needed for correct GL_UNPACK_ROW_LENGTH
specification. This is currently only supported for
non-mipmapped, non-compressed textures. */
- public void setRowLength(int rowLength) { this.rowLength = rowLength; }
+ public void setRowLength(int rowLength) ;
/** Indicates to this TextureData whether the GL_EXT_abgr extension
is available. Used for optimization along some code paths to
avoid data copies. */
- public void setHaveEXTABGR(boolean haveEXTABGR) {
- this.haveEXTABGR = haveEXTABGR;
- }
+ public void setHaveEXTABGR(boolean haveEXTABGR) ;
/** Indicates to this TextureData whether OpenGL version 1.2 is
available. If not, falls back to relatively inefficient code
paths for several input data types (several kinds of packed
pixel formats, in particular). */
- public void setHaveGL12(boolean haveGL12) {
- this.haveGL12 = haveGL12;
- }
+ public void setHaveGL12(boolean haveGL12) ;
/** Returns an estimate of the amount of memory in bytes this
TextureData will consume once uploaded to the graphics card. It
should only be treated as an estimate; most applications should
not need to query this but instead let the OpenGL implementation
page textures in and out as necessary. */
- public int getEstimatedMemorySize() {
- return estimatedMemorySize;
- }
+ public int getEstimatedMemorySize() ;
/** Flushes resources associated with this TextureData by calling
Flusher.flush(). */
- public void flush() {
- if (flusher != null) {
- flusher.flush();
- flusher = null;
- }
- }
+ public void flush() ;
/** Defines a callback mechanism to allow the user to explicitly
deallocate native resources (memory-mapped files, etc.)
@@ -399,303 +139,4 @@ public class TextureData {
TextureData. */
public void flush();
}
-
- //----------------------------------------------------------------------
- // Internals only below this point
- //
-
- private void createNIOBufferFromImage(BufferedImage image) {
- buffer = wrapImageDataBuffer(image);
- }
-
- private Buffer wrapImageDataBuffer(BufferedImage image) {
- //
- // Note: Grabbing the DataBuffer will defeat Java2D's image
- // management mechanism (as of JDK 5/6, at least). This shouldn't
- // be a problem for most JOGL apps, but those that try to upload
- // the image into an OpenGL texture and then use the same image in
- // Java2D rendering might find the 2D rendering is not as fast as
- // it could be.
- //
-
- DataBuffer data = image.getRaster().getDataBuffer();
- if (data instanceof DataBufferByte) {
- return ByteBuffer.wrap(((DataBufferByte) data).getData());
- } else if (data instanceof DataBufferDouble) {
- throw new RuntimeException("DataBufferDouble rasters not supported by OpenGL");
- } else if (data instanceof DataBufferFloat) {
- return FloatBuffer.wrap(((DataBufferFloat) data).getData());
- } else if (data instanceof DataBufferInt) {
- return IntBuffer.wrap(((DataBufferInt) data).getData());
- } else if (data instanceof DataBufferShort) {
- return ShortBuffer.wrap(((DataBufferShort) data).getData());
- } else if (data instanceof DataBufferUShort) {
- return ShortBuffer.wrap(((DataBufferUShort) data).getData());
- } else {
- throw new RuntimeException("Unexpected DataBuffer type?");
- }
- }
-
- private void createFromImage(BufferedImage image) {
- pixelType = 0; // Determine from image
- mustFlipVertically = true;
-
- width = image.getWidth();
- height = image.getHeight();
-
- int scanlineStride;
- SampleModel sm = image.getRaster().getSampleModel();
- if (sm instanceof SinglePixelPackedSampleModel) {
- scanlineStride =
- ((SinglePixelPackedSampleModel)sm).getScanlineStride();
- } else if (sm instanceof MultiPixelPackedSampleModel) {
- scanlineStride =
- ((MultiPixelPackedSampleModel)sm).getScanlineStride();
- } else if (sm instanceof ComponentSampleModel) {
- scanlineStride =
- ((ComponentSampleModel)sm).getScanlineStride();
- } else {
- // This will only happen for TYPE_CUSTOM anyway
- setupLazyCustomConversion(image);
- return;
- }
-
- switch (image.getType()) {
- case BufferedImage.TYPE_INT_RGB:
- pixelFormat = GL.GL_BGRA;
- pixelType = GL.GL_UNSIGNED_INT_8_8_8_8_REV;
- rowLength = scanlineStride;
- alignment = 4;
- expectingGL12 = true;
- setupLazyCustomConversion(image);
- break;
- case BufferedImage.TYPE_INT_ARGB_PRE:
- pixelFormat = GL.GL_BGRA;
- pixelType = GL.GL_UNSIGNED_INT_8_8_8_8_REV;
- rowLength = scanlineStride;
- alignment = 4;
- expectingGL12 = true;
- setupLazyCustomConversion(image);
- break;
- case BufferedImage.TYPE_INT_BGR:
- pixelFormat = GL.GL_RGBA;
- pixelType = GL.GL_UNSIGNED_INT_8_8_8_8_REV;
- rowLength = scanlineStride;
- alignment = 4;
- expectingGL12 = true;
- setupLazyCustomConversion(image);
- break;
- case BufferedImage.TYPE_3BYTE_BGR:
- {
- // we can pass the image data directly to OpenGL only if
- // we have an integral number of pixels in each scanline
- if ((scanlineStride % 3) == 0) {
- pixelFormat = GL.GL_BGR;
- pixelType = GL.GL_UNSIGNED_BYTE;
- rowLength = scanlineStride / 3;
- alignment = 1;
- } else {
- setupLazyCustomConversion(image);
- return;
- }
- }
- break;
- case BufferedImage.TYPE_4BYTE_ABGR_PRE:
- {
- // we can pass the image data directly to OpenGL only if
- // we have an integral number of pixels in each scanline
- // and only if the GL_EXT_abgr extension is present
-
- // NOTE: disabling this code path for now as it appears it's
- // buggy at least on some NVidia drivers and doesn't perform
- // the necessary byte swapping (FIXME: needs more
- // investigation)
- if ((scanlineStride % 4) == 0 && false) {
- pixelFormat = GL.GL_ABGR_EXT;
- pixelType = GL.GL_UNSIGNED_BYTE;
- rowLength = scanlineStride / 4;
- alignment = 4;
-
- // Store a reference to the original image for later in
- // case it turns out that we don't have GL_EXT_abgr at the
- // time we're going to do the texture upload to OpenGL
- setupLazyCustomConversion(image);
- expectingEXTABGR = true;
- break;
- } else {
- setupLazyCustomConversion(image);
- return;
- }
- }
- case BufferedImage.TYPE_USHORT_565_RGB:
- pixelFormat = GL.GL_RGB;
- pixelType = GL.GL_UNSIGNED_SHORT_5_6_5;
- rowLength = scanlineStride;
- alignment = 2;
- expectingGL12 = true;
- setupLazyCustomConversion(image);
- break;
- case BufferedImage.TYPE_USHORT_555_RGB:
- pixelFormat = GL.GL_BGRA;
- pixelType = GL.GL_UNSIGNED_SHORT_1_5_5_5_REV;
- rowLength = scanlineStride;
- alignment = 2;
- expectingGL12 = true;
- setupLazyCustomConversion(image);
- break;
- case BufferedImage.TYPE_BYTE_GRAY:
- pixelFormat = GL.GL_LUMINANCE;
- pixelType = GL.GL_UNSIGNED_BYTE;
- rowLength = scanlineStride;
- alignment = 1;
- break;
- case BufferedImage.TYPE_USHORT_GRAY:
- pixelFormat = GL.GL_LUMINANCE;
- pixelType = GL.GL_UNSIGNED_SHORT;
- rowLength = scanlineStride;
- alignment = 2;
- break;
- // Note: TYPE_INT_ARGB and TYPE_4BYTE_ABGR images go down the
- // custom code path to satisfy the invariant that images with an
- // alpha channel always go down with premultiplied alpha.
- case BufferedImage.TYPE_INT_ARGB:
- case BufferedImage.TYPE_4BYTE_ABGR:
- case BufferedImage.TYPE_BYTE_BINARY:
- case BufferedImage.TYPE_BYTE_INDEXED:
- case BufferedImage.TYPE_CUSTOM:
- default:
- ColorModel cm = image.getColorModel();
- if (cm.equals(rgbColorModel)) {
- pixelFormat = GL.GL_RGB;
- pixelType = GL.GL_UNSIGNED_BYTE;
- rowLength = scanlineStride / 3;
- alignment = 1;
- } else if (cm.equals(rgbaColorModel)) {
- pixelFormat = GL.GL_RGBA;
- pixelType = GL.GL_UNSIGNED_BYTE;
- rowLength = scanlineStride / 4; // FIXME: correct?
- alignment = 4;
- } else {
- setupLazyCustomConversion(image);
- return;
- }
- break;
- }
-
- createNIOBufferFromImage(image);
- }
-
- private void setupLazyCustomConversion(BufferedImage image) {
- imageForLazyCustomConversion = image;
- boolean hasAlpha = image.getColorModel().hasAlpha();
- if (pixelFormat == 0) {
- pixelFormat = hasAlpha ? GL.GL_RGBA : GL.GL_RGB;
- }
- alignment = 1; // FIXME: do we need better?
- rowLength = width; // FIXME: correct in all cases?
-
- // Allow previously-selected pixelType (if any) to override that
- // we can infer from the DataBuffer
- DataBuffer data = image.getRaster().getDataBuffer();
- if (data instanceof DataBufferByte || isPackedInt(image)) {
- // Don't use GL_UNSIGNED_INT for BufferedImage packed int images
- if (pixelType == 0) pixelType = GL.GL_UNSIGNED_BYTE;
- } else if (data instanceof DataBufferDouble) {
- throw new RuntimeException("DataBufferDouble rasters not supported by OpenGL");
- } else if (data instanceof DataBufferFloat) {
- if (pixelType == 0) pixelType = GL.GL_FLOAT;
- } else if (data instanceof DataBufferInt) {
- // FIXME: should we support signed ints?
- if (pixelType == 0) pixelType = GL.GL_UNSIGNED_INT;
- } else if (data instanceof DataBufferShort) {
- if (pixelType == 0) pixelType = GL.GL_SHORT;
- } else if (data instanceof DataBufferUShort) {
- if (pixelType == 0) pixelType = GL.GL_UNSIGNED_SHORT;
- } else {
- throw new RuntimeException("Unexpected DataBuffer type?");
- }
- }
-
- private void createFromCustom(BufferedImage image) {
- int width = image.getWidth();
- int height = image.getHeight();
-
- // create a temporary image that is compatible with OpenGL
- boolean hasAlpha = image.getColorModel().hasAlpha();
- ColorModel cm = null;
- int dataBufferType = image.getRaster().getDataBuffer().getDataType();
- // Don't use integer components for packed int images
- if (isPackedInt(image)) {
- dataBufferType = DataBuffer.TYPE_BYTE;
- }
- if (dataBufferType == DataBuffer.TYPE_BYTE) {
- cm = hasAlpha ? rgbaColorModel : rgbColorModel;
- } else {
- if (hasAlpha) {
- cm = new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB),
- null, true, true,
- Transparency.TRANSLUCENT,
- dataBufferType);
- } else {
- cm = new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB),
- null, false, false,
- Transparency.OPAQUE,
- dataBufferType);
- }
- }
-
- boolean premult = cm.isAlphaPremultiplied();
- WritableRaster raster =
- cm.createCompatibleWritableRaster(width, height);
- BufferedImage texImage = new BufferedImage(cm, raster, premult, null);
-
- // copy the source image into the temporary image
- Graphics2D g = texImage.createGraphics();
- g.setComposite(AlphaComposite.Src);
- g.drawImage(image, 0, 0, null);
- g.dispose();
-
- // Wrap the buffer from the temporary image
- createNIOBufferFromImage(texImage);
- }
-
- private boolean isPackedInt(BufferedImage image) {
- int imgType = image.getType();
- return (imgType == BufferedImage.TYPE_INT_RGB ||
- imgType == BufferedImage.TYPE_INT_BGR ||
- imgType == BufferedImage.TYPE_INT_ARGB ||
- imgType == BufferedImage.TYPE_INT_ARGB_PRE);
- }
-
- private void revertPixelFormatAndType() {
- // Knowing we don't have e.g. OpenGL 1.2 functionality available,
- // and knowing we're in the process of doing the fallback code
- // path, re-infer a vanilla pixel format and type compatible with
- // OpenGL 1.1
- pixelFormat = 0;
- pixelType = 0;
- setupLazyCustomConversion(imageForLazyCustomConversion);
- }
-
- private int estimatedMemorySize(Buffer buffer) {
- if (buffer == null) {
- return 0;
- }
- int capacity = buffer.capacity();
- if (buffer instanceof ByteBuffer) {
- return capacity;
- } else if (buffer instanceof IntBuffer) {
- return capacity * BufferUtil.SIZEOF_INT;
- } else if (buffer instanceof FloatBuffer) {
- return capacity * BufferUtil.SIZEOF_FLOAT;
- } else if (buffer instanceof ShortBuffer) {
- return capacity * BufferUtil.SIZEOF_SHORT;
- } else if (buffer instanceof LongBuffer) {
- return capacity * BufferUtil.SIZEOF_LONG;
- } else if (buffer instanceof DoubleBuffer) {
- return capacity * BufferUtil.SIZEOF_DOUBLE;
- }
- throw new RuntimeException("Unexpected buffer type " +
- buffer.getClass().getName());
- }
}
diff --git a/src/classes/com/sun/opengl/util/texture/TextureProvider.java b/src/classes/com/sun/opengl/util/texture/TextureProvider.java
new file mode 100755
index 000000000..38a89b245
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/texture/TextureProvider.java
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.texture;
+
+import java.io.*;
+import java.net.*;
+
+/** Plug-in interface to TextureIO to support reading OpenGL textures
+ from new file formats. For all methods, either internalFormat or
+ pixelFormat may be 0 in which case they must be inferred as
+ e.g. RGB or RGBA depending on the file contents.
+*/
+
+public interface TextureProvider {
+
+ /**
+ * Produces a TextureData object from a file, or returns null if the
+ * file format was not supported by this TextureProvider. Does not
+ * do any OpenGL-related work. The resulting TextureData can be
+ * converted into an OpenGL texture in a later step.
+ *
+ * @param file the file from which to read the texture data
+ *
+ * @param internalFormat the OpenGL internal format to be used for
+ * the texture, or 0 if it should be inferred
+ * from the file's contents
+ *
+ * @param pixelFormat the OpenGL pixel format to be used for
+ * the texture, or 0 if it should be inferred
+ * from the file's contents
+ *
+ * @param mipmap whether mipmaps should be produced for this
+ * texture either by autogenerating them or
+ * reading them from the file. Some file formats
+ * support multiple mipmaps in a single file in
+ * which case those mipmaps will be used rather
+ * than generating them.
+ *
+ * @param fileSuffix the file suffix to be used as a hint to the
+ * provider to more quickly decide whether it
+ * can handle the file, or null if the
+ * provider should infer the type from the
+ * file's contents
+ *
+ * @throws IOException if an error occurred while reading the file
+ */
+ public TextureData newTextureData(File file,
+ int internalFormat,
+ int pixelFormat,
+ boolean mipmap,
+ String fileSuffix) throws IOException;
+
+ /**
+ * Produces a TextureData object from a stream, or returns null if
+ * the file format was not supported by this TextureProvider. Does
+ * not do any OpenGL-related work. The resulting TextureData can be
+ * converted into an OpenGL texture in a later step.
+ *
+ * @param stream the stream from which to read the texture data
+ *
+ * @param internalFormat the OpenGL internal format to be used for
+ * the texture, or 0 if it should be inferred
+ * from the file's contents
+ *
+ * @param pixelFormat the OpenGL pixel format to be used for
+ * the texture, or 0 if it should be inferred
+ * from the file's contents
+ *
+ * @param mipmap whether mipmaps should be produced for this
+ * texture either by autogenerating them or
+ * reading them from the file. Some file formats
+ * support multiple mipmaps in a single file in
+ * which case those mipmaps will be used rather
+ * than generating them.
+ *
+ * @param fileSuffix the file suffix to be used as a hint to the
+ * provider to more quickly decide whether it
+ * can handle the file, or null if the
+ * provider should infer the type from the
+ * file's contents
+ *
+ * @throws IOException if an error occurred while reading the stream
+ */
+ public TextureData newTextureData(InputStream stream,
+ int internalFormat,
+ int pixelFormat,
+ boolean mipmap,
+ String fileSuffix) throws IOException;
+
+ /**
+ * Produces a TextureData object from a URL, or returns null if the
+ * file format was not supported by this TextureProvider. Does not
+ * do any OpenGL-related work. The resulting TextureData can be
+ * converted into an OpenGL texture in a later step.
+ *
+ * @param url the URL from which to read the texture data
+ *
+ * @param internalFormat the OpenGL internal format to be used for
+ * the texture, or 0 if it should be inferred
+ * from the file's contents
+ *
+ * @param pixelFormat the OpenGL pixel format to be used for
+ * the texture, or 0 if it should be inferred
+ * from the file's contents
+ *
+ * @param mipmap whether mipmaps should be produced for this
+ * texture either by autogenerating them or
+ * reading them from the file. Some file formats
+ * support multiple mipmaps in a single file in
+ * which case those mipmaps will be used rather
+ * than generating them.
+ *
+ * @param fileSuffix the file suffix to be used as a hint to the
+ * provider to more quickly decide whether it
+ * can handle the file, or null if the
+ * provider should infer the type from the
+ * file's contents
+ *
+ * @throws IOException if an error occurred while reading the URL
+ */
+ public TextureData newTextureData(URL url,
+ int internalFormat,
+ int pixelFormat,
+ boolean mipmap,
+ String fileSuffix) throws IOException;
+}
diff --git a/src/classes/com/sun/opengl/util/texture/TextureUtil.java b/src/classes/com/sun/opengl/util/texture/TextureUtil.java
new file mode 100755
index 000000000..80a4f1ddb
--- /dev/null
+++ b/src/classes/com/sun/opengl/util/texture/TextureUtil.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.sun.opengl.util.texture;
+
+import javax.media.opengl.*;
+import javax.media.opengl.glu.*;
+
+public class TextureUtil {
+ /** Constant which can be used as a file suffix to indicate a
+ DirectDraw Surface file. */
+ public static final String DDS = "dds";
+
+ /** Constant which can be used as a file suffix to indicate an SGI
+ RGB file. */
+ public static final String SGI = "sgi";
+
+ /** Constant which can be used as a file suffix to indicate an SGI
+ RGB file. */
+ public static final String SGI_RGB = "rgb";
+
+ /** Constant which can be used as a file suffix to indicate a GIF
+ file. */
+ public static final String GIF = "gif";
+
+ /** Constant which can be used as a file suffix to indicate a JPEG
+ file. */
+ public static final String JPG = "jpg";
+
+ /** Constant which can be used as a file suffix to indicate a PNG
+ file. */
+ public static final String PNG = "png";
+
+ /** Constant which can be used as a file suffix to indicate a Targa
+ file. */
+ public static final String TGA = "tga";
+
+ /** Constant which can be used as a file suffix to indicate a TIFF
+ file. */
+ public static final String TIFF = "tiff";
+
+ // For manually disabling the use of the texture rectangle
+ // extensions so you know the texture target is GL_TEXTURE_2D; this
+ // is useful for shader writers (thanks to Chris Campbell for this
+ // observation)
+ private static boolean texRectEnabled = true;
+
+ //---------------------------------------------------------------------------
+ // Global disabling of texture rectangle extension
+ //
+
+ /** Toggles the use of the GL_ARB_texture_rectangle extension by the
+ TextureIO classes. By default, on hardware supporting this
+ extension, the TextureIO classes may use the
+ GL_ARB_texture_rectangle extension for non-power-of-two
+ textures. (If the hardware supports the
+ GL_ARB_texture_non_power_of_two extension, that one is
+ preferred.) In some situations, for example when writing
+ shaders, it is advantageous to force the texture target to
+ always be GL_TEXTURE_2D in order to have one version of the
+ shader, even at the expense of texture memory in the case where
+ NPOT textures are not supported. This method allows the use of
+ the GL_ARB_texture_rectangle extension to be turned off globally
+ for this purpose. The default is that the use of the extension
+ is enabled. */
+ public static void setTexRectEnabled(boolean enabled) {
+ texRectEnabled = enabled;
+ }
+
+ /** Indicates whether the GL_ARB_texture_rectangle extension is
+ allowed to be used for non-power-of-two textures; see {@link
+ #setTexRectEnabled setTexRectEnabled}. */
+ public static boolean isTexRectEnabled() {
+ return texRectEnabled;
+ }
+
+}