 
 # The ammount of padding on each side of a panel
 AYP_PANEL_PADDING = 6
+
+# Space left between stacked speech bubbles
+# and the sides of the panel and the speech bubbles
+AYP_BUBBLE_PADDING_VERTICAL   = 3
+AYP_BUBBLE_PADDING_HORIZONTAL = 3
+
+# Maximum width of the speech bubble, after text becomes wider
+# it is wrapped to a new line
+AYP_BUBBLE_MAX_WIDTH          = AYP_PANEL_WIDTH - 18
 
 
 ## Paths to find media

    # I can render all the text unconditionally
    # since it looks the same regardless of the number
    # of speakers. (i.e. left -> right, top -> bottom)
    top = 0
    left = 0
    first = true
    topPad = 3
    for line in lines
      [who, what] = line
      bubble = textBubble what

      if not first
        left = frame.width - bubble.width

      compositeImage frame, bubble, left, top



  return chunks.map (c) -> c.trim()

formatForTextBubble = (msg, font, size, max) ->
  msg = msg.trim()
  [w, h] = textSize(msg, font, size)
  if w > max
