diff options
author | Sven Gothel <[email protected]> | 2011-04-08 21:35:34 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-04-08 21:35:34 +0200 |
commit | 324b85b0cc688f85a91e84b0b6d6a0378a79bea3 (patch) | |
tree | a5acbe1630d879e80ec66c6c3a72623431c57632 /src/jogl/classes/jogamp/graph/font | |
parent | e104e42ba9ecda8c4094bf4b183105a6ab719da5 (diff) |
Fix TAB: Replace all TAB with 4 spaces
Diffstat (limited to 'src/jogl/classes/jogamp/graph/font')
11 files changed, 218 insertions, 218 deletions
diff --git a/src/jogl/classes/jogamp/graph/font/JavaFontLoader.java b/src/jogl/classes/jogamp/graph/font/JavaFontLoader.java index a9ab902a9..bead9a5d2 100644 --- a/src/jogl/classes/jogamp/graph/font/JavaFontLoader.java +++ b/src/jogl/classes/jogamp/graph/font/JavaFontLoader.java @@ -74,7 +74,7 @@ public class JavaFontLoader implements FontSet { return get(FAMILY_REGULAR, 0) ; // Sans Serif Regular } - public Font get(int family, int style) { + public Font get(int family, int style) { Font font = (Font)fontMap.get( ( family << 8 ) | style ); if (font != null) { return font; @@ -121,7 +121,7 @@ public class JavaFontLoader implements FontSet { return font; } - + Font abspath(String fname, int family, int style) { final String err = "Problem loading font "+fname+", file "+javaFontPath+fname ; diff --git a/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java b/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java index 3614add5c..17db08801 100644 --- a/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java +++ b/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java @@ -76,8 +76,8 @@ public class UbuntuFontLoader implements FontSet { return get(FAMILY_REGULAR, 0) ; // Sans Serif Regular } - public Font get(int family, int style) - { + public Font get(int family, int style) + { Font font = (Font)fontMap.get( ( family << 8 ) | style ); if (font != null) { return font; @@ -119,7 +119,7 @@ public class UbuntuFontLoader implements FontSet { return font; } - + Font abspath(String fname, int family, int style) { final String err = "Problem loading font "+fname+", stream "+relPath+fname; try { @@ -136,5 +136,5 @@ public class UbuntuFontLoader implements FontSet { } catch(IOException ioe) { throw new GLException(err, ioe); } - } + } } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java index f702b981f..6292c8826 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java @@ -43,97 +43,97 @@ import com.jogamp.graph.font.FontFactory; import com.jogamp.graph.geom.AABBox; class TypecastFont implements FontInt { - static final boolean DEBUG = false; - - final OTFontCollection fontset; - final OTFont font; + static final boolean DEBUG = false; + + final OTFontCollection fontset; + final OTFont font; TypecastHMetrics metrics; final CmapFormat cmapFormat; - int cmapentries; - - // FIXME: Add cache size to limit memory usage ?? + int cmapentries; + + // FIXME: Add cache size to limit memory usage ?? IntObjectHashMap char2Glyph; public TypecastFont(OTFontCollection fontset) { - this.fontset = fontset; + this.fontset = fontset; this.font = fontset.getFont(0); // FIXME: Generic attempt to find the best CmapTable, // which is assumed to be the one with the most entries (stupid 'eh?) - CmapTable cmapTable = font.getCmapTable(); + CmapTable cmapTable = font.getCmapTable(); CmapFormat[] _cmapFormatP = { null, null, null, null }; int platform = -1; int platformLength = -1; int encoding = -1; - for(int i=0; i<cmapTable.getNumTables(); i++) { - CmapIndexEntry cmapIdxEntry = cmapTable.getCmapIndexEntry(i); - int pidx = cmapIdxEntry.getPlatformId(); - CmapFormat cf = cmapIdxEntry.getFormat(); + for(int i=0; i<cmapTable.getNumTables(); i++) { + CmapIndexEntry cmapIdxEntry = cmapTable.getCmapIndexEntry(i); + int pidx = cmapIdxEntry.getPlatformId(); + CmapFormat cf = cmapIdxEntry.getFormat(); if(DEBUG) { System.err.println("CmapFormat["+i+"]: platform " + pidx + ", encoding "+cmapIdxEntry.getEncodingId() + ": "+cf); } - if( _cmapFormatP[pidx] == null || - _cmapFormatP[pidx].getLength() < cf.getLength() ) { - _cmapFormatP[pidx] = cf; - if( cf.getLength() > platformLength ) { - platformLength = cf.getLength() ; - platform = pidx; - encoding = cmapIdxEntry.getEncodingId(); - } - } - } + if( _cmapFormatP[pidx] == null || + _cmapFormatP[pidx].getLength() < cf.getLength() ) { + _cmapFormatP[pidx] = cf; + if( cf.getLength() > platformLength ) { + platformLength = cf.getLength() ; + platform = pidx; + encoding = cmapIdxEntry.getEncodingId(); + } + } + } if(0 <= platform) { cmapFormat = _cmapFormatP[platform]; if(DEBUG) { System.err.println("Selected CmapFormat: platform " + platform + ", encoding "+encoding + ": "+cmapFormat); } - } else { - CmapFormat _cmapFormat = null; - /*if(null == _cmapFormat) { + } else { + CmapFormat _cmapFormat = null; + /*if(null == _cmapFormat) { platform = ID.platformMacintosh; encoding = ID.encodingASCII; - _cmapFormat = cmapTable.getCmapFormat(platform, encoding); - } */ - if(null == _cmapFormat) { - // default unicode - platform = ID.platformMicrosoft; - encoding = ID.encodingUnicode; - _cmapFormat = cmapTable.getCmapFormat((short)platform, (short)encoding); - } - if(null == _cmapFormat) { - // maybe a symbol font ? + _cmapFormat = cmapTable.getCmapFormat(platform, encoding); + } */ + if(null == _cmapFormat) { + // default unicode + platform = ID.platformMicrosoft; + encoding = ID.encodingUnicode; + _cmapFormat = cmapTable.getCmapFormat((short)platform, (short)encoding); + } + if(null == _cmapFormat) { + // maybe a symbol font ? platform = ID.platformMicrosoft; encoding = ID.encodingSymbol; _cmapFormat = cmapTable.getCmapFormat((short)platform, (short)encoding); - } - if(null == _cmapFormat) { - throw new RuntimeException("Cannot find a suitable cmap table for font "+font); - } + } + if(null == _cmapFormat) { + throw new RuntimeException("Cannot find a suitable cmap table for font "+font); + } cmapFormat = _cmapFormat; if(DEBUG) { System.err.println("Selected CmapFormat (2): platform " + platform + ", encoding "+encoding + ": "+cmapFormat); } } - cmapentries = 0; + cmapentries = 0; for (int i = 0; i < cmapFormat.getRangeCount(); ++i) { CmapFormat.Range range = cmapFormat.getRange(i); cmapentries += range.getEndCode() - range.getStartCode() + 1; // end included - } + } if(DEBUG) { - System.err.println("num glyphs: "+font.getNumGlyphs()); - System.err.println("num cmap entries: "+cmapentries); - System.err.println("num cmap ranges: "+cmapFormat.getRangeCount()); + System.err.println("num glyphs: "+font.getNumGlyphs()); + System.err.println("num cmap entries: "+cmapentries); + System.err.println("num cmap ranges: "+cmapFormat.getRangeCount()); for (int i = 0; i < cmapFormat.getRangeCount(); ++i) { CmapFormat.Range range = cmapFormat.getRange(i); for (int j = range.getStartCode(); j <= range.getEndCode(); ++j) { - final int code = cmapFormat.mapCharCode(j); - if(code < 15) { - System.err.println(" char: " + (int)j + " ( " + (char)j +" ) -> " + code); - } + final int code = cmapFormat.mapCharCode(j); + if(code < 15) { + System.err.println(" char: " + (int)j + " ( " + (char)j +" ) -> " + code); + } } } } @@ -155,9 +155,9 @@ class TypecastFont implements FontInt { } public Glyph getGlyph(char symbol) { - TypecastGlyph result = (TypecastGlyph) char2Glyph.get(symbol); + TypecastGlyph result = (TypecastGlyph) char2Glyph.get(symbol); if (null == result) { - // final short code = (short) char2Code.get(symbol); + // final short code = (short) char2Code.get(symbol); short code = (short) cmapFormat.mapCharCode(symbol); if(0 == code && 0 != symbol) { // reserved special glyph IDs by convention @@ -168,19 +168,19 @@ class TypecastFont implements FontInt { } } - jogamp.graph.font.typecast.ot.OTGlyph glyph = font.getGlyph(code); - if(null == glyph) { - glyph = font.getGlyph(Glyph.ID_UNKNOWN); - } - if(null == glyph) { - throw new RuntimeException("Could not retrieve glyph for symbol: <"+symbol+"> "+(int)symbol+" -> glyph id "+code); - } - Path2D path = TypecastRenderer.buildPath(glyph); - result = new TypecastGlyph(this, symbol, code, glyph.getBBox(), glyph.getAdvanceWidth(), path); - if(DEBUG) { - System.err.println("New glyph: " + (int)symbol + " ( " + (char)symbol +" ) -> " + code + ", contours " + glyph.getPointCount() + ": " + path); - } - final HdmxTable hdmx = font.getHdmxTable(); + jogamp.graph.font.typecast.ot.OTGlyph glyph = font.getGlyph(code); + if(null == glyph) { + glyph = font.getGlyph(Glyph.ID_UNKNOWN); + } + if(null == glyph) { + throw new RuntimeException("Could not retrieve glyph for symbol: <"+symbol+"> "+(int)symbol+" -> glyph id "+code); + } + Path2D path = TypecastRenderer.buildPath(glyph); + result = new TypecastGlyph(this, symbol, code, glyph.getBBox(), glyph.getAdvanceWidth(), path); + if(DEBUG) { + System.err.println("New glyph: " + (int)symbol + " ( " + (char)symbol +" ) -> " + code + ", contours " + glyph.getPointCount() + ": " + path); + } + final HdmxTable hdmx = font.getHdmxTable(); if (null!= result && null != hdmx) { /*if(DEBUG) { System.err.println("hdmx "+hdmx); @@ -193,14 +193,14 @@ class TypecastFont implements FontInt { System.err.println("hdmx advance : pixelsize = "+dr.getWidth(code)+" : "+ dr.getPixelSize()); } } - } - char2Glyph.put(symbol, result); + } + char2Glyph.put(symbol, result); } return result; } public void getOutline(String string, float pixelSize, AffineTransform transform, Path2D[] result) { - TypecastRenderer.getOutline(this, string, pixelSize, transform, result); + TypecastRenderer.getOutline(this, string, pixelSize, transform, result); } public float getStringWidth(String string, float pixelSize) { @@ -217,7 +217,7 @@ class TypecastFont implements FontInt { } } - return (int)(width + 0.5f); + return (int)(width + 0.5f); } public float getStringHeight(String string, float pixelSize) { @@ -233,7 +233,7 @@ class TypecastFont implements FontInt { height = (int)Math.ceil(Math.max(bbox.getHeight(), height)); } } - return height; + return height; } public AABBox getStringBounds(CharSequence string, float pixelSize) { @@ -263,11 +263,11 @@ class TypecastFont implements FontInt { totalHeight -= advanceY; totalWidth = Math.max(curLineWidth, totalWidth); } - return new AABBox(0, 0, 0, totalWidth, totalHeight,0); + return new AABBox(0, 0, 0, totalWidth, totalHeight,0); } final public int getNumGlyphs() { - return font.getNumGlyphs(); + return font.getNumGlyphs(); } public boolean isPrintableChar( char c ) { diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java index 88d865f9c..f20b7d1e7 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java @@ -42,7 +42,7 @@ public class TypecastGlyph implements FontInt.Glyph { final Font font; final float advance; HashMap<Float, Float> size2advance = new HashMap<Float, Float>(); - + public Advance(Font font, float advance) { this.font = font; @@ -86,12 +86,12 @@ public class TypecastGlyph implements FontInt.Glyph { "\n advances: \n"+size2advance; } } - + public class Metrics { - AABBox bbox; + AABBox bbox; Advance advance; - + public Metrics(Font font, AABBox bbox, float advance) { this.bbox = bbox; @@ -128,13 +128,13 @@ public class TypecastGlyph implements FontInt.Glyph { "\n bbox: "+this.bbox+ this.advance; } - } + } public static final short INVALID_ID = (short)((1 << 16) - 1); public static final short MAX_ID = (short)((1 << 16) - 2); private final Font font; - + char symbol; short id; int advance; @@ -143,15 +143,15 @@ public class TypecastGlyph implements FontInt.Glyph { protected Path2D path; // in EM units protected Path2D pathSized; protected float numberSized; - + protected TypecastGlyph(Font font, char symbol) { - this.font = font; + this.font = font; this.symbol = symbol; } protected TypecastGlyph(Font font, - char symbol, short id, AABBox bbox, int advance, Path2D path) { - this.font = font; + char symbol, short id, AABBox bbox, int advance, Path2D path) { + this.font = font; this.symbol = symbol; this.advance = advance; @@ -161,7 +161,7 @@ public class TypecastGlyph implements FontInt.Glyph { this.pathSized = null; this.numberSized = 0.0f; } - + void init(short id, AABBox bbox, int advance) { this.id = id; this.advance = advance; @@ -176,11 +176,11 @@ public class TypecastGlyph implements FontInt.Glyph { public Font getFont() { return this.font; } - + public char getSymbol() { return this.symbol; } - + AABBox getBBoxUnsized() { return this.metrics.getBBox(); } @@ -192,22 +192,22 @@ public class TypecastGlyph implements FontInt.Glyph { public Metrics getMetrics() { return this.metrics; } - + public short getID() { return this.id; } - + public float getScale(float pixelSize) { return this.metrics.getScale(pixelSize); } - + public AABBox getBBox(float pixelSize) { final float size = getScale(pixelSize); AABBox newBox = getBBox().clone(); newBox.scale(size); return newBox; } - + protected void addAdvance(float advance, float size) { this.metrics.addAdvance(advance, size); } @@ -217,9 +217,9 @@ public class TypecastGlyph implements FontInt.Glyph { } public Path2D getPath() { - return this.path; + return this.path; } - + public Path2D getPath(float pixelSize) { final float size = getScale(pixelSize); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java index a69948006..0dd7a6178 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java @@ -34,22 +34,22 @@ import com.jogamp.graph.font.Font.Metrics; import com.jogamp.graph.geom.AABBox; class TypecastHMetrics implements Metrics { - private final TypecastFont fontImpl; - - // HeadTable + private final TypecastFont fontImpl; + + // HeadTable private final HeadTable headTable; - private final float unitsPerEM_Inv; - private final AABBox bbox; - // HheaTable - private final HheaTable hheaTable; + private final float unitsPerEM_Inv; + private final AABBox bbox; + // HheaTable + private final HheaTable hheaTable; // VheaTable (for horizontal fonts) // private final VheaTable vheaTable; - - public TypecastHMetrics(TypecastFont fontImpl) { - this.fontImpl = fontImpl; - headTable = this.fontImpl.font.getHeadTable(); - hheaTable = this.fontImpl.font.getHheaTable(); - // vheaTable = this.fontImpl.font.getVheaTable(); + + public TypecastHMetrics(TypecastFont fontImpl) { + this.fontImpl = fontImpl; + headTable = this.fontImpl.font.getHeadTable(); + hheaTable = this.fontImpl.font.getHheaTable(); + // vheaTable = this.fontImpl.font.getVheaTable(); unitsPerEM_Inv = 1.0f / ( (float) headTable.getUnitsPerEm() ); int maxWidth = headTable.getXMax() - headTable.getXMin(); @@ -59,8 +59,8 @@ class TypecastHMetrics implements Metrics { float highx = lowx + maxWidth; float highy = lowy + maxHeight; bbox = new AABBox(lowx, lowy, 0, highx, highy, 0); // invert - } - + } + public final float getAscent(float pixelSize) { return getScale(pixelSize) * -hheaTable.getAscender(); // invert } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java index 9a81d78d3..ab5e673db 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java @@ -40,48 +40,48 @@ import com.jogamp.graph.font.Font; */ public class TypecastRenderer { - public static void getOutline(TypecastFont font, - String string, float pixelSize, AffineTransform transform, Path2D[] p) - { - if (string == null) { - return; - } - Font.Metrics metrics = font.getMetrics(); - float advanceTotal = 0; - float lineGap = metrics.getLineGap(pixelSize) ; - float ascent = metrics.getAscent(pixelSize) ; - float descent = metrics.getDescent(pixelSize) ; - if (transform == null) { - transform = new AffineTransform(); - } - AffineTransform t = new AffineTransform(); + public static void getOutline(TypecastFont font, + String string, float pixelSize, AffineTransform transform, Path2D[] p) + { + if (string == null) { + return; + } + Font.Metrics metrics = font.getMetrics(); + float advanceTotal = 0; + float lineGap = metrics.getLineGap(pixelSize) ; + float ascent = metrics.getAscent(pixelSize) ; + float descent = metrics.getDescent(pixelSize) ; + if (transform == null) { + transform = new AffineTransform(); + } + AffineTransform t = new AffineTransform(); - float advanceY = lineGap - descent + ascent; - float y = 0; - for (int i=0; i<string.length(); i++) - { - p[i] = new Path2D(); - p[i].reset(); - t.setTransform(transform); - char character = string.charAt(i); - if (character == '\n') { - y -= advanceY; - advanceTotal = 0; - continue; - } else if (character == ' ') { - advanceTotal += font.font.getHmtxTable().getAdvanceWidth(TypecastGlyph.ID_SPACE) * metrics.getScale(pixelSize); + float advanceY = lineGap - descent + ascent; + float y = 0; + for (int i=0; i<string.length(); i++) + { + p[i] = new Path2D(); + p[i].reset(); + t.setTransform(transform); + char character = string.charAt(i); + if (character == '\n') { + y -= advanceY; + advanceTotal = 0; + continue; + } else if (character == ' ') { + advanceTotal += font.font.getHmtxTable().getAdvanceWidth(TypecastGlyph.ID_SPACE) * metrics.getScale(pixelSize); continue; } - TypecastGlyph glyph = (TypecastGlyph) font.getGlyph(character); - Path2D gp = glyph.getPath(); - float scale = metrics.getScale(pixelSize); - t.translate(advanceTotal, y); - t.scale(scale, scale); - p[i].append(gp.iterator(t), false); - advanceTotal += glyph.getAdvance(pixelSize, true); - } - } - + TypecastGlyph glyph = (TypecastGlyph) font.getGlyph(character); + Path2D gp = glyph.getPath(); + float scale = metrics.getScale(pixelSize); + t.translate(advanceTotal, y); + t.scale(scale, scale); + p[i].append(gp.iterator(t), false); + advanceTotal += glyph.getAdvance(pixelSize, true); + } + } + /** * Build a {@link com.jogamp.graph.geom.Path2D Path2D} from a * {@link jogamp.graph.font.typecast.ot.OTGlyph Glyph}. This glyph path can then @@ -116,44 +116,44 @@ public class TypecastRenderer { Point point = glyph.getPoint(startIndex + offset%count); Point point_plus1 = glyph.getPoint(startIndex + (offset+1)%count); Point point_plus2 = glyph.getPoint(startIndex + (offset+2)%count); - if(offset == 0) + if(offset == 0) { gp.moveTo(point.x, -point.y); } - - if (point.onCurve) { - if (point_plus1.onCurve) { - // s = new Line2D.Float(point.x, -point.y, point_plus1.x, -point_plus1.y); - gp.lineTo( point_plus1.x, -point_plus1.y ); - offset++; - } else { - if (point_plus2.onCurve) { - // s = new QuadCurve2D.Float( point.x, -point.y, point_plus1.x, -point_plus1.y, point_plus2.x, -point_plus2.y); - gp.quadTo(point_plus1.x, -point_plus1.y, point_plus2.x, -point_plus2.y); - offset+=2; - } else { - // s = new QuadCurve2D.Float(point.x,-point.y,point_plus1.x,-point_plus1.y, - // midValue(point_plus1.x, point_plus2.x), -midValue(point_plus1.y, point_plus2.y)); - gp.quadTo(point_plus1.x, -point_plus1.y, midValue(point_plus1.x, point_plus2.x), -midValue(point_plus1.y, point_plus2.y)); - offset+=2; - } - } - } else { - if (point_plus1.onCurve) { - // s = new QuadCurve2D.Float(midValue(point_minus1.x, point.x), -midValue(point_minus1.y, point.y), - // point.x, -point.y, point_plus1.x, -point_plus1.y); - //gp.curve3(point_plus1.x, -point_plus1.y, point.x, -point.y); - gp.quadTo(point.x, -point.y, point_plus1.x, -point_plus1.y); - offset++; - - } else { - // s = new QuadCurve2D.Float(midValue(point_minus1.x, point.x), -midValue(point_minus1.y, point.y), point.x, -point.y, - // midValue(point.x, point_plus1.x), -midValue(point.y, point_plus1.y)); - //gp.curve3(midValue(point.x, point_plus1.x), -midValue(point.y, point_plus1.y), point.x, -point.y); - gp.quadTo(point.x, -point.y, midValue(point.x, point_plus1.x), -midValue(point.y, point_plus1.y)); - offset++; - } - } + + if (point.onCurve) { + if (point_plus1.onCurve) { + // s = new Line2D.Float(point.x, -point.y, point_plus1.x, -point_plus1.y); + gp.lineTo( point_plus1.x, -point_plus1.y ); + offset++; + } else { + if (point_plus2.onCurve) { + // s = new QuadCurve2D.Float( point.x, -point.y, point_plus1.x, -point_plus1.y, point_plus2.x, -point_plus2.y); + gp.quadTo(point_plus1.x, -point_plus1.y, point_plus2.x, -point_plus2.y); + offset+=2; + } else { + // s = new QuadCurve2D.Float(point.x,-point.y,point_plus1.x,-point_plus1.y, + // midValue(point_plus1.x, point_plus2.x), -midValue(point_plus1.y, point_plus2.y)); + gp.quadTo(point_plus1.x, -point_plus1.y, midValue(point_plus1.x, point_plus2.x), -midValue(point_plus1.y, point_plus2.y)); + offset+=2; + } + } + } else { + if (point_plus1.onCurve) { + // s = new QuadCurve2D.Float(midValue(point_minus1.x, point.x), -midValue(point_minus1.y, point.y), + // point.x, -point.y, point_plus1.x, -point_plus1.y); + //gp.curve3(point_plus1.x, -point_plus1.y, point.x, -point.y); + gp.quadTo(point.x, -point.y, point_plus1.x, -point_plus1.y); + offset++; + + } else { + // s = new QuadCurve2D.Float(midValue(point_minus1.x, point.x), -midValue(point_minus1.y, point.y), point.x, -point.y, + // midValue(point.x, point_plus1.x), -midValue(point.y, point_plus1.y)); + //gp.curve3(midValue(point.x, point_plus1.x), -midValue(point.y, point_plus1.y), point.x, -point.y); + gp.quadTo(point.x, -point.y, midValue(point.x, point_plus1.x), -midValue(point.y, point_plus1.y)); + offset++; + } + } } } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/Mnemonic.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/Mnemonic.java index 5afb939ab..6b3dc1f6f 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/Mnemonic.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/Mnemonic.java @@ -72,9 +72,9 @@ public class Mnemonic { public static final short RS = 0x43; public static final short WCVTP = 0x44; public static final short RCVT = 0x45; - public static final short GC = 0x46; // [a] + public static final short GC = 0x46; // [a] public static final short SCFS = 0x48; - public static final short MD = 0x49; // [a] + public static final short MD = 0x49; // [a] public static final short MPPEM = 0x4B; public static final short MPS = 0x4C; public static final short FLIPON = 0x4D; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/OTFont.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/OTFont.java index 17b5af594..6e7e76bc7 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/OTFont.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/OTFont.java @@ -182,8 +182,8 @@ public class OTFont { } public OTGlyph getGlyph(int i) { - - final GlyfDescript _glyfDescr = _glyf.getDescription(i); + + final GlyfDescript _glyfDescr = _glyf.getDescription(i); return (null != _glyfDescr) ? new OTGlyph( _glyfDescr, diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/OTGlyph.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/OTGlyph.java index 4b6242d56..5c004246a 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/OTGlyph.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/OTGlyph.java @@ -103,7 +103,7 @@ public class OTGlyph { } public AABBox getBBox() { - return _bbox; + return _bbox; } public int getAdvanceWidth() { @@ -164,6 +164,6 @@ public class OTGlyph { // _points[gd.getPointCount()] = new Point(0, 0, true, true); // _points[gd.getPointCount()+1] = new Point(_advanceWidth, 0, true, true); - _bbox = new AABBox(gd.getXMinimum(), gd.getYMinimum(), 0, gd.getXMaximum(), gd.getYMaximum(), 0); + _bbox = new AABBox(gd.getXMinimum(), gd.getYMinimum(), 0, gd.getXMaximum(), gd.getYMaximum(), 0); } } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PostTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PostTable.java index ed82f2654..4804c35f2 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PostTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PostTable.java @@ -175,15 +175,15 @@ public class PostTable implements Table { "lessequal", // 148 "greaterequal", // 149 "yen", // 150 - "mu", // 151 + "mu", // 151 "partialdiff", // 152 "summation", // 153 "product", // 154 - "pi", // 155 + "pi", // 155 "integral'", // 156 "ordfeminine", // 157 "ordmasculine", // 158 - "Omega", // 159 + "Omega", // 159 "ae", // 160 "oslash", // 161 "questiondown", // 162 diff --git a/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Interpreter.java b/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Interpreter.java index 252c6acc4..a659a7003 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Interpreter.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Interpreter.java @@ -140,8 +140,8 @@ public class Interpreter { private void _deltac1() { int n = pop(); for (int i = 0; i < n; i++) { - pop(); // pn - pop(); // argn + pop(); // pn + pop(); // argn } } @@ -151,8 +151,8 @@ public class Interpreter { private void _deltac2() { int n = pop(); for (int i = 0; i < n; i++) { - pop(); // pn - pop(); // argn + pop(); // pn + pop(); // argn } } @@ -162,8 +162,8 @@ public class Interpreter { private void _deltac3() { int n = pop(); for (int i = 0; i < n; i++) { - pop(); // pn - pop(); // argn + pop(); // pn + pop(); // argn } } @@ -173,8 +173,8 @@ public class Interpreter { private void _deltap1() { int n = pop(); for (int i = 0; i < n; i++) { - pop(); // pn - pop(); // argn + pop(); // pn + pop(); // argn } } @@ -184,8 +184,8 @@ public class Interpreter { private void _deltap2() { int n = pop(); for (int i = 0; i < n; i++) { - pop(); // pn - pop(); // argn + pop(); // pn + pop(); // argn } } @@ -195,8 +195,8 @@ public class Interpreter { private void _deltap3() { int n = pop(); for (int i = 0; i < n; i++) { - pop(); // pn - pop(); // argn + pop(); // pn + pop(); // argn } } @@ -407,12 +407,12 @@ public class Interpreter { * to inhibit grid-fitting when a glyph is being rotated or stretched, use the * following sequence on the preprogram: * - * PUSHB[000] 6 ; ask GETINFO to check for stretching or rotation - * GETINFO[] ; will push TRUE if glyph is stretched or rotated - * IF[] ; tests value at top of stack - * PUSHB[000] 1 ; value for INSTCTRL - * PUSHB[000] 1 ; selector for INSTCTRL - * INSTRCTRL[] ; based on selector and value will turn grid-fitting off + * PUSHB[000] 6 ; ask GETINFO to check for stretching or rotation + * GETINFO[] ; will push TRUE if glyph is stretched or rotated + * IF[] ; tests value at top of stack + * PUSHB[000] 1 ; value for INSTCTRL + * PUSHB[000] 1 ; selector for INSTCTRL + * INSTRCTRL[] ; based on selector and value will turn grid-fitting off * EIF[] * * Selector flag 2 is used to establish that any parameters set in the CVT program @@ -923,8 +923,8 @@ public class Interpreter { * Set Freedom_Vector From Stack */ private void _sfvfs() { - gs.freedom_vector[1] = pop(); // y - gs.freedom_vector[0] = pop(); // x + gs.freedom_vector[1] = pop(); // y + gs.freedom_vector[0] = pop(); // x } /* @@ -988,9 +988,9 @@ public class Interpreter { * USES: loop */ private void _shpix() { - pop(); // amount + pop(); // amount while (gs.loop-- > 0) { - pop(); // p + pop(); // p } gs.loop = 1; } @@ -1017,8 +1017,8 @@ public class Interpreter { * Set Projection_Vector From Stack */ private void _spvfs() { - gs.projection_vector[1] = pop(); // y - gs.projection_vector[0] = pop(); // x + gs.projection_vector[1] = pop(); // y + gs.projection_vector[0] = pop(); // x } /* |