Minor optimization of references -- now spaces will not be referenced.
This commit is contained in:
parent
6459be6f68
commit
2a9be6e815
6 changed files with 56 additions and 49 deletions
|
@ -3,6 +3,15 @@ import { Nwid, Wwid } from "@iosevka/glyph/relation";
|
|||
import { gcFont } from "./gc.mjs";
|
||||
import { finalizeGlyphs } from "./glyphs.mjs";
|
||||
|
||||
export function finalizeFont(cache, para, glyphStore, excludedCodePoints, restFont) {
|
||||
assignGrAndCodeRank(glyphStore, Wwid, Nwid);
|
||||
assignSubRank(glyphStore);
|
||||
glyphStore = gcFont(glyphStore, excludedCodePoints, restFont);
|
||||
glyphStore = finalizeGlyphs(cache, para, glyphStore);
|
||||
validateMonospace(para, glyphStore);
|
||||
return glyphStore;
|
||||
}
|
||||
|
||||
function assignGrAndCodeRank(glyphStore, ...flatteners) {
|
||||
for (const g of glyphStore.glyphs()) {
|
||||
g.codeRank = 0xffffffff;
|
||||
|
@ -32,11 +41,3 @@ function validateMonospace(para, glyphStore) {
|
|||
throw new Error("Unreachable! Building monospace with more than 2 character widths");
|
||||
}
|
||||
}
|
||||
export function finalizeFont(cache, para, glyphStore, excludedCodePoints, restFont) {
|
||||
assignGrAndCodeRank(glyphStore, Nwid, Wwid);
|
||||
assignSubRank(glyphStore);
|
||||
glyphStore = gcFont(glyphStore, excludedCodePoints, restFont);
|
||||
glyphStore = finalizeGlyphs(cache, para, glyphStore);
|
||||
validateMonospace(para, glyphStore);
|
||||
return glyphStore;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue