@@ -154,8 +154,7 @@ def __init__(self, parameters):
154154 "prefer_horizontal" : wc_params .get ("prefer_horizontal" , 0.75 ),
155155 "min_font_size" : wc_params .get ("min_font_size" , 8 ),
156156 "max_font_size" : wc_params .get ("max_font_size" , 15 ),
157- "set_font" : wc_params .get ("set_font" , False ),
158- "font_path" : wc_params .get ("font_path" , "" ),
157+ "font_path" : wc_params .get ("font_path" , None ),
159158 "scale_adjustment" : wc_params .get ("scale_adjustment" , 7 ),
160159 "contour_width" : wc_params .get ("contour_width" , 3 ),
161160 "contour_color" : wc_params .get ("contour_color" , 'black' ),
@@ -164,8 +163,10 @@ def __init__(self, parameters):
164163 "mask_path" : wc_params .get ("mask_path" , None )
165164 }
166165 if self .word_cloud ["use_mask" ] and not self .word_cloud ["mask_path" ]:
167- self .word_cloud ["mask_path" ] = os .path .realpath (os .path .join (os .path .dirname (__file__ ),
168- '../../../resources/word_cloud_brain_mask.png' ))
166+ self .word_cloud ["mask_path" ] = os .path .realpath (
167+ os .path .join (os .path .dirname (__file__ ), '../../../resources/word_cloud_brain_mask.png' ))
168+ if self .word_cloud ["font_path" ]:
169+ self .word_cloud ["font_path" ] = os .path .realpath (self .word_cloud ["font_path" ])
169170
170171 def do_op (self , dispatcher , df , name , sidecar = None ):
171172 """ Summarize the HED tags present in the dataset.
@@ -314,7 +315,7 @@ def save_visualizations(self, save_dir, file_formats=['.svg'], individual_summar
314315 prefer_horizontal = wc ["prefer_horizontal" ], background_color = wc ["background_color" ],
315316 min_font_size = wc ["min_font_size" ], max_font_size = wc ["max_font_size" ],
316317 contour_width = wc ["contour_width" ], contour_color = wc ["contour_color" ],
317- set_font = wc [ "set_font" ], font_path = wc ["font_path" ])
318+ font_path = wc ["font_path" ])
318319 svg_data = word_cloud_to_svg (tag_wc )
319320 cloud_filename = os .path .realpath (os .path .join (save_dir , self .sum_op .summary_name ,
320321 self .sum_op .summary_name + '_word_cloud.svg' ))
0 commit comments