Box drawing characters
Encyclopedia
Box drawing characters, also known as line drawing characters, or pseudographics, are widely used in text user interface
Text user interface
TUI short for: Text User Interface or Textual User Interface , is a retronym that was coined sometime after the invention of graphical user interfaces, to distinguish them from text-based user interfaces...

s to draw various frames and boxes. In graphical user interface
Graphical user interface
In computing, a graphical user interface is a type of user interface that allows users to interact with electronic devices with images rather than text commands. GUIs can be used in computers, hand-held devices such as MP3 players, portable media players or gaming devices, household appliances and...

s these characters are much less useful, 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
Typeface
In typography, a typeface is the artistic representation or interpretation of characters; it is the way the type looks. Each type is designed and there are thousands of different typefaces in existence, with new ones being developed constantly....

. They are still useful, however, for plaintext comments on 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 shadow
Drop shadow
In computer graphics, a drop shadow is a visual effect consisting of drawing that looks like the shadow of an object, giving the impression that the object is raised above the objects behind it. The drop shadow is often used for elements of a graphical user interface such as windows or menus, and...

s.

Unicode

Unicode
Unicode
Unicode is a computing industry standard for the consistent encoding, representation and handling of text expressed in most of the world's writing systems...

 includes 128 such characters: The adjacent Block Elements table contains 32 block element, shade and terminal graphics characters.

DOS

In all MS-DOS
MS-DOS
MS-DOS is an operating system for x86-based personal computers. It was the most commonly used member of the DOS family of operating systems, and was the main operating system for IBM PC compatible personal computers during the 1980s to the mid 1990s, until it was gradually superseded by operating...

 code page
Code page
Code page is another term for character encoding. It consists of a table of values that describes the character set for a particular language. The term code page originated from IBM's EBCDIC-based mainframe systems, but many vendors use this term including Microsoft, SAP, and Oracle Corporation...

s, box drawing characters are present, but their number is limited to 40 (for example in code page 437
Code page 437
IBM PC or MS-DOS code page 437 is the character set of the original IBM PC. It is also known as CP 437, OEM 437, PC-8, MS-DOS Latin US or sometimes misleadingly referred to as the OEM font, High ASCII or Extended ASCII....

):
0123456789ABCDEF
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
Code page 850
Code page 850 is a code page used under MS-DOS in Western Europe. It is the code page commonly used by the version of MS-DOS underlying Windows ME...

):
0123456789ABCDEF
B
C
D

Unix

On many Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 systems, usually only 11 basic characters are available, via the VT100
VT100
The VT100 is a video terminal that was made by Digital Equipment Corporation . Its detailed attributes became the de facto standard for terminal emulators.-History:...

 alternate character set:
0123456789ABCDEF
6
7


And on some terminals, they are not available at all, so they are replaced with ASCII
ASCII
The American Standard Code for Information Interchange is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text...

 characters that approximate box drawing characters, such as - (hyphen-minus
Hyphen-minus
The hyphen-minus is a character used in digital documents and computing to represent a hyphen or a minus sign .It is present in Unicode as code point ; it is also in ASCII with the same value....

), | (vertical bar
Vertical bar
The vertical bar is a character with various uses in mathematics, where it can be used to represent absolute value, among others; in computing and programming and in general typography, as a divider not unlike the interpunct...

) and + (plus sign) in a kind of ASCII art
ASCII art
ASCII art is a graphic design technique that uses computers for presentation and consists of pictures pieced together from the 95 printable characters defined by the ASCII Standard from 1963 and ASCII compliant character sets with proprietary extended characters...

 fashion.

As these codes conflict with the lower-case ASCII
ASCII
The American Standard Code for Information Interchange is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text...

 characters (0x6A is equivalent to "j"), it may be necessary to shift into the graphic character set "(0" to use these codes and back "(B" when finished.

Historical

Many microcomputer
Microcomputer
A microcomputer is a computer with a microprocessor as its central processing unit. They are physically small compared to mainframe and minicomputers...

s 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
PETSCII
PETSCII , also known as CBM ASCII, is the variation of the ASCII character set used in Commodore Business Machines 's 8-bit home computers, starting with the PET from 1977 and including the VIC-20, C64, CBM-II, Plus/4, C16, C116 and C128...

, include box drawing symbols with no corresponding Unicode character.

The Sinclair ZX81
Sinclair ZX81
The ZX81 was a home computer produced by Sinclair Research and manufactured in Scotland by Timex Corporation. It was launched in the United Kingdom in March 1981 as the successor to Sinclair's ZX80 and was designed to be a low-cost introduction to home computing for the general public...

 and Spectrum included a set of pseudographics
Text semigraphics
Text semigraphics is a primitive method used in early video hardware to emulate per pixel addressable graphics without having to implement the logic for a true "high resolution" mode....

 with block elements and dithering patterns.

The BBC Micro could utilise the Teletext
Teletext
Teletext is a television information retrieval service developed in the United Kingdom in the early 1970s. It offers a range of text-based information, typically including national, international and sporting news, weather and TV schedules...

 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.

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.

The World Standard Teletext
World System Teletext
World System Teletext is the name of a standard for encoding and displaying teletext information, which is used as the standard for teletext throughout Europe today....

 (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”. However, these characters have not been encoded into the Unicode standard.

Examples

Sample constructions made out of the Unicode characters:
┌─┬┐╔═╦╗┏━┳┓╓─╥╖╒═╤╕
││║ ║║┃┃┃║║║│││
├─┼┤╠═╬╣┣━╋┫╟─╫╢╞═╪╡
└─┴┘╚═╩╝┗━┻┛╙─╨╜╘═╧╛
┌───────────────────┐
│ ╔═══╗ Some Text │▒
│ ╚═╦═╝ in the box │▒
╞═╤══╩══╤═══════════╡▒
│ ├──┬──┤ │▒
│ └──┴──┘ │▒
└───────────────────┘▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

See also

  • Character set
  • Unicode Symbols
    Unicode Symbols
    In computing, in addition to encoding characters for the various writing systems used throughout the World, Unicode also devotes several blocks of characters to symbols that have a well-defined place in plain text. In Unicode there is a main distinction between "scripts" and "symbols". A character...

  • Mapping of Unicode characters
    Mapping of Unicode characters
    Unicode’s Universal Character Set has a potential capacity to support over 1 million characters. Each UCS character is mapped to a code point which is an integer between 0 and 1,114,111 used to represent each character within the internal logic of text processing software .As of Unicode 5.2.0,...

  • ASCII art
    ASCII art
    ASCII art is a graphic design technique that uses computers for presentation and consists of pictures pieced together from the 95 printable characters defined by the ASCII Standard from 1963 and ASCII compliant character sets with proprietary extended characters...

  • ANSI art
    ANSI art
    ANSI art is a computer art form that was widely used at one time on BBSes. It is similar to ASCII art, but constructed from a larger set of 256 letters, numbers, and symbols — all codes found in IBM code page 437, often referred to as extended ASCII and used in MS-DOS and Unix environments...

  • Text-based (computing)
  • text semigraphics
    Text semigraphics
    Text semigraphics is a primitive method used in early video hardware to emulate per pixel addressable graphics without having to implement the logic for a true "high resolution" mode....

  • MouseText
    MouseText
    MouseText designed by Bruce Tognazzini is a set of 32 graphical characters first implemented in the Apple IIc. They were then retrofitted to the Apple IIe forming part of the Enhanced IIe upgrade. A slightly revised version was then released with the Apple IIgs....

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK