Skip to content

Commit ed8e639

Browse files
committed
improve python to generate charset grid
1 parent 4531f36 commit ed8e639

File tree

8 files changed

+9899
-3259
lines changed

8 files changed

+9899
-3259
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# /Users/stephennixon/type-repos/recursive/venv/bin/python
2+
# coding=utf8
3+
4+
import unicodedata
5+
from datetime import datetime
6+
7+
timestamp = datetime.now().strftime("%Y-%m-%d")
8+
9+
# this string was pulled from RoboFont Space Center, then edited by hand
10+
11+
u = 'AÀÁÂÃÄÅĀĂĄǺẠẢẤẦẨẪẬẮẰẲẴẶBCÇĆĈĊČDĎEÈÉÊËĒĔĖĘĚẸẺẼẾỀỂỄỆFGĜĞĠĢǦHĤIÌÍÎÏĨĪĬĮİỈỊJĴKĶLĹĻĽMNÑŃŅŇOÒÓÔÕÖŌŎŐƠǪỌỎỐỒỔỖỘỚỜỞỠỢPQRŔŖŘSŚŜŞŠȘTŢŤȚUÙÚÛÜŨŪŬŮŰŲƯỤỦỨỪỬỮỰVWŴẀẂẄXYÝŶŸȲỲỴỸZŹŻŽÆǼÐØǾÞĐĦIJĿŁŊŒŦƏƝƳDŽLJNJẞΩaàáâãäåāăąǻạảấầẩẫậắằẳẵặbcçćĉċčdďeèéêëēĕėęěẹẻẽếềểễệfgĝğġģǧhĥiìíîïĩīĭįỉịjĵkķlĺļľmnñńņňoòóôõöōŏőơǫọỏốồổỗộớờởỡợpqrŕŗřsśŝşšștţťțuùúûüũūŭůűųưụủứừửữựvwŵẁẃẅxyýÿŷȳỳỵỹzźżžßæǽðøǿþđħıijĸŀłʼnŋœŧƴdžljnjȷəπDžLjNjfffiflffifflªº0123456789⁰¹²³⁴⁵⁶⁷⁸⁹₀₁₂₃₄₅₆₇₈₉¼½¾⅓⅔⅛⅜⅝⅞_-–—()[]{}⟨⟩#%‰\'\"‘’“”‚„ˌ‹›«»*†‡.,:;…!¡?¿//\⁄|¦&§¶ℓ№·•′″‾+−±÷×=<>≤≥≈≠¬∂∆∏∑∕√∞∫◊≡$¢£¤¥฿₡₦₨₩₪₫€ƒ₭₱₲₴₵₸₼₽₿^~´`˝ˆˇ˘˜¯¨˙˚¸˛ʹʺʻʾʿˈˉˊˋ©®™°℮■□▲△▶▷▼▽◀◁◆◇♥♡←↑→↓↖↗↘↙↕↔'
12+
13+
path = 'docs/00--character_set_for_google_fonts/web-test/index.html'
14+
15+
html = f"""\
16+
<!DOCTYPE html>
17+
<html lang="en">
18+
<head>
19+
<meta charset="UTF-8">
20+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
21+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
22+
<title>Recursive CharSet</title>
23+
<link rel="stylesheet" href="style.css">
24+
</head>
25+
<body>
26+
27+
<h1>Recursive Character Set</h1>
28+
<p>As of {timestamp}</p>
29+
<ul class="grid">
30+
"""
31+
32+
for i, c in enumerate(u):
33+
print(c)
34+
html += f"""\
35+
<li>
36+
{c}
37+
</li>
38+
"""
39+
40+
html += """\
41+
<li>
42+
43+
</li>
44+
<li>
45+
@
46+
</li>
47+
</ul>
48+
</body>
49+
</html>
50+
"""
51+
52+
53+
54+
with open(path, 'w') as file:
55+
file.write(html)
56+
print('saved to ', str(path))

0 commit comments

Comments
 (0)