Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add kerning to single-byte strings in PDFs#19582

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

sauerburger
Copy link
Member

@sauerburgersauerburger commentedFeb 25, 2021
edited
Loading

PR Summary

PR#18517 adds kerning to strings in PDFs if the string contains multi-byte chars. In case of strings consisting only of single-byte chars, the PDF output does not contains kerning (PDF operatorTj). This PR adds kerning to the single-byte case and adds the string using theTJ operator. See also#19581.

PR Checklist

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (runflake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).
  • Conforms to Matplotlib style conventions (installflake8-docstrings and runflake8 --docstring-convention=all).
  • New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).

@jklymak
Copy link
Member

Thanks for this! This changes 10 PDF tests, so those images will have to be updated. There is also a flake8 error.

@sauerburgersauerburgerforce-pushed thepdf-ascii-string-kerning branch 2 times, most recently fromb30d609 to08f03c1CompareMarch 1, 2021 16:06
@sauerburger
Copy link
MemberAuthor

The failing PDF tests were actually a string encoding issue on my side. I've fixed this now, and improved the code style.

@sauerburgersauerburgerforce-pushed thepdf-ascii-string-kerning branch from08f03c1 tof179cceCompareMarch 1, 2021 17:25
@sauerburgersauerburgerforce-pushed thepdf-ascii-string-kerning branch fromf179cce tob555611CompareMarch 1, 2021 19:42
@QuLogicQuLogic added this to thev3.4.0 milestoneMar 2, 2021
@QuLogic
Copy link
Member

Don't forget to mark this ready for review.

@sauerburgersauerburger marked this pull request as ready for reviewMarch 2, 2021 08:27
tacaswell
tacaswell previously requested changesMar 3, 2021
Copy link
Member

@tacaswelltacaswell left a comment

Choose a reason for hiding this comment

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

I agree with@QuLogic that we should use the new style for the new images.

Anyone can clear this.

@sauerburgersauerburgerforce-pushed thepdf-ascii-string-kerning branch fromb555611 to4881758CompareMarch 3, 2021 21:39
@QuLogicQuLogic merged commit451e329 intomatplotlib:masterMar 4, 2021
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestMar 4, 2021
tacaswell added a commit that referenced this pull requestMar 4, 2021
…582-on-v3.4.xBackport PR#19582 on branch v3.4.x (Add kerning to single-byte strings in PDFs)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@aitikguptaaitikguptaaitikgupta left review comments

@QuLogicQuLogicQuLogic approved these changes

@anntzeranntzeranntzer approved these changes

@tacaswelltacaswellAwaiting requested review from tacaswell

Assignees
No one assigned
Projects
None yet
Milestone
v3.4.0
Development

Successfully merging this pull request may close these issues.

6 participants
@sauerburger@jklymak@QuLogic@tacaswell@anntzer@aitikgupta

[8]ページ先頭

©2009-2025 Movatter.jp