forked from pyodide/pyodide
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Requires an update to matplotlib-pyodide before it will work: pyodide/matplotlib-pyodide#52
- Loading branch information
Showing
4 changed files
with
18 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 16c3b1d3881d809d564638421e656837ca4d5cb8 Mon Sep 17 00:00:00 2001 | ||
From ccaf51989a9afb51e42a1d368ccb07834bea8745 Mon Sep 17 00:00:00 2001 | ||
From: William Lachance <[email protected]> | ||
Date: Mon, 12 Dec 2022 18:18:31 -0800 | ||
Subject: [PATCH 1/3] disable macosx backend | ||
|
@@ -9,10 +9,10 @@ This comes from #541. We let it as is in case it helps building on Mac. | |
1 file changed, 1 insertion(+) | ||
|
||
diff --git a/setupext.py b/setupext.py | ||
index 0387223b94..5e78ace36e 100644 | ||
index 9f78d88c87..f6945c961a 100644 | ||
--- a/setupext.py | ||
+++ b/setupext.py | ||
@@ -774,6 +774,7 @@ class BackendMacOSX(OptionalPackage): | ||
@@ -782,6 +782,7 @@ class BackendMacOSX(OptionalPackage): | ||
name = 'macosx' | ||
|
||
def check(self): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From b82445488de21258ba2a72dfb0853eb1c6514658 Mon Sep 17 00:00:00 2001 | ||
From dd7c0ccf731b605e540401f13aa801a02016f6b2 Mon Sep 17 00:00:00 2001 | ||
From: casatir <[email protected]> | ||
Date: Mon, 12 Dec 2022 18:26:01 -0800 | ||
Subject: [PATCH 2/3] fix threading | ||
|
@@ -9,10 +9,10 @@ threading.Timer is not yet supported in Pyodide. | |
1 file changed, 3 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/lib/matplotlib/font_manager.py b/lib/matplotlib/font_manager.py | ||
index a5742ef88f..7eb183ab00 100644 | ||
index a91ca4ba45..c16466ef5e 100644 | ||
--- a/lib/matplotlib/font_manager.py | ||
+++ b/lib/matplotlib/font_manager.py | ||
@@ -1093,10 +1093,8 @@ class FontManager: | ||
@@ -1031,10 +1031,8 @@ class FontManager: | ||
self.afmlist = [] | ||
self.ttflist = [] | ||
|
||
|
@@ -25,7 +25,7 @@ index a5742ef88f..7eb183ab00 100644 | |
try: | ||
for fontext in ["afm", "ttf"]: | ||
for path in [*findSystemFonts(paths, fontext=fontext), | ||
@@ -1109,7 +1107,7 @@ class FontManager: | ||
@@ -1047,7 +1045,7 @@ class FontManager: | ||
_log.info("Failed to extract font properties from %s: " | ||
"%s", path, exc) | ||
finally: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 84121d18d4f98fb8eedcc0c5ba282231714dc40a Mon Sep 17 00:00:00 2001 | ||
From 0cb057461c1280a1304808db02e81930dcc54b24 Mon Sep 17 00:00:00 2001 | ||
From: casatir <[email protected]> | ||
Date: Mon, 12 Dec 2022 18:27:17 -0800 | ||
Subject: [PATCH 3/3] hardcoded font cache | ||
|
@@ -11,18 +11,18 @@ so we teach `font_manager.py` where to find it. | |
1 file changed, 1 insertion(+), 3 deletions(-) | ||
|
||
diff --git a/lib/matplotlib/font_manager.py b/lib/matplotlib/font_manager.py | ||
index 7eb183ab00..51a0a29bec 100644 | ||
index c16466ef5e..afb2b68a3d 100644 | ||
--- a/lib/matplotlib/font_manager.py | ||
+++ b/lib/matplotlib/font_manager.py | ||
@@ -1557,7 +1557,6 @@ def _get_font(font_filepaths, hinting_factor, *, _kerning_factor, thread_id): | ||
@@ -1503,7 +1503,6 @@ def _get_font(font_filepaths, hinting_factor, *, _kerning_factor, thread_id): | ||
_kerning_factor=_kerning_factor | ||
) | ||
|
||
- | ||
# FT2Font objects cannot be used across fork()s because they reference the same | ||
# FT_Library object. While invalidating *all* existing FT2Fonts after a fork | ||
# would be too complicated to be worth it, the main way FT2Fonts get reused is | ||
@@ -1615,8 +1614,7 @@ def get_font(font_filepaths, hinting_factor=None): | ||
@@ -1560,8 +1559,7 @@ def get_font(font_filepaths, hinting_factor=None): | ||
|
||
|
||
def _load_fontmanager(*, try_read_cache=True): | ||
|