fullbleed 2.5.4__tar.gz → 2.5.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fullbleed-2.5.4 → fullbleed-2.5.6}/Cargo.lock +1 -1
- {fullbleed-2.5.4 → fullbleed-2.5.6}/Cargo.toml +1 -1
- {fullbleed-2.5.4 → fullbleed-2.5.6}/PKG-INFO +8 -3
- {fullbleed-2.5.4 → fullbleed-2.5.6}/README.md +7 -2
- {fullbleed-2.5.4 → fullbleed-2.5.6}/fullbleed-agent-contract.json +1 -1
- {fullbleed-2.5.4 → fullbleed-2.5.6}/llms.txt +1 -1
- {fullbleed-2.5.4 → fullbleed-2.5.6}/pyproject.toml +1 -1
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/canvas.rs +2 -2
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/flowable.rs +6 -7
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/pdf.rs +129 -37
- fullbleed-2.5.6/src/pdf_raster/forms.rs +228 -0
- fullbleed-2.5.6/src/pdf_raster/shading/radial_bands.rs +186 -0
- fullbleed-2.5.6/src/pdf_raster/shading/tests.rs +318 -0
- fullbleed-2.5.6/src/pdf_raster/shading.rs +578 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/pdf_raster.rs +144 -37
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/raster.rs +57 -16
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/raster_native.rs +96 -1
- {fullbleed-2.5.4 → fullbleed-2.5.6}/COPYRIGHT +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/FONT_LICENSE_AUDIT.json +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/FONT_LICENSE_AUDIT.md +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/LICENSE +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/LICENSING.md +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/THIRD_PARTY_LICENSES.md +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/build.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/build_backend/fullbleed_build_backend.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/crates/fullbleed_audit_contract/Cargo.lock +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/crates/fullbleed_audit_contract/Cargo.toml +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/crates/fullbleed_audit_contract/LICENSE +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/crates/fullbleed_audit_contract/README.md +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/crates/fullbleed_audit_contract/specs/fullbleed.audit_registry.v1.yaml +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/crates/fullbleed_audit_contract/specs/section508_html_registry.v1.yaml +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/crates/fullbleed_audit_contract/specs/wcag20aa_registry.v1.yaml +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/crates/fullbleed_audit_contract/src/json.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/crates/fullbleed_audit_contract/src/lib.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/crates/fullbleed_audit_contract/src/sha256.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/docs/specs/fullbleed.a11y.verify.v1.schema.json +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/docs/specs/fullbleed.audit_registry.v1.yaml +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/docs/specs/fullbleed.pmr.v1.schema.json +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/docs/specs/section508_html_registry.v1.yaml +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/docs/specs/wcag20aa_registry.v1.yaml +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/__init__.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/__main__.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/_abi.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/accessibility/__init__.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/accessibility/engine.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/accessibility/runtime.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/accessibility/types.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/audit_prototype.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/audit_section508.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/audit_wcag.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/ui/__init__.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/ui/accessibility.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/ui/cav/__init__.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/ui/cav/_core.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/ui/cav/agency_letter.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/ui/cav/court_motion_form.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/ui/cav/declaration_form.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/ui/cav/instruction_sheet.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/ui/cav/investment_portfolio_report.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/ui/cav/marriage_record.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/ui/cav/profiles.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/ui/cav/recorded_plat.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/ui/cav/redaction_request_form.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/ui/cav/warranty_deed.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/ui/core.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/ui/primitives.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed/ui/style.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_assets/__init__.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_assets/bootstrap.min.css +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_assets/fonts/Inter-Variable.ttf +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_assets/fonts/NotoSans-Regular.ttf +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_assets/fonts/NotoSansMath-Regular.ttf +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_assets/fonts/NotoSansSymbols-Regular.ttf +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_assets/fonts/NotoSansSymbols2-Regular.ttf +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_assets/icons/bootstrap-icons.svg +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/__init__.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/__main__.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/agent.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/agent_acceptance.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/agent_contract.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/assets.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/cache.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/cli.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/finalize.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/mcp.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/__init__.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/init/.gitignore +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/init/AGENTS.md +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/init/COMPLIANCE.md +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/init/SCAFFOLDING.md +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/init/components/__init__.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/init/components/body.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/init/components/fb_ui.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/init/components/footer.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/init/components/header.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/init/components/primitives.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/init/components/styles/body.css +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/init/components/styles/footer.css +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/init/components/styles/header.css +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/init/components/styles/primitives.css +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/init/report.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/init/styles/report.css +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/init/styles/tokens.css +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/accessible/README.md +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/accessible/output/.gitignore +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/accessible/output/.gitkeep +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/accessible/report.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/accessible/styles/report.css +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/accessible/vendor/fonts/Inter-Variable.ttf +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/invoice/output/.gitignore +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/invoice/output/.gitkeep +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/invoice/report.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/invoice/templates/invoice.css +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/invoice/templates/invoice.html +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/COMPLIANCE.md +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/README.md +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/SCAFFOLDING.md +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/assets/brand-mark.svg +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/assets/reference-pattern.svg +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/components/__init__.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/components/appendix.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/components/architecture.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/components/cover.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/components/data_pages.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/components/fb_ui.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/components/primitives.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/components/styles/appendix.css +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/components/styles/architecture.css +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/components/styles/cover.css +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/components/styles/data.css +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/components/styles/primitives.css +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/components/styles/visuals.css +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/components/visuals.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/data/reference.json +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/output/.gitignore +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/report.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/styles/report.css +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/reference/styles/tokens.css +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/statement/output/.gitignore +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/statement/output/.gitkeep +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/statement/report.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/statement/templates/statement.css +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/scaffold_templates/new/statement/templates/statement.html +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/python/fullbleed_cli/watch.py +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/skills/fullbleed/SKILL.md +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/skills/fullbleed/agents/openai.yaml +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/skills/fullbleed/references/compliance.md +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/skills/fullbleed/references/selection.md +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/skills/fullbleed/references/workflows.md +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/assets.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/authoring.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/base14_metrics.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/base14_metrics_data.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/base64.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/chart.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/chart_document.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/css_native.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/css_queries.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/debug.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/doc_context.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/doc_template.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/document_metadata.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/error.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/finalize.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/flate_native.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/font.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/font_subset.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/frame.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/glyph_report.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/html.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/html_dom.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/html_entities.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/html_entities_0.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/html_entities_1.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/html_entities_2.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/html_entities_3.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/html_entities_4.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/html_entities_5.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/icc.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/image_native.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/jit.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/jpeg_native.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/lib.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/math.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/metrics.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/native_shape.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/page_data.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/page_template.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/parallel.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/pdf_encodings.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/pdf_identity.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/pdf_native.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/pdf_print_contract.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/pdf_profile.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/pdf_table.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/pdf_vt.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/pdf_vt_inspect.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/pdfinspect.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/perf.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/plan.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/python/abi_exports.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/python/pdf_vt.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/python.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/python_abi.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/sfnt.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/sfnt_cff.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/sfnt_outline.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/spill.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/style.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/svg.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/table_header_tests.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/table_semantics.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/text_shape.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/types.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/unicode_data.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/src/xml.rs +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/tools/data/base14/Courier-Bold.afm +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/tools/data/base14/Courier-BoldOblique.afm +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/tools/data/base14/Courier-Oblique.afm +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/tools/data/base14/Courier.afm +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/tools/data/base14/Helvetica-Bold.afm +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/tools/data/base14/Helvetica-BoldOblique.afm +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/tools/data/base14/Helvetica-Oblique.afm +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/tools/data/base14/Helvetica.afm +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/tools/data/base14/MustRead.html +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/tools/data/base14/Symbol.afm +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/tools/data/base14/Times-Bold.afm +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/tools/data/base14/Times-BoldItalic.afm +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/tools/data/base14/Times-Italic.afm +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/tools/data/base14/Times-Roman.afm +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/tools/data/base14/ZapfDingbats.afm +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/tools/data/base14/agl-LICENSE.md +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/tools/data/base14/agl-glyphlist.txt +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/tools/data/base14/agl-zapfdingbats.txt +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/tools/data/base14/sources.json +0 -0
- {fullbleed-2.5.4 → fullbleed-2.5.6}/tools/generate_base14_metrics.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fullbleed
|
|
3
|
-
Version: 2.5.
|
|
3
|
+
Version: 2.5.6
|
|
4
4
|
Classifier: Development Status :: 5 - Production/Stable
|
|
5
5
|
Classifier: License :: OSI Approved :: MIT License
|
|
6
6
|
Classifier: Operating System :: MacOS
|
|
@@ -81,7 +81,9 @@ Path("invoice.pdf").write_bytes(pdf)
|
|
|
81
81
|
|
|
82
82
|
Open `invoice.pdf`. The [quickstart](https://docs.fullbleed.dev/getting-started/quickstart/) adds fonts, previews, and a complete project. The runnable source is in [`examples/quickstart/hello.py`](examples/quickstart/hello.py).
|
|
83
83
|
|
|
84
|
-
**Using Rust?** Start with the [native Rust quickstart](https://docs.fullbleed.dev/getting-started/rust/). The [`fullbleed` crate](https://crates.io/crates/fullbleed) exposes `FullBleed::builder()` and `render_to_buffer(...)`, with no Python requirement. The guide includes runnable invoice and report examples with explicit fonts and PNG previews, plus the [Rust API reference](https://docs.rs/fullbleed/2.5.
|
|
84
|
+
**Using Rust?** Start with the [native Rust quickstart](https://docs.fullbleed.dev/getting-started/rust/). The [`fullbleed` crate](https://crates.io/crates/fullbleed) exposes `FullBleed::builder()` and `render_to_buffer(...)`, with no Python requirement. The guide includes runnable invoice and report examples with explicit fonts and PNG previews, plus the [Rust API reference](https://docs.rs/fullbleed/2.5.6/fullbleed/).
|
|
85
|
+
|
|
86
|
+
**Using Node.js?** The [Node.js quickstart](https://docs.fullbleed.dev/getting-started/node/) includes a downloadable designed invoice project. The separate [Node package](https://github.com/fullbleed-engine/fullbleed-node) bundles the engine as WebAssembly and includes fonts, ESM/CommonJS support, TypeScript declarations, and PNG previews. It requires Node 22+ and covers ordinary PDF generation.
|
|
85
87
|
|
|
86
88
|
## Choose your starting point
|
|
87
89
|
|
|
@@ -89,6 +91,7 @@ Open `invoice.pdf`. The [quickstart](https://docs.fullbleed.dev/getting-started/
|
|
|
89
91
|
| --- | --- |
|
|
90
92
|
| Distinctive invoices, reports, notices, and statements | [Designed showcase with fonts and source](examples/design_showcase) |
|
|
91
93
|
| A native Rust application | [Rust quickstart and runnable examples](https://docs.fullbleed.dev/getting-started/rust/) |
|
|
94
|
+
| A Node.js or TypeScript application | [Node quickstart and designed invoice project](https://docs.fullbleed.dev/getting-started/node/) |
|
|
92
95
|
| An invoice from JSON | [Complete, checked example](examples/agent_workflows) |
|
|
93
96
|
| Automatic rebuilds while editing HTML/CSS (2.5.0+) | [Watch-mode invoice example](examples/render_watch) |
|
|
94
97
|
| Catch PDF changes in pull requests | [Standalone project with a reviewed baseline and CI workflow](examples/pdf_regression) |
|
|
@@ -119,6 +122,8 @@ Profile selection alone does not establish standards conformance. The [release e
|
|
|
119
122
|
|
|
120
123
|
Ask usage questions and share documents in [Discussions](https://github.com/fullbleed-engine/fullbleed-official/discussions). For a reproducible bug or feature proposal, [open an issue](https://github.com/fullbleed-engine/fullbleed-official/issues/new/choose). The [contributor guide](CONTRIBUTING.md) covers local setup, tests, and where to make changes.
|
|
121
124
|
|
|
125
|
+
If Fullbleed is useful to you, [support its maintenance](https://docs.fullbleed.dev/support/) through sponsorship, documentation, or a useful example. Sponsorship is optional; Fullbleed remains MIT licensed and free to use.
|
|
126
|
+
|
|
122
127
|
## Agent discovery and integrations
|
|
123
128
|
|
|
124
129
|
An agent does not need release-specific Fullbleed knowledge. The installed binary generates one canonical contract containing its actual version, selection boundary, capabilities, parser-derived CLI surface, result schemas, PDF profiles, examples, limitations, Agent Skill metadata, MCP tools, and acceptance tasks:
|
|
@@ -268,7 +273,7 @@ python -m pip install fullbleed
|
|
|
268
273
|
From a local wheel:
|
|
269
274
|
|
|
270
275
|
```bash
|
|
271
|
-
python -m pip install C:\path\to\fullbleed-2.5.
|
|
276
|
+
python -m pip install C:\path\to\fullbleed-2.5.6-cp310-abi3-win_amd64.whl
|
|
272
277
|
```
|
|
273
278
|
|
|
274
279
|
From a source checkout with Rust installed, no Python build package is needed:
|
|
@@ -38,7 +38,9 @@ Path("invoice.pdf").write_bytes(pdf)
|
|
|
38
38
|
|
|
39
39
|
Open `invoice.pdf`. The [quickstart](https://docs.fullbleed.dev/getting-started/quickstart/) adds fonts, previews, and a complete project. The runnable source is in [`examples/quickstart/hello.py`](examples/quickstart/hello.py).
|
|
40
40
|
|
|
41
|
-
**Using Rust?** Start with the [native Rust quickstart](https://docs.fullbleed.dev/getting-started/rust/). The [`fullbleed` crate](https://crates.io/crates/fullbleed) exposes `FullBleed::builder()` and `render_to_buffer(...)`, with no Python requirement. The guide includes runnable invoice and report examples with explicit fonts and PNG previews, plus the [Rust API reference](https://docs.rs/fullbleed/2.5.
|
|
41
|
+
**Using Rust?** Start with the [native Rust quickstart](https://docs.fullbleed.dev/getting-started/rust/). The [`fullbleed` crate](https://crates.io/crates/fullbleed) exposes `FullBleed::builder()` and `render_to_buffer(...)`, with no Python requirement. The guide includes runnable invoice and report examples with explicit fonts and PNG previews, plus the [Rust API reference](https://docs.rs/fullbleed/2.5.6/fullbleed/).
|
|
42
|
+
|
|
43
|
+
**Using Node.js?** The [Node.js quickstart](https://docs.fullbleed.dev/getting-started/node/) includes a downloadable designed invoice project. The separate [Node package](https://github.com/fullbleed-engine/fullbleed-node) bundles the engine as WebAssembly and includes fonts, ESM/CommonJS support, TypeScript declarations, and PNG previews. It requires Node 22+ and covers ordinary PDF generation.
|
|
42
44
|
|
|
43
45
|
## Choose your starting point
|
|
44
46
|
|
|
@@ -46,6 +48,7 @@ Open `invoice.pdf`. The [quickstart](https://docs.fullbleed.dev/getting-started/
|
|
|
46
48
|
| --- | --- |
|
|
47
49
|
| Distinctive invoices, reports, notices, and statements | [Designed showcase with fonts and source](examples/design_showcase) |
|
|
48
50
|
| A native Rust application | [Rust quickstart and runnable examples](https://docs.fullbleed.dev/getting-started/rust/) |
|
|
51
|
+
| A Node.js or TypeScript application | [Node quickstart and designed invoice project](https://docs.fullbleed.dev/getting-started/node/) |
|
|
49
52
|
| An invoice from JSON | [Complete, checked example](examples/agent_workflows) |
|
|
50
53
|
| Automatic rebuilds while editing HTML/CSS (2.5.0+) | [Watch-mode invoice example](examples/render_watch) |
|
|
51
54
|
| Catch PDF changes in pull requests | [Standalone project with a reviewed baseline and CI workflow](examples/pdf_regression) |
|
|
@@ -76,6 +79,8 @@ Profile selection alone does not establish standards conformance. The [release e
|
|
|
76
79
|
|
|
77
80
|
Ask usage questions and share documents in [Discussions](https://github.com/fullbleed-engine/fullbleed-official/discussions). For a reproducible bug or feature proposal, [open an issue](https://github.com/fullbleed-engine/fullbleed-official/issues/new/choose). The [contributor guide](CONTRIBUTING.md) covers local setup, tests, and where to make changes.
|
|
78
81
|
|
|
82
|
+
If Fullbleed is useful to you, [support its maintenance](https://docs.fullbleed.dev/support/) through sponsorship, documentation, or a useful example. Sponsorship is optional; Fullbleed remains MIT licensed and free to use.
|
|
83
|
+
|
|
79
84
|
## Agent discovery and integrations
|
|
80
85
|
|
|
81
86
|
An agent does not need release-specific Fullbleed knowledge. The installed binary generates one canonical contract containing its actual version, selection boundary, capabilities, parser-derived CLI surface, result schemas, PDF profiles, examples, limitations, Agent Skill metadata, MCP tools, and acceptance tasks:
|
|
@@ -225,7 +230,7 @@ python -m pip install fullbleed
|
|
|
225
230
|
From a local wheel:
|
|
226
231
|
|
|
227
232
|
```bash
|
|
228
|
-
python -m pip install C:\path\to\fullbleed-2.5.
|
|
233
|
+
python -m pip install C:\path\to\fullbleed-2.5.6-cp310-abi3-win_amd64.whl
|
|
229
234
|
```
|
|
230
235
|
|
|
231
236
|
From a source checkout with Rust installed, no Python build package is needed:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Fullbleed PDF Engine
|
|
2
2
|
|
|
3
|
-
> Fullbleed 2.5.
|
|
3
|
+
> Fullbleed 2.5.6 is a deterministic, self-contained document-generation runtime for Python and Rust. It turns structured data plus static HTML/CSS into validated PDF documents without a browser.
|
|
4
4
|
|
|
5
5
|
The installed runtime is authoritative. Do not infer its API from this file or from remembered release knowledge. Start with:
|
|
6
6
|
|
|
@@ -5,7 +5,7 @@ backend-path = ["build_backend"]
|
|
|
5
5
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "fullbleed"
|
|
8
|
-
version = "2.5.
|
|
8
|
+
version = "2.5.6"
|
|
9
9
|
description = "Deterministic Python PDF engine for reports, invoices, accessible documents, print-ready output, and compiled VDP"
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
requires-python = ">=3.10"
|
|
@@ -422,8 +422,8 @@ pub enum Command {
|
|
|
422
422
|
m11: f32,
|
|
423
423
|
},
|
|
424
424
|
/// Reusable vector-shader path for browser-synthesized bold. The PDF
|
|
425
|
-
/// backend compiles each unique glyph into a shared
|
|
426
|
-
///
|
|
425
|
+
/// backend compiles each unique glyph into a shared paint-only Form;
|
|
426
|
+
/// the accompanying logical text command supplies searchable text once.
|
|
427
427
|
DrawSyntheticBoldGlyphRun {
|
|
428
428
|
x: Pt,
|
|
429
429
|
y: Pt,
|
|
@@ -5658,7 +5658,7 @@ fn draw_registered_text_run(
|
|
|
5658
5658
|
let italic_shear = synthetic_italic_shear(style.font_style);
|
|
5659
5659
|
// Fixed VDP substitutes slot values after layout. Keep binding-bearing
|
|
5660
5660
|
// text as a patchable text command instead of compiling the placeholder's
|
|
5661
|
-
// glyph IDs into the reusable
|
|
5661
|
+
// glyph IDs into the reusable synthetic-bold paint program.
|
|
5662
5662
|
if contains_binding_slot && synthetic_bold {
|
|
5663
5663
|
if synthetic_italic {
|
|
5664
5664
|
canvas.draw_string_synthetic_bold_italic(x, y, text, strength, italic_shear);
|
|
@@ -5696,8 +5696,7 @@ fn draw_registered_text_run(
|
|
|
5696
5696
|
canvas, registry, style, font_name, x, y, &text, strength, 0.0,
|
|
5697
5697
|
) {
|
|
5698
5698
|
// Preserve search, copy, accessibility, and tagged-PDF text
|
|
5699
|
-
// while the visible glyphs
|
|
5700
|
-
// synthetic-bold geometry.
|
|
5699
|
+
// while the visible glyphs use reusable unhinted paint forms.
|
|
5701
5700
|
canvas.save_state();
|
|
5702
5701
|
canvas.set_text_rendering_mode(3);
|
|
5703
5702
|
canvas.draw_string(x, y, text);
|
|
@@ -5797,9 +5796,9 @@ fn draw_registered_synthetic_bold_outline_run(
|
|
|
5797
5796
|
}
|
|
5798
5797
|
|
|
5799
5798
|
// Chromium serializes synthetic browser bold as unhinted Type 3 outlines.
|
|
5800
|
-
// Compile the shaped run into reusable glyph programs
|
|
5801
|
-
//
|
|
5802
|
-
//
|
|
5799
|
+
// Compile the shaped run into reusable paint-only glyph programs, keeping
|
|
5800
|
+
// the same font-space transform. The correction used by direct page paths
|
|
5801
|
+
// would apply that phase twice. This replaces
|
|
5803
5802
|
// O(occurrences × outline commands) display lists with O(unique glyphs)
|
|
5804
5803
|
// vector programs plus compact run references.
|
|
5805
5804
|
canvas.save_state();
|
|
@@ -5840,7 +5839,7 @@ fn draw_registered_synthetic_bold_outline_run(
|
|
|
5840
5839
|
return true;
|
|
5841
5840
|
}
|
|
5842
5841
|
|
|
5843
|
-
// Oblique synthesis retains the direct path until the
|
|
5842
|
+
// Oblique synthesis retains the direct path until the reusable shader grows
|
|
5844
5843
|
// a full affine font matrix; this preserves existing combined bold/italic
|
|
5845
5844
|
// geometry without weakening the common reusable upright path.
|
|
5846
5845
|
let (phase_x, phase_y) = browser_synthetic_bold_outline_phase(style.font_size);
|
|
@@ -1129,6 +1129,7 @@ pub(crate) struct PdfStreamWriter<'a, W: Write> {
|
|
|
1129
1129
|
image_bytes_total: usize,
|
|
1130
1130
|
|
|
1131
1131
|
form_resources: Vec<(String, usize)>,
|
|
1132
|
+
glyph_form_map: BTreeMap<(String, u16, u32), String>,
|
|
1132
1133
|
form_name_map: HashMap<String, String>,
|
|
1133
1134
|
form_content_map: HashMap<u64, (String, usize)>,
|
|
1134
1135
|
form_size_map: HashMap<String, Size>,
|
|
@@ -1565,6 +1566,7 @@ impl<'a, W: Write> PdfStreamWriter<'a, W> {
|
|
|
1565
1566
|
next_image_index: 1,
|
|
1566
1567
|
image_bytes_total: 0,
|
|
1567
1568
|
form_resources: Vec::new(),
|
|
1569
|
+
glyph_form_map: BTreeMap::new(),
|
|
1568
1570
|
form_name_map: HashMap::new(),
|
|
1569
1571
|
form_content_map: HashMap::new(),
|
|
1570
1572
|
form_size_map: HashMap::new(),
|
|
@@ -3299,9 +3301,9 @@ impl<'a, W: Write> PdfStreamWriter<'a, W> {
|
|
|
3299
3301
|
pre_shaped: Option<&ShapedText>,
|
|
3300
3302
|
) -> io::Result<bool> {
|
|
3301
3303
|
let font_key = self.font_key(font_name);
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3304
|
+
// Resolve only fonts used by text, and record usage in each document
|
|
3305
|
+
// even when the shared font resource was created by an earlier one.
|
|
3306
|
+
self.ensure_font(font_name)?;
|
|
3305
3307
|
let Some((resource, encoding)) = self
|
|
3306
3308
|
.fonts
|
|
3307
3309
|
.get(&font_key)
|
|
@@ -3696,7 +3698,8 @@ impl<'a, W: Write> PdfStreamWriter<'a, W> {
|
|
|
3696
3698
|
let mut current_font_size = Pt::from_f32(12.0);
|
|
3697
3699
|
let mut current_font_name = "Helvetica".to_string();
|
|
3698
3700
|
let mut current_fill = Color::BLACK;
|
|
3699
|
-
let mut
|
|
3701
|
+
let mut current_text_rendering_mode = 0u8;
|
|
3702
|
+
let mut graphics_state_stack: Vec<(Pt, String, Color, u8)> = Vec::new();
|
|
3700
3703
|
let mut tag_stack: Vec<usize> = Vec::new();
|
|
3701
3704
|
let mut suppressed_tag_depth = 0usize;
|
|
3702
3705
|
let mut marked_content_stack: Vec<bool> = Vec::new();
|
|
@@ -3766,14 +3769,18 @@ impl<'a, W: Write> PdfStreamWriter<'a, W> {
|
|
|
3766
3769
|
current_font_size,
|
|
3767
3770
|
current_font_name.clone(),
|
|
3768
3771
|
current_fill,
|
|
3772
|
+
current_text_rendering_mode,
|
|
3769
3773
|
));
|
|
3770
3774
|
out.push_str("q\n");
|
|
3771
3775
|
}
|
|
3772
3776
|
Command::RestoreState => {
|
|
3773
|
-
if let Some((font_size, font_name, fill)) =
|
|
3777
|
+
if let Some((font_size, font_name, fill, text_mode)) =
|
|
3778
|
+
graphics_state_stack.pop()
|
|
3779
|
+
{
|
|
3774
3780
|
current_font_size = font_size;
|
|
3775
3781
|
current_font_name = font_name;
|
|
3776
3782
|
current_fill = fill;
|
|
3783
|
+
current_text_rendering_mode = text_mode;
|
|
3777
3784
|
}
|
|
3778
3785
|
out.push_str("Q\n");
|
|
3779
3786
|
}
|
|
@@ -3974,12 +3981,12 @@ impl<'a, W: Write> PdfStreamWriter<'a, W> {
|
|
|
3974
3981
|
Command::ApplyBackdropFilter { .. } => {}
|
|
3975
3982
|
Command::SetFontName(name) => {
|
|
3976
3983
|
current_font_name = name.clone();
|
|
3977
|
-
self.ensure_font(¤t_font_name)?;
|
|
3978
3984
|
}
|
|
3979
3985
|
Command::SetFontSize(size) => {
|
|
3980
3986
|
current_font_size = *size;
|
|
3981
3987
|
}
|
|
3982
3988
|
Command::SetTextRenderingMode(mode) => {
|
|
3989
|
+
current_text_rendering_mode = (*mode).min(7);
|
|
3983
3990
|
out.push_str(&format!("{} Tr\n", (*mode).min(7)));
|
|
3984
3991
|
}
|
|
3985
3992
|
Command::ClipRect {
|
|
@@ -4181,29 +4188,33 @@ impl<'a, W: Write> PdfStreamWriter<'a, W> {
|
|
|
4181
4188
|
offsets,
|
|
4182
4189
|
stroke_width,
|
|
4183
4190
|
} => {
|
|
4191
|
+
// Like the Type 3 glyphs this replaces, only invisible
|
|
4192
|
+
// text mode suppresses paint (ISO 32000-1, 9.3.6).
|
|
4193
|
+
if current_text_rendering_mode == 3 {
|
|
4194
|
+
continue;
|
|
4195
|
+
}
|
|
4184
4196
|
let synthetic_bold_millionths =
|
|
4185
4197
|
synthetic_bold_ratio_millionths(*stroke_width, current_font_size);
|
|
4186
4198
|
let mut pen_x = *x;
|
|
4187
4199
|
let mut pen_y = *y;
|
|
4188
4200
|
for (index, glyph_id) in glyph_ids.iter().copied().enumerate() {
|
|
4189
4201
|
let offset = offsets.get(index).copied().unwrap_or((Pt::ZERO, Pt::ZERO));
|
|
4190
|
-
if let Some(resource) = self.
|
|
4202
|
+
if let Some(resource) = self.ensure_glyph_paint_form(
|
|
4191
4203
|
¤t_font_name,
|
|
4192
4204
|
glyph_id,
|
|
4193
4205
|
synthetic_bold_millionths,
|
|
4194
4206
|
)? {
|
|
4195
|
-
|
|
4207
|
+
// The authored text is emitted once by the following
|
|
4208
|
+
// invisible DrawString. Painting these same glyphs as
|
|
4209
|
+
// Type 3 text makes readers extract both copies.
|
|
4196
4210
|
out.push_str(&format!(
|
|
4197
|
-
"
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
));
|
|
4201
|
-
out.push_str(&format!(
|
|
4202
|
-
"1 0 0 1 {} {} Tm\n",
|
|
4211
|
+
"q\n{} 0 0 {} {} {} cm\n/{} Do\nQ\n",
|
|
4212
|
+
format_fixed(current_font_size.to_milli_i64(), 6),
|
|
4213
|
+
format_fixed(-current_font_size.to_milli_i64(), 6),
|
|
4203
4214
|
fmt_pt(pen_x + offset.0),
|
|
4204
4215
|
fmt_pt(page_height - pen_y - offset.1),
|
|
4216
|
+
resource,
|
|
4205
4217
|
));
|
|
4206
|
-
out.push_str(&format!("<{:02X}> Tj\nET\n", glyph_id & 0x00ff));
|
|
4207
4218
|
}
|
|
4208
4219
|
if let Some((advance_x, advance_y)) = advances.get(index) {
|
|
4209
4220
|
pen_x = pen_x + *advance_x;
|
|
@@ -5125,6 +5136,46 @@ impl<'a, W: Write> PdfStreamWriter<'a, W> {
|
|
|
5125
5136
|
Ok(Some(font.resource.clone()))
|
|
5126
5137
|
}
|
|
5127
5138
|
|
|
5139
|
+
fn ensure_glyph_paint_form(
|
|
5140
|
+
&mut self,
|
|
5141
|
+
name: &str,
|
|
5142
|
+
glyph_id: u16,
|
|
5143
|
+
synthetic_bold_millionths: u32,
|
|
5144
|
+
) -> io::Result<Option<String>> {
|
|
5145
|
+
if glyph_id == 0 {
|
|
5146
|
+
return Ok(None);
|
|
5147
|
+
}
|
|
5148
|
+
let logical_name = self.canonical_font_name(name);
|
|
5149
|
+
let key = (
|
|
5150
|
+
normalize_font_key(&logical_name),
|
|
5151
|
+
glyph_id,
|
|
5152
|
+
synthetic_bold_millionths,
|
|
5153
|
+
);
|
|
5154
|
+
if let Some(resource) = self.glyph_form_map.get(&key) {
|
|
5155
|
+
return Ok(Some(resource.clone()));
|
|
5156
|
+
}
|
|
5157
|
+
let Some(outline) = self
|
|
5158
|
+
.registry
|
|
5159
|
+
.and_then(|registry| registry.glyph_outline_for_id(&logical_name, glyph_id))
|
|
5160
|
+
else {
|
|
5161
|
+
return Ok(None);
|
|
5162
|
+
};
|
|
5163
|
+
let (program, bbox, _) = glyph_outline_program(&outline, synthetic_bold_millionths);
|
|
5164
|
+
let resource = format!("GlyphPaint{}", self.glyph_form_map.len() + 1);
|
|
5165
|
+
let object_id = self.alloc_ids(1);
|
|
5166
|
+
let dictionary = format!(
|
|
5167
|
+
"/Type /XObject /Subtype /Form /BBox [{} {} {} {}] /Resources << >>",
|
|
5168
|
+
fmt(bbox[0]),
|
|
5169
|
+
fmt(bbox[1]),
|
|
5170
|
+
fmt(bbox[2]),
|
|
5171
|
+
fmt(bbox[3]),
|
|
5172
|
+
);
|
|
5173
|
+
self.write_stream_object_bytes(object_id, &dictionary, program.as_bytes())?;
|
|
5174
|
+
self.form_resources.push((resource.clone(), object_id));
|
|
5175
|
+
self.glyph_form_map.insert(key, resource.clone());
|
|
5176
|
+
Ok(Some(resource))
|
|
5177
|
+
}
|
|
5178
|
+
|
|
5128
5179
|
fn write_type3_font(
|
|
5129
5180
|
&mut self,
|
|
5130
5181
|
font_state: &Type3StreamFont,
|
|
@@ -9408,6 +9459,23 @@ fn synthetic_bold_ratio_millionths(stroke_width: Pt, font_size: Pt) -> u32 {
|
|
|
9408
9459
|
fn type3_glyph_program(
|
|
9409
9460
|
outline: &RegisteredGlyphOutline,
|
|
9410
9461
|
synthetic_bold_millionths: u32,
|
|
9462
|
+
) -> (String, [f32; 4], f32) {
|
|
9463
|
+
let (paint, bbox, width) = glyph_outline_program(outline, synthetic_bold_millionths);
|
|
9464
|
+
let program = format!(
|
|
9465
|
+
"{} 0 {} {} {} {} d1\n{}",
|
|
9466
|
+
fmt(width),
|
|
9467
|
+
fmt(bbox[0]),
|
|
9468
|
+
fmt(bbox[1]),
|
|
9469
|
+
fmt(bbox[2]),
|
|
9470
|
+
fmt(bbox[3]),
|
|
9471
|
+
paint,
|
|
9472
|
+
);
|
|
9473
|
+
(program, bbox, width)
|
|
9474
|
+
}
|
|
9475
|
+
|
|
9476
|
+
fn glyph_outline_program(
|
|
9477
|
+
outline: &RegisteredGlyphOutline,
|
|
9478
|
+
synthetic_bold_millionths: u32,
|
|
9411
9479
|
) -> (String, [f32; 4], f32) {
|
|
9412
9480
|
let scale = 1000.0 / f32::from(outline.units_per_em.max(1));
|
|
9413
9481
|
let transform = |x: f32, y: f32| (x * scale, -y * scale);
|
|
@@ -9501,17 +9569,10 @@ fn type3_glyph_program(
|
|
|
9501
9569
|
bbox[3] += expansion;
|
|
9502
9570
|
}
|
|
9503
9571
|
let width = f32::from(outline.advance) * scale;
|
|
9504
|
-
let mut program =
|
|
9505
|
-
"{} 0 {} {} {} {} d1\n",
|
|
9506
|
-
fmt(width),
|
|
9507
|
-
fmt(bbox[0]),
|
|
9508
|
-
fmt(bbox[1]),
|
|
9509
|
-
fmt(bbox[2]),
|
|
9510
|
-
fmt(bbox[3]),
|
|
9511
|
-
);
|
|
9572
|
+
let mut program = String::new();
|
|
9512
9573
|
if stroke_width > 0.0 {
|
|
9513
9574
|
// Skia's synthetic font weight is a fill plus centered outline with a
|
|
9514
|
-
// four-unit miter limit. Keeping it inside the
|
|
9575
|
+
// four-unit miter limit. Keeping it inside the shared glyph program
|
|
9515
9576
|
// makes the expansion reusable and gives every occurrence the same
|
|
9516
9577
|
// unhinted vector-mask raster phase.
|
|
9517
9578
|
program.push_str(&format!(
|
|
@@ -10764,7 +10825,7 @@ mod tests {
|
|
|
10764
10825
|
}
|
|
10765
10826
|
|
|
10766
10827
|
#[test]
|
|
10767
|
-
fn
|
|
10828
|
+
fn pdfua1_synthetic_bold_keeps_one_logical_text_copy() {
|
|
10768
10829
|
let inter_path = repo_font_path("Inter-Variable.ttf");
|
|
10769
10830
|
let inter_bytes = std::fs::read(&inter_path).expect("read inter");
|
|
10770
10831
|
let mut registry = FontRegistry::new();
|
|
@@ -10816,9 +10877,17 @@ mod tests {
|
|
|
10816
10877
|
document_to_pdf_with_metrics_and_registry(&doc, None, Some(®istry), &options)
|
|
10817
10878
|
.expect("render PDF/UA synthetic bold text");
|
|
10818
10879
|
let pdf = String::from_utf8_lossy(&bytes);
|
|
10819
|
-
|
|
10820
|
-
assert!(pdf.contains("/
|
|
10821
|
-
assert!(pdf.contains(
|
|
10880
|
+
let content = page_content_bytes(&bytes);
|
|
10881
|
+
assert!(!pdf.contains("/Subtype /Type3"));
|
|
10882
|
+
assert!(pdf.contains("/Subtype /Form"));
|
|
10883
|
+
assert!(pdf.contains("/ToUnicode"));
|
|
10884
|
+
assert!(pdf.contains("<0041>"));
|
|
10885
|
+
assert_eq!(
|
|
10886
|
+
count_token(&content, b" Tj") + count_token(&content, b" TJ"),
|
|
10887
|
+
1
|
|
10888
|
+
);
|
|
10889
|
+
assert_eq!(count_token(&content, b"/P <</MCID 0>> BDC"), 1);
|
|
10890
|
+
assert_eq!(count_token(&content, b"/GlyphPaint1 Do"), 1);
|
|
10822
10891
|
}
|
|
10823
10892
|
|
|
10824
10893
|
#[test]
|
|
@@ -10904,7 +10973,7 @@ mod tests {
|
|
|
10904
10973
|
}
|
|
10905
10974
|
|
|
10906
10975
|
#[test]
|
|
10907
|
-
fn
|
|
10976
|
+
fn synthetic_bold_glyph_run_reuses_one_stroked_paint_form() {
|
|
10908
10977
|
let inter_path = repo_font_path("Inter-Variable.ttf");
|
|
10909
10978
|
let inter_bytes = std::fs::read(&inter_path).expect("read inter");
|
|
10910
10979
|
let mut registry = FontRegistry::new();
|
|
@@ -10939,16 +11008,12 @@ mod tests {
|
|
|
10939
11008
|
.expect("render reusable synthetic-bold glyph run");
|
|
10940
11009
|
let pdf = String::from_utf8_lossy(&bytes);
|
|
10941
11010
|
let content = page_content_bytes(&bytes);
|
|
10942
|
-
assert!(pdf.contains("/Subtype /Type3"));
|
|
11011
|
+
assert!(!pdf.contains("/Subtype /Type3"));
|
|
11012
|
+
assert_eq!(count_token(&bytes, b"/Subtype /Form"), 1);
|
|
10943
11013
|
assert!(pdf.contains("31.238 w"));
|
|
10944
11014
|
assert!(pdf.contains("B\n"));
|
|
10945
|
-
assert_eq!(count_token(&content, b" Tj"),
|
|
10946
|
-
|
|
10947
|
-
// reference that shared program instead of expanding its outline.
|
|
10948
|
-
assert_eq!(
|
|
10949
|
-
count_token(&bytes, format!("/g{:04X}", glyph_id).as_bytes()),
|
|
10950
|
-
2
|
|
10951
|
-
);
|
|
11015
|
+
assert_eq!(count_token(&content, b" Tj"), 0);
|
|
11016
|
+
assert_eq!(count_token(&content, b"/GlyphPaint1 Do"), 3);
|
|
10952
11017
|
}
|
|
10953
11018
|
|
|
10954
11019
|
#[test]
|
|
@@ -11056,6 +11121,33 @@ mod tests {
|
|
|
11056
11121
|
assert!(err.to_string().contains("pdfua1 requires a font registry"));
|
|
11057
11122
|
}
|
|
11058
11123
|
|
|
11124
|
+
#[test]
|
|
11125
|
+
fn pdfua1_does_not_require_an_unused_restored_font() {
|
|
11126
|
+
let inter_path = repo_font_path("Inter-Variable.ttf");
|
|
11127
|
+
let mut registry = FontRegistry::new();
|
|
11128
|
+
let name = registry
|
|
11129
|
+
.register_bytes(std::fs::read(&inter_path).unwrap(), None)
|
|
11130
|
+
.expect("register font");
|
|
11131
|
+
let mut doc = text_page(&name, "Embedded text");
|
|
11132
|
+
// A transformed element restores the canvas's default font after its
|
|
11133
|
+
// last text run. Selection alone must not embed or validate that font.
|
|
11134
|
+
doc.pages[0]
|
|
11135
|
+
.commands
|
|
11136
|
+
.push(Command::SetFontName("Helvetica".to_string()));
|
|
11137
|
+
let options = PdfOptions {
|
|
11138
|
+
pdf_profile: PdfProfile::PdfUa1,
|
|
11139
|
+
document_lang: Some("en-US".to_string()),
|
|
11140
|
+
document_title: Some("Unused font selection".to_string()),
|
|
11141
|
+
..PdfOptions::default()
|
|
11142
|
+
};
|
|
11143
|
+
let bytes =
|
|
11144
|
+
document_to_pdf_with_metrics_and_registry(&doc, None, Some(®istry), &options)
|
|
11145
|
+
.expect("only painted text requires an embedded font");
|
|
11146
|
+
let pdf = String::from_utf8_lossy(&bytes);
|
|
11147
|
+
assert!(pdf.contains("/FontFile2"));
|
|
11148
|
+
assert!(!pdf.contains("/BaseFont /Helvetica"));
|
|
11149
|
+
}
|
|
11150
|
+
|
|
11059
11151
|
#[test]
|
|
11060
11152
|
fn wtpdf_profiles_emit_pdf_declarations_and_pdf20_structure() {
|
|
11061
11153
|
let doc = one_page_document(vec![]);
|