}
}
}
- assert (cell.getWidth() == Cell.Width.RIGHT);
-
- if (x > 0) {
- Cell leftHalf = getScreen().getCharXY(x - 1, y);
- if (leftHalf.getWidth() == Cell.Width.LEFT) {
- invertCell(x - 1, y, true);
+ if (cell.getWidth() == Cell.Width.RIGHT) {
+ if (x > 0) {
+ Cell leftHalf = getScreen().getCharXY(x - 1, y);
+ if (leftHalf.getWidth() == Cell.Width.LEFT) {
+ invertCell(x - 1, y, true);
+ }
}
}
}
glyphCache.put(key, image);
}
+ /*
+ System.err.println("cellWidth " + cellWidth +
+ " cellHeight " + cellHeight + " image " + image);
+ */
+
return image;
}
textHeight = fontTextHeight + textAdjustHeight;
textWidth = fontTextWidth + textAdjustWidth;
+ /*
+ System.err.println("font " + font);
+ System.err.println("fontTextWidth " + fontTextWidth);
+ System.err.println("fontTextHeight " + fontTextHeight);
+ System.err.println("textWidth " + textWidth);
+ System.err.println("textHeight " + textHeight);
+ */
gotFontDimensions = true;
}
* @param fontSize the size of these fonts in pixels
*/
private GlyphMaker(final int fontSize) {
+ assert (fontSize > 3);
makerMono = new GlyphMakerFont(MONO, fontSize);
// makerCJKhk = new GlyphMakerFont(CJKhk, fontSize);
// makerCJKkr = new GlyphMakerFont(CJKkr, fontSize);
public final void putFullwidthCharXY(final int x, final int y,
final Cell cell) {
- if (lastTextHeight != getTextHeight()) {
- glyphMaker = GlyphMaker.getInstance(getTextHeight());
- lastTextHeight = getTextHeight();
+ int cellWidth = getTextWidth();
+ int cellHeight = getTextHeight();
+
+ if (lastTextHeight != cellHeight) {
+ glyphMaker = GlyphMaker.getInstance(cellHeight);
+ lastTextHeight = cellHeight;
}
- BufferedImage image = glyphMaker.getImage(cell, getTextWidth() * 2,
- getTextHeight());
- BufferedImage leftImage = image.getSubimage(0, 0, getTextWidth(),
- getTextHeight());
- BufferedImage rightImage = image.getSubimage(getTextWidth(), 0,
- getTextWidth(), getTextHeight());
+ BufferedImage image = glyphMaker.getImage(cell, cellWidth * 2,
+ cellHeight);
+ BufferedImage leftImage = image.getSubimage(0, 0, cellWidth,
+ cellHeight);
+ BufferedImage rightImage = image.getSubimage(cellWidth, 0, cellWidth,
+ cellHeight);
Cell left = new Cell(cell);
left.setImage(leftImage);
/**
* Width of a character cell in pixels.
*/
- private int textWidth = 1;
+ private int textWidth = 16;
/**
* Height of a character cell in pixels.
*/
- private int textHeight = 1;
+ private int textHeight = 20;
/**
* Width of a character cell in pixels, as reported by font.