-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix glyph sizing in textpath. #14159
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
base: main
Are you sure you want to change the base?
Conversation
d205fae
to
88dc6d8
Compare
mpl.rcParams['svg.fonttype'] = 'none' | ||
# Use Computer Modern Sans Serif, not Helvetica (which has no \textwon). | ||
mpl.style.use('default') | ||
plt.figtext(.5, .5, r'\textdegree', usetex=True) |
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.
(I intentionally chose this character with a simple outline to make the svg as small as possible :))
Scaling by dvifont.size / self.FONT_SCALE resulted in way to small glyphs for many fonts.
I don't see a clear effect, but that's also because Also, is it correct that matplotlib/lib/matplotlib/textpath.py Line 255 in ec1693c
|
Hum, looks like this depends on some details of your tex install, in particular I can't repro this anymore "as is" with texlive 2019; OTOH one can still see the issue with
but this shows that even setting the size to 1 is not sufficient to fix the problem (even though it does improve the situation). |
Since this Pull Request has not been updated in 60 days, it has been marked "inactive." This does not mean that it will be closed, though it may be moved to a "Draft" state. This helps maintainers prioritize their reviewing efforts. You can pick the PR back up anytime - please ping us if you need a review or guidance to move the PR forward! If you do not plan on continuing the work, please let us know so that we can either find someone to take the PR over, or close it. |
PR Summary
Scaling by dvifont.size / self.FONT_SCALE resulted in way to small
glyphs for many fonts.
Closes the "bad size" part of #12928 / #14146 (comment).
This goes on top of #14156 even though they are technically independent as both are needed to fix (I think) #14156.
Setting the later scaling of 1 should be equivalent (modulo hinting, which is likely better?) to the solution in #12928 (comment), which increased the font size to compensate for the later scaling.
Closes #8068.
PR Checklist