TextBorder

class text_renderer.effect.TextBorder(p=0.5, border_width=(1, 3), border_color_cfg: TextColorCfg = None, border_style='solid', blur_radius=0, enable=True, fraction=0.5, light_enable=True, light_fraction=0.5, dark_enable=True, dark_fraction=0.5)[source]

Add border around text characters

Parameters:
  • p (float) – probability to apply effect

  • border_width (int, int) – border width range

  • border_color_cfg (TextColorCfg) – border color configuration

  • border_style (str) – border style - ‘solid’, ‘dashed’, ‘dotted’

  • blur_radius (int) – Gaussian blur radius for border (0 for no blur)

  • enable (bool) – whether to enable text border effect

  • fraction (float) – fraction of applying text border

  • light_enable (bool) – whether to enable light border

  • light_fraction (float) – fraction of light border when enabled

  • dark_enable (bool) – whether to enable dark border

  • dark_fraction (float) – fraction of dark border when enabled