Turn ligation list to table in README
95
README.md
|
@ -57,32 +57,87 @@ Iosevka supports accessing all letter variants using OpenType features, includin
|
||||||
|
|
||||||
Iosevka’s default ligation set is assigned to `calt` feature, though not all of them are enabled by default.
|
Iosevka’s default ligation set is assigned to `calt` feature, though not all of them are enabled by default.
|
||||||
|
|
||||||
|
Iosevka supports Language-Specific Ligations, which is the ligation set enabled only under certain languages. These ligation sets are assigned to custom feature tags. To use them, you need to turn **off** `calt` and enable the corresponded feature. The feature list is:
|
||||||
|
|
||||||
<!-- BEGIN Section-OT-Ligation-Tags -->
|
<!-- BEGIN Section-OT-Ligation-Tags -->
|
||||||
<!-- THIS SECTION IS AUTOMATICALLY GENERATED. DO NOT EDIT. -->
|
<!-- THIS SECTION IS AUTOMATICALLY GENERATED. DO NOT EDIT. -->
|
||||||
|
|
||||||
Iosevka supports Language-Specific Ligations, which is the ligation set enabled only under certain languages. These ligation sets are assigned to custom feature tags. To use them, you need to turn **off** `calt` and enable the corresponded feature. The feature list is:
|
<table>
|
||||||
|
<tr>
|
||||||
- `dlig`: Discretionary ligatures.
|
<td><code>dlig</code></td>
|
||||||
- `CLIK`: C-Like.
|
<td>Discretionary ligatures</td>
|
||||||
- `JSPT`: JavaScript.
|
</tr>
|
||||||
- `PHPX`: PHP.
|
<tr>
|
||||||
- `MLXX`: ML.
|
<td colspan="2"><img src="images/ligset-dlig-1.png"/></td>
|
||||||
- `FSHP`: F#.
|
</tr>
|
||||||
- `FSTA`: F*.
|
<tr>
|
||||||
- `HSKL`: Haskell.
|
<td><code>CLIK</code>; <code>JSPT</code>; <code>PHPX</code></td>
|
||||||
- `IDRS`: Idris.
|
<td>C-Like, JavaScript, PHP</td>
|
||||||
- `ELMX`: Elm.
|
</tr>
|
||||||
- `PURS`: PureScript.
|
<tr>
|
||||||
- `SWFT`: Swift.
|
<td colspan="2"><img src="images/ligset-CLIK-1.png"/></td>
|
||||||
- `COQX`: Coq.
|
</tr>
|
||||||
- `MTLB`: Matlab.
|
<tr>
|
||||||
- `VRLG`: Verilog.
|
<td><code>MLXX</code>; <code>FSHP</code></td>
|
||||||
- `WFLM`: Wolfram Language (Mathematica).
|
<td>ML, F#</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><img src="images/ligset-MLXX-1.png"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>FSTA</code></td>
|
||||||
|
<td>F*</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><img src="images/ligset-FSTA-1.png"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>HSKL</code>; <code>IDRS</code>; <code>ELMX</code>; <code>PURS</code></td>
|
||||||
|
<td>Haskell, Idris, Elm, PureScript</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><img src="images/ligset-HSKL-1.png"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>SWFT</code></td>
|
||||||
|
<td>Swift</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><img src="images/ligset-SWFT-1.png"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>COQX</code></td>
|
||||||
|
<td>Coq</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><img src="images/ligset-COQX-1.png"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>MTLB</code></td>
|
||||||
|
<td>Matlab</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><img src="images/ligset-MTLB-1.png"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>VRLG</code></td>
|
||||||
|
<td>Verilog</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><img src="images/ligset-VRLG-1.png"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>WFLM</code></td>
|
||||||
|
<td>Wolfram Language (Mathematica)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><img src="images/ligset-WFLM-1.png"/></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<!-- END Section-OT-Ligation-Tags -->
|
<!-- END Section-OT-Ligation-Tags -->
|
||||||
|
|
||||||

|
Please note that, due to the complex interactions when forming ligations, cherry-picking ligation groups will require a custom Iosevka build. The instructions could be seen below.
|
||||||
|
|
||||||
|
|
||||||
## Building from Source
|
## Building from Source
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
* \[**Breaking**\] Change implementation of character variants to `cv##` and alternate substitutions.
|
* \[**Breaking**\] Change implementation of character variants to `cv##` and alternate substitutions (#572).
|
||||||
* \[**Breaking**\] Change the building configuration format -- now we use dicts instead of “array of styles”.
|
* \[**Breaking**\] Change the building configuration format -- now we use dicts instead of “array of styles”.
|
||||||
* \[**Breaking**\] Cleanup of weight levels and increase contrast under heavier weights.
|
* \[**Breaking**\] Cleanup of weight levels and increase contrast under heavier weights.
|
||||||
* Fix the shape of hook-top V's.
|
* Fix the shape of hook-top V's.
|
||||||
* Add half-filled stars (`U+2BE8` ... `U+2BEB`, #708).
|
* Add half-filled stars (`U+2BE8` ... `U+2BEB`, #708).
|
||||||
|
* Add ligation set for Verilog (#710).
|
||||||
|
|
Before Width: | Height: | Size: 375 KiB After Width: | Height: | Size: 375 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 363 KiB After Width: | Height: | Size: 363 KiB |
Before Width: | Height: | Size: 388 KiB |
BIN
images/ligset-CLIK-1.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
images/ligset-COQX-1.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
images/ligset-ELMX-1.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
images/ligset-FSHP-1.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
images/ligset-FSTA-1.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
images/ligset-HSKL-1.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
images/ligset-IDRS-1.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
images/ligset-JSPT-1.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
images/ligset-MLXX-1.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
images/ligset-MTLB-1.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
images/ligset-PHPX-1.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
images/ligset-PURS-1.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
images/ligset-SWFT-1.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
images/ligset-VRLG-1.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
images/ligset-WFLM-1.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
images/ligset-calt-0.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
images/ligset-calt-1.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
images/ligset-dlig-1.png
Normal file
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 177 KiB After Width: | Height: | Size: 177 KiB |
Before Width: | Height: | Size: 310 KiB After Width: | Height: | Size: 310 KiB |
Before Width: | Height: | Size: 972 KiB After Width: | Height: | Size: 973 KiB |
Before Width: | Height: | Size: 322 KiB After Width: | Height: | Size: 322 KiB |
|
@ -5,6 +5,7 @@ const windowHeight = window.innerHeight;
|
||||||
const dpi = window.devicePixelRatio;
|
const dpi = window.devicePixelRatio;
|
||||||
const ipc = require("electron").ipcRenderer;
|
const ipc = require("electron").ipcRenderer;
|
||||||
const packagingTasks = require("./packaging-tasks.json");
|
const packagingTasks = require("./packaging-tasks.json");
|
||||||
|
const auxData = require("./index.data.json");
|
||||||
|
|
||||||
let onScroll = function () {};
|
let onScroll = function () {};
|
||||||
ipc.on("scroll", function () {
|
ipc.on("scroll", function () {
|
||||||
|
@ -18,13 +19,52 @@ ipc.on("complete", function () {
|
||||||
onComplete.apply(this, arguments);
|
onComplete.apply(this, arguments);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const captureCallbacks = {
|
||||||
|
"amend-ligset-sampler-contents": cbAmendLigsetSamplerContents
|
||||||
|
};
|
||||||
|
function cbAmendLigsetSamplerContents(element, p) {
|
||||||
|
element.innerHTML = "";
|
||||||
|
if (p.tag === "calt") element.style.fontFeatureSettings = `'${p.tag}' ${p.rank}`;
|
||||||
|
else element.style.fontFeatureSettings = `'calt' off, '${p.tag}' ${p.rank}`;
|
||||||
|
|
||||||
|
const groupSet = new Set(p.ligSets);
|
||||||
|
for (const row of auxData.ligation.samples) {
|
||||||
|
const line = document.createElement("div");
|
||||||
|
element.appendChild(line);
|
||||||
|
for (let m = 0; m < row.length; m++) {
|
||||||
|
if (m > 0) line.appendChild(document.createTextNode(" "));
|
||||||
|
const item = row[m];
|
||||||
|
let rank = 0;
|
||||||
|
for (let k = item.tags.length; k-- > 0; ) {
|
||||||
|
if (groupSet.has(item.tags[k])) {
|
||||||
|
rank = k + 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (rank) {
|
||||||
|
const run = document.createElement("em");
|
||||||
|
run.appendChild(document.createTextNode(item.s));
|
||||||
|
run.className = `rank-${rank}`;
|
||||||
|
line.appendChild(run);
|
||||||
|
} else {
|
||||||
|
const run = document.createElement("s");
|
||||||
|
run.appendChild(document.createTextNode(item.s));
|
||||||
|
run.className = `rank-${rank}`;
|
||||||
|
line.appendChild(run);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function captureElement(options, callback) {
|
function captureElement(options, callback) {
|
||||||
window.scroll(0, 0);
|
window.scroll(0, 0);
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
const element = document.querySelector(options.el);
|
const element = document.querySelector(options.el);
|
||||||
if (options.applyClass) element.className = options.applyClass;
|
if (options.applyClass) element.className = options.applyClass;
|
||||||
if (options.applyFeature) element.style = "font-feature-settings:" + options.applyFeature;
|
if (options.applyFeature) element.style = "font-feature-settings:" + options.applyFeature;
|
||||||
|
if (options.applyCallback) {
|
||||||
|
captureCallbacks[options.applyCallback](element, options.applyCallbackArgs);
|
||||||
|
}
|
||||||
const rect = element.getBoundingClientRect();
|
const rect = element.getBoundingClientRect();
|
||||||
onScroll = function (event, arg) {
|
onScroll = function (event, arg) {
|
||||||
window.scrollTo(0, arg);
|
window.scrollTo(0, arg);
|
||||||
|
@ -55,7 +95,7 @@ window.onload = function () {
|
||||||
{ el: "#matrix", name: "matrix" },
|
{ el: "#matrix", name: "matrix" },
|
||||||
{ el: "#previews", name: "preview-all" },
|
{ el: "#previews", name: "preview-all" },
|
||||||
{ el: "#weights", name: "weights" },
|
{ el: "#weights", name: "weights" },
|
||||||
{ el: "#ligations", name: "ligations", doubleTrim: "white" },
|
// { el: "#ligations", name: "ligations", doubleTrim: "white" },
|
||||||
...packagingTasks
|
...packagingTasks
|
||||||
];
|
];
|
||||||
let current = 0;
|
let current = 0;
|
||||||
|
|
|
@ -352,28 +352,10 @@ section.style-sets
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
color: #c33500;
|
color: #c33500;
|
||||||
|
|
||||||
#ligations > table
|
#ligation-sampler
|
||||||
border-spacing: 0;
|
font-size: 12px;
|
||||||
border-top: 2px solid black;
|
width: 42em;
|
||||||
border-bottom: 2px solid black;
|
padding: 1em;
|
||||||
margin: 1em auto;
|
|
||||||
|
|
||||||
th
|
|
||||||
white-space: nowrap;
|
|
||||||
|
|
||||||
pre
|
|
||||||
margin: 0;
|
|
||||||
|
|
||||||
th, td
|
|
||||||
padding: 0.4em 1em;
|
|
||||||
text-align: left;
|
|
||||||
|
|
||||||
tr.note
|
|
||||||
td
|
|
||||||
border-top: 1px solid black;
|
|
||||||
|
|
||||||
font-style: italic;
|
|
||||||
color: #c33500;
|
|
||||||
|
|
||||||
em
|
em
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
|
@ -382,13 +364,10 @@ section.style-sets
|
||||||
&.rank-2
|
&.rank-2
|
||||||
color: #c33500;
|
color: #c33500;
|
||||||
|
|
||||||
s, .nolig
|
s
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
opacity: 0.25;
|
opacity: 0.25;
|
||||||
|
|
||||||
.nolig
|
|
||||||
font-feature-settings: 'calt' 0;
|
|
||||||
|
|
||||||
#packaging-sampler
|
#packaging-sampler
|
||||||
width: 18rem;
|
width: 18rem;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
|
|
|
@ -1,28 +1,9 @@
|
||||||
<section id="ligations">
|
<section id="ligation-sampler">
|
||||||
<table>
|
|
||||||
<thead><tr class="first"><th>Feature Tag</th><th>Description</th></tr></thead>
|
|
||||||
<tbody>
|
|
||||||
<%_ for(const group of ligation.sets) { _%>
|
|
||||||
<%_ const tagSet = new Set(group.ligSets); _%>
|
|
||||||
<%_ const featureSettings = group.tag === 'calt' ? `style="font-feature-settings:'${group.tag}' ${group.rank}"` : `style="font-feature-settings: 'calt' off, '${group.tag}' ${group.rank}"` _%>
|
|
||||||
<tr class="note">
|
|
||||||
<td><%= group.tagName || group.tag %><%= group.rank === 1 ? '' : group.rank === 0 ? ' off' : ' ' + rank %></td>
|
|
||||||
<td><%= group.desc %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" <%- featureSettings -%>>
|
|
||||||
<%_ for(const line of ligation.samples) { _%>
|
<%_ for(const line of ligation.samples) { _%>
|
||||||
<pre><%_ for(let i = 0; i < line.length; i++) { _%>
|
<div className="line"><%_ for(let i = 0; i < line.length; i++) { _%>
|
||||||
<%_ const item = line[i]; _%>
|
<%_ const item = line[i]; _%>
|
||||||
<%_ if(i > 0) { _%><%= " " %><%_ } _%>
|
<%_ if(i > 0) { _%><%= " " %><%_ } _%>
|
||||||
<%_ if (tagSet.has(item.tags[1]) || tagSet.has(item.tags[2])) { _%><em class="rank-2"><%= item.s %></em><%_ _%>
|
<s><%= item.s %></s>
|
||||||
<%_ } else if (tagSet.has(item.tags[0])) { _%><em class="rank-1"><%= item.s %></em><%_ _%>
|
<%_ } _%></div>
|
||||||
<%_ } else { _%><s><%= item.s %></s><%_ } _%>
|
|
||||||
<%_ } _%></pre>
|
|
||||||
<%_ } _%>
|
<%_ } _%>
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<%_ } _%>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
</section>
|
|
@ -1 +0,0 @@
|
||||||
Iosevka supports Language-Specific Ligations, which is the ligation set enabled only under certain languages. These ligation sets are assigned to custom feature tags. To use them, you need to turn **off** `calt` and enable the corresponded feature. The feature list is:
|
|
|
@ -161,13 +161,18 @@ async function processLigSetPreDef() {
|
||||||
async function processLigSetOt() {
|
async function processLigSetOt() {
|
||||||
const ligData = await parseLigationData();
|
const ligData = await parseLigationData();
|
||||||
const md = new MdCol("Section-OT-Ligation-Tags");
|
const md = new MdCol("Section-OT-Ligation-Tags");
|
||||||
const headerPath = path.resolve(__dirname, "fragments/description-ot-ligation-tags.md");
|
md.log(`<table>`);
|
||||||
md.log(await fs.readFile(headerPath, "utf-8"));
|
for (const ls of ligData.sets) {
|
||||||
for (const ls of ligData.nonMergeSets) {
|
|
||||||
if (!ls.rank || ls.tag === "calt") continue;
|
if (!ls.rank || ls.tag === "calt") continue;
|
||||||
const longDesc = ls.desc;
|
md.log(`<tr>`);
|
||||||
md.log(`- \`${ls.tag}\`: ${longDesc}.`);
|
md.log(`<td>${ls.tagName.map(x => `<code>${x}</code>`).join("; ")}</td>`);
|
||||||
|
md.log(`<td>${ls.desc}</td>`);
|
||||||
|
md.log(`</tr>`);
|
||||||
|
md.log(`<tr>`);
|
||||||
|
md.log(`<td colspan="2"><img src="images/ligset-${ls.tag}-${ls.rank}.png"/></td>`);
|
||||||
|
md.log(`</tr>`);
|
||||||
}
|
}
|
||||||
|
md.log(`</table>`);
|
||||||
return md;
|
return md;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -261,13 +261,13 @@ function buildLigationSet(ligData, getKey) {
|
||||||
tag: comp.tag,
|
tag: comp.tag,
|
||||||
rank: 1,
|
rank: 1,
|
||||||
ligSets: [...ligSets],
|
ligSets: [...ligSets],
|
||||||
tagName: comp.tag,
|
tagName: [comp.tag],
|
||||||
desc: comp.desc,
|
desc: comp.desc,
|
||||||
brief: comp.brief || comp.desc
|
brief: comp.brief || comp.desc
|
||||||
};
|
};
|
||||||
ligationSets.set(key, item);
|
ligationSets.set(key, item);
|
||||||
} else {
|
} else {
|
||||||
item.tagName += ", " + comp.tag;
|
item.tagName = [...item.tagName, comp.tag];
|
||||||
item.desc += ", " + comp.desc;
|
item.desc += ", " + comp.desc;
|
||||||
item.brief += ", " + comp.brief;
|
item.brief += ", " + comp.brief;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ const execMain = require("../shared/execMain");
|
||||||
|
|
||||||
const inputPath = process.argv[2];
|
const inputPath = process.argv[2];
|
||||||
const outputPath = process.argv[3];
|
const outputPath = process.argv[3];
|
||||||
|
const outputDataPath = process.argv[4];
|
||||||
|
|
||||||
execMain(main);
|
execMain(main);
|
||||||
|
|
||||||
|
@ -17,9 +18,11 @@ execMain(main);
|
||||||
async function main() {
|
async function main() {
|
||||||
const weightGrades = [100, 200, 300, 400, 500, 600, 700, 800, 900];
|
const weightGrades = [100, 200, 300, 400, 500, 600, 700, 800, 900];
|
||||||
const templatePath = path.join(inputPath, "index.ejs");
|
const templatePath = path.join(inputPath, "index.ejs");
|
||||||
|
const variationData = await await parseVariantsData();
|
||||||
|
const ligationData = await getLigationData();
|
||||||
const html = await ejs.renderFile(templatePath, {
|
const html = await ejs.renderFile(templatePath, {
|
||||||
...(await parseVariantsData()),
|
...variationData,
|
||||||
ligation: await getLigationData(),
|
ligation: ligationData,
|
||||||
weights: weightGrades,
|
weights: weightGrades,
|
||||||
buildSsHtml(body, hc) {
|
buildSsHtml(body, hc) {
|
||||||
const hcs = new Set(hc);
|
const hcs = new Set(hc);
|
||||||
|
@ -30,4 +33,5 @@ async function main() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
await fs.writeFile(outputPath, html);
|
await fs.writeFile(outputPath, html);
|
||||||
|
await fs.writeJson(outputDataPath, { ligation: ligationData }, { spaces: " " });
|
||||||
}
|
}
|
||||||
|
|
20
verdafile.js
|
@ -736,8 +736,8 @@ const SampleImagesPre = task(`sample-images:pre`, async target => {
|
||||||
await cp(`${DIST}/${sparkle}`, `${SNAPSHOT_TMP}/${sparkle}`);
|
await cp(`${DIST}/${sparkle}`, `${SNAPSHOT_TMP}/${sparkle}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
const PackageSnapshotConfig = computed(`package-snapshot-image-config`, async target => {
|
const PackageSnapshotConfig = computed(`package-snapshot-config`, async target => {
|
||||||
const [plan] = await target.need(BuildPlans);
|
const [plan, sh] = await target.need(BuildPlans, SnapShotHtml);
|
||||||
const cfg = [];
|
const cfg = [];
|
||||||
for (const key in plan.buildPlans) {
|
for (const key in plan.buildPlans) {
|
||||||
const p = plan.buildPlans[key];
|
const p = plan.buildPlans[key];
|
||||||
|
@ -749,6 +749,18 @@ const PackageSnapshotConfig = computed(`package-snapshot-image-config`, async ta
|
||||||
name: key
|
name: key
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const de = JSON.parse(fs.readFileSync(`${sh.dir}/${sh.name}.data.json`));
|
||||||
|
for (const ls of de.ligation.nonMergeSets) {
|
||||||
|
cfg.push({
|
||||||
|
el: "#ligation-sampler",
|
||||||
|
applyClass: "iosevka",
|
||||||
|
applyFeature: `'${ls.tag}' ${ls.rank}`,
|
||||||
|
name: `ligset-${ls.tag}-${ls.rank}`,
|
||||||
|
applyCallback: `amend-ligset-sampler-contents`,
|
||||||
|
applyCallbackArgs: ls
|
||||||
|
});
|
||||||
|
}
|
||||||
return cfg;
|
return cfg;
|
||||||
});
|
});
|
||||||
const SnapShotJson = file(`${SNAPSHOT_TMP}/packaging-tasks.json`, async (target, out) => {
|
const SnapShotJson = file(`${SNAPSHOT_TMP}/packaging-tasks.json`, async (target, out) => {
|
||||||
|
@ -764,7 +776,8 @@ const SnapShotHtml = file(`${SNAPSHOT_TMP}/index.html`, async (target, out) => {
|
||||||
`node`,
|
`node`,
|
||||||
`utility/generate-snapshot-page/index.js`,
|
`utility/generate-snapshot-page/index.js`,
|
||||||
"snapshot-src/templates",
|
"snapshot-src/templates",
|
||||||
out.full
|
out.full,
|
||||||
|
`${out.dir}/${out.name}.data.json`
|
||||||
);
|
);
|
||||||
await run(`node`, `utility/amend-readme/index`, cm.full, cmi.full, cmo.full);
|
await run(`node`, `utility/amend-readme/index`, cm.full, cmi.full, cmo.full);
|
||||||
});
|
});
|
||||||
|
@ -797,7 +810,6 @@ const SampleImages = task(`sample-images`, async target => {
|
||||||
await target.need(
|
await target.need(
|
||||||
ScreenShot("charvars"),
|
ScreenShot("charvars"),
|
||||||
ScreenShot("languages"),
|
ScreenShot("languages"),
|
||||||
ScreenShot("ligations"),
|
|
||||||
ScreenShot("matrix"),
|
ScreenShot("matrix"),
|
||||||
ScreenShot("preview-all"),
|
ScreenShot("preview-all"),
|
||||||
ScreenShot("stylesets"),
|
ScreenShot("stylesets"),
|
||||||
|
|