Skip to content

Commit

Permalink
make sure there are no zero-area textures
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner committed Sep 7, 2018
1 parent fed4af0 commit b347921
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/render/glyph_atlas.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default class GlyphAtlas {
}

const {w, h} = potpack(bins);
const image = new AlphaImage({width: w, height: h});
const image = new AlphaImage({width: w || 1, height: h || 1});

for (const stack in stacks) {
const glyphs = stacks[stack];
Expand Down
2 changes: 1 addition & 1 deletion src/render/image_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class ImageManager {
const {w, h} = potpack(bins);

const dst = this.atlasImage;
dst.resize({width: w, height: h});
dst.resize({width: w || 1, height: h || 1});

for (const id in this.patterns) {
const {bin} = this.patterns[id];
Expand Down

0 comments on commit b347921

Please sign in to comment.