@@ -440,7 +440,7 @@ def _write_svgfonts(self):
440
440
'font-face' ,
441
441
attrib = {
442
442
'font-family' : font .family_name ,
443
- 'font-style' : font .style_name ,
443
+ 'font-style' : font .style_name . lower () ,
444
444
'units-per-em' : '72' ,
445
445
'bbox' : ' ' .join (str (x / 64.0 ) for x in font .bbox )})
446
446
for char in chars :
@@ -896,7 +896,7 @@ def _draw_text_as_text(self, gc, x, y, s, prop, angle, ismath):
896
896
attrib = {}
897
897
style ['font-size' ] = str (fontsize )
898
898
style ['font-family' ] = str (fontfamily )
899
- style ['font-style' ] = prop .get_style ()
899
+ style ['font-style' ] = prop .get_style (). lower ()
900
900
attrib ['style' ] = generate_css (style )
901
901
902
902
attrib ['transform' ] = generate_transform ([
@@ -937,7 +937,7 @@ def _draw_text_as_text(self, gc, x, y, s, prop, angle, ismath):
937
937
style = generate_css ({
938
938
'font-size' : str (fontsize ),
939
939
'font-family' : font .family_name ,
940
- 'font-style' : font .style_name })
940
+ 'font-style' : font .style_name . lower () })
941
941
if thetext == 32 :
942
942
thetext = 0xa0 # non-breaking space
943
943
spans .setdefault (style , []).append ((new_x , - new_y , thetext ))
0 commit comments