Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flag to inhibit FOP glyph substitution #904

Merged

Conversation

dadza
Copy link
Contributor

@dadza dadza commented Apr 24, 2023

Description of the new Feature/Bugfix

When FOP is present on the classpath, it will be automatically used to perform glyph substitutions, which are mandatory for complex layout scripts.

But for scripts where glyph substitutions are optional (e.g. Latin ligatures), it makes sense to have an enable/disable flag because glyph substitutions come with drawbacks such as incorrect text when copying from the document.

The PR introduces a new method Document.setGlyphSubstitutionEnabled that can be used to disable glyph substitutions when FOP is present.

Related Issue: #297

@sonatype-lift
Copy link

sonatype-lift bot commented Apr 24, 2023

🛠 Lift Auto-fix

Some of the Lift findings in this PR can be automatically fixed. You can download and apply these changes in your local project directory of your branch to review the suggestions before committing.1

# Download the patch
curl https://lift.sonatype.com/api/patch/github.com/LibrePDF/OpenPDF/904.diff -o lift-autofixes.diff

# Apply the patch with git
git apply lift-autofixes.diff

# Review the changes
git diff

Want it all in a single command? Open a terminal in your project's directory and copy and paste the following command:

curl https://lift.sonatype.com/api/patch/github.com/LibrePDF/OpenPDF/904.diff | git apply

Once you're satisfied, commit and push your changes in your project.

Footnotes

  1. You can preview the patch by opening the patch URL in the browser.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@andreasrosdal andreasrosdal merged commit 1d970b9 into LibrePDF:master Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants