Created
November 2, 2014 00:24
-
-
Save zkamvar/2abc7fa4af33345699ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# | |
# This script was created because I had a problem with inkscape not recognizing | |
# fonts generated by R's pdf generator. This will go through and make these fonts | |
# scaleable. | |
# | |
# Workflow: Generate PDF > open in inkscape > save as svg > run this script | |
# | |
# Usage: perl -i inkscape_pdf_font.pl <my_file.svg> | |
# | |
# Note, that the i flag means "inline" | |
use strict; | |
use warnings; | |
while(<>){ | |
s/(x=\"[[:digit:][:punct:]]+?)[[:blank:]].+?$/$1"/g; | |
print $_; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hooray! This is not needed anymore!
https://twitter.com/timelyportfolio/status/626143595255496705
http://stackoverflow.com/questions/17555331/how-to-preserve-text-when-saving-ggplot2-as-svg