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

With glyph substitution question mark is coming in PDF #348

Merged
merged 2 commits into from
Mar 20, 2020

Conversation

codecracker2014
Copy link
Contributor

In case of glyph substitution occurs for text, glyph array length may change. So limit should be considered while iterating array else null character will get inserted.

… change. So limit should be considered while iterating array else null character will get inserted.
@asturio
Copy link
Member

asturio commented Mar 19, 2020

Can you write a test for it?

@codecracker2014
Copy link
Contributor Author

codecracker2014 commented Mar 19, 2020

@asturio there is already a test case for FopGlyphProcessor.convertToBytesWithGlyphs method (AdvanceTypographyTest.testTypographySubstitution). Current issue can't be replicated for all fonts, currently it's occurring on calibri font as below.
image
Can we include calibri font for test case?

@asturio
Copy link
Member

asturio commented Mar 19, 2020

Can we include calibri font for test case?

Can it be replicated with Liberation-Fonts? They are already in the repo.

@codecracker2014
Copy link
Contributor Author

I tried all Liberation-Fonts this issue is not reproducing.
With Liberation-Font:
image
With calibri:
image

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

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

@codecracker2014
Copy link
Contributor Author

codecracker2014 commented Mar 19, 2020

Reproducing with Viaoda Libre Font added test case. look 'instruction' has 11 characters but after glyph substitution it is represented with 9 glyphs.
image
Also added Viaoda Libre(https://fonts.google.com/specimen/Viaoda+Libre) font for tests.

@asturio asturio merged commit e087cb8 into LibrePDF:master Mar 20, 2020
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.

2 participants