Skip to content

Commit f74f218

Browse files
committed
update specimen
1 parent c8ebed7 commit f74f218

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

examples/specimen.html

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ <h4>Gap-adjustments.</h4>
274274
<h3>Stylistic Alternates</h3>
275275
<h4>(for those who prefer)</h4>
276276
<p>
277-
Currently the only implemented stylistic alternate is Oldstyle Figures.<br><br>
277+
There are some alternate styles available for certain sets of glyphs.<br><br>
278278
(onum) <input type="checkbox" name="onum" id="onum"> <label for="onum">Disabled</label>
279279
</p>
280280
<h4>Oldstyle Figures (onum)</h4>
@@ -289,15 +289,25 @@ <h4>Oldstyle Figures (onum)</h4>
289289
<br>
290290
let [x<span class="hi">1</span>, y<span class="hi">1</span>] = [<span class="hi">0</span>.<span class="hi">12569</span>, <span class="hi">0</span>.<span class="hi">45780</span>];<br>
291291
</div>
292+
<br>
293+
<p>(ss01) <input type="checkbox" name="ss01" id="ss01"> <label for="ss01">Disabled</label></p>
294+
<h4>Straight Comma (ss01)</h4>
295+
<div class="ex">
296+
{a:b[c],d:e}; | Originally, when Pixel Code was first released, it had a<br>
297+
:;:;:;:;:;:;: | less distinct style for the comma and semicolon; the old<br>
298+
,.,.,.,.,.,., | style has been made available as a togglable feature, so<br>
299+
.:;,.: ;,.:;, | that it can still be used if you preferred it.
300+
</div>
292301
<br><br>
293302
<div class="bottomspacer"></div>
294303

295304
<script>
296305
let calt = true;
297306
let onum = false;
298307
let liga = true;
308+
let ss01 = false;
299309
const update_style = () => {
300-
document.body.style.fontFeatureSettings = `"calt" ${+calt}, "onum" ${+onum}, "liga" ${+liga}`;
310+
document.body.style.fontFeatureSettings = `"calt" ${+calt}, "onum" ${+onum}, "liga" ${+liga}, "ss01" ${+ss01}`;
301311
}
302312
update_style();
303313
const liga_toggle = document.getElementById('liga');
@@ -318,6 +328,12 @@ <h4>Oldstyle Figures (onum)</h4>
318328
onum_toggle.nextElementSibling.textContent = onum ? 'Enabled' : 'Disabled';
319329
update_style();
320330
});
331+
const ss01_toggle = document.getElementById('ss01');
332+
ss01_toggle.addEventListener('input', () => {
333+
ss01 = ss01_toggle.checked;
334+
ss01_toggle.nextElementSibling.textContent = ss01 ? 'Enabled' : 'Disabled';
335+
update_style();
336+
});
321337
</script>
322338
</body>
323339
</html>

0 commit comments

Comments
 (0)