/** * Returns the number of chars represented by the glyphs within the * specified range. * @param startGlyphIndex The index of the first glyph in the range. * @param endGlyphIndex The index of the last glyph in the range. * @return The number of chars. */ public int getCharacterCount(int startGlyphIndex, int endGlyphIndex) { int numChars = 0; if (startGlyphIndex < 0) { startGlyphIndex = 0; } if (endGlyphIndex > glyphs.length-1) { endGlyphIndex = glyphs.length-1; } for (int i = startGlyphIndex; i <= endGlyphIndex; i++) { Glyph glyph = glyphs[i]; if (glyph.getGlyphCode() == -1) { // Missing glyph mapps to just one char... numChars++; } else { String glyphUnicode = glyph.getUnicode(); numChars += glyphUnicode.length(); } } return numChars; }
/** * Returns the number of chars represented by the glyphs within the * specified range. * @param startGlyphIndex The index of the first glyph in the range. * @param endGlyphIndex The index of the last glyph in the range. * @return The number of chars. */ public int getCharacterCount(int startGlyphIndex, int endGlyphIndex) { int numChars = 0; if (startGlyphIndex < 0) { startGlyphIndex = 0; } if (endGlyphIndex > glyphs.length-1) { endGlyphIndex = glyphs.length-1; } for (int i = startGlyphIndex; i <= endGlyphIndex; i++) { Glyph glyph = glyphs[i]; if (glyph.getGlyphCode() == -1) { // Missing glyph mapps to just one char... numChars++; } else { String glyphUnicode = glyph.getUnicode(); numChars += glyphUnicode.length(); } } return numChars; }
/** * Returns the number of chars represented by the glyphs within the * specified range. * @param startGlyphIndex The index of the first glyph in the range. * @param endGlyphIndex The index of the last glyph in the range. * @return The number of chars. */ public int getCharacterCount(int startGlyphIndex, int endGlyphIndex) { int numChars = 0; if (startGlyphIndex < 0) { startGlyphIndex = 0; } if (endGlyphIndex > glyphs.length-1) { endGlyphIndex = glyphs.length-1; } for (int i = startGlyphIndex; i <= endGlyphIndex; i++) { Glyph glyph = glyphs[i]; if (glyph.getGlyphCode() == -1) { // Missing glyph mapps to just one char... numChars++; } else { String glyphUnicode = glyph.getUnicode(); numChars += glyphUnicode.length(); } } return numChars; }
glyphLogicalBounds[i] = null; String uni = g.getUnicode(); if ((uni != null) && (uni.length() != 0) && ArabicTextHandler.arabicCharTransparent(uni.charAt(0))) { int j; for (j=i+1; j<glyphs.length; j++) { uni = glyphs[j].getUnicode(); if ((uni == null) || (uni.length() == 0)) break; char ch = uni.charAt(0);
glyphLogicalBounds[i] = null; String uni = g.getUnicode(); if ((uni != null) && (uni.length() != 0) && ArabicTextHandler.arabicCharTransparent(uni.charAt(0))) { int j; for (j=i+1; j<glyphs.length; j++) { uni = glyphs[j].getUnicode(); if ((uni == null) || (uni.length() == 0)) break; char ch = uni.charAt(0);
glyphLogicalBounds[i] = null; String uni = g.getUnicode(); if ((uni != null) && (uni.length() != 0) && ArabicTextHandler.arabicCharTransparent(uni.charAt(0))) { int j; for (j=i+1; j<glyphs.length; j++) { uni = glyphs[j].getUnicode(); if ((uni == null) || (uni.length() == 0)) break; char ch = uni.charAt(0);