diff --git a/screenshot.cpp b/screenshot.cpp
index dd129978..11f9dc62 100644
--- a/screenshot.cpp
+++ b/screenshot.cpp
@@ -63,7 +63,7 @@ EX always_false in;
}
}
- char* stylestr(color_t fill, color_t stroke, ld width=1) {
+ char* stylestr(color_t fill, color_t stroke, ld width=1, string extrastyle = "") {
fixgamma(fill);
fixgamma(stroke);
static char buf[600];
@@ -78,10 +78,11 @@ EX always_false in;
else fill = 0xFFFFFFFF;
}
- snprintf(buf, 600, "style=\"stroke:#%06x;stroke-opacity:%.3" PLDF ";stroke-width:%" PLDF "px;fill:#%06x;fill-opacity:%.3" PLDF "\"",
+ snprintf(buf, 600, "style=\"stroke:#%06x;stroke-opacity:%.3" PLDF ";stroke-width:%" PLDF "px;fill:#%06x;fill-opacity:%.3" PLDF "%s\"",
(stroke>>8) & 0xFFFFFF, cta(stroke),
width/divby,
- (fill>>8) & 0xFFFFFF, cta(fill)
+ (fill>>8) & 0xFFFFFF, cta(fill),
+ extrastyle.c_str()
);
return buf;
}
@@ -106,6 +107,8 @@ EX always_false in;
}
string font = "Times";
+ string fontstyle = "";
+ string tspan = "";
ld text_width_multiplier = 1/40.;
int min_text = 3;
@@ -144,8 +147,10 @@ EX always_false in;
"end", "' ");
if(!uselatex)
print(f, "font-family='", font, "' font-size='", coord(size), "' ");
+ if(tspan != "") str2 =
+ "" + str2 + "";
print(f,
- stylestr(col, frame ? 0x0000000FF : 0, (1<", str2, "");
stopstring();
println(f);
@@ -219,6 +224,14 @@ int read_args() {
// note: use '-svgfont latex' to produce text output as: \myfont{size}{text}
// (this is helpful with Inkscape's PDF+TeX output feature; define \myfont yourself)
}
+ else if(argis("-svgtspan")) {
+ shift(); svg::tspan = args();
+ }
+ else if(argis("-svgfontstyle")) {
+ shift(); svg::fontstyle = args();
+ // note: use '-svgfont latex' to produce text output as: \myfont{size}{text}
+ // (this is helpful with Inkscape's PDF+TeX output feature; define \myfont yourself)
+ }
else if(argis("-svggamma")) {
shift_arg_formula(shot::gamma);
}