Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5971feb

Browse files
authored
Merge pull request #22704 from anntzer/tpg
Small simplification to textpath.
2 parents abdc7c4 + 0f757d2 commit 5971feb

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/matplotlib/textpath.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,10 @@ def get_text_path(self, prop, s, ismath=False):
117117
glyph_info, glyph_map, rects = self.get_glyphs_mathtext(prop, s)
118118

119119
verts, codes = [], []
120-
121120
for glyph_id, xposition, yposition, scale in glyph_info:
122121
verts1, codes1 = glyph_map[glyph_id]
123-
if len(verts1):
124-
verts1 = np.array(verts1) * scale + [xposition, yposition]
125-
verts.extend(verts1)
126-
codes.extend(codes1)
127-
122+
verts.extend(verts1 * scale + [xposition, yposition])
123+
codes.extend(codes1)
128124
for verts1, codes1 in rects:
129125
verts.extend(verts1)
130126
codes.extend(codes1)

0 commit comments

Comments
 (0)