Coords coords = gdo.getCoords();
int scale_factor_x = coords.getWidth() / coords.getAAWidth();
int scale_factor_y = coords.getHeight() / coords.getAAHeight();
FEGlyph feg = fefont.getGlyphArray().getGlyph(c);
Claim.claim(feg != null, "FEG = null: [" + c + "] - (" + (int) c + ")");
int x_max = feg.getMaxX(gdo);
int y_max = feg.getMaxY(gdo);
//feg.getFEPointList(gdo).dump();
// Log.log("x_max:" + x_max + " y_max:" + y_max);
if (gdo.getPen().getWidth() > 0)
{
x_max += gdo.getLineWidthOffsetEast()
- gdo.getLineWidthOffsetWest();
y_max += gdo.getLineWidthOffsetSouth()
- gdo.getLineWidthOffsetNorth();
}
x_max = coords.scaleX(x_max);
y_max = coords.scaleY(y_max);
x_max = ((x_max + scale_factor_x) / scale_factor_x) * scale_factor_x; // + scale_factor_x;
y_max = ((y_max + scale_factor_y) / scale_factor_y) * scale_factor_y; // + scale_factor_y;
if (x_max < scale_factor_x)
{
x_max = scale_factor_x;
}
if (y_max < scale_factor_y)
{
y_max = scale_factor_y;
}
ImageWrapper tti = new ImageWrapper(x_max, y_max);
Image i = tti.getImage();
Claim.claim(i != null, "Severe component/image problems...");
if (i != null)
{
feg.draw(i.getGraphics(), gdo);
//gdo.getCoords().dump();
//ImageWrapperTranslated image = FontImageProcessor.fontScale(tti, scale_factor_x, scale_factor_y);
//cache[c] = new CachedGlyph(image.getImageWrapper(), image.getOffsetY());