Commit fa7f42f
committed
Simplify font_manager font enumeration logic.
The font enumeration logic on Windows was relatively difficult to
follow, being split over three different functions (win32FontDirectory,
_win32RegistryFonts, and win32InstalledFonts), with variable names that
did not clearly indicate whether they are directories (such as
MSUserFontDirectories) or registry keys (such as MSFontDirectories).
Inline most of the logic to _get_win32_installed_fonts, and also
get rid of the extension filtering (both here and in
get_fontconfig_fonts), as it can be done once for all at the call site
(in `findSystemFonts`); also make the helpers return Paths, for simpler
manipulation (we still convert to strs at the end).1 parent 9177280 commit fa7f42f
3 files changed
Lines changed: 55 additions & 14 deletions
File tree
- doc/api/next_api_changes/deprecations
- lib/matplotlib
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| 266 | + | |
| 267 | + | |
266 | 268 | | |
267 | 269 | | |
268 | 270 | | |
| |||
290 | 292 | | |
291 | 293 | | |
292 | 294 | | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
293 | 327 | | |
294 | | - | |
295 | | - | |
| 328 | + | |
| 329 | + | |
296 | 330 | | |
297 | 331 | | |
298 | 332 | | |
| |||
301 | 335 | | |
302 | 336 | | |
303 | 337 | | |
304 | | - | |
| 338 | + | |
305 | 339 | | |
306 | 340 | | |
| 341 | + | |
307 | 342 | | |
308 | 343 | | |
309 | 344 | | |
310 | | - | |
311 | | - | |
| 345 | + | |
| 346 | + | |
312 | 347 | | |
313 | 348 | | |
314 | 349 | | |
| |||
324 | 359 | | |
325 | 360 | | |
326 | 361 | | |
| 362 | + | |
327 | 363 | | |
328 | | - | |
329 | | - | |
330 | 364 | | |
331 | | - | |
| 365 | + | |
332 | 366 | | |
333 | 367 | | |
334 | | - | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
335 | 372 | | |
336 | 373 | | |
337 | 374 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| |||
0 commit comments