@@ -69,7 +69,7 @@ def get_text_width_height_descent(self, s, prop, ismath):
69
69
d /= 64.0
70
70
return w * scale ,h * scale ,d * scale
71
71
72
- def get_text_path (self ,prop ,s ,ismath = False ):
72
+ def get_text_path (self ,prop ,s ,ismath = False , language = None ):
73
73
"""
74
74
Convert text *s* to path (a tuple of vertices and codes for
75
75
matplotlib.path.Path).
@@ -109,7 +109,8 @@ def get_text_path(self, prop, s, ismath=False):
109
109
glyph_info ,glyph_map ,rects = self .get_glyphs_tex (prop ,s )
110
110
elif not ismath :
111
111
font = self ._get_font (prop )
112
- glyph_info ,glyph_map ,rects = self .get_glyphs_with_font (font ,s )
112
+ glyph_info ,glyph_map ,rects = self .get_glyphs_with_font (font ,s ,
113
+ language = language )
113
114
else :
114
115
glyph_info ,glyph_map ,rects = self .get_glyphs_mathtext (prop ,s )
115
116
@@ -130,7 +131,7 @@ def get_text_path(self, prop, s, ismath=False):
130
131
return verts ,codes
131
132
132
133
def get_glyphs_with_font (self ,font ,s ,glyph_map = None ,
133
- return_new_glyphs_only = False ):
134
+ return_new_glyphs_only = False , language = None ):
134
135
"""
135
136
Convert string *s* to vertices and codes using the provided ttf font.
136
137
"""
@@ -145,7 +146,7 @@ def get_glyphs_with_font(self, font, s, glyph_map=None,
145
146
146
147
xpositions = []
147
148
glyph_ids = []
148
- for item in _text_helpers .layout (s ,font ):
149
+ for item in _text_helpers .layout (s ,font , language ):
149
150
char_id = self ._get_char_id (item .ft_object ,ord (item .char ))
150
151
glyph_ids .append (char_id )
151
152
xpositions .append (item .x )