This phase focuses on reliable fonts, charts, SVGs and images in exported PDFs while retaining explicit quality controls and predictable cleanup.
### Planned work
  1. Improve font readiness
- Wait for required fonts through the Font Loading API before measuring and rendering.
- Add a custom TTF/OTF font registry for selectable-text output, documenting supported font formats and limitations.
  1. Capture charts consistently
- Freeze/snapshot chart canvases for export.
- Keep export replacements isolated and restore temporary resources after success, failure or cancellation.
  1. Define SVG rendering behavior
- Define when to preserve SVG content and when to rasterize it.
- Document fidelity differences and fallback behavior across renderers.
  1. Optimize image processing
- Add automatic image optimization with explicit image-quality controls.
- Extend and verify repeated-image caching to avoid redundant work.
  1. Reuse repeated document assets
- Extend repeated-watermark caching.
- Expose or refine static-footer reuse metrics.
- Build on existing reuse paths rather than duplicating them.
  1. Verify reliability and recovery
- Document CORS failures and recovery paths.
- Confirm all staging replacements are restored.
- Cover representative fonts, images, charts and SVGs with focused regression tests and browser verification.
### Primary goals
  • Reduce missing fonts, images and charts in exported documents.
  • Make typography and media behavior predictable across supported render modes.
  • Reduce repeated asset processing without silently sacrificing quality.
  • Preserve backward compatibility and reliable cleanup.
### Completion criteria
CORS failure behavior is documented, all staging replacements are restored, and image-quality controls are explicit. Feature-specific regression and browser results are recorded before marking the phase complete.
Status: Planned