@@ -331,7 +331,7 @@ def _get_hatch(self, gc, rgbFace):
331
331
else :
332
332
_ , oid = oid
333
333
return oid
334
-
334
+
335
335
def _write_hatches (self ):
336
336
if not len (self ._hatchd ):
337
337
return
@@ -445,7 +445,7 @@ def _write_clips(self):
445
445
writer .element ('rect' , x = str (x ), y = str (y ), width = str (w ), height = str (h ))
446
446
writer .end ('clipPath' )
447
447
writer .end ('defs' )
448
-
448
+
449
449
def _write_svgfonts (self ):
450
450
if not rcParams ['svg.fonttype' ] == 'svgfont' :
451
451
return
@@ -926,7 +926,8 @@ def _draw_text_as_text(self, gc, x, y, s, prop, angle, ismath):
926
926
fontstyle = prop .get_style ()
927
927
928
928
attrib = {}
929
- style ['font-size' ] = str (fontsize )
929
+ # Must add "px" to workaround a Firefox bug
930
+ style ['font-size' ] = str (fontsize ) + 'px'
930
931
style ['font-family' ] = str (fontfamily )
931
932
style ['font-style' ] = prop .get_style ().lower ()
932
933
attrib ['style' ] = generate_css (style )
@@ -967,7 +968,8 @@ def _draw_text_as_text(self, gc, x, y, s, prop, angle, ismath):
967
968
spans = {}
968
969
for font , fontsize , thetext , new_x , new_y , metrics in svg_glyphs :
969
970
style = generate_css ({
970
- 'font-size' : str (fontsize ),
971
+ # Must add "px" to work around a Firefox bug
972
+ 'font-size' : str (fontsize ) + 'px' ,
971
973
'font-family' : font .family_name ,
972
974
'font-style' : font .style_name .lower ()})
973
975
if thetext == 32 :
0 commit comments