This macro provides way to set text properties on your PCBnew board. You can choose targets by regular expression of the module reference or text string.
Here is the function definition.
def set_text_properties(board, pattern, type="reference", width=None, height=None, thickness=None, visibility=None):
""" Sets text properties which matches with the pattern.
@param board Pcbnew board
@param pattern compiled regular expression or string
@param type one of reference, value or text
@param width character width in mm
@param height character height in mm
@param thickness line thickness in mm
@param visibility visibility state
"""
If None is passed to property value, it would not touched.
Here is an example to set height, width and thickness of all reference text:
import pcbnew
set_text_properties(pcbnew.GetBoard(), ".*", "reference", 1.0, 1.0, 0.15, None)