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

Update FPDFFont_* bindings and implementations #152

Closed
ajrcarey opened this issue Aug 4, 2024 · 5 comments
Closed

Update FPDFFont_* bindings and implementations #152

ajrcarey opened this issue Aug 4, 2024 · 5 comments
Assignees

Comments

@ajrcarey
Copy link
Owner

ajrcarey commented Aug 4, 2024

Follow-on from #137, #151. Upgrading to Pdfium release 6611 from https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F6611/pdfium-linux-x64.tgz results in failed static builds because the FPDFFont_GetFontName() function has been removed, replaced instead with separate FPDFFont_GetBaseFontName() and FPDFFont_GetFamilyName() functions.

Additionally, new FPDFFont_GetFontData() and FPDFFont_GetIsEmbeded() functions have been added.

Update all bindings and implementations to match.

@ajrcarey
Copy link
Owner Author

ajrcarey commented Aug 4, 2024

FPDFFont_GetBaseFontName() is in the Pdfium source export headers, but has not yet been published at https://github.com/bblanchon/pdfium-binaries yet.

ajrcarey pushed a commit that referenced this issue Aug 4, 2024
ajrcarey pushed a commit that referenced this issue Aug 4, 2024
@ajrcarey ajrcarey self-assigned this Aug 4, 2024
ajrcarey pushed a commit that referenced this issue Aug 5, 2024
@ajrcarey
Copy link
Owner Author

ajrcarey commented Aug 6, 2024

Used version feature flags introduced in #153 to appropriately version FPDFFont_GetFontName() (pre-6611), FPDFFont_GetBaseFontName() (post-6611), and two separate versions of FPDFFont_GetFamilyName() (the pointer argument and return types differ between Pdfium release 6611 and the Pdfium source mainline head that will form the next release).

Awaiting next Pdfium release to update version flags and close out. Should be possible to include in 0.8.25.

ajrcarey pushed a commit that referenced this issue Aug 6, 2024
@ajrcarey
Copy link
Owner Author

Added backward compatibility checks to .github/workflows/build_test.yml to detect bindings breakage across Pdfium API versions. Removed some unnecessary feature gates from bindings.rs. Merged in related pull request #155.

ajrcarey pushed a commit that referenced this issue Aug 16, 2024
@ajrcarey
Copy link
Owner Author

Pdfium release 6666 includes all changes. Updated bindings for pdfium_6666 and pdfium_future features. Removed TODOs. All workflow checks passed.

@ajrcarey
Copy link
Owner Author

Waiting on completion of #137. Will be released in crate version 0.8.25.

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

No branches or pull requests

1 participant