-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
BUG: The font list order of pypdf.annotations.FreeText is different(#1435) #2893
BUG: The font list order of pypdf.annotations.FreeText is different(#1435) #2893
Conversation
Could you please elaborate?
Yes, in the best case we would check the correct output here as well covering some common combinations. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2893 +/- ##
=======================================
Coverage 96.43% 96.43%
=======================================
Files 52 52
Lines 8724 8726 +2
Branches 1721 1721
=======================================
+ Hits 8413 8415 +2
Misses 182 182
Partials 129 129 ☔ View full report in Codecov by Sentry. |
The problem is that it's difficult for me to capture in code that the font size has changed.
|
#2084 can also be closed. |
In general, we prefer tests that are automated. Thus, for your change, I would prefer you to add a corresponding test which asserts that we indeed generate the correct font strings from the inputs. IMHO this case can be tested from code and does not need manual inspection. |
Is it okay to delete the original test and create a new one? |
It should not harm to keep the existing test nevertheless. In my opinion, it would be sufficient to just create different |
Thank you! |
I think #2305 can be closed if there are no problems with the comments. |
Please move this to a dedicated test function, for example |
I changed it. Please help me if there are any problems with the input location. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
@stefan6419846 Please also check the following two issues. #2084 It can simply be closed. |
## What's new ### New Features (ENH) - Add `layout_mode_font_height_weight` argument to `PageObject.extract_text()` (#2920) by @hpierre001 ### Bug Fixes (BUG) - Fix font specificier for FreeText annotation (#2893) by @ssjkamei - Line breaks are not generated due to incorrect calculation of text leading (#2890) by @ssjkamei - Improve handling of spaces in text extraction (#2882) by @ssjkamei ### Robustness (ROB) - Soft failure for flate encode image mode 1 with wrong LUT size (#2900) by @stefan6419846 ### Documentation (DOC) - Use latest package versions (#2907) by @stefan6419846 - Correct example of reading FileAttachment annotation (#2906) by @j-t-1 ### Developer Experience (DEV) - Update pinned requirements (#2918) by @stefan6419846 - Make make_release.py compatible with Windows environment (#2894) by @pubpub-zz ### Maintenance (MAINT) - Remove references to outdated Python versions (#2919) by @stefan6419846 - Generalize the method of obtaining space_code (#2891) by @ssjkamei - Unnecessary character mapping process (#2888) by @ssjkamei - New LZW decoding implementation (#2887) by @MartinThoma ### Testing (TST) - Add LzwCodec for encoding (#2883) by @MartinThoma ### Code Style (STY) - Capitalize error messages (#2903) by @j-t-1 - Modify error messages in PdfWriter (#2902) by @j-t-1 [Full Changelog](5.0.1...5.1.0)
Close #1435
The order of the list was different.
It seems difficult to obtain the actual font size etc. Is it necessary to test?