Skip to content

Commit

Permalink
Merge pull request #1533 from rvilarl/fix/1528
Browse files Browse the repository at this point in the history
point fixed on ornaments and text notes
  • Loading branch information
rvilarl authored Mar 18, 2023
2 parents 577939d + e2480b9 commit bcae216
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 55 deletions.
58 changes: 4 additions & 54 deletions src/fonts/common_metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,47 +382,6 @@ export const CommonMetrics = {
},
clefNote_default: {},
clefNote_small: {},
ornament: {
ornamentTurn: {
scale: 1.2,
},
ornamentTurnSlash: {
scale: 1.2,
},
brassScoop: {
scale: 1.0,
},
brassDoitMedium: {
scale: 1.0,
},
brassFallLipShort: {
scale: 1.0,
},
brassLiftMedium: {
scale: 1.0,
},
brassFallRoughMedium: {
scale: 1.0,
},
brassBend: {
scale: 1.0,
},
brassMuteClosed: {
scale: 1.0,
},
brassMuteOpen: {
scale: 1.0,
},
brassFlip: {
scale: 1.0,
},
brassJazzTurn: {
scale: 1.0,
},
brassSmear: {
scale: 1.0,
},
},
stroke_straight: {
arrowheadBlackDown: {
shiftX: -4.5,
Expand All @@ -442,34 +401,25 @@ export const CommonMetrics = {
},
},
textNote: {
point: 34,
point: 39,
breathMarkTick: {
point: 36,
shiftY: 9,
},
breathMarkComma: {
point: 36,
},
breathMarkComma: {},
segno: {
point: 30,
shiftX: -7,
shiftY: 8,
},
coda: {
point: 20,
shiftX: -7,
shiftY: 8,
},
ornamentTrill: {
shiftX: -8,
shiftY: 8,
},
ornamentTurn: {
point: 42,
},
ornamentTurnSlash: {
point: 42,
},
ornamentTurn: {},
ornamentTurnSlash: {},
ornamentMordent: {
shiftX: -8,
},
Expand Down
3 changes: 2 additions & 1 deletion src/textnote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import { Font, FontInfo, FontStyle, FontWeight } from './font';
import { Glyph } from './glyph';
import { Note, NoteStruct } from './note';
import { Tables } from './tables';
import { Category } from './typeguard';
import { RuntimeError } from './util';

Expand Down Expand Up @@ -133,7 +134,7 @@ export class TextNote extends Note {
const struct = TextNote.GLYPHS[noteStruct.glyph];
if (!struct) throw new RuntimeError('Invalid glyph type: ' + noteStruct.glyph);

this.glyph = new Glyph(struct.code, 40, { category: 'textNote' });
this.glyph = new Glyph(struct.code, Tables.NOTATION_FONT_SCALE, { category: 'textNote' });
this.setWidth(this.glyph.getMetrics().width);
} else {
this.glyph = undefined;
Expand Down

0 comments on commit bcae216

Please sign in to comment.