Skip to content

Commit d574c90

Browse files
committed
stroke metrics
1 parent 94e1eb9 commit d574c90

File tree

4 files changed

+40
-46
lines changed

4 files changed

+40
-46
lines changed

src/fonts/bravura_metrics.ts

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -444,24 +444,22 @@ export const BravuraMetrics = {
444444
scale: 1.0,
445445
},
446446
},
447-
stroke: {
447+
stroke_straight: {
448448
arrowheadBlackDown: {
449-
straight: {
450-
shiftX: -4.5,
451-
},
452-
wiggly: {
453-
shiftX: -1,
454-
shiftY: 1,
455-
},
449+
shiftX: -4.5,
456450
},
457451
arrowheadBlackUp: {
458-
straight: {
459-
shiftX: -0.85,
460-
},
461-
wiggly: {
462-
shiftX: -1,
463-
shiftY: 1,
464-
},
452+
shiftX: -0.85,
453+
},
454+
},
455+
stroke_wiggly: {
456+
arrowheadBlackDown: {
457+
shiftX: -1,
458+
shiftY: 1,
459+
},
460+
arrowheadBlackUp: {
461+
shiftX: -1,
462+
shiftY: 1,
465463
},
466464
},
467465
textNote: {

src/fonts/leland_metrics.ts

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -440,24 +440,22 @@ export const LelandMetrics = {
440440
scale: 1.0,
441441
},
442442
},
443-
stroke: {
443+
stroke_straight: {
444444
arrowheadBlackDown: {
445-
straight: {
446-
shiftX: -4.5,
447-
},
448-
wiggly: {
449-
shiftX: -1,
450-
shiftY: 1,
451-
},
445+
shiftX: -4.5,
452446
},
453447
arrowheadBlackUp: {
454-
straight: {
455-
shiftX: -0.85,
456-
},
457-
wiggly: {
458-
shiftX: -1,
459-
shiftY: 1,
460-
},
448+
shiftX: -0.85,
449+
},
450+
},
451+
stroke_wiggly: {
452+
arrowheadBlackDown: {
453+
shiftX: -1,
454+
shiftY: 1,
455+
},
456+
arrowheadBlackUp: {
457+
shiftX: -1,
458+
shiftY: 1,
461459
},
462460
},
463461
textNote: {

src/fonts/petaluma_metrics.ts

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -468,24 +468,22 @@ export const PetalumaMetrics = {
468468
scale: 1.0,
469469
},
470470
},
471-
stroke: {
471+
stroke_straight: {
472472
arrowheadBlackDown: {
473-
straight: {
474-
shiftX: -4.5,
475-
},
476-
wiggly: {
477-
shiftX: -1,
478-
shiftY: 1,
479-
},
473+
shiftX: -4.5,
480474
},
481475
arrowheadBlackUp: {
482-
straight: {
483-
shiftX: -0.85,
484-
},
485-
wiggly: {
486-
shiftX: -1,
487-
shiftY: 1,
488-
},
476+
shiftX: -0.85,
477+
},
478+
},
479+
stroke_wiggly: {
480+
arrowheadBlackDown: {
481+
shiftX: -1,
482+
shiftY: 1,
483+
},
484+
arrowheadBlackUp: {
485+
shiftX: -1,
486+
shiftY: 1,
489487
},
490488
},
491489
textNote: {

src/strokes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ export class Stroke extends Modifier {
233233

234234
// Draw the arrow head
235235
Glyph.renderGlyph(ctx, x + this.x_shift + arrow_shift_x, arrow_y, this.render_options.font_scale, arrow, {
236-
category: `stroke.${arrow}.${strokeLine}`,
236+
category: `stroke_${strokeLine}.${arrow}`,
237237
});
238238

239239
// Draw the rasquedo "R"

0 commit comments

Comments
 (0)