font_manger.findSystemFonts() broken on macOS in matplotlib 3.0

Hello,

font_manger.findSystemFonts() is broken on macOS in matplotlib 3.0
because the function OSXInstalledFonts() is broken. I was about to send
a patch but I see that the function is now deprecated. However, I think
it should be fixed in the 3.0.1 release. The patch is attached.

Cheers,
Dan
-------------- next part --------------
From fda67ab81b362d5a57f1c1a3f99766a50c7d5fb5 Mon Sep 17 00:00:00 2001

···

From: Daniele Nicolodi <daniele@grinta.net>
Date: Wed, 10 Oct 2018 19:23:22 -0600
Subject: [PATCH] Fix font_manager.OSXInstalledFonts()
Status: O
Content-Length: 690
Lines: 21

---
lib/matplotlib/font_manager.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/matplotlib/font_manager.py b/lib/matplotlib/font_manager.py
index 37a0c7fc1..7a8f873f9 100644
--- a/lib/matplotlib/font_manager.py
+++ b/lib/matplotlib/font_manager.py
@@ -218,8 +218,7 @@ def OSXInstalledFonts(directories=None, fontext='ttf'):
         directories = OSXFontDirectories
     return [path
             for directory in directories
- for ext in get_fontext_synonyms(fontext)
- for path in list_fonts(directory, ext)]
+ for path in list_fonts(directory, get_fontext_synonyms(fontext))]

@lru_cache()
--
2.15.2 (Apple Git-101.1)

Can you open a PR on github with that patch? Agree that even though it is
deprecated it should be fixed for 3.0.1.

Tom

···

On Wed, Oct 10, 2018 at 9:32 PM Daniele Nicolodi <daniele at grinta.net> wrote:

Hello,

font_manger.findSystemFonts() is broken on macOS in matplotlib 3.0
because the function OSXInstalledFonts() is broken. I was about to send
a patch but I see that the function is now deprecated. However, I think
it should be fixed in the 3.0.1 release. The patch is attached.

Cheers,
Dan
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org
https://mail.python.org/mailman/listinfo/matplotlib-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20181010/6ba78f74/attachment.html>

https://github.com/matplotlib/matplotlib/pull/12485

Dan

···

On 10-10-2018 19:57, Thomas Caswell wrote:

Can you open a PR on github with that patch?? Agree that even though it
is deprecated it should be fixed for 3.0.1.