[Troubleshooting] Text Spacing and Wrapping Differences within Repertoire 8.x and Repertoire 202x

Overview

This entry explains the rendering differences observed between Repertoire 8.x and Repertoire 202x. The variations are primarily due to changes in Java font metric calculations between Java 8 and newer Java versions.


Vertical Shifting & Spacing of Report Elements

Certain reports may show slight vertical shifts in text blocks. This occurs because of differences in how Java versions calculate text height and line spacing:

  • Java 8

    • Applied an extra leading (line spacing) value at the top of text blocks.
    • For auto‑wrap fields, font height metrics (ascent + descent + leading) produced slightly larger line spacing values.
    • Example: Identical wrapped text may measure 15 pt line spacing.
  • Java 9 onwards

    • Removed the extra leading at the top of text blocks, applying leading only between lines.
    • Adjusted font height metric computation, resulting in smaller inter‑line spacing values.
    • Example: Identical wrapped text may measure 14 pt line spacing.

Due to each auto‑wrapped field contributes a minor upward shift (~1 pixel), the effect accumulates further down the page. Fields with fixed height or auto‑wrap disabled remain unaffected.


Premature Text Wrapping

Text wrapping differences are linked to how Java calculates text width:

  • Java 8

    • Relied on logical font metrics during layout, which did not always match the physical font metrics used for rendering.
    • Logical font names were mapped internally for layout, while the actual physical font was resolved only at rendering.
    • This mismatch caused the layout engine to reserve more width than necessary, leading to early line breaks and unused right‑hand margin space.
    • Example: Layout may reserve 200 px, while the rendered text only occupies 160 px.
  • Java 9 onwards

    • Improved alignment between layout width calculation and final rendering.
    • Reserved width closely matches rendered width, preventing premature line breaks.
    • Text now extends correctly to the full width of the text block, producing more precise rendering behavior.

What This Clarification Achieves

  • Explains why vertical shifting and spacing differences occur between Java versions.
  • Clarifies the root cause of premature text wrapping in Repertoire 8.10.
  • Highlights that Repertoire 2024 rendering behavior is more accurate and consistent with updated Java font metrics.