X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fbackend%2FLogicalScreen.java;h=558fdc4812c1e553b1434e0b1d6c173dc4ef0469;hb=bfa37f3b2ef87d39c15fad7d565c00cbabd92acf;hp=e8d2662943abd06d579fe86ff082c7fc482a900d;hpb=b4570a63cef669dc85335a7f8d571a5eefdfc3c7;p=fanfix.git diff --git a/src/jexer/backend/LogicalScreen.java b/src/jexer/backend/LogicalScreen.java index e8d2662..558fdc4 100644 --- a/src/jexer/backend/LogicalScreen.java +++ b/src/jexer/backend/LogicalScreen.java @@ -967,16 +967,19 @@ public class LogicalScreen implements Screen { 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);