Skip to content

Commit 1f610fe

Browse files
committed
Align markers horizontally
1 parent 386a829 commit 1f610fe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function atlas(options) {
113113
var data = sdf.draw(chars[i])
114114

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

118118
x += step[0]
119119
if (x > shape[0] - step[0]) {

test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ let opts = {
1010
family: 'sans-serif',
1111
size: 64,
1212
// chars: [100, 120]
13-
chars: ['●','#','✝','+', 'xyz', '▲', '▼', '_']
13+
chars: '◣●#◢✝+xyz▲▼_'.split('')
1414
}
1515
function update (o) {
1616
console.time('sdf')

0 commit comments

Comments
 (0)