Skip to content

Text is not correctly rendered on Shapes #853

@sascha08-15

Description

@sascha08-15

Current state

in org.apache.poi.sl.draw.DrawTextParagraph
in method 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions