PixmapPacker packer) { boolean missing = face.getCharIndex(c) == 0 && c != 0; if (missing) return null;
PixmapPacker packer) { boolean missing = face.getCharIndex(c) == 0 && c != 0; if (missing) return null;
Glyph first = data.getGlyph(firstChar); if (first == null) continue; int firstIndex = face.getCharIndex(firstChar); for (int ii = i; ii < charactersLength; ii++) { char secondChar = characters[ii]; Glyph second = data.getGlyph(secondChar); if (second == null) continue; int secondIndex = face.getCharIndex(secondChar);
Glyph first = data.getGlyph(firstChar); if (first == null) continue; int firstIndex = face.getCharIndex(firstChar); for (int ii = i; ii < charactersLength; ii++) { char secondChar = characters[ii]; Glyph second = data.getGlyph(secondChar); if (second == null) continue; int secondIndex = face.getCharIndex(secondChar);
PixmapPacker packer) { boolean missing = face.getCharIndex(c) == 0 && c != 0; if (missing) return null;
if (face.getCharIndex(c) == 0) { return null;
@Override public Glyph getGlyph (char ch) { Glyph glyph = super.getGlyph(ch); if (glyph != null && glyph != missingGlyph) return glyph; for (int i = 0; i < generators.size; i++) { FreeTypeFontGenerator generator = generators.get(i); generator.setPixelSizes(0, parameter.size); float baseline = ((flipped ? -ascent : ascent) + capHeight) / scaleY; glyph = generator.createGlyph(ch, this, parameter, stroker, baseline, packer); if (glyph == null) continue; setGlyphRegion(glyph, regions.get(glyph.page)); setGlyph(ch, glyph); glyphs.add(glyph); dirty = true; Face face = generator.face; if (parameter.kerning) { int glyphIndex = face.getCharIndex(ch); for (int j = 0, n = glyphs.size; j < n; j++) { Glyph other = glyphs.get(j); int otherIndex = face.getCharIndex(other.id); int kerning = face.getKerning(glyphIndex, otherIndex, 0); if (kerning != 0) glyph.setKerning(other.id, FreeType.toInt(kerning)); kerning = face.getKerning(otherIndex, glyphIndex, 0); if (kerning != 0) other.setKerning(ch, FreeType.toInt(kerning)); } } return glyph; } return missingGlyph; }
private static native int getCharIndex(long face, int charCode); /* return FT_Get_Char_Index((FT_Face)face, charCode);
Glyph first = data.getGlyph(firstChar); if (first == null) continue; int firstIndex = face.getCharIndex(firstChar); for (int ii = i; ii < charactersLength; ii++) { char secondChar = characters[ii]; Glyph second = data.getGlyph(secondChar); if (second == null) continue; int secondIndex = face.getCharIndex(secondChar);
if (face.getCharIndex(c) == 0) { return null;
if (face.getCharIndex(c) == 0) { return null;
@Override public Glyph getGlyph (char ch) { Glyph glyph = super.getGlyph(ch); if (glyph == null && generator != null) { generator.setPixelSizes(0, parameter.size); float baseline = ((flipped ? -ascent : ascent) + capHeight) / scaleY; glyph = generator.createGlyph(ch, this, parameter, stroker, baseline, packer); if (glyph == null) return missingGlyph; setGlyphRegion(glyph, regions.get(glyph.page)); setGlyph(ch, glyph); glyphs.add(glyph); dirty = true; Face face = generator.face; if (parameter.kerning) { int glyphIndex = face.getCharIndex(ch); for (int i = 0, n = glyphs.size; i < n; i++) { Glyph other = glyphs.get(i); int otherIndex = face.getCharIndex(other.id); int kerning = face.getKerning(glyphIndex, otherIndex, 0); if (kerning != 0) glyph.setKerning(other.id, FreeType.toInt(kerning)); kerning = face.getKerning(otherIndex, glyphIndex, 0); if (kerning != 0) other.setKerning(ch, FreeType.toInt(kerning)); } } } return glyph; }
@Override public Glyph getGlyph (char ch) { Glyph glyph = super.getGlyph(ch); if (glyph == null && generator != null) { generator.setPixelSizes(0, parameter.size); float baseline = ((flipped ? -ascent : ascent) + capHeight) / scaleY; glyph = generator.createGlyph(ch, this, parameter, stroker, baseline, packer); if (glyph == null) return missingGlyph; setGlyphRegion(glyph, regions.get(glyph.page)); setGlyph(ch, glyph); glyphs.add(glyph); dirty = true; Face face = generator.face; if (parameter.kerning) { int glyphIndex = face.getCharIndex(ch); for (int i = 0, n = glyphs.size; i < n; i++) { Glyph other = glyphs.get(i); int otherIndex = face.getCharIndex(other.id); int kerning = face.getKerning(glyphIndex, otherIndex, 0); if (kerning != 0) glyph.setKerning(other.id, FreeType.toInt(kerning)); kerning = face.getKerning(otherIndex, glyphIndex, 0); if (kerning != 0) other.setKerning(ch, FreeType.toInt(kerning)); } } } return glyph; }
private static native int getCharIndex(long face, int charCode); /* return FT_Get_Char_Index((FT_Face)face, charCode);
private static native int getCharIndex(long face, int charCode); /* return FT_Get_Char_Index((FT_Face)face, charCode);