Skip to content

Commit 7423397

Browse files
committed
adding html docs, touch version number
1 parent 54b0980 commit 7423397

File tree

8 files changed

+811
-2
lines changed

8 files changed

+811
-2
lines changed

InterpolationMatrix.roboFontExt/html/github-markdown.css

Lines changed: 703 additions & 0 deletions
Large diffs are not rendered by default.
139 KB
Loading
72.1 KB
Loading
62.1 KB
Loading
93.1 KB
Loading
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>CornerTools</title>
6+
<link rel="stylesheet" href="github-markdown.css">
7+
<style>
8+
html {
9+
margin-left: auto;
10+
margin-right: auto;
11+
}
12+
.headerlink {
13+
opacity: 0.0;
14+
}
15+
body h1:hover a.headerlink,
16+
body h2:hover a.headerlink,
17+
body h3:hover a.headerlink,
18+
body h4:hover a.headerlink {
19+
opacity: 1.0;
20+
}
21+
</style>
22+
</head>
23+
<body>
24+
<h1 id="interpolation-matrix-mutatormath">Interpolation Matrix (MutatorMath)<a class="headerlink" href="#interpolation-matrix-mutatormath" title="Permanent link">&para;</a></h1>
25+
<p><em>This version of Interpolation Matrix is a fork of the original version by Loïc Sander.</em></p>
26+
<p>The interpolation matrix is a tool requiring at least two master fonts open in RoboFont and interpolable glyphs (if the glyphs are incompatible, no instance will show). It allows you to preview interpolation and extrapolation based on master position in a grid.</p>
27+
<p>This version of the script &amp; the extension are a rewriting of the previous Interpolation Preview Matrix, now using LettError’s <a href="http://github.com/LettError/MutatorMath">MutatorMath</a> ❤️ whereas previous inter/extrapolations were written by my simple self.</p>
28+
<p><a href="http://vimeo.com/109734720">check out the demo on Vimeo</a></p>
29+
<h3 id="previewing-interpolations">Previewing interpolations<a class="headerlink" href="#previewing-interpolations" title="Permanent link">&para;</a></h3>
30+
<p><img alt="" src="images/example-matrix-1.png" /></p>
31+
<p>The glyphs are updated (almost) at draw time [mouseUp, keyUp], so you can modify glyphs and see changes happen in the matrix. Theoretically, you can have a 15×15 matrix of 225 fonts; beyond that, it would get too slow to use… Testing indicates that 7×7 is the ‘maximal-optimum’ use case.</p>
32+
<h3 id="generating-instances">Generating instances<a class="headerlink" href="#generating-instances" title="Permanent link">&para;</a></h3>
33+
<p><img alt="" src="images/example-matrix-2.png" />
34+
<img alt="" src="images/example-matrix-3.png" /></p>
35+
<p>You can use the matrix to generate font instances or compatibility check reports. You choose which instance(s) to generate by naming their ‘coordinates’ (A1, B4, C3, etc.), or you can generate instances by whole rows/columns (A, 1, etc.), or all at once. Generated instances are issued in a folder next to the source master font (which you indicate before generating).</p>
36+
<h3 id="saving-matrices">Saving matrices<a class="headerlink" href="#saving-matrices" title="Permanent link">&para;</a></h3>
37+
<p>Last but not least, you can save matrices: grid size, window size and master fonts are stored and can be reaccessed quickly. The matrix stores a simple .txt file. It’s not ideal but does the trick for now.</p>
38+
</body>
39+
</html>

InterpolationMatrix.roboFontExt/info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<key>developerURL</key>
1919
<string>https://github.com/loicsander</string>
2020
<key>html</key>
21-
<false/>
21+
<true/>
2222
<key>launchAtStartUp</key>
2323
<integer>0</integer>
2424
<key>mainScript</key>
@@ -32,6 +32,6 @@
3232
<key>timeStamp</key>
3333
<real>1547483378.40699</real>
3434
<key>version</key>
35-
<string>0.7.1</string>
35+
<string>0.7.2</string>
3636
</dict>
3737
</plist>

build-html.py

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import os
2+
import markdown
3+
from markdown.extensions.toc import TocExtension
4+
5+
baseFolder = os.getcwd()
6+
readmePath = os.path.join(baseFolder, 'README.md')
7+
extensionPath = os.path.join(baseFolder, 'InterpolationMatrix.roboFontExt')
8+
9+
# -------------
10+
# generate html
11+
# -------------
12+
13+
htmlFolder = os.path.join(extensionPath, 'html')
14+
htmlPath = os.path.join(htmlFolder, 'index.html')
15+
16+
htmlTemplate = '''\
17+
<!DOCTYPE html>
18+
<html>
19+
<head>
20+
<meta charset="UTF-8">
21+
<title>CornerTools</title>
22+
<link rel="stylesheet" href="github-markdown.css">
23+
<style>
24+
html {
25+
margin-left: auto;
26+
margin-right: auto;
27+
}
28+
.headerlink {
29+
opacity: 0.0;
30+
}
31+
body h1:hover a.headerlink,
32+
body h2:hover a.headerlink,
33+
body h3:hover a.headerlink,
34+
body h4:hover a.headerlink {
35+
opacity: 1.0;
36+
}
37+
</style>
38+
</head>
39+
<body>
40+
%s
41+
</body>
42+
</html>
43+
'''
44+
45+
with open(readmePath, mode="r", encoding="utf-8") as f:
46+
markdownSource = f.read()
47+
48+
M = markdown.Markdown(extensions=[TocExtension(permalink=True)])
49+
html = htmlTemplate % M.convert(markdownSource)
50+
51+
with open(htmlPath, mode="w", encoding="utf-8") as htmlFile:
52+
htmlFile.write(html)
53+
54+
# -----------
55+
# copy images
56+
# -----------
57+
58+
import shutil
59+
60+
imgsFolder = os.path.join(baseFolder, 'images')
61+
htmlImgsFolder = os.path.join(htmlFolder, 'images')
62+
63+
for f in os.listdir(imgsFolder):
64+
if not os.path.splitext(f)[-1] in ['.png', '.jpg', '.jpeg']:
65+
continue
66+
imgPath = os.path.join(imgsFolder, f)
67+
shutil.copy2(imgPath, htmlImgsFolder)

0 commit comments

Comments
 (0)