Skip to content

PDF/A widget appearance streams draw text without shaping or bidi #408

Closed

Description

@jakejackson1

On #330 with #387, each widget under PDF/A gets an /AP appearance stream that mPDF writes itself. That text is not run through OTL or bidi:

  • Arabic, Indic and other complex scripts show unshaped glyphs.
  • RTL values are drawn in logical order.

A viewer redraws the field once it is edited, so only the initial appearance is wrong. Under PDF/A, though, /NeedAppearances is off, so the static appearance is what prints.

An auto font size (fontsize 0) fits single-line fields to the height and falls back to 12pt otherwise. Viewers shrink a multi-line field's text to fit.

Expected. Build the appearance text through the same shaping path as page text (Otl plus the bidi pass), and fit multi-line auto sizes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfork-only

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions