Skip to content

Commit a81400f

Browse files
committed
Correctly map the dash-like characters to unicode
1 parent 2a29df5 commit a81400f

11 files changed

Lines changed: 756 additions & 663 deletions

preview.html

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,7 @@
7272
<body>
7373

7474
<div id="container" class="container">
75-
76-
77-
<a href="https://github.com/ipython/xkcd-font">
78-
<img id="forkme-ribbon" style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/e7bbb0521b397edbd5fe43e7f760759336b5e05f/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677265656e5f3030373230302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png"></a>
79-
<div>
75+
<div>
8076
<div class="header">
8177
<h3 class="xkcd-script">The xkcd font</h3>
8278
<p class="summary xkcd-script">brought to you by the <a href="https://github.com/ipython/xkcd-font">ipython/xkcd-font</a> team</p>
@@ -91,7 +87,7 @@ <h3 class="xkcd-script">The xkcd font</h3>
9187
UNAUTHORITATIVENESS LEATHERBARK INTRACOLIC MICROCHELIA
9288
OFFSIDER GLASSWEED ROTTOLO ALBERTITE HERMATORRHACHIS
9389
ORGANOMETALLIC SEGREGATIONIST UNEVANGELIC CAMPSTOOL
94-
+ - x * ! ? # @ $ % ¦ & ^ _ - - - ( ) [ ] { } / \ < > ÷ ± √ Σ
90+
+ - x * ! ? # @ $ % ¦ & ^ _ — – - ( ) [ ] { } / \ < > ÷ ± √ Σ
9591
1 2 3 4 5 6 7 8 9 0 ∫ = ≈ ≠ ~ ≤ ≥ |> <| 🎂 . , ; : “HI” ’ ‘ CAN'T ' "
9692
É Ò Å Ü ≪ ≫ ‽ Ē Ő “ ”
9793

@@ -110,11 +106,8 @@ <h3 class="xkcd-script">The xkcd font</h3>
110106
</div>
111107
</form>
112108
</div>
113-
114-
115-
116-
</div>
117-
109+
</div>
110+
</div>
118111

119112

120113
<script>

xkcd-script/font/xkcd-script.otf

368 Bytes
Binary file not shown.

xkcd-script/font/xkcd-script.sfd

Lines changed: 745 additions & 651 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

xkcd-script/font/xkcd-script.ttf

432 Bytes
Binary file not shown.

xkcd-script/font/xkcd-script.woff

268 Bytes
Binary file not shown.

xkcd-script/generator/pt2_character_classification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
U N A U T H O R I T A T I V E N E S S L EA T H E R B A R K I N T R A CO L I C M I CR OCH E L I A
5454
O F F S I D ER G LA S S W EE D R O TT O L O A LB E R T I T E H ER M A T O RR H A C H I S
5555
O R G A N O M E T A LL I C S E G R E G A T I ON I S T U N E V A N G E L I C CA M PS TO O L
56-
+ - x * ! ? # @ $ % ¦ & ^ _ - - - ( ) [ ] { } / \ < > ÷ ± √ Σ
56+
+ - x * ! ? # @ $ % ¦ & ^ _ — – - ( ) [ ] { } / \ < > ÷ ± √ Σ
5757
1 2 3 4 5 6 7 8 9 0 ∫ = ≈ ≠ ~ ≤ ≥ |> <| 🎂 . , ; : “ H I ” ’ ‘ C A N ' T ' "
5858
É Ò Å Ü ≪ ≫ ‽ Ē Ő “ ”
5959
""".strip()

xkcd-script/generator/pt6_derived_chars.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,12 @@ def _accented(cp, base_name, mark_name, gap=20, x_adj=0):
214214
(0x2032, 'quoteright'), # prime
215215
(0x2033, 'quotedbl'), # doubleprime
216216
(0x2035, 'quoteleft'), # backprime
217+
# Dash aliases
218+
(0x2011, 'hyphen'), # non-breaking hyphen
219+
(0x00AD, 'hyphen'), # soft hyphen
220+
(0x2212, 'endash'), # minus sign
221+
(0x2012, 'endash'), # figure dash
222+
(0x2015, 'emdash'), # horizontal bar
217223
]
218224
for codepoint, source_name in ref_aliases:
219225
c = font.createMappedChar(codepoint)
282 Bytes
Loading
111 Bytes
Loading
133 Bytes
Loading

0 commit comments

Comments
 (0)