Commit deb8d04
committed
Fix handling of nonmath hyphens in mathtext.
hyphen-to-unicode-minus replacement now occurs at the parsing stage, and
thus does not need to be done again in get_unicode_index (otherwise,
text hyphens also get incorrectly substituted.
Strictly speaking, one would need either to fully deprecate
get_unicode_index and replace it by a private helper (for which `math`
is always False), or introduce a deprecation period during which users
*must* pass the `math` kwarg (any value other than False results in a
warning) and then another one that deprecates that kwarg; which is quite
long; hopefully the change is in a private-enough part of the library
that we can just do it as is.
Also do some more changes to the mathtext-svg-text-only-tests that I
missed when the feature first went in: only test svg (that's the
point of it...) and only test two fonts: a "standard" truetype font --
the default dejavusans -- and the "cm" font, which has a very specific
encoding (see the BakomaFonts class).1 parent 0371cf9 commit deb8d04
File tree
6 files changed
+48
-11
lines changed- doc/api/next_api_changes
- behavior
- deprecations
- lib/matplotlib
- tests
- baseline_images/test_mathtext
6 files changed
+48
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
| 46 | + | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
Lines changed: 19 additions & 0 deletions
Loading
Lines changed: 18 additions & 0 deletions
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| |||
206 | 207 | | |
207 | 208 | | |
208 | 209 | | |
209 | | - | |
210 | | - | |
| 210 | + | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| |||
0 commit comments