magnww commented on PR #505: URL: https://github.com/apache/poi/pull/505#issuecomment-1720433400
Test code: ``` @Test public void testResizeToFitText() throws IOException { XMLSlideShow slideShow = new XMLSlideShow(); Slide slide = slideShow.createSlide(); TextBox textBox = slide.createTextBox(); textBox.setAnchor(new Rectangle(0, 0, 600, 100)); TextRun textRun = textBox.appendText("测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试", false); textRun.setFontFamily("黑体"); textRun.setFontSize(40.); textBox.resizeToFitText(); Slide slide2 = slideShow.createSlide(); TextBox textBox2 = slide2.createTextBox(); textBox2.setAnchor(new Rectangle(0, 0, 600, 100)); TextRun textRun2 = textBox2.appendText("latin character test latin character test latin character test latin character test latin character test latin character test latin character test latin test latin character test latin character test", false); textRun2.setFontFamily(HSSFFont.FONT_ARIAL); textRun2.setFontSize(40.); textBox2.resizeToFitText(); try (FileOutputStream outputStream = new FileOutputStream("e:\\temp\\test.pptx")) { slideShow.write(outputStream); } } ``` The Textbox height set by the `resizeToFitText` method is smaller than the actual height.   After adding getLeading:   -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org