I am using a code that (among other things) generate a svg file of the geometry that I create.
Given an input script my-geometry.py, the structure of the code is the following:
python pre.py my-geometry
In pre.py t is called another module:
from render import *
[...] some other code
execfile(script, globals()) #script=my-geometry
render.py itself import another module
from svg_render import *
[...]
svg = SvgEnvironment(x,y,title='a',desc='b')
svg.text(x_mid, y_mid, blk.label, anchor="middle")
[...]
where SvgEnvironment
is a class defined in svg_render
. The text
method of the class is defined as:
def text(self, x, y, textString, angle=0.0, fontSize=10,
anchor="start", colour="black",
fontFamily="sanserif")
My question is: how is it possible to modify/override the default value of fontSize
,from my-geometry.py
? (What i want to do, is to modify the fontsize for all text that it is written to the svg without modyfing the source code)
I had a look to this question , but it seems not to fit to my case.