* Fixed mapping for U+028C, U+034D.

* Fixed the thickness of thick arrows under full width.
 * Fixed missing `TM` and `SM` symbol.
 * Fixed weight of dotted numbers.
 * Fix APL symbols' metric under Aile.
This commit is contained in:
Belleve Invis 2020-04-01 19:18:14 -07:00
parent 39fd7db0c0
commit 0ce2397179
16 changed files with 551 additions and 152 deletions

View file

@ -0,0 +1,39 @@
const blockData = require("./block-data");
const ucdNames = require("unicode-13.0.0/Names");
const ugc = require("unicode-13.0.0/General_Category");
module.exports = function(rawCov) {
const result = [];
const inFontCharSet = new Set(rawCov.keys());
for (const [[lchBlockStart, lchBlockEnd], block] of blockData) {
let blockResults = [];
let processed = new Set();
for (const [lchFont, [gn, ck]] of rawCov) {
if (lchFont < 0x20 || lchFont < lchBlockStart || lchFont > lchBlockEnd) continue;
const lchStart = (lchFont >>> 4) << 4;
const lchEnd = lchStart + 0x10;
for (let lch = lchStart; lch < lchEnd; lch++) {
if (processed.has(lch)) continue;
const chName = ucdNames.get(lch);
const gc = ugc.get(lch);
blockResults.push({
lch,
charName: chName,
glyphName: inFontCharSet.has(lch) ? gn : undefined,
gc,
ck,
inFont: inFontCharSet.has(lch)
});
processed.add(lch);
}
}
if (blockResults.length) {
result.push({
name: block,
characters: blockResults.sort((a, b) => a.lch - b.lch)
});
}
}
return result;
};