0xfe / vexflow

A JavaScript library for rendering music notation and guitar tablature.
http://www.vexflow.com
Other
3.88k stars 661 forks source link

bad dots position (Y) for rest note #607

Closed sug1no closed 6 years ago

sug1no commented 6 years ago

pls refer to the following test:

https://jsfiddle.net/47mxtjsf/

vexflow dot line for rest note is differenct from {finale, museScore}: image

b346a917125ab4b57bd5eaa28e3dd8de07818fbe fix #288 but ignore Vex.Flow.durationToGlyph.duration_codes[*].type.r.dot_shiftY (https://github.com/0xfe/vexflow/blob/e107adf1b7c4512b4ec73d46b0e607332b5535b8/src/tables.js#L744) values(applied to Dot at https://github.com/0xfe/vexflow/blob/58aafbf34c6a63908e82692302ad2c2ea2a00b57/src/stavenote.js#L810)

0xfe commented 6 years ago

Thanks -- I think this is a straightforward fix, but will look into it when I get a chance.

mscuthbert commented 6 years ago

The Finale behavior may be a font issue; in my version of F25 the dot is perfectly centered, which is I believe the right behavior.

sug1no commented 6 years ago

@mscuthbert san agree with you. my environment is {Kousaku, finale25, windows10}.

I think the problem is as follows :

gristow commented 6 years ago

I've tracked the problem down to the format method in Dot.js, where regardless of what dot_shiftY had been set to, it is overwritten: https://github.com/0xfe/vexflow/blob/d8763b9cb030c94208cd45a38b878d4efc6e40e1/src/dot.js#L75

@0xfe do you still want to take this one, or should I go after it? (It'll take me a bit to dig into what the code around this is doing...)

0xfe commented 6 years ago

@gristow Thanks for tracking it down. I'm unfortunately too swamped to look at it right now, however will eventually get to it if no one else does first.

gristow commented 6 years ago

No worries, @0xfe. It turned out to be a one character fix.