diff --git a/src/view_element.cpp b/src/view_element.cpp index 1608a8c4867..9b2cc39a933 100644 --- a/src/view_element.cpp +++ b/src/view_element.cpp @@ -1743,7 +1743,9 @@ void View::DrawSyl(DeviceContext *dc, LayerElement *element, Layer *layer, Staff return; } - syl->SetDrawingYRel(this->GetSylYRel(syl->m_drawingVerse, staff)); + if (m_doc->IsFacs()) { + syl->SetDrawingYRel(this->GetSylYRel(syl->m_drawingVerse, staff)); + } dc->StartGraphic(syl, "", syl->GetID()); dc->DeactivateGraphicY(); diff --git a/src/view_text.cpp b/src/view_text.cpp index ff281247add..f1f30653f9c 100644 --- a/src/view_text.cpp +++ b/src/view_text.cpp @@ -271,21 +271,21 @@ void View::DrawLyricString( std::u32string syl = U""; std::u32string lyricStr = str; - const int x = (params) ? params->m_x : VRV_UNSET; - const int y = (params) ? params->m_y : VRV_UNSET; + const int dcX = (params) ? ToDeviceContextX(params->m_x) : VRV_UNSET; + const int dcY = (params) ? ToDeviceContextY(params->m_y) : VRV_UNSET; const int width = (params) ? params->m_width : VRV_UNSET; const int height = (params) ? params->m_height : VRV_UNSET; if (m_doc->GetOptions()->m_lyricElision.GetValue() == ELISION_unicode) { std::replace(lyricStr.begin(), lyricStr.end(), U'_', UNICODE_UNDERTIE); - dc->DrawText(UTF32to8(lyricStr), lyricStr, x, y, width, height); + dc->DrawText(UTF32to8(lyricStr), lyricStr, dcX, dcY, width, height); } else { while (lyricStr.compare(syl) != 0) { wroteText = true; auto index = lyricStr.find_first_of(U"_"); syl = lyricStr.substr(0, index); - dc->DrawText(UTF32to8(syl), syl, x, y, width, height); + dc->DrawText(UTF32to8(syl), syl, dcX, dcY, width, height); // no _ if (index == std::string::npos) break; @@ -298,7 +298,7 @@ void View::DrawLyricString( bool isFallbackNeeded = (m_doc->GetResources()).IsSmuflFallbackNeeded(elision); vrvTxt.SetSmuflWithFallback(isFallbackNeeded); dc->SetFont(&vrvTxt); - dc->DrawText(UTF32to8(elision), elision, x, y, width, height); + dc->DrawText(UTF32to8(elision), elision, dcX, dcY, width, height); dc->ResetFont(); // next syllable @@ -310,7 +310,8 @@ void View::DrawLyricString( // This should only be called in facsimile mode where a zone is specified but there is // no text. This draws the bounds of the zone but leaves the space blank. if (!wroteText && params) { - dc->DrawText("", U"", params->m_x, params->m_y, params->m_width, params->m_height); + dc->DrawText( + "", U"", ToDeviceContextX(params->m_x), ToDeviceContextY(params->m_y), params->m_width, params->m_height); } }