Round width
This commit is contained in:
parent
f669f56b15
commit
275fc23ba3
3 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue