| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| 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())), |
There was a problem hiding this comment.
This doesn't round the same, but I'm not sure if it's important:
In [9]: for i in range(10):
...: i = i + 0.5
...: print(i, round(i), int(i + 0.5))
...:
0.5 0 1
1.5 2 2
2.5 2 3
3.5 4 4
4.5 4 5
5.5 6 6
6.5 6 7
7.5 8 8
8.5 8 9
9.5 10 10
Sorry, something went wrong.
There was a problem hiding this comment.
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...).
Sorry, something went wrong.
This is a very-small partial revert of matplotlib#15292, which claimed that wx supports floats, but this no longer appears to be the case with Python 3.10, and looking at the C++ class constructor [1], should not have ever been supported. [1] https://docs.wxwidgets.org/3.0/classwx_font.html
| Back | FazBrowse Home | New Git URL |
PR Summary
PR Checklist