Permalink
Browse files

added svg geader fix for webkit (chrome/chromium)

  • Loading branch information...
1 parent ea25ea5 commit a747402df01688af3f201dc1e07bc27479525352 @puzrin puzrin committed May 18, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 bin/fontconvert.py
View
@@ -26,6 +26,19 @@
try:
font.generate(font_name_template + '.woff')
font.generate(font_name_template + '.svg')
+
+ # Fix SVG header, to make webkit work
+ source_text = '''<svg>'''
+ replace_text = '''<svg xmlns="http://www.w3.org/2000/svg">'''
+ file_name = font_name_template + '.svg'
+
+ file = open(file_name, "r")
+ text = file.read()
+ file.close()
+ file = open(file_name, "w")
+ file.write(text.replace(source_text, replace_text))
+ file.close()
+
except:
stderr.write("Cannot write files in to %s\n" % args.fonts_dir)
sys.exit(1)

0 comments on commit a747402

Please sign in to comment.