Skip to content

Fix upper case font name support#646

Closed
CY-Qiu wants to merge 0 commit intopy-pdf:masterfrom
CY-Qiu:master
Closed

Fix upper case font name support#646
CY-Qiu wants to merge 0 commit intopy-pdf:masterfrom
CY-Qiu:master

Conversation

@CY-Qiu
Copy link

@CY-Qiu CY-Qiu commented Dec 25, 2022

Fixes #638

Fix upper case font name support.

Checklist:

  • 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.

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

  • This PR is ready to be merged

  • 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

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

@CY-Qiu CY-Qiu requested a review from Lucas-C as a code owner December 25, 2022 13:07
@Lucas-C
Copy link
Member

Lucas-C commented Dec 25, 2022

Thank you @CY-Qiu for submitting this PR!

As suggested in the PR template, could you please add a mention of this fix in CHANGELOG.md,
and also a unit test? We currently have a Roboto-BoldItalic.ttf file that is not used by any unit test,
you could rename it with an uppercase extension and use it in a new unit test.

def test_add_font_uppercase():
pdf = FPDF()
pdf.add_font(fname="Roboto-BoldItalic.TTF")
assert (pdf.fonts is not None and len(pdf.fonts) != 0) # fonts add successful No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Lucas-C
Copy link
Member

Lucas-C commented Dec 27, 2022

Hi @CY-Qiu!

Thank you for adding a unit test 😄
If you struggle with the PR mechanism, I can add an entry to the CHANGELOG.md myself

Was it intentional to close the PR? Do you plan to open an new one?

@Lucas-C Lucas-C mentioned this pull request Dec 27, 2022
5 tasks
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.

Unsupport upper case font file name

2 participants