Skip to content

jRTF 1.2.2

Latest

Choose a tag to compare

@ullenboom ullenboom released this 08 Aug 19:08

What's New since 1.2.0

Font Embedding

  • RtfHeaderFont.embed(InputStream) — embeds full TTF/OTF font files (no subsetting)
    into {\*\fontfile\fontemb...} so fonts are available on systems that don't have them installed

Border Style Enums

  • RtfCell.topBorder(BorderStyle) / bottomBorder() / leftBorder() / rightBorder() /
    allBorders() — same RtfTextPara.BorderStyle enum as paragraphs (SINGLE, DASHED, DOUBLE,
    DOTTED, HAIRLINE…), no longer hardcoded to single-line
  • RtfRow.bottomCellBorder(BorderStyle) / topCellBorder() / leftCellBorder() / rightCellBorder()

Shading & Background Consistency

  • RtfCell.shadingPattern(ShadingPattern, int) — cell-level pattern fills
  • RtfRow.backgroundColor(int) — row-level background color (previously only via factory method)
  • All three classes (RtfTextPara, RtfCell, RtfRow) now have the same backgroundColor /
    shadingPattern API surface

Thread Safety

  • CharsetEncoder is now ThreadLocal — multiple Rtf instances can be built in parallel
    from different threads (e.g. web server generating one document per request). Each individual
    Rtf instance remains single-threaded.

Internal

  • Shared Hex utility class: 256-entry Hex.RAW / Hex.ESCAPED lookup tables replace ad-hoc
    String.format / Integer.toHexString across the codebase
  • Removed qoute (misspelled) — use quote
  • dottedUnderline(String) → dottedUnderline(Object) for consistency with sibling methods
  • RtfHeaderColor.at() / RtfHeaderFont.at() covariant return types (no more explicit casts)
  • RtfHeaderStyle.toString() removed — streams lazily via rtf(RtfOutput) instead
  • Dead code removed, wildcard imports replaced with specific imports, null checks added