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

Shorten RendererWx.get_wx_font.#15292

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
tacaswell merged 1 commit intomatplotlib:masterfromanntzer:wxfont
Nov 5, 2019
Merged

Conversation

anntzer
Copy link
Contributor

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code isFlake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

self.fontd[key] = font

self.fontd[key] = font = wx.Font( # Cache the font and gc.
pointSize=round(self.points_to_pixels(prop.get_size_in_points())),
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't round the same, but I'm not sure if it's important:

In [9]:foriinrange(10):    ...:i=i+0.5    ...:print(i,round(i),int(i+0.5))    ...:0.5011.5222.5233.5444.5455.5666.5677.5888.5899.51010

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Actually, upon further testing wx.Font accepts floats just fine here so I just dropped the rounding (after all freetype accepts sizes in multiples of (1/64) so there's no reason to drop that info...).

@tacaswelltacaswell merged commit8189978 intomatplotlib:masterNov 5, 2019
@tacaswelltacaswell added this to thev3.3.0 milestoneNov 5, 2019
@anntzeranntzer deleted the wxfont branchNovember 5, 2019 10:25
QuLogic added a commit to QuLogic/matplotlib that referenced this pull requestJan 29, 2021
This is a very-small partial revert ofmatplotlib#15292, which claimed that wxsupports floats, but this no longer appears to be the case with Python3.10, and looking at the C++ class constructor [1], should not have everbeen supported.[1]https://docs.wxwidgets.org/3.0/classwx_font.html
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic left review comments

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
v3.3.0
Development

Successfully merging this pull request may close these issues.

4 participants
@anntzer@QuLogic@timhoffm@tacaswell

[8]ページ先頭

©2009-2025 Movatter.jp