verovio
verovio copied to clipboard
adjustPageWidth & different system widths
Describe the problem
I don't know if I'm missing something here, but the adjustPageWidth
option results in different system widths.
To Reproduce I'm sharing a minimal example, based on the First Steps tutorial:
<html>
<head>
<script src="http://www.verovio.org/javascript/latest/verovio-toolkit-wasm.js" defer></script>
<script>
document.addEventListener("DOMContentLoaded", (event) => {
Module.onRuntimeInitialized = async _ => {
let tk = new verovio.toolkit();
console.log("Verovio has loaded!");
tk.setOptions({
scale: 30,
adjustPageWidth: true
});
fetch("https://www.verovio.org/examples/downloads/Schubert_Lindenbaum.mei")
.then( (response) => response.text() )
.then( (meiXML) => {
let svg = tk.renderData(meiXML, {});
document.getElementById("notation").innerHTML = svg;
});
}
});
</script>
</head>
<body>
<h1>Hello Verovio!</h1>
<div id="notation"></div>
</body>
</html>
Expected behavior I'm sharing screen captures of both the un-aligned and expected results.
Verovio information
- Latest version, 3.11.0, JavaScript toolkit
Environment information (as appropriate)
- Windows 10, Chrome 103
By using adjustPageWidth
you're saying explicitly "don't justify the system, and cut off whitespace".
It should be used for single system layouts only, see the original issue #272.
It's not a bug, it's a feature.
Ok then. In that case, shouldn't the docs be more specific? I didn't find that obvious at all...
Maybe it would be a good idea to throw a warning if you mix incompatible features?
That seems appropriate.
Done here