Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Box-drawing characters

From Wikipedia, the free encyclopedia
(Redirected from)
Characters for drawing frames and boxes
Several confusable characters redirect here. You may be looking forem dash,vertical bar,multiplication sign,slash (punctuation) orbackslash.
This article containsspecial characters. Without properrendering support, you may seequestion marks, boxes, or other symbols.
Midnight Commander using box-drawing characters in aterminal emulator

Box-drawing characters, also known asline-drawing characters, are a form ofsemigraphics widely used intext 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 withmonospaced fonts.

Ingraphical user interfaces, these characters are much less useful as it is more simple and appropriate to draw lines and rectangles directly with graphicalAPIs. However, they are still useful forcommand-line interfaces and plaintextcomments withinsource code.

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

Other types of box-drawing characters areblock elements, shade characters, and terminal graphic characters; these can be used for filling regions of the screen and portrayingdrop shadows.

Unicode

[edit]

Box Drawing

[edit]

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

Box Drawing[1]
Official Unicode Consortium code chart (PDF)
 0123456789ABCDEF
U+250x
U+251x
U+252x
U+253x
U+254x
U+255x
U+256x
U+257x
Notes
1.^ As of Unicode version 16.0

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

Block Elements

[edit]

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

Block Elements[1]
Official Unicode Consortium code chart (PDF)
 0123456789ABCDEF
U+258x
U+259x
Notes
1.^ As of Unicode version 16.0

Symbols for Legacy Computing

[edit]

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 isNoto Sans Symbols 2), but the table of symbols is provided here:

Symbols for Legacy Computing[1][2]
Official Unicode Consortium code chart (PDF)
 0123456789ABCDEF
U+1FB0x🬀🬁🬂🬃🬄🬅🬆🬇🬈🬉🬊🬋🬌🬍🬎🬏
U+1FB1x🬐🬑🬒🬓🬔🬕🬖🬗🬘🬙🬚🬛🬜🬝🬞🬟
U+1FB2x🬠🬡🬢🬣🬤🬥🬦🬧🬨🬩🬪🬫🬬🬭🬮🬯
U+1FB3x🬰🬱🬲🬳🬴🬵🬶🬷🬸🬹🬺🬻🬼🬽🬾🬿
U+1FB4x🭀🭁🭂🭃🭄🭅🭆🭇🭈🭉🭊🭋🭌🭍🭎🭏
U+1FB5x🭐🭑🭒🭓🭔🭕🭖🭗🭘🭙🭚🭛🭜🭝🭞🭟
U+1FB6x🭠🭡🭢🭣🭤🭥🭦🭧🭨🭩🭪🭫🭬🭭🭮🭯
U+1FB7x🭰🭱🭲🭳🭴🭵🭶🭷🭸🭹🭺🭻🭼🭽🭾🭿
U+1FB8x🮀🮁🮂🮃🮄🮅🮆🮇🮈🮉🮊🮋🮌🮍🮎🮏
U+1FB9x🮐🮑🮒🮔🮕🮖🮗🮘🮙🮚🮛🮜🮝🮞🮟
U+1FBAx🮠🮡🮢🮣🮤🮥🮦🮧🮨🮩🮪🮫🮬🮭🮮🮯
U+1FBBx🮰🮱🮲🮳🮴🮵🮶🮷🮸🮹🮺🮻🮼🮽🮾🮿
U+1FBCx🯀🯁🯂🯃🯄🯅🯆🯇🯈🯉🯊🯋🯌🯍🯎🯏
U+1FBDx🯐🯑🯒🯓🯔🯕🯖🯗🯘🯙🯚🯛🯜🯝🯞🯟
U+1FBEx🯠🯡🯢🯣🯤🯥🯦🯧🯨🯩🯪🯫🯬🯭🯮🯯
U+1FBFx🯰🯱🯲🯳🯴🯵🯶🯷🯸🯹
Notes
1.^ As of Unicode version 16.0
2.^ Grey areas indicate non-assigned code points

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

[edit]

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

Symbols for Legacy Computing Supplement[1][2]
Official Unicode Consortium code chart (PDF)
 0123456789ABCDEF
