// (gv) createGV, layoutGV
// (tl) TL constructors
// (tm) line break
public static void init() {
textroot = new Group("text", "Text Benchmarks");
textroot.setTabbed();
txoptroot = new Group(textroot, "opts", "Text Options");
txoptroot.setTabbed();
txoptdataroot = new Group(txoptroot, "data", "Text Data");
tlengthList = new Option.IntList(txoptdataroot, "tlength",
"Text Length",
tlengths,
intStringList(tlengths),
intStringList(tlengths, " chars"),
0x10);
((Option.ObjectList) tlengthList).setNumRows(5);
tscriptList = new Option.ObjectList(txoptdataroot, "tscript",
"Text Script",
tscripts,
tscripts,
tscripts,
tscripts,
0x1);
((Option.ObjectList) tscriptList).setNumRows(4);
txoptfontroot = new Group(txoptroot, "font", "Font");
fnameList = new FontOption(txoptfontroot, "fname", "Family Name");
fstyleList = new Option.IntList(txoptfontroot, "fstyle",
"Style",
new int[] {
Font.PLAIN, Font.BOLD, Font.ITALIC, Font.BOLD + Font.ITALIC,
},
new String[] {
"plain", "bold", "italic", "bolditalic",
},
new String[] {
"Plain", "Bold", "Italic", "Bold Italic",
},
0x1);
float[] fsl = hasGraphics2D ? fsizes : fintsizes;
fsizeList = new Option.ObjectList(txoptfontroot, "fsize",
"Size",
floatStringList(fsl),
floatObjectList(fsl),
floatStringList(fsl),
floatStringList(fsl, "pt"),
0x40);
((Option.ObjectList) fsizeList).setNumRows(5);
if (hasGraphics2D) {
ftxList = new Option.ObjectList(txoptfontroot, "ftx",
"Transform",
txDescNames,
txList,
txNames,
txDescNames,
0x1);
((Option.ObjectList) ftxList).setNumRows(6);
txoptgraphicsroot = new Group(txoptroot, "graphics", "Graphics");
String[] taaNames;
Object[] taaHints;
try {
taaNames = new String[] {
"Off", "On",
"LCD_HRGB", "LCD_HBGR", "LCD_VRGB", "LCD_VBGR"
};
taaHints = new Object[] {
RenderingHints.VALUE_TEXT_ANTIALIAS_OFF,
RenderingHints.VALUE_TEXT_ANTIALIAS_ON,
RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB,
RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HBGR,
RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_VRGB,
RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_VBGR,
};
} catch (NoSuchFieldError e) {
taaNames = new String[] {
"Off", "On"
};
taaHints = new Object[] {
RenderingHints.VALUE_TEXT_ANTIALIAS_OFF,
RenderingHints.VALUE_TEXT_ANTIALIAS_ON,
};
}
taaList = new Option.ObjectList(txoptgraphicsroot, "textaa",
"Text AntiAlias",
taaNames, taaHints,
taaNames, taaNames,
0x1);
((Option.ObjectList) taaList).setNumRows(2);
// add special TextAAOpt for backwards compatibility with
// older options files
new TextAAOpt();
tfmTog = new Option.Toggle(txoptgraphicsroot, "tfm",
"Fractional Metrics", Option.Toggle.Off);
gaaTog = new Option.Toggle(txoptgraphicsroot, "gaa",
"Graphics AntiAlias", Option.Toggle.Off);
gtxList = new Option.ObjectList(txoptgraphicsroot, "gtx",
"Transform",
txDescNames,
txList,
txNames,
txDescNames,
0x1);
((Option.ObjectList) gtxList).setNumRows(6);
advoptsroot = new Group(txoptroot, "advopts", "Advanced Options");
gvstyList = new Option.IntList(advoptsroot, "gvstyle", "Style",
new int[] { 0, 1, 2, 3 },
new String[] { "std", "wave", "twist", "circle" },
new String[] { "Standard",
"Positions adjusted",