-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Text antialiasing for mathtext (reopen) #26376
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
Changes from all commits
f11c92c
1f6d78f
27526d9
5325014
4edd250
2008271
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -962,3 +962,19 @@ def test_text_antialiased_on_default_vs_manual(fig_test, fig_ref): | |
|
||
mpl.rcParams['text.antialiased'] = True | ||
fig_ref.text(0.5, 0.5, '6 inches x 2 inches') | ||
|
||
|
||
@check_figures_equal() | ||
def test_text_math_antialiased_on_default_vs_manual(fig_test, fig_ref): | ||
fig_test.text(0.5, 0.5, r"OutsideMath $I\'m \sqrt{2}$", antialiased=True) | ||
|
||
mpl.rcParams['text.antialiased'] = True | ||
fig_ref.text(0.5, 0.5, r"OutsideMath $I\'m \sqrt{2}$") | ||
|
||
|
||
@check_figures_equal() | ||
def test_text_math_antialiased_off_default_vs_manual(fig_test, fig_ref): | ||
fig_test.text(0.5, 0.5, r"OutsideMath $I\'m \sqrt{2}$", antialiased=False) | ||
|
||
mpl.rcParams['text.antialiased'] = False | ||
fig_ref.text(0.5, 0.5, r"OutsideMath $I\'m \sqrt{2}$") | ||
Comment on lines
+967
to
+980
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately, neither of these tests fail without this PR, so I'm not sure if they are testing what you want? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. |
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.
This also fixes a latent bug where we would incorrectly hit the cache if the rcparam was changed between the first and subsequent calls!