@@ -67,6 +67,9 @@ def _get_char_id_ps(self, font, ccode):
67
67
char_id = urllib .parse .quote ('%s-%d' % (ps_name , ccode ))
68
68
return char_id
69
69
70
+ @cbook .deprecated (
71
+ "3.1" ,
72
+ alternative = "font.get_path() and manual translation of the vertices" )
70
73
def glyph_to_path (self , font , currx = 0. ):
71
74
"""
72
75
convert the ft2font glyph to vertices and codes.
@@ -215,7 +218,7 @@ def get_glyphs_with_font(self, font, s, glyph_map=None,
215
218
216
219
char_id = self ._get_char_id (font , ccode )
217
220
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 ( )
219
222
220
223
currx += kern / 64
221
224
@@ -266,7 +269,7 @@ def get_glyphs_mathtext(self, prop, s, glyph_map=None,
266
269
font .clear ()
267
270
font .set_size (self .FONT_SCALE , self .DPI )
268
271
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 ( )
270
273
271
274
xpositions .append (ox )
272
275
ypositions .append (oy )
@@ -343,7 +346,7 @@ def get_glyphs_tex(self, prop, s, glyph_map=None,
343
346
344
347
glyph0 = font .load_char (glyph , flags = ft2font_flag )
345
348
346
- glyph_map_new [char_id ] = self . glyph_to_path ( font )
349
+ glyph_map_new [char_id ] = font . get_path ( )
347
350
348
351
glyph_ids .append (char_id )
349
352
xpositions .append (x1 )
0 commit comments