Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cmake/MpVerovio.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ if(MP_VEROVIO_CCACHE_DIR)
endif()
# Third-party code: its warnings are not ours to act on.
if(MSVC)
target_compile_options(mp_verovio PRIVATE /W0 /bigobj /O1 /Gy /Gw)
# /utf-8: its sources hold UTF-8 text, such as the dashes round a page
# number and the accidentals of a chord symbol, which MSVC otherwise reads
# in the system code page.
target_compile_options(mp_verovio PRIVATE /W0 /bigobj /O1 /Gy /Gw /utf-8)
# Unused functions and data left out, and identical ones folded. The
# release default already, unless a configuration asks for debug
# information; stated so that one does too.
Expand Down
10 changes: 10 additions & 0 deletions tests/test_score.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,16 @@ class ScoreEngraverTest final : public mp::test::Test {
size_t notes = 0;
for (int p = 1; p <= eng.pageCount(); ++p) notes += countOf(eng.renderPage(p), "class=\"note\"");
MP_CHECK(notes == 6, "no note is lost when the page narrows");
// The second page's number sits between two en dashes, U+2013.
{
mp::ScoreEngraver trio(MP_TEST_SCORE_DATA_DIR);
trio.setPage(300, 300, 100);
MP_CHECK(trio.load(readScoreFixture("organ-trio.musicxml")) && trio.pageCount() >= 2,
"the trio on a small page takes several pages, got " + std::to_string(trio.pageCount()));
const std::string second = trio.renderPage(2);
MP_CHECK(second.find("\xe2\x80\x93") != std::string::npos && second.find("\xc3\xa2") == std::string::npos,
"the page number's dashes are en dashes");
}

MP_CHECK(!eng.midiBase64().empty(), "the score is given as MIDI");
MP_CHECK(eng.timemapJson().find("tstamp") != std::string::npos, "and as a time map");
Expand Down
Loading