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

Font.php: hot fix for calculateTextWidth in case Widths key is not set #645

Merged
merged 3 commits into from
Oct 2, 2023

Conversation

k00ni
Copy link
Collaborator

@k00ni k00ni commented Sep 29, 2023

Type of pull request

  • Bug fix (involves code and configuration changes)

About

Hot fix for Font.php to avoid PHP warning in case the Widths-key is not set in $details.

Checklist for code / configuration changes

In case you changed the code/configuration, please read each of the following checkboxes as they contain valuable information:

  • Please add at least one test case (unit test, system test, ...) to demonstrate that the change is working. If existing code was changed, your tests cover these code parts as well.
    By the way, you don't have to provide a full fledged PDF file to demonstrate a fix. Instead a unit test may be sufficient sometimes,
    please have a look at FontTest for example code.
    Code changes without any tests are likely to be rejected. If you dont know how to write tests, no problem, tell us upfront and we may add them ourselves or discuss other ways.
  • Please run PHP-CS-Fixer before committing, to confirm with our coding styles. See https://github.com/smalot/pdfparser/blob/master/.php-cs-fixer.php for more information about our coding styles.

Acknowledgement

Bug reported in #619 by @gidzr.

@k00ni k00ni requested a review from j0k3r October 2, 2023 11:23
@k00ni
Copy link
Collaborator Author

k00ni commented Oct 2, 2023

I refined the wording of my comment. Changes like these might be needed in other places too, but for now that should be sufficient.

@k00ni k00ni merged commit 52c4f6c into master Oct 2, 2023
29 checks passed
@k00ni k00ni deleted the fix/font-calculateTextWidth-Widths-key branch October 2, 2023 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants