Box drawing characters
From Wikipedia, the free encyclopedia
Box drawing characters, also known as line drawing characters, or pseudographics, are widely used in text user interfaces to draw various frames and boxes. In graphical user interfaces these characters are useless, because it is much simpler to draw lines and rectangles directly with graphical APIs; besides, box drawing characters work only with fixed-width (monospaced) fonts. They are still useful, however, for plaintext comments on 'Web 2.0' websites.
Used along with box drawing characters are block elements, shade characters and terminal graphic characters; these can be used for filling regions of the screen and drop shadows.
Contents |
[edit] Encodings
[edit] Unicode
Unicode includes 128 such characters:[1]
|
The adjacent Block Elements table contains 32 block element, shade and terminal graphics characters:[2]
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | ||
2580 | ▀ | ▁ | ▃ | ▃ | ▄ | ▅ | ▆ | ▇ | █ | ▉ | ▊ | ▋ | ▌ | ▍ | ▎ | ▏ | |
2590 | ▐ | ░ | ▒ | ▓ | ▔ | ▕ | ▖ | ▗ | ▘ | ▙ | ▚ | ▛ | ▜ | ▝ | ▞ | ▟ |
[edit] DOS
In all MS-DOS code pages, box drawing characters are present, but their number is limited to 40 (for example in code page 437):
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
B | │ | ┤ | ╡ | ╢ | ╖ | ╕ | ╣ | ║ | ╗ | ╝ | ╜ | ╛ | ┐ | |||
C | └ | ┴ | ┬ | ├ | ─ | ┼ | ╞ | ╟ | ╚ | ╔ | ╩ | ╦ | ╠ | ═ | ╬ | ╧ |
D | ╨ | ╤ | ╥ | ╙ | ╘ | ╒ | ╓ | ╫ | ╪ | ┘ | ┌ |
Their number is further limited to 22 on those code pages that use their places for other, usually alphabetic, characters (such as code page 850):
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
B | │ | ┤ | ╣ | ║ | ╗ | ╝ | ┐ | |||||||||
C | └ | ┴ | ┬ | ├ | ─ | ┼ | ╚ | ╔ | ╩ | ╦ | ╠ | ═ | ╬ | |||
D | ┘ | ┌ |
[edit] Unix
On many Unix systems, usually only 11 basic characters are available, via the VT100 alternate character set:
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | ┘ | ┐ | ┌ | └ | ┼ | |||||||||||
7 | ─ | ├ | ┤ | ┴ | ┬ | │ |
And on some terminals, they are not available at all, so they are replaced with ASCII characters that approximate box drawing characters, such as - (hyphen-minus), | (vertical bar) and + (plus sign) in a kind of ASCII art fashion.
[edit] Historical
Many microcomputers of the 1970s and 1980s had their own proprietary character sets which also included box drawing characters. Some of these sets, such as Commodore's PETSCII, include box drawing symbols with no corresponding Unicode character.
The Sinclair ZX81 included a set of pseudographics with block elements and dithering patterns.
[edit] Examples
Example boxes using Unicode:
-
┌ ─ ┬ ┐ ╔ ═ ╦ ╗ ┏ ━ ┳ ┓ │ │ │ ║ ║ ║ ┃ ┃ ┃ ├ ─ ┼ ┤ ╠ ═ ╬ ╣ ┣ ━ ╋ ┫ └ ─ ┴ ┘ ╚ ═ ╩ ╝ ┗ ━ ┻ ┛
-
┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ │ ╔ ═ ═ ═ ╗ │ ▒ │ ╚ ═ ╦ ═ ╝ │ ▒ ╞ ═ ╤ ═ ═ ╩ ═ ═ ╤ ═ ╡ ▒ │ ├ ─ ─ ┬ ─ ─ ┤ │ ▒ │ └ ─ ─ ┴ ─ ─ ┘ │ ▒ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒
[edit] References
- ^ Box Drawing U+2500-U+257F, The Unicode Standard 5.0 Code Charts
- ^ Block Elements U+2580-U+259F, The Unicode Standard 5.0 Code Charts