-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathVD-designspace-2-masters-1-axis.md.xml
More file actions
31 lines (28 loc) · 1.33 KB
/
VD-designspace-2-masters-1-axis.md.xml
File metadata and controls
31 lines (28 loc) · 1.33 KB
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
<?xml version="1.0" encoding="utf-8"?>
<document><pre><code># ----------------------------------------
# designspace.html
# ----------------------------------------
page = page.next
page.applyTemplate(template)
page.name = '2 masters 1 axis'
page.url = 'Design space/2-masters-1-axis.html'
content = page.select('Content')
box = content.newBanner()
</code></pre>
<h1>Design space: 2 masters, 1 axis</h1>
<pre><code>box = content.newIntroduction()
</code></pre>
<h1>Single axis with 2 masters. One of them must be origin. The other is <strong>min</strong> or <strong>max</strong>.</h1>
<pre><code>section = content.newSection()
box = section.newMain()
</code></pre>
<h2>Usage examples</h2>
<h3>Single weight <strong>[wght]</strong> axis interpolating Regular to Bold</h3>
<h3>Single weight <strong>[wght]</strong> axis interpolating Light to Regular</h3>
<h3>Single width <strong>[wght]</strong> axis interpolating Regular to Condensed</h3>
<h3>Single optical size <strong>[opsz]</strong> axis interpolating Regular-Display to Regular-Text</h3>
<pre><code>from pagebot.elements.vf.designspacegraph import newDesignSpaceGraph
path = 'resources/fonts/typetr/2-master-1-axis.designspace'
path = 'code/2-masters-1-axis.json'
box = newDesignSpaceGraph(parent=section, path=path, stroke=0, nodeStroke=1, labelSize=doc.rootStyle['labelSize'])
</code></pre></document>