https://bz.apache.org/bugzilla/show_bug.cgi?id=69555
--- Comment #3 from PJ Fanning <fannin...@yahoo.com> --- I don't know what the getCellWidth call can do if TextLayout fails. ``` private static double getCellWidth(float defaultCharWidth, int colspan, CellStyle style, double minWidth, AttributedString str) { TextLayout layout = new TextLayout(str.getIterator(), fontRenderContext); final Rectangle2D bounds; if (style.getRotation() != 0) { /* * Transform the text using a scale so that its height is increased by a multiple of the leading, * and then rotate the text before computing the bounds. The scale results in some whitespace around * the unrotated top and bottom of the text that normally wouldn't be present if unscaled, but * is added by the standard Excel autosize. */ AffineTransform trans = new AffineTransform(); trans.concatenate(AffineTransform.getRotateInstance(style.getRotation()*2.0*Math.PI/360.0)); trans.concatenate( AffineTransform.getScaleInstance(1, fontHeightMultiple) ); bounds = layout.getOutline(trans).getBounds(); } else { bounds = layout.getBounds(); } // frameWidth accounts for leading spaces which is excluded from bounds.getWidth() final double frameWidth = bounds.getX() + bounds.getWidth(); return Math.max(minWidth, ((frameWidth / colspan) / defaultCharWidth) + style.getIndention()); } ``` What value would you return here if we caught the exception and tried to deal with it? -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org