U+1CC0x𜰀𜰁𜰂𜰃𜰄𜰅𜰆𜰇𜰈𜰉𜰊𜰋𜰌𜰍𜰎𜰏
U+1CC1x𜰐𜰑𜰒𜰓𜰔𜰕𜰖𜰗𜰘𜰙𜰚𜰛𜰜𜰝𜰞𜰟
U+1CC2x𜰠𜰡𜰢𜰣𜰤𜰥𜰦𜰧𜰨𜰩𜰪𜰫𜰬𜰭𜰮𜰯
U+1CC3x𜰰𜰱𜰲𜰳𜰴𜰵𜰶𜰷𜰸𜰹𜰺𜰻𜰼𜰽𜰾𜰿
U+1CC4x𜱀𜱁𜱂𜱃𜱄𜱅𜱆𜱇𜱈𜱉𜱊𜱋𜱌𜱍𜱎𜱏
U+1CC5x𜱐𜱑𜱒𜱓𜱔𜱕𜱖𜱗𜱘𜱙𜱚𜱛𜱜𜱝𜱞𜱟
U+1CC6x𜱠𜱡𜱢𜱣𜱤𜱥𜱦𜱧𜱨𜱩𜱪𜱫𜱬𜱭𜱮𜱯
U+1CC7x𜱰𜱱𜱲𜱳𜱴𜱵𜱶𜱷𜱸𜱹𜱺𜱻𜱼𜱽𜱾𜱿
U+1CC8x𜲀𜲁𜲂𜲃𜲄𜲅𜲆𜲇𜲈𜲉𜲊𜲋𜲌𜲍𜲎𜲏
U+1CC9x𜲐𜲑𜲒𜲓𜲔𜲕𜲖𜲗𜲘𜲙𜲚𜲛𜲜𜲝𜲞𜲟
U+1CCAx𜲠𜲡𜲢𜲣𜲤𜲥𜲦𜲧𜲨𜲩𜲪𜲫𜲬𜲭𜲮𜲯
U+1CCBx𜲰𜲱𜲲𜲳𜲴𜲵𜲶𜲷𜲸𜲹𜲺𜲻𜲼𜲽𜲾𜲿
U+1CCCx𜳀𜳁𜳂𜳃𜳄𜳅𜳆𜳇𜳈𜳉𜳊𜳋𜳌𜳍𜳎𜳏
U+1CCDx𜳐𜳑𜳒𜳓𜳔𜳕𜳖𜳗𜳘𜳙𜳚𜳛𜳜𜳝𜳞𜳟
U+1CCEx𜳠𜳡𜳢𜳣𜳤𜳥𜳦𜳧𜳨𜳩𜳪𜳫𜳬𜳭𜳮𜳯
U+1CCFx𜳰𜳱𜳲𜳳𜳴𜳵𜳶𜳷𜳸𜳹
U+1CD0x𜴀𜴁𜴂𜴃𜴄𜴅𜴆𜴇𜴈𜴉𜴊𜴋𜴌𜴍𜴎𜴏
U+1CD1x𜴐𜴑𜴒𜴓𜴔𜴕𜴖𜴗𜴘𜴙𜴚𜴛𜴜𜴝𜴞𜴟
U+1CD2x𜴠𜴡𜴢𜴣𜴤𜴥𜴦𜴧𜴨𜴩𜴪𜴫𜴬𜴭𜴮𜴯
U+1CD3x𜴰𜴱𜴲𜴳𜴴𜴵𜴶𜴷𜴸𜴹𜴺𜴻𜴼𜴽𜴾𜴿
U+1CD4x𜵀𜵁𜵂𜵃𜵄𜵅𜵆𜵇𜵈𜵉𜵊𜵋𜵌𜵍𜵎𜵏
U+1CD5x𜵐𜵑𜵒𜵓𜵔𜵕𜵖𜵗𜵘𜵙𜵚𜵛𜵜𜵝𜵞𜵟
U+1CD6x𜵠𜵡𜵢𜵣𜵤𜵥𜵦𜵧𜵨𜵩𜵪𜵫𜵬𜵭𜵮𜵯
U+1CD7x𜵰𜵱𜵲𜵳𜵴𜵵𜵶𜵷𜵸𜵹𜵺𜵻𜵼𜵽𜵾𜵿
U+1CD8x𜶀𜶁𜶂𜶃𜶄𜶅𜶆𜶇𜶈𜶉𜶊𜶋𜶌𜶍𜶎𜶏
U+1CD9x𜶐𜶑𜶒𜶓𜶔𜶕𜶖𜶗𜶘𜶙𜶚𜶛𜶜𜶝𜶞𜶟
U+1CDAx𜶠𜶡𜶢𜶣𜶤𜶥𜶦𜶧𜶨𜶩𜶪𜶫𜶬𜶭𜶮𜶯
U+1CDBx𜶰𜶱𜶲𜶳𜶴𜶵𜶶𜶷𜶸𜶹𜶺𜶻𜶼𜶽𜶾𜶿
U+1CDCx𜷀𜷁𜷂𜷃𜷄𜷅𜷆𜷇𜷈𜷉𜷊𜷋𜷌𜷍𜷎𜷏
U+1CDDx𜷐𜷑𜷒𜷓𜷔𜷕𜷖𜷗𜷘𜷙𜷚𜷛𜷜𜷝𜷞𜷟
U+1CDEx𜷠𜷡𜷢𜷣𜷤𜷥𜷦𜷧𜷨𜷩𜷪𜷫𜷬𜷭𜷮𜷯
U+1CDFx𜷰𜷱𜷲𜷳𜷴𜷵𜷶𜷷𜷸𜷹𜷺𜷻𜷼𜷽𜷾𜷿
U+1CE0x𜸀𜸁𜸂𜸃𜸄𜸅𜸆𜸇𜸈𜸉𜸊𜸋𜸌𜸍𜸎𜸏
U+1CE1x𜸐𜸑𜸒𜸓𜸔𜸕𜸖𜸗𜸘𜸙𜸚𜸛𜸜𜸝𜸞𜸟
U+1CE2x𜸠𜸡𜸢𜸣𜸤𜸥𜸦𜸧𜸨𜸩𜸪𜸫𜸬𜸭𜸮𜸯
U+1CE3x𜸰𜸱𜸲𜸳𜸴𜸵𜸶𜸷𜸸𜸹𜸺𜸻𜸼𜸽𜸾𜸿
U+1CE4x𜹀𜹁𜹂𜹃𜹄𜹅𜹆𜹇𜹈𜹉𜹊𜹋𜹌𜹍𜹎𜹏
U+1CE5x𜹐𜹑𜹒𜹓𜹔𜹕𜹖𜹗𜹘𜹙𜹚𜹛𜹜𜹝𜹞𜹟
U+1CE6x𜹠𜹡𜹢𜹣𜹤𜹥𜹦𜹧𜹨𜹩𜹪𜹫𜹬𜹭𜹮𜹯
U+1CE7x𜹰𜹱𜹲𜹳𜹴𜹵𜹶𜹷𜹸𜹹𜹺𜹻𜹼𜹽𜹾𜹿
U+1CE8x𜺀𜺁𜺂𜺃𜺄𜺅𜺆𜺇𜺈𜺉𜺊𜺋𜺌𜺍𜺎𜺏
U+1CE9x𜺐𜺑𜺒𜺓𜺔𜺕𜺖𜺗𜺘𜺙𜺚𜺛𜺜𜺝𜺞𜺟
U+1CEAx𜺠𜺡𜺢𜺣𜺤𜺥𜺦𜺧𜺨𜺩𜺪𜺫𜺬𜺭𜺮𜺯
U+1CEBx𜺰𜺱𜺲𜺳
Notes
1.^ As of Unicode version 16.0
2.^ Grey areas indicate non-assigned code points

