ASCII LAB

Draw ASCII borders and frames

A frame has a top and bottom line and matching sides. To keep the edges aligned, count the characters in the message row before drawing the border.

+--------+
| STATUS |
+--------+

Three steps

  1. Write the longest line of your message in a monospaced editor.
  2. Add the same amount of padding on each side and place a vertical bar at both edges.
  3. Use matching corner symbols and enough horizontal strokes for the top and bottom to match the width.

Count the interior first

If a heading has six characters and needs one space on either side, the interior is eight columns. Add two edge characters for a ten column frame. Apply that count to every line of the finished drawing.

Keep corners and sides consistent

A plus sign makes a clear corner, a vertical bar defines the sides and a dash makes a horizontal rule. Leave blank space on shorter rows so their final side character sits directly under the corner.

Test where it will appear

Paste the frame into a code block or plain text viewer and check all four corners. If the message wraps, shorten it or increase the actual available width before changing the outline.

Questions

Can I use a repeated pattern as a divider?

Yes. A divider needs only one row, so it can be useful where a multiline frame takes too much space.

Language