Fix off by one error in glyph atlas rects

This commit is contained in:
Patrick Walton 2017-08-24 19:39:07 -07:00
parent cae6e16416
commit d24dd7ce24
1 changed files with 3 additions and 3 deletions

View File

@ -2049,12 +2049,12 @@ class Atlas {
const glyphRect = glmatrix.vec4.fromValues(nextOrigin[0] + 1,
nextOrigin[1] + 1,
nextOrigin[0] + glyphSize[0] + 2,
nextOrigin[1] + glyphSize[1] + 2);
nextOrigin[0] + glyphSize[0] + 1,
nextOrigin[1] + glyphSize[1] + 1);
glyph.setAtlasRect(glyphRect);
nextOrigin[0] = glyphRect[2];
nextOrigin[0] = glyphRect[2] + 1;
shelfBottom = Math.max(shelfBottom, glyphRect[3]);
}