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

Clarify FPDF.add_font()'s style parameter accepted values #1263

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

jhenriquelc
Copy link

@jhenriquelc jhenriquelc commented Sep 18, 2024

Changes:

In FPDF.add_font(), a line of documentation about the accepted values of the style parameter is being clarified to explicitly mention the empty string case and infer that "BI" is an accepted value.

Motives:

I suspect this is the cause for a misimplementation in typeshed's typing stubs, which I have opened a PR there to fix.

Sorry for this small PR, but I felt like it was appropriate. I'm looking forward to doing more (and bigger) docs clarifications if they're welcomed.

Thank you for working on this amazing project, maintainers!

Checklist:

  • This PR is ready to be merged

  • The GitHub pipeline is OK (green),
    meaning that both pylint (static code analyzer) and black (code formatter) are happy with the changes of this PR.

  • [N/A] A unit test is covering the code added / modified by this PR

  • [N/A] In case of a new feature, docstrings have been added, with also some documentation in the docs/ folder

  • A mention of the change is present in CHANGELOG.md

License consent:

By submitting this pull request, I confirm that my contribution is made under the terms of the GNU LGPL 3.0 license.

The former sentence did not make it clear about using an empty string or combining B and I.
@Lucas-C
Copy link
Member

Lucas-C commented Sep 20, 2024

Thank you for your contribution @jhenriquelc 👍
I'm going to merge this PR now.

@allcontributors please add @jhenriquelc for documentation

Copy link

@Lucas-C

I've put up a pull request to add @jhenriquelc! 🎉

@Lucas-C Lucas-C merged commit 3e5e783 into py-pdf:master Sep 20, 2024
1 of 11 checks passed
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