You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by "sascha08-15 (via GitHub)" <gi...@apache.org> on 2025/07/23 06:50:39 UTC

[I] Text is not correctly rendered on Shapes [poi]

sascha08-15 opened a new issue, #853:
URL: https://github.com/apache/poi/issues/853

   **Current state**
   
   in `org.apache.poi.sl.draw.DrawTextParagraph`
   protected double getWrappingWidth(boolean firstLine, Graphics2D graphics)
   
   - Indents are correctly subtracted
   - Margins too
   - Line (the border) width is unaccounted for
   
   Result:
   - line breaks are wrong/inconsistent with actual PowerPoint
   - Worst cases: text is rendered over the border (e.g. JPG/PNG export)
   
   **To be state**
   
   - Powerpoint has an implicit margin which is 0.5 of the border line width
   - getWrappingWidth should account for the line width to get the actual canvas size it is drawing to


-- 
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-unsubscribe@poi.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org