@@ -67,6 +67,9 @@ def _get_char_id_ps(self, font, ccode):
6767 char_id = urllib .parse .quote ('%s-%d' % (ps_name , ccode ))
6868 return char_id
6969
70+ @cbook .deprecated (
71+ "3.1" ,
72+ alternative = "font.get_path() and manual translation of the vertices" )
7073 def glyph_to_path (self , font , currx = 0. ):
7174 """
7275 convert the ft2font glyph to vertices and codes.
@@ -215,7 +218,7 @@ def get_glyphs_with_font(self, font, s, glyph_map=None,
215218
216219 char_id = self ._get_char_id (font , ccode )
217220 if char_id not in glyph_map :
218- glyph_map_new [char_id ] = self . glyph_to_path ( font )
221+ glyph_map_new [char_id ] = font . get_path ( )
219222
220223 currx += kern / 64
221224
@@ -266,7 +269,7 @@ def get_glyphs_mathtext(self, prop, s, glyph_map=None,
266269 font .clear ()
267270 font .set_size (self .FONT_SCALE , self .DPI )
268271 glyph = font .load_char (ccode , flags = LOAD_NO_HINTING )
269- glyph_map_new [char_id ] = self . glyph_to_path ( font )
272+ glyph_map_new [char_id ] = font . get_path ( )
270273
271274 xpositions .append (ox )
272275 ypositions .append (oy )
@@ -343,7 +346,7 @@ def get_glyphs_tex(self, prop, s, glyph_map=None,
343346
344347 glyph0 = font .load_char (glyph , flags = ft2font_flag )
345348
346- glyph_map_new [char_id ] = self . glyph_to_path ( font )
349+ glyph_map_new [char_id ] = font . get_path ( )
347350
348351 glyph_ids .append (char_id )
349352 xpositions .append (x1 )
0 commit comments