Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I discovered an error in the changes made in commit 03a6cbc5a5187e90f265b11841854afd9cfe7c54. The issue is that the scaling factor was not added to the symbol: #1755

Closed
goodgame365 opened this issue Nov 16, 2024 · 1 comment · Fixed by #1772

Comments

@goodgame365
Copy link

I discovered an error in the changes made in commit 03a6cbc. The issue is that the scaling factor was not added to the symbol:

at:\src\rendering\glyphs\SustainPedalGlyph.ts

if (marker.pedalType === SustainPedalMarkerType.Down) { canvas.fillMusicFontSymbol(markerX, y + h, 1, MusicFontSymbol.KeyboardPedalPed, true); linePadding = (SustainPedalGlyph.TextWidth / 2) * this.scale + SustainPedalGlyph.TextLinePadding * this.scale; } else if (marker.pedalType === SustainPedalMarkerType.Up) { canvas.fillMusicFontSymbol(markerX, y + h, 1, MusicFontSymbol.KeyboardPedalUp, true);

In this part, the line:
canvas.fillMusicFontSymbol(markerX, y + h, 1, MusicFontSymbol.KeyboardPedalPed, true);

should be changed to:
canvas.fillMusicFontSymbol(markerX, y + h, this.scale, MusicFontSymbol.KeyboardPedalPed, true);

Similarly, the latter part should also change 1 to this.scale.

Originally posted by @goodgame365 in #1753

@goodgame365
Copy link
Author

goodgame365 commented Nov 16, 2024

The situation is that, for the scaling ratio, when scaled to 0.5, this symbol does not shrink accordingly, as shown in the figure.

test.zip

1、 This is the state without scaling:

1

2、This is the state scaled down by 50%.:
2

I think this is the correct one. like this img

normal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant