/** * Returns whether or not the vertical glyph orientation value is "auto". */ protected boolean isGlyphOrientationAuto() { if (!isVertical()) return false; aci.first(); Integer vOrient = (Integer)aci.getAttribute(VERTICAL_ORIENTATION); if (vOrient != null) { return (vOrient == ORIENTATION_AUTO); } return true; }
/** * Returns whether or not the vertical glyph orientation value is "auto". */ protected boolean isGlyphOrientationAuto() { if (!isVertical()) return false; aci.first(); Integer vOrient = (Integer)aci.getAttribute(VERTICAL_ORIENTATION); if (vOrient != null) { return (vOrient == ORIENTATION_AUTO); } return true; }
/** * Returns whether or not the vertical glyph orientation value is "auto". */ protected boolean isGlyphOrientationAuto() { if (!isVertical()) return false; aci.first(); Integer vOrient = (Integer)aci.getAttribute(VERTICAL_ORIENTATION); if (vOrient != null) { return (vOrient == ORIENTATION_AUTO); } return true; }
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; }
Float angle; if (isVertical()) { angle = (Float)aci.getAttribute(VERTICAL_ORIENTATION_ANGLE); } else {
Float angle; if (isVertical()) { angle = (Float)aci.getAttribute(VERTICAL_ORIENTATION_ANGLE); } else {
Float angle; if (isVertical()) { angle = (Float)aci.getAttribute(VERTICAL_ORIENTATION_ANGLE); } else {
/** * Return the angle value according to the orientation * of the character. */ public double getComputedOrientationAngle(int index){ if ( isGlyphOrientationAuto() ){ if (isVertical()) { char ch = aci.setIndex(index); if (isLatinChar(ch)) return 90.0; else return 0.0; } return 0.0; } else{ return getGlyphOrientationAngle(); } }
/** * Return the angle value according to the orientation * of the character. */ public double getComputedOrientationAngle(int index){ if ( isGlyphOrientationAuto() ){ if (isVertical()) { char ch = aci.setIndex(index); if (isLatinChar(ch)) return 90.0; else return 0.0; } return 0.0; } else{ return getGlyphOrientationAngle(); } }
/** * Return the angle value according to the orientation * of the character. */ public double getComputedOrientationAngle(int index){ if ( isGlyphOrientationAuto() ){ if (isVertical()) { char ch = aci.setIndex(index); if (isLatinChar(ch)) return 90.0; else return 0.0; } return 0.0; } else{ return getGlyphOrientationAngle(); } }
boolean horizontal = !isVertical();
boolean horizontal = !isVertical();
boolean horizontal = !isVertical();
if (isVertical()) { if (glyphOrientationAuto) { if (isLatinChar(ch)) {
if (isVertical()) { if (glyphOrientationAuto) { if (isLatinChar(ch)) {
if (isVertical()) { if (glyphOrientationAuto) { if (isLatinChar(ch)) {