File: test_font_rendering.py

package info (click to toggle)
3270font 3.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 4,424 kB
  • sloc: python: 184; makefile: 140; sh: 81; xml: 21
file content (72 lines) | stat: -rwxr-xr-x 2,229 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/env python3

import string

printable = "".join(c for c in string.printable if c not in string.whitespace)

boxes = """
┌─┬┐╔═╦╗╓─╥╖╒═╤╕╭─┬╮
├─┼┤╠═╬╣╟─╫╢╞═╪╡├─┼┤
│ ││║ ║║║ ║║│ │││ ││
└─┴┘╚═╩╝╙─╨╜╘═╧╛╰─┴╯
"""

misc_glyphs = "Misc glyphs: ™●⌘⏎⬇⬆✔✼✎✘‘’◢◣◤◥▮◆▒░▓  ▏▎▍▌▋▊▉█"

composed_glyphs = (
    "Composed glyphs: ÀÉI͂o̓N̈́AͅB̊͆Ȍ͇U͈D̈ẢB̊A̋ĎA̍J̎Ȁ"
    "1⃜2⃜3⃜4⃜5⃜6⃜7⃜8⃜9⃜0⃜\n"
)

apl_set = (
    "The APL set: ⌶⌷⌸⌹⌺⌻⌼⌽⌾⌿⍀⍁⍂⍃⍄⍅⍆⍇⍈⍉⍊⍋⍌⍍⍎⍏⍐⍑⍒⍓⍔⍕⍖⍗⍘⍙⍚⍛⍜⍝⍞⍟⍠⍡⍢⍣⍤⍥⍦⍧⍨⍩⍪⍫⍬⍭⍮⍯⍰⍱"
    "⍲⍳⍴⍵⍶⍷⍸⍹⍺⊂⊃⊆⊇⊏⊐⊑⊒⊔⊓⊕⊖⊗⊘⊙⌾⊝⋆⌈⌉⌊⌋⁼⇐⇒⊸⟜⟨⟩⋄∧∨⊢⊣⊤⊥≢⚇⎉⎊◴◵◶◷⥊⥋∾‿↩↪≍𝕩𝕨𝕤𝕣𝕘𝕗𝕏𝕎𝕊𝔾𝔽"
)

confusables = (
    "Easily confused pairs: bh 5S HX 6G AR kx gy gq Z2 Il 1l 1I OQ CG DO 0O\n"
)

ladder = "Vttest's ladder: ⎺⎻─⎼⎽\n"

u1fb0_symbols = (
    "U+1FB00 symbols 🬀🬁🬅🬊🬍🬒🬗🬛🬥🭄🭆🭈🭋🭍🭂🭬🭭🭮🭯🮌🮏🮒🮚🮛🮜 " "🮰🮲🮳🯁🯂🯃🮹🮺🯄🯅🯆🯇🯈🯉🯰🯱🯲🯳🯴🯵🯶🯷🯸🯹\n"
)

patterns = "U+1FB00 Patterns: 🮘🮘🮘🮘 🮙🮙🮙🮙 🮕🮕🮕🮕 🮖🮖🮖🮖\n"

BOLD = "\x1b[1m"
ITALIC = "\x1b[3m"
UNDERLINE = "\x1b[4m"
OVERLINE = "\x1b[53m"
RESET = "\x1b[0m"

if __name__ == "__main__":
    print("ASCII:", printable)
    print(boxes)
    print(misc_glyphs)
    print(composed_glyphs)
    print(apl_set)
    print(confusables)
    print(ladder)
    print(u1fb0_symbols)
    print(patterns)
    print(
        BOLD
        + "BOLD "
        + ITALIC
        + "BOLD+ITALIC "
        + RESET
        + ITALIC
        + "ITALIC "
        + RESET
        + UNDERLINE
        + "UNDERLINE"
        + RESET
        + " "
        + OVERLINE
        + "OVERLINE"
        + RESET
        + " "
        + "NORMAL"
    )