2499: Using quotes for font-weight (bold) and font-style (italic) on Style Editor will generate a not well formed SVG file

svn: r11302
This commit is contained in:
Jérôme Rapinat 2008-11-15 10:16:31 +00:00
parent 6caf63009e
commit d57f55389d

View File

@ -108,9 +108,9 @@ class SvgDrawDoc(BaseDoc.BaseDoc,BaseDoc.DrawDoc):
self.t.write('transform="rotate(%d %4.2f %4.2f)" ' % (angle,centerx,centery)) self.t.write('transform="rotate(%d %4.2f %4.2f)" ' % (angle,centerx,centery))
self.t.write('style="fill:#%02x%02x%02x; '% font.get_color()) self.t.write('style="fill:#%02x%02x%02x; '% font.get_color())
if font.get_bold(): if font.get_bold():
self.t.write('font-weight:"bold";') self.t.write('font-weight:bold;')
if font.get_italic(): if font.get_italic():
self.t.write('font-style:"italic";') self.t.write('font-style:italic;')
self.t.write('font-size:%d; ' % size) self.t.write('font-size:%d; ' % size)
if font.get_type_face() == BaseDoc.FONT_SANS_SERIF: if font.get_type_face() == BaseDoc.FONT_SANS_SERIF:
self.t.write('font-family:sans-serif;') self.t.write('font-family:sans-serif;')
@ -202,9 +202,9 @@ class SvgDrawDoc(BaseDoc.BaseDoc,BaseDoc.DrawDoc):
self.t.write('y="%4.2fcm" ' % ypos) self.t.write('y="%4.2fcm" ' % ypos)
self.t.write('style="fill:#%02x%02x%02x; '% font.get_color()) self.t.write('style="fill:#%02x%02x%02x; '% font.get_color())
if font.get_bold(): if font.get_bold():
self.t.write(' font-weight:"bold";') self.t.write(' font-weight:bold;')
if font.get_italic(): if font.get_italic():
self.t.write(' font-style:"italic";') self.t.write(' font-style:italic;')
self.t.write(' font-size:%d;' % font_size) self.t.write(' font-size:%d;' % font_size)
if font.get_type_face() == BaseDoc.FONT_SANS_SERIF: if font.get_type_face() == BaseDoc.FONT_SANS_SERIF:
self.t.write(' font-family:sans-serif;') self.t.write(' font-family:sans-serif;')