Skip to content

Fix upper case font name support#648

Merged
Lucas-C merged 7 commits intopy-pdf:masterfrom
CY-Qiu:master
Dec 28, 2022
Merged

Fix upper case font name support#648
Lucas-C merged 7 commits intopy-pdf:masterfrom
CY-Qiu:master

Conversation

@CY-Qiu
Copy link

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

e.g. Fixes #638
Fix upper case font name support.
Sorry I'm not very familiar with the pr system.

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 27, 2022 11:15
@Lucas-C
Copy link
Member

Lucas-C commented Dec 27, 2022

Note: this is a replacement for PR #646

* a `ValueError: Incoherent hierarchy` could be raised when using `write_html()` with some headings hierarchy
* performance issue with adding large images with `FlateDecode` image filter
* image (`<img>`) without `height` attribute overlaps with the following content [#632](https://github.com/PyFPDF/fpdf2/issues/632)
* Fix support for upper case font file name [#638](https://github.com/PyFPDF/fpdf2/issues/638)
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

pylint is being very strict... hence the failing GitHub Actions checks.

$ pylint fpdf test tutorial/tuto*.py
************* Module test.fonts.test_add_font
test/fonts/test_add_font.py:114:0: C0305: Trailing newlines (trailing-newlines)

You can either disable this trailing-newlines rule in .pylintrc,
or just remove a newline at the end of test/fonts/test_add_font.py

@Lucas-C
Copy link
Member

Lucas-C commented Dec 28, 2022

This time it's the black code formatter that's complaining... 😄
The related documentation is here: https://pyfpdf.github.io/fpdf2/Development.html#code-auto-formatting

You just need to run the black command in the repository directory.

I can do it myself by adding a commit to your branch if you want.

@Lucas-C Lucas-C merged commit b3c8880 into py-pdf:master Dec 28, 2022
@Lucas-C
Copy link
Member

Lucas-C commented Dec 28, 2022

Merged! Thank you @CY-Qiu 😄

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