Skip to content

Commit

Permalink
Align markers horizontally
Browse files Browse the repository at this point in the history
  • Loading branch information
dy committed Jun 13, 2017
1 parent 386a829 commit 1f610fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function atlas(options) {
var data = sdf.draw(chars[i])

// ctx.putImageData(data, x + diff[0]*scale, y + diff[1]*scale, 0, -diff[1]*scale, data.width, data.height)
ctx.putImageData(data, x, y)
ctx.putImageData(data, x + diff[0]*scale, y)

x += step[0]
if (x > shape[0] - step[0]) {
Expand Down
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let opts = {
family: 'sans-serif',
size: 64,
// chars: [100, 120]
chars: ['●','#','✝','+', 'xyz', '▲', '▼', '_']
chars: '◣●#◢✝+xyz▲▼_'.split('')
}
function update (o) {
console.time('sdf')
Expand Down

0 comments on commit 1f610fe

Please sign in to comment.