Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified xkcd-script/font/xkcd-script.otf
Binary file not shown.
11,154 changes: 5,572 additions & 5,582 deletions xkcd-script/font/xkcd-script.sfd

Large diffs are not rendered by default.

Binary file modified xkcd-script/font/xkcd-script.ttf
Binary file not shown.
Binary file modified xkcd-script/font/xkcd-script.woff
Binary file not shown.
2 changes: 1 addition & 1 deletion xkcd-script/generator/pt5_svg_to_font.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def create_char(font, chars, fname):
return c


baseline_chars = ['a' 'e', 'm', 'A', 'E', 'M', '&', '@', '.', u'≪', u'É']
baseline_chars = ['a', 'e', 'm', 'A', 'E', 'M', '&', '@', '.', u'≪', u'É']
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One little character missing has quite the effect... !

caps_chars = ['S', 'T', 'J', 'k', 't', 'l', 'b', 'd', '1', '2', u'3', u'≪', '?', '!']

line_stats = {}
Expand Down
1 change: 1 addition & 0 deletions xkcd-script/generator/pt7_font_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def expand(chars, left_side):
kern(175, ['r'], ['i'], minKern=35)
kern(180, ['r'], ['g', 'x'], minKern=35)
kern(100, ['r'], lower, minKern=50)
kern(60, ['r'], ['e'], minKern=30)
kern(60, ['s'], lower, minKern=50)
# f has a long right-arm; kern slightly tighter than default but don't overdo it.
kern(75, ['f'], lower, minKern=40)
Expand Down
2 changes: 2 additions & 0 deletions xkcd-script/generator/pt8_gen_reprod_font.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import datetime
import os
import calendar
from pathlib import Path

import fontforge
from fontTools.ttLib import TTFont as _TTFont
Expand Down Expand Up @@ -54,6 +55,7 @@

content.append(line.encode('utf-8'))

Path(base).mkdir(exist_ok=True)
with open(sfd_out, 'wb') as fh_out:
for line in content:
fh_out.write(line)
Expand Down
Binary file modified xkcd-script/samples/charmap_arrows.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified xkcd-script/samples/charmap_basic_latin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified xkcd-script/samples/charmap_combining_diacritical_marks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified xkcd-script/samples/charmap_general_punctuation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified xkcd-script/samples/charmap_greek_and_coptic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified xkcd-script/samples/charmap_latin_1_supplement.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified xkcd-script/samples/charmap_latin_extended_a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified xkcd-script/samples/charmap_latin_extended_additional.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified xkcd-script/samples/charmap_latin_extended_b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified xkcd-script/samples/charmap_mathematical_operators.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified xkcd-script/samples/charmap_non_latin_other.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion xkcd-script/samples/fonts.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<dir>../font/</dir>
<dir prefix="cwd">../font/</dir>
<cachedir>../.font-cache</cachedir>
<config></config>
</fontconfig>
2 changes: 2 additions & 0 deletions xkcd-script/samples/gen_charmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import matplotlib.patches as mpatches
from matplotlib.font_manager import FontProperties
from fontTools.ttLib import TTFont
from PIL import Image

HERE = os.path.dirname(os.path.abspath(__file__))
OTF = os.path.join(HERE, '../font/xkcd-script.otf')
Expand Down Expand Up @@ -245,5 +246,6 @@ def render_block(label, rows):
fig = render_block(label, rows)
out = os.path.join(OUTDIR, f'charmap_{slugify(label)}.png')
fig.savefig(out, dpi=150, bbox_inches='tight', facecolor=fig.get_facecolor())
Image.open(out).save(out)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously there was the matplotlib version in the metadata, which was a source of non-reproducible output (the version changed recently). Here, I drop that metadata.

plt.close(fig)
print(f'charmap → {out}')
Binary file modified xkcd-script/samples/handwriting.png
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A definite improvement! 👍

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified xkcd-script/samples/ipsum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified xkcd-script/samples/kerning.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion xkcd-script/samples/preview.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cat <<EOF > fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<dir>../font/</dir>
<dir prefix="cwd">../font/</dir>
<cachedir>../.font-cache</cachedir>
<config></config>
</fontconfig>
Expand Down
Loading