Skip to content

[Bug]: extraction and rendering decode glyphs with two different decoders #1007

Description

@tobocop2

Bug Description

Text extraction and rendering each carry their own glyph decoder with different feature sets. A Type0 font with a UTF-8 CMap extracts correctly and renders garbage; a ligature renders correctly but extracts lossily.

Steps to Reproduce

Extract and render a document using a Type0/UTF-8-CMap font; compare the text each path produces.

Expected Behavior

One decoder carrying the union of both paths' capabilities.

Actual Behavior

Path-dependent results for the same glyph stream.

PDF Information (if applicable)

CJK and ligature-heavy documents; validated corpus-wide (the unification changed one page's tokens, an improvement, on a 454,905-page sweep).

Environment

  • pdf_oxide: current main (reproduced at v0.3.77 and after)
  • OS: Linux x86_64 (Ubuntu 20.04/22.04) and macOS 14; behavior is platform-independent
  • Rust: stable 1.97
  • Installed from: source checkout

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions