This fixes text clipping with italic font
gitlab #475
Change-Id: I7223d6b7e960f28c61644ba7bc608b46530a58a1
this.scaleRecip = 1.0 / scale;
this.caret = 0;
this.selectionTail = 0;
+
resetCaches();
}
y += line.layout.getDescent() + line.layout.getLeading() + line.layout.getAscent();
Rectangle2D bbox = line.layout.getLogicalHighlightShape(0, lineText.length()).getBounds2D();
+ // HighlightShape is not large enough, if font is italic.
+ Rectangle2D bbox2 = line.layout.getBounds();
+ bbox.add(bbox2);
bbox.setFrame(bbox.getX(), bbox.getY() + line.drawPosY, bbox.getWidth(), bbox.getHeight());
line.bbox = bbox;
}