ArticleslgStudy

science

Box-drawing characters

Box-drawing characters is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Box-drawing characters rather than just read about it. In short: Box-drawing characters, also known as line-drawing characters, are a form of semigraphics widely used in text user interfaces to draw various geometric frames and boxes. These characters are characterized by being designed to be connected horizontally and/or vertically with adjacent characters, which requires proper alignment.

Box-drawing characters — main illustration
Box-drawing characters — illustration

Key takeaways

  • Box-drawing characters belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Box-drawing characters to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Box-drawing characters from memory before moving on to harder problems.

Reference excerpt

Box-drawing characters, also known as line-drawing characters, are a form of semigraphics widely used in text user interfaces to draw various geometric frames and boxes. These characters are characterized by being designed to be connected horizontally and/or vertically with adjacent characters, which requires proper alignment. Box-drawing characters therefore typically only work well with monospaced fonts. In graphical user interfaces, these characters are much less useful as it is simpler to draw lines and rectangles directly with graphical APIs. However, they are still useful for command-line interfaces and plaintext comments within source code. Some recent embedded systems also use proprietary character sets, usually extensions to ISO 8859 character sets, which include box-drawing characters or other special symbols. Other types of box-drawing characters are block elements, shade characters, and terminal graphic characters; these can be used for filling regions of the screen and portraying drop shadows.

Unicode

Box Drawing Unicode includes 128 such characters in the Box Drawing block. In many Unicode fonts, only the subset that is also available in the IBM PC character set (see below) will exist, due to it being defined as part of the WGL4 character set.

The image below is provided as a quick reference for these symbols on systems that are unable to display them directly:

Block Elements The Block Elements Unicode block includes shading characters. 32 characters are included in the block.

Symbols for Legacy Computing In version 13.0, Unicode was extended with another block containing many graphics characters, Symbols for Legacy Computing, which includes a few box-drawing characters and other symbols used by obsolete operating systems (mostly from the 1980s). Few fonts support these characters (one is Noto Sans Symbols 2, which only covers partially), but the table of symbols is provided here:

The image below is provided as a quick reference for these symbols on systems that are unable to display them directly:

Symbols for Legacy Computing Supplement In version 16.0 (September 2024), Unicode was extended with another block containing many graphics characters, Symbols for Legacy Computing Supplement, which includes a few box-drawing characters and other symbols used by obsolete operating systems (mostly from the 1970s and 1980s).

The image below is provided as quick reference for these symbols on systems that are unable to display them directly:

Platform-specific Various different platforms defined their own unique set of box-drawing characters.

DOS The hardware code page of the original IBM PC supplied the following box-drawing characters, in what DOS now calls code page 437. This subset of the Unicode box-drawing characters is thus included in WGL4 and is far more popular and likely to be rendered correctly:

The integral halves are also box drawing as they are used alongside 0xB3:

Their number is further limited to 28 on those code pages that replace the 18 characters that combine single and double lines, the left and right half blocks, as well as integral halves with other, usually alphabetic, characters (such as code page 850):

Note: The non-double characters are the thin (light) characters (U+2500, U+2502), not the bold (heavy) characters (U+2501, U+2503). Some OEM DOS computers supported other character sets, for example the Hewlett-Packard HP 110 / HP Portable and HP 110 Plus / HP Portable Plus, where in a modified version of the character set box-drawing characters were added in reserved areas of their normal HP Roman-8 character set.

Unix, CP/M, BBS On many Unix systems and early dial-up bulletin board systems the only common standard for box-drawing characters was the VT100 alternate character set (see also: DEC Special Graphics). The escape sequence Esc ( 0 switched the codes for lower-case ASCII letters to draw this set, and the sequence Esc ( B switched back:

On some terminals, these characters are not available at all, and the complexity of the escape sequences discouraged their use, so often only ASCII characters that approximate box-drawing characters are used, such as - (hyphen-minus), | (vertical bar), _ (underscore), = (equal sign) and + (plus sign) in a kind of ASCII art fashion. Modern Unix terminal emulators use Unicode and thus have access to the line-drawing characters listed above.

Teletext The World System Teletext (WST) uses pixel-drawing characters for some graphics. A character cell is divided in 2×3 regions, and 26 = 64 code positions are allocated for all possible combinations of pixels. These characters were added to the Unicode standard in Version 13.

Historical Many microcomputers of the 1970s and 1980s had their own proprietary character sets, which also included box-drawing characters. Many of these were added to Unicode as Symbols for Legacy Computing.

Commodore

Commodore machines, such as the Commodore PET and the Commodore 64, included a set of text semigraphics with block elements and dithering patterns in the PETSCII character set.

Sinclair

The Sinclair ZX80, ZX81, and ZX Spectrum included a set of text semigraphics with quadrant-based block elements. The ZX80 and ZX81 also included a set of text semigraphics with dithering patterns.

BBC and Acorn The BBC Micro could utilize the Teletext 7-bit character set, which had 128 box-drawing characters, whose code points were shared with the regular alphanumeric and punctuation characters. Control characters were used to switch between regular text and box drawing.

The BBC Master and later Acorn computers have the soft font by default defined with line drawing characters.

Amstrad The Amstrad CPC character set also has soft characters defined by default as block and line drawing characters.

The CP/M Plus character set used on various Amstrad computers of the CPC, PCW and Spectrum families included a rich set of line-drawing characters as well:

Apple MouseText is a set of display characters for the Apple IIc, IIe, and IIGS that includes box-drawing characters.

Encoding On many platforms, the character shape is determined programmatically from the character code.

… excerpt ends here. Continue reading the full article.

Illustrations

Box-drawing characters: Midnight Commander using box-drawing characters in a terminal emulator
Midnight Commander using box-drawing characters in a terminal emulator
Box-drawing characters illustration
Box-drawing characters illustration
Box-drawing characters illustration
Box-drawing characters: PET 2001 keyboard layout, illustrating PETSCII graphics characters
PET 2001 keyboard layout, illustrating PETSCII graphics characters

Worked examples

Example 1 — a first encounter with Box-drawing characters

Start with the simplest possible case. Write down what Box-drawing characters claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Box-drawing characters before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Box-drawing characters ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Box-drawing characters

In research
Box-drawing characters appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Box-drawing characters in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Box-drawing characters is common in secondary-school and first-year university syllabi. It links to neighbouring topics Character sets, Lists of shapes, Unicode, so understanding it makes those chapters shorter.
In everyday life
Look for Box-drawing characters outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Box-drawing characters” →

How to study Box-drawing characters in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Box-drawing characters means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Box-drawing characters out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Box-drawing characters in simple terms?

Box-drawing characters, also known as line-drawing characters, are a form of semigraphics widely used in text user interfaces to draw various geometric frames and boxes. These characters are characterized by being designed to be connected horizontally and/or vertically with adjacent characters, whi…

Why does Box-drawing characters matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Box-drawing characters?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Box-drawing characters.

Tags

  • Character sets
  • Lists of shapes
  • Unicode

Keep exploring