figureflow.figure_panel.FigurePanel.rescale_font_size

figureflow.figure_panel.FigurePanel.rescale_font_size = <function FigurePanel.rescale_font_size>

Only possible for single images with single pptx files for now! Only the first slide of the pptx file will be considered. Text boxes in powerpoint MUST BE 99% opacity for this script to work properly… before saving it as an image! It therefore also just works with pngs saved from powerpoint (not with e.g. jpeg) Font sizes of at least 30 will be scaled according to font_size_factor. For all other text self.font_size will be used and optionally multiplied with font_size_factor Font color is not extracted at the moment. Instead, black text is used on top of a lighter background and white text on top of a darker background.

Parameters:
  • font_size_factor – font_size factor by which to scale text that has a font size >= 30 pt in powerpoint

  • font_size – font_size to use, if None, use default of figure_panel

  • linespacing – spacing of lines when text includes line breaks

  • add_new_text – Whether new text should be added after powerpoint text was removed. This is useful when editing the text first using the edit_panel function to change text position. New text can then be added through the printed add_text functions. Thus adding the powerpoint text through rescale_font_size directly is not needed and would lead to duplicated text. Alternatively to doing this, text can also be directly deleted in the powerpoint file (then rescale_font_size is not needed at all anymore) (but deleting it in the pptx file is irreversible of course).