3 # Reduce fontsize and change font
4 s/fontsize=10/fontsize=8/g;
5 s/fontname="FreeSans.ttf"/fontname="Verdana"/g;
7 # Wrap long labels (templates and pathnames)
8 if (/label=\"([^"]{48,})\"/) { #"])){ # To make emacs happy ...
10 $post=$'; #'; # To make emacs happy ...
13 # Break at each komma or /
14 $label=~s{[,/]}{$&\\r\\ \\ \\ \\ \\ \\ \\ \\ }g;
16 # If more than one '<' is in the label, break after each '<'
17 if (($label=~tr/</</)>1) {
18 $label=~s/</<\\r\\ \\ \\ \\ \\ \\ \\ \\ /g;
21 # If at least one break is in there ...
23 # If it's a pathname, make all but the last line flush left
24 # Otherwise only make first line flush left
26 $label=~s/\\r(\\ )*/\\ \\ \\ \\ \\ \\ \\ \\ \\l/g;
27 # Re-add blanks before last line
28 $label=~s/^.*\\l/$&\\ \\ \\ \\ \\ \\ \\ \\ /;
30 $label=~s/\\r/\\ \\ \\ \\ \\ \\ \\ \\ \\l/;
32 # Make last line flush right
35 print "${pre}label=\"${label}\"${post}";