Skip to content

Commit e799f5e

Browse files
committed
Added more vispy patches
1 parent 658ee9b commit e799f5e

File tree

3 files changed

+72
-0
lines changed

3 files changed

+72
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
diff --git a/vispy/util/fonts/_triage.py b/vispy/util/fonts/_triage.py
2+
index ddbc93d..324c161 100644
3+
--- a/vispy/util/fonts/_triage.py
4+
+++ b/vispy/util/fonts/_triage.py
5+
@@ -9,14 +9,14 @@ import sys
6+
from ._vispy_fonts import _vispy_fonts
7+
if sys.platform.startswith('linux'):
8+
from ._freetype import _load_glyph
9+
- from ...ext.fontconfig import _list_fonts
10+
-elif sys.platform == 'darwin':
11+
- from ._quartz import _load_glyph, _list_fonts
12+
-elif sys.platform.startswith('win'):
13+
- from ._freetype import _load_glyph # noqa, analysis:ignore
14+
- from ._win32 import _list_fonts # noqa, analysis:ignore
15+
-else:
16+
- raise NotImplementedError('unknown system %s' % sys.platform)
17+
+ # from ...ext.fontconfig import _list_fonts
18+
+# elif sys.platform == 'darwin':
19+
+# from ._quartz import _load_glyph, _list_fonts
20+
+# elif sys.platform.startswith('win'):
21+
+# from ._freetype import _load_glyph # noqa, analysis:ignore
22+
+# from ._win32 import _list_fonts # noqa, analysis:ignore
23+
+# else:
24+
+# raise NotImplementedError('unknown system %s' % sys.platform)
25+
26+
_fonts = {}
27+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
diff --git a/vispy/util/fonts/_freetype.py b/vispy/util/fonts/_freetype.py
2+
index 3b33d0b..229d559 100644
3+
--- a/vispy/util/fonts/_freetype.py
4+
+++ b/vispy/util/fonts/_freetype.py
5+
@@ -12,12 +12,12 @@ import numpy as np
6+
7+
# Convert face to filename
8+
from ._vispy_fonts import _vispy_fonts, _get_vispy_font_filename
9+
-if sys.platform.startswith('linux'):
10+
- from ...ext.fontconfig import find_font
11+
-elif sys.platform.startswith('win'):
12+
- from ._win32 import find_font # noqa, analysis:ignore
13+
-else:
14+
- raise NotImplementedError
15+
+# if sys.platform.startswith('linux'):
16+
+# from ...ext.fontconfig import find_font
17+
+# elif sys.platform.startswith('win'):
18+
+# from ._win32 import find_font # noqa, analysis:ignore
19+
+# else:
20+
+# raise NotImplementedError
21+
22+
_font_dict = {}
23+
24+
@@ -41,6 +41,7 @@ def _load_font(face, bold, italic):
25+
26+
def _load_glyph(f, char, glyphs_dict):
27+
"""Load glyph from font into dict"""
28+
+ return
29+
from ...ext.freetype import (FT_LOAD_RENDER, FT_LOAD_NO_HINTING,
30+
FT_LOAD_NO_AUTOHINT)
31+
flags = FT_LOAD_RENDER | FT_LOAD_NO_HINTING | FT_LOAD_NO_AUTOHINT
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/vispy/gloo/gl/__init__.py b/vispy/gloo/gl/__init__.py
2+
index 93813fa..c41859c 100644
3+
--- a/vispy/gloo/gl/__init__.py
4+
+++ b/vispy/gloo/gl/__init__.py
5+
@@ -210,7 +210,7 @@ def check_error(when='periodic check'):
6+
7+
8+
# Load default gl backend
9+
-from . import gl2 as default_backend # noqa
10+
+from . import es2 as default_backend # noqa
11+
12+
# Call use to start using our default backend
13+
-use_gl()
14+
+use_gl('es2')

0 commit comments

Comments
 (0)