/** * Returns the current text position at the completion * of glyph layout. */ public Point2D getAdvance2D() { adjustTextSpacing(); return advance; }
/** * Returns the current text position at the completion * of glyph layout. */ public Point2D getAdvance2D() { adjustTextSpacing(); return advance; }
/** * Returns the current text position at the completion * of glyph layout. */ public Point2D getAdvance2D() { adjustTextSpacing(); return advance; }
public float [] getGlyphAdvances() { if (glyphAdvances != null) return glyphAdvances; if (!spacingApplied) // This will layout the text if needed. adjustTextSpacing(); int numGlyphs = gv.getNumGlyphs(); float [] glyphPos = gv.getGlyphPositions(0, numGlyphs+1, null); glyphAdvances = new float[numGlyphs+1]; int off = 0; if (isVertical()) off = 1; float start = glyphPos[off]; for (int i=0; i<numGlyphs+1; i++) { glyphAdvances[i] = glyphPos[2*i+off]-start; } return glyphAdvances; }
public float [] getGlyphAdvances() { if (glyphAdvances != null) return glyphAdvances; if (!spacingApplied) // This will layout the text if needed. adjustTextSpacing(); int numGlyphs = gv.getNumGlyphs(); float [] glyphPos = gv.getGlyphPositions(0, numGlyphs+1, null); glyphAdvances = new float[numGlyphs+1]; int off = 0; if (isVertical()) off = 1; float start = glyphPos[off]; for (int i=0; i<numGlyphs+1; i++) { glyphAdvances[i] = glyphPos[2*i+off]-start; } return glyphAdvances; }
public float [] getGlyphAdvances() { if (glyphAdvances != null) return glyphAdvances; if (!spacingApplied) // This will layout the text if needed. adjustTextSpacing(); int numGlyphs = gv.getNumGlyphs(); float [] glyphPos = gv.getGlyphPositions(0, numGlyphs+1, null); glyphAdvances = new float[numGlyphs+1]; int off = 0; if (isVertical()) off = 1; float start = glyphPos[off]; for (int i=0; i<numGlyphs+1; i++) { glyphAdvances[i] = glyphPos[2*i+off]-start; } return glyphAdvances; }