Jump to content

Box-drawing characters: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Historical: embedded systems
No edit summary
Line 1: Line 1:
{{SpecialChars}}
{{SpecialChars}}
[[Image:GNU Midnight Commander 4.1.36 Windows Vista.png|thumb|right|280px|[[GNU]] [[Midnight Commander]] using box drawing characters in the [[Win32 console]].]]
[[Image:GNU Midnight Commander 4.1.36 Windows Vista.png|thumb|right|280px|[[GNU]] [[Midnight Commander]] using box drawing characters in the [[Win32 console]].]]
'''Box drawing characters''', also known as '''line drawing characters''', or '''pseudographics''', are widely used in [[text user interface]]s to draw various frames and boxes. In [[graphical user interface]]s these characters are useless, because it is much simpler to draw lines and rectangles directly with graphical [[API]]s; besides, box drawing characters work only with fixed-width ([[Typeface#Proportionality|monospaced]]) [[typeface|fonts]]. They are still useful, however, for plaintext comments on 'Web 2.0' websites.
'''Box drawing characters''', also known as '''line drawing characters''', or '''pseudographics''', are widely used in [[text user interface]]s to draw various frames and boxes. In [[graphical user interface]]s these characters are much less useful, because it is much simpler to draw lines and rectangles directly with graphical [[API]]s; besides, box drawing characters work only with fixed-width ([[Typeface#Proportionality|monospaced]]) [[typeface|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 shadow]]s.
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]]s.

Revision as of 03:25, 28 February 2009

GNU Midnight Commander using box drawing characters in the Win32 console.

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 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. 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.

Encodings

Unicode

Unicode includes 128 such characters:[1]

    0 1 2 3 4 5 6 7 8 9 A B C D E F
2500  
2510  
2520  
2530  
2540  
2550  
2560  
2570  
Unicode Box Drawing symbols. A screenshot showing all 128 symbols, for web browsers that are unable to display them.

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  

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

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.

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.

ZX81 pseudographics

The Sinclair ZX81 and Spectrum included a set of pseudographics with block elements and dithering patterns.

Some recent embedded systems also use proprietary character sets, usually extensions to ISO8859 character sets, which include box drawing characters or other special symbols.

Examples

Example boxes using Unicode:


     
 
       
       
   
   
 

References

  1. ^ Box Drawing U+2500-U+257F, The Unicode Standard 5.0 Code Charts
  2. ^ Block Elements U+2580-U+259F, The Unicode Standard 5.0 Code Charts

See also