Platform-specific

[edit]

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

DOS

[edit]

Thehardware code page of the original IBM PC supplied the following box-drawing characters, in whatDOS now callscode page 437. This subset of the Unicode box-drawing characters is thus included inWGL4 and is far more popular and likely to be rendered correctly:

0123456789ABCDEF
B
C
D

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

45
F

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 ascode page 850):

0123456789ABCDEF
B
C
D

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 theHewlett-PackardHP 110 /HP Portable andHP 110 Plus /HP Portable Plus, where in amodified version of the character set box-drawing characters were added in reserved areas of their normalHP Roman-8 character set.[2][3]

[2][3]0123456789ABCDEF
8
9

Unix, CP/M, BBS

[edit]

On manyUnix systems and early dial-upbulletin board systems the only common standard for box-drawing characters was theVT100 alternate character set (see also:DEC Special Graphics). Theescape sequenceEsc ( 0 switched the codes for lower-case ASCII letters to draw this set, and the sequenceEsc ( B switched back:

0123456789ABCDEF
6
7

On some terminals, these characters are not available at all, and the complexity of the escape sequences discouraged their use, so often onlyASCII characters that approximate box-drawing characters are used, such as - (hyphen-minus), | (vertical bar), _ (underscore), = (equal sign) and + (plus sign) in a kind ofASCII art fashion.

Modern Unixterminal emulators use Unicode and thus have access to the line-drawing characters listed above.

Teletext

[edit]

TheWorld 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.[4] These characters were added to the Unicode standard in Version 13.[5]

Historical

[edit]

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

Commodore

[edit]
Main article:PETSCII

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

PET 2001 keyboard layout, illustrating PETSCII graphics characters

Sinclair

[edit]
ZX81 semigraphics
See also:ZX80 character set,ZX81 character set, andZX Spectrum character set

TheSinclair ZX80,ZX81, andZX 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

[edit]

TheBBC Micro could utilize theTeletext 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.[6]

Teletext G1 Block Mosaics Set[7]
0123456789ABCDEF
2NBSP🬀🬁🬂🬃🬄🬅🬆🬇🬈🬉🬊🬋🬌🬍🬎
3🬏🬐🬑🬒🬓▌🬔🬕🬖🬗🬘🬙🬚🬛🬜🬝
6🬞🬟🬠🬡🬢🬣🬤🬥🬦🬧▐🬨🬩🬪🬫🬬
7🬭🬮🬯🬰🬱🬲🬳🬴🬵🬶🬷🬸🬹🬺🬻█
Braille Sextant Mosaics Set[8][failed verification]
0123456789ABCDEF
2NBSP🬳🬇🬷🬥🬡🬴🬏🬺🬻🬟🬯🬞🬭🬠🬑
3🬵🬃🬓🬋🬩🬢🬚🬹🬱🬖🬧🬦🬣█🬘🬨
4🬁🬀🬄🬂🬊🬈🬆🬎🬌🬅🬍🬐▌🬒🬙🬗
5🬕🬝🬛🬔🬜🬮🬲🬫🬰🬸🬶🬤🬪🬬🬉▐

TheBBC Master and laterAcorn computers have the soft font by default defined with line drawing characters.

0123456789ABCDEF
A
B

Amstrad

[edit]

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

0123456789ABCDEF
8
9

TheCP/M Plus character set used on variousAmstrad computers of theCPC,PCW andSpectrum families included a rich set of line-drawing characters as well:[9][10][11]

[9]0123456789ABCDEF
8
9

Apple

[edit]

MouseText is a set of display characters for theApple IIc,IIe, andIIGS that includes box-drawing characters.

Encoding

[edit]

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

  • ZX Spectrum block characters:
    0x80 + topright*1 + topleft*2 + bottomright*4 + bottomleft*8
  • Amstrad CPC block characters:
    0x80 + topleft*1 + topright*2 + bottomleft*4 + bottomright*8
  • Amstrad CPC line characters:
    0x90 + up*1 + right*2 + down*4 + left*8
  • BBC Master line characters:
    0xA0 + down*1 + right*2 + left*4 + up*8
  • Teletext block characters:
    0xA0 + topleft*1 + topright*2 + middleleft*4 + middleright*8 + bottomleft*16 + bottomright*64

However, DOS line- and box-drawing characters are not ordered in any programmatic manner, so calculating a particular character shape needs to use a look-up table.

Examples

[edit]

Sample diagrams made out of the standard box-drawing characters, using a monospaced font:

┌─┬┐  ╔═╦╗  ╓─╥╖  ╒═╤╕│ ││  ║ ║║  ║ ║║  │ ││├─┼┤  ╠═╬╣  ╟─╫╢  ╞═╪╡└─┴┘  ╚═╩╝  ╙─╨╜  ╘═╧╛┌───────────────────┐│  ╔═══╗ Some Text  │▒│  ╚═╦═╝ in the box │▒╞═╤══╩══╤═══════════╡▒│ ├──┬──┤           │▒│ └──┴──┘           │▒└───────────────────┘▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

See also

[edit]
Wikimedia Commons has media related toText mode box drawing.

References

[edit]
  1. ^Box Drawing U+2500-U+257F, The Unicode Standard Code Charts
  2. ^abHewlett-Packard - Technical Reference Manual - Portable PLUS (1 ed.). Corvallis, OR, USA:Hewlett-Packard Company, Portable Computer Division. August 1985. 45559-90001. Retrieved2016-11-27.
  3. ^abHewlett-Packard - Technical Reference Manual - Portable PLUS(PDF) (2 ed.). Portable Computer Division, Corvallis, OR, USA:Hewlett-Packard Company. December 1986 [August 1985]. 45559-90006.Archived(PDF) from the original on 2016-11-28. Retrieved2016-11-27.
  4. ^Wiels."TeleText - Het Protocol" (in Dutch). Mosaic characters.Archived from the original on 2017-12-22. Retrieved2017-12-21.
  5. ^"Symbols for Legacy Computing"(PDF).Unicode Consortium. Retrieved2020-04-19.
  6. ^Broadcast Teletext Specification, September 1976 (asHTML orscans of original document)
  7. ^Enhanced Teletext specification(PDF), European Telecommunications Standards Institute, May 1997, p. 126
  8. ^Enhanced Teletext specification(PDF), European Telecommunications Standards Institute, May 1997, p. 126
  9. ^ab"Appendix II: CP/M Plus character sets / II.1 The complete character set (Language 0)".Spectrum +3 CP/M Plus manual (User Manual).Archived from the original on 2009-10-15. Retrieved2017-07-10.[1]
  10. ^Elliott, John C. (2015-04-04)."Amstrad Extended BIOS Internals".Seasip.info.Archived from the original on 2017-07-15. Retrieved2017-07-15.
  11. ^"Amstrad CP/M Plus character set".Archived from the original on 2017-07-15. Retrieved2017-07-15.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Box-drawing_characters&oldid=1273060386"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp