specify SVG font size is in points, for stupid viewers

This commit is contained in:
Paul Franklin 2014-12-30 10:50:55 -08:00
parent 555a244a45
commit bf20905761

View File

@ -120,7 +120,7 @@ class SvgDrawDoc(BaseDoc, DrawDoc):
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:%dpt; ' % size)
if font.get_type_face() == FONT_SANS_SERIF: if font.get_type_face() == FONT_SANS_SERIF:
self.t.write('font-family:sans-serif;') self.t.write('font-family:sans-serif;')
else: else:
@ -242,7 +242,7 @@ class SvgDrawDoc(BaseDoc, DrawDoc):
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:%dpt;' % font_size)
if font.get_type_face() == FONT_SANS_SERIF: if font.get_type_face() == FONT_SANS_SERIF:
self.t.write(' font-family:sans-serif;') self.t.write(' font-family:sans-serif;')
else: else:
@ -275,7 +275,7 @@ class SvgDrawDoc(BaseDoc, DrawDoc):
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:%dpt; ' % font_size)
if font.get_type_face() == FONT_SANS_SERIF: if font.get_type_face() == FONT_SANS_SERIF:
self.t.write('font-family:sans-serif;') self.t.write('font-family:sans-serif;')
else: else: