Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Commite1750a8
Don't try to find TeX-only fonts when layouting TeX text. (#13170)
Text.is_math_text is only ever called with self.get_usetex() as secondargument, so just change it to a private method (Text._preprocess_math)that calls self.get_usetex() internally; deprecate is_math_text whichis clearly a private internal helper. This also helps clarifying thatusetex mode is only ever called if self.get_usetex() is True (in thetextobj.is_math_text(...) line, textobj is actually the same object(!)as self so shares the same get_usetex() value).In Text._get_layout, if self.get_usetex() is True (and only in thatcase), self._fontproperties can refer to a TeX-only font (e.g. "ComputerModern Roman"). If that's the case, don't try to callrenderer.get_text_width_height_descent with ismath=False, as that wouldtrigger a font resolution that can fail (perhaps there's no "ComputerModern Roman" font available in the font cache; it may only be availableto TeX) and cause a spurious warning.1 parenta598811 commite1750a8
File tree
3 files changed
+31
-5
lines changed- doc/api/next_api_changes
- lib/matplotlib
3 files changed
+31
-5
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + |
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
264 | 264 |
| |
265 | 265 |
| |
266 | 266 |
| |
267 |
| - | |
| 267 | + | |
268 | 268 |
| |
269 | 269 |
| |
270 | 270 |
| |
|
Lines changed: 26 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
286 | 286 |
| |
287 | 287 |
| |
288 | 288 |
| |
289 |
| - | |
| 289 | + | |
| 290 | + | |
290 | 291 |
| |
291 | 292 |
| |
292 | 293 |
| |
293 |
| - | |
| 294 | + | |
294 | 295 |
| |
295 | 296 |
| |
296 | 297 |
| |
| |||
697 | 698 |
| |
698 | 699 |
| |
699 | 700 |
| |
700 |
| - | |
701 |
| - | |
| 701 | + | |
702 | 702 |
| |
703 | 703 |
| |
704 | 704 |
| |
| |||
1152 | 1152 |
| |
1153 | 1153 |
| |
1154 | 1154 |
| |
| 1155 | + | |
1155 | 1156 |
| |
1156 | 1157 |
| |
1157 | 1158 |
| |
| |||
1174 | 1175 |
| |
1175 | 1176 |
| |
1176 | 1177 |
| |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
1177 | 1199 |
| |
1178 | 1200 |
| |
1179 | 1201 |
| |
|
0 commit comments
Comments
(0)