FreeType.Glyph mainGlyph = slot.getGlyph(); try { mainGlyph.toBitmap(parameter.mono ? FreeType.FT_RENDER_MODE_MONO : FreeType.FT_RENDER_MODE_NORMAL); FreeType.Glyph borderGlyph = slot.getGlyph(); borderGlyph.strokeBorder(stroker, false); borderGlyph.toBitmap(parameter.mono ? FreeType.FT_RENDER_MODE_MONO : FreeType.FT_RENDER_MODE_NORMAL); GlyphMetrics metrics = slot.getMetrics(); Glyph glyph = new Glyph(); glyph.id = c;
FreeType.Glyph mainGlyph = slot.getGlyph(); try { mainGlyph.toBitmap(parameter.mono ? FreeType.FT_RENDER_MODE_MONO : FreeType.FT_RENDER_MODE_NORMAL); FreeType.Glyph borderGlyph = slot.getGlyph(); borderGlyph.strokeBorder(stroker, false); borderGlyph.toBitmap(parameter.mono ? FreeType.FT_RENDER_MODE_MONO : FreeType.FT_RENDER_MODE_NORMAL); GlyphMetrics metrics = slot.getMetrics(); Glyph glyph = new Glyph(); glyph.id = c;
bitmap = slot.getBitmap(); } else if (!slot.renderGlyph(FreeType.FT_RENDER_MODE_NORMAL)) { bitmap = null; } else { bitmap = slot.getBitmap(); GlyphMetrics metrics = slot.getMetrics(); glyph.height = 0; glyph.xoffset = slot.getBitmapLeft(); glyph.yoffset = flip ? -slot.getBitmapTop() + baseline : -(glyph.height - slot.getBitmapTop()) - baseline; glyph.xadvance = FreeType.toInt(metrics.getHoriAdvance()); glyph.srcX = 0;
private static native int getAdvanceY(long slot); /* return ((FT_GlyphSlot)slot)->advance.y;
private static native int getBitmapLeft(long slot); /* return ((FT_GlyphSlot)slot)->bitmap_left;
private static native int getLinearHoriAdvance(long slot); /* return ((FT_GlyphSlot)slot)->linearHoriAdvance;
private static native int getBitmapTop(long slot); /* return ((FT_GlyphSlot)slot)->bitmap_top;
private static native long getBitmap(long slot); /* FT_GlyphSlot glyph = ((FT_GlyphSlot)slot);
private static native long getGlyph(long glyphSlot); /* FT_Glyph glyph;
private static native long getGlyph(long face); /* return (jlong)((FT_Face)face)->glyph;
private static native int getLinearVertAdvance(long slot); /* return ((FT_GlyphSlot)slot)->linearVertAdvance;
private static native int getFormat(long slot); /* return ((FT_GlyphSlot)slot)->format;
private static native int getAdvanceX(long slot); /* return ((FT_GlyphSlot)slot)->advance.x;
private boolean checkForBitmapFont () { int faceFlags = face.getFaceFlags(); if (((faceFlags & FreeType.FT_FACE_FLAG_FIXED_SIZES) == FreeType.FT_FACE_FLAG_FIXED_SIZES) && ((faceFlags & FreeType.FT_FACE_FLAG_HORIZONTAL) == FreeType.FT_FACE_FLAG_HORIZONTAL)) { if (loadChar(32)) { GlyphSlot slot = face.getGlyph(); if (slot.getFormat() == 1651078259) { bitmapped = true; } } } return bitmapped; }
FreeType.Glyph mainGlyph = slot.getGlyph(); try { mainGlyph.toBitmap(parameter.mono ? FreeType.FT_RENDER_MODE_MONO : FreeType.FT_RENDER_MODE_NORMAL); FreeType.Glyph borderGlyph = slot.getGlyph(); borderGlyph.strokeBorder(stroker, false); borderGlyph.toBitmap(parameter.mono ? FreeType.FT_RENDER_MODE_MONO : FreeType.FT_RENDER_MODE_NORMAL); GlyphMetrics metrics = slot.getMetrics(); Glyph glyph = new Glyph(); glyph.id = c;
bitmap = slot.getBitmap(); } else if (!slot.renderGlyph(FreeType.FT_RENDER_MODE_NORMAL)) { bitmap = null; } else { bitmap = slot.getBitmap(); GlyphMetrics metrics = slot.getMetrics(); glyph.height = 0; glyph.xoffset = slot.getBitmapLeft(); glyph.yoffset = flip ? -slot.getBitmapTop() + baseline : -(glyph.height - slot.getBitmapTop()) - baseline; glyph.xadvance = FreeType.toInt(metrics.getHoriAdvance()); glyph.srcX = 0;
bitmap = slot.getBitmap(); } else if (!slot.renderGlyph(FreeType.FT_RENDER_MODE_NORMAL)) { bitmap = null; } else { bitmap = slot.getBitmap(); GlyphMetrics metrics = slot.getMetrics(); glyph.height = 0; glyph.xoffset = slot.getBitmapLeft(); glyph.yoffset = flip ? -slot.getBitmapTop() + baseline : -(glyph.height - slot.getBitmapTop()) - baseline; glyph.xadvance = FreeType.toInt(metrics.getHoriAdvance()); glyph.srcX = 0;
private static native long getGlyph(long glyphSlot); /* FT_Glyph glyph;
private static native int getAdvanceY(long slot); /* return ((FT_GlyphSlot)slot)->advance.y;
private static native int getAdvanceY(long slot); /* return ((FT_GlyphSlot)slot)->advance.y;