Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

16 лет назад
16 лет назад
16 лет назад
16 лет назад
16 лет назад
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. header('Content-Type: text/html; charset=UTF-8');
  3. ?>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  5. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  6. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  7. <?php
  8. /*
  9. * unicode libcaca Unicode rendering test program
  10. * Copyright (c) 2008 Benjamin C. Wiley Sittler <bsittler@gmail.com>
  11. *
  12. * This file is a Php port of "examples/unicode.c"
  13. * which is:
  14. * Copyright (c) 2006 Sam Hocevar <sam@zoy.org>
  15. * All Rights Reserved
  16. *
  17. * $Id$
  18. *
  19. * This program is free software. It comes without any warranty, to
  20. * the extent permitted by applicable law. You can redistribute it
  21. * and/or modify it under the terms of the Do What The Fuck You Want
  22. * To Public License, Version 2, as published by Sam Hocevar. See
  23. * http://sam.zoy.org/wtfpl/COPYING for more details.
  24. */
  25. ?>
  26. <head>
  27. <title>libcaca Unicode rendering test program</title>
  28. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  29. </head>
  30. <body text="silver" bgcolor="black">
  31. <?php
  32. $cv = caca_create_canvas(80, 25);
  33. if(! $cv)
  34. {
  35. die("Can't created canvas\n");
  36. }
  37. caca_set_color_ansi($cv, CACA_WHITE, CACA_BLUE);
  38. caca_put_str($cv, 1, 1, "Basic Unicode support");
  39. caca_set_color_ansi($cv, CACA_DEFAULT, CACA_TRANSPARENT);
  40. caca_put_str($cv, 1, 2, "This is ASCII: | abc DEF 123 !@# |");
  41. caca_put_str($cv, 1, 3, "This is Unicode: | äßç δεφ ☺♥♀ ╞╬╗ |");
  42. caca_put_str($cv, 1, 4, "And this is, too: | ἀβϛ ΔЗҒ ᚴᛒᛯ ♩♔✈ |");
  43. caca_put_str($cv, 1, 5, "If the three lines do not have the same length, there is a bug somewhere.");
  44. caca_set_color_ansi($cv, CACA_WHITE, CACA_BLUE);
  45. caca_put_str($cv, 1, 7, "Gradient glyphs");
  46. caca_set_color_ansi($cv, CACA_DEFAULT, CACA_TRANSPARENT);
  47. caca_put_str($cv, 31, 8, " 0%");
  48. caca_put_str($cv, 31, 9, " 25%");
  49. caca_put_str($cv, 31, 10, " 50%");
  50. caca_put_str($cv, 31, 11, " 75%");
  51. caca_put_str($cv, 31, 12, "100%");
  52. caca_set_color_ansi($cv, CACA_LIGHTRED, CACA_LIGHTGREEN);
  53. caca_put_str($cv, 1, 8, " ");
  54. caca_put_str($cv, 1, 9, "░░░░░░░░░░░░░░░░░░░░░░░░░░░░░");
  55. caca_put_str($cv, 1, 10, "▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒");
  56. caca_put_str($cv, 1, 11, "▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓");
  57. caca_put_str($cv, 1, 12, "█████████████████████████████");
  58. caca_set_color_ansi($cv, CACA_LIGHTGREEN, CACA_LIGHTRED);
  59. caca_put_str($cv, 36, 8, "█████████████████████████████");
  60. caca_put_str($cv, 36, 9, "▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓");
  61. caca_put_str($cv, 36, 10, "▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒");
  62. caca_put_str($cv, 36, 11, "░░░░░░░░░░░░░░░░░░░░░░░░░░░░░");
  63. caca_put_str($cv, 36, 12, " ");
  64. caca_set_color_ansi($cv, CACA_WHITE, CACA_BLUE);
  65. caca_put_str($cv, 1, 14, "Double width characters");
  66. caca_set_color_ansi($cv, CACA_LIGHTRED, CACA_TRANSPARENT);
  67. caca_put_str($cv, 1, 15, "| ドラゴン ボーレ |");
  68. caca_set_color_ansi($cv, CACA_DEFAULT, CACA_TRANSPARENT);
  69. caca_put_str($cv, 1, 16, "| ()()()() ()()() |");
  70. caca_set_color_ansi($cv, CACA_YELLOW, CACA_TRANSPARENT);
  71. caca_put_str($cv, 1, 17, "| ドラゴン");
  72. caca_put_str($cv, 12, 17, "ボーレ |");
  73. caca_set_color_ansi($cv, CACA_DEFAULT, CACA_TRANSPARENT);
  74. caca_put_str($cv, 1, 18, "If the three lines do not have the same length, there is a bug somewhere.");
  75. caca_put_str($cv, 1, 20, "CP437 glyphs: ☺ ☻ ♥ ♦ ♣ ♠ • ◘ ○ ◙ ♂ ♀ ♪ ♫ ☼ ► ◄ ↕ ‼ ¶ § ▬ ↨ ↑ ↓ → ← ∟ ↔ ▲ ▼");
  76. caca_put_str($cv, 1, 21, "more CP437: α ß Γ π Σ σ µ τ Φ Θ Ω δ ∞ φ ε ∩ ≡ ± ≥ ≤ ⌠ ⌡ ÷ ≈ ° ∙ · √ ⁿ ² ■");
  77. caca_put_str($cv, 1, 22, "drawing blocks: ███ ▓▓▓ ▒▒▒ ░░░ ▀ ▄ ▌ ▐ █ ▖ ▗ ▘ ▝ ▚ ▞ ▙ ▛ ▜ ▟ ─ │ ┌ ┐ └ ┘ ├ ┤");
  78. caca_put_str($cv, 1, 23, "more drawing: ┬ ┴ ┼ ═ ║ ╒ ╓ ╔ ╕ ╖ ╗ ╘ ╙ ╚ ╛ ╜ ╝ ╞ ╟ ╠ ╡ ╢ ╣ ╤ ╥ ╦ ╧ ╨ ╩ ╪ ╫ ╬");
  79. caca_put_str($cv, 1, 24, "misc Unicode: ● ☭ ☮ ☯ ♔ ♛ ♙ ♞ ⚒ ⚓ ⚠");
  80. echo caca_export_string($cv, "html3");
  81. ?>
  82. </body>
  83. </html>