Round width

This commit is contained in:
Belleve Invis 2020-06-06 23:06:23 -07:00
parent f669f56b15
commit 275fc23ba3
3 changed files with 4 additions and 3 deletions

View file

@ -24,7 +24,8 @@ module.exports = function (para) {
// Filtering
if (para.forceMonospace && para.spacing == 0) {
gs.glyphList = gs.glyphList.filter(g => !(g.advanceWidth > para.width));
for (const g of gs.glyphList) g.advanceWidth = Math.round(g.advanceWidth || 0);
gs.glyphList = gs.glyphList.filter(g => !(g.advanceWidth > Math.round(para.width)));
}
// Regulate