Fix missing 'g's from PDFs#5227
Conversation
|
Will take a look at this tomorrow |
|
Looks good functionally. @dorner -- as a standard, should we put a more specific comment so we can later guess that it might be ok to remove the specificity (As for myself, I have no idea what would break if we updated the other gems that are in the "for compatability reasons" group ) |
|
@Sukhpreet-s tests are failing unfortunately. |
I probably did local testing on the main branch accidentally, instead of testing in the feature branch. Oopsie 😅 I'll look into it. Thanks for pointing it out! |
|
The test at The other failures in I followed the instructions in the code comments to regenerate the fixture PDFs using human-essentials/spec/pdfs/distribution_pdf_spec.rb Lines 138 to 141 in b9a481a but the tests still fail -- even when regenerated on the main branch. If anyone has insight into why the encoding differences persist, it would be helpful. |
|
Are they consistently different? If you regenerate them again, do they stay the same? I'm wondering if there's something on your machine that generates them differently than on CI. |
Every time I generate the fixture PDFs, they are the same. One thing to note is that I'm not running |
|
@Sukhpreet-s: Your PR |

Resolves #5198
Description
This PR fixes the issue of missing 'g's in PDFs downloaded through the web app, specifically when opened using Adobe Acrobat Reader.
This is fixed by downgrading and pinning the ttfunk gem. The
prawngem is also pinned to a lower version to satisfyttfunkrequirements, and also to stop it from downgrading too much (0.8.4).Updates to the gem versions:
2.5.0to2.4.01.8.0to1.7.0There is already an ongoing discussion about this issue on the
ttfunkrepo. The downgrade fix was suggested in one of the comments.Notes
I tested this issue using the following PDF viewers:
The issue only appeared when using Adobe, and every other PDF reader rendered it correctly.
Type of change
How Has This Been Tested?
This is tested manually by downloading and opening a PDF with Adobe Acrobat Reader to ensure the g's are there.
Screenshots
Before
After fix