vcl/qa/cppunit/text.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
New commits: commit 1a4955f2c1158197db74d7cf4f1f0c98c096224c Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Feb 4 15:13:28 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sat Feb 5 20:04:11 2022 +0100 this test assumes KacstBook has no Latin glyphs which is true for the one bundled with LibreOffice but is not true for the fedora one (kacst-book-fonts-2.0-26.fc35), but neither of them have Cyrillic glyphs Change-Id: Ide8b84502886c7b9e0bc4fcef4685b4b89ec2bc3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129494 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/qa/cppunit/text.cxx b/vcl/qa/cppunit/text.cxx index 072a0d0a1f98..5ab706045606 100644 --- a/vcl/qa/cppunit/text.cxx +++ b/vcl/qa/cppunit/text.cxx @@ -684,13 +684,14 @@ void VclTextTest::testImplLayoutArgsRightAlign() void VclTextTest::testImplLayoutArgs_PrepareFallback_precalculatedglyphs() { - // this font has no latin characters and thus needs fallback + // this font has no Cyrillic characters and thus needs fallback const vcl::Font aFont("KacstBook", Size(0, 36)); ScopedVclPtrInstance<VirtualDevice> pVirDev; pVirDev->SetFont(aFont); - const OUString sTestString = "The quick\n jumped over"; + const OString sUTF8String(u8"Тхе яуицк\n ыумпед овер"); + const OUString sTestString(OUString::fromUtf8(sUTF8String)); std::unique_ptr<SalLayout> pLayout = pVirDev->ImplLayout(sTestString, 0, sTestString.getLength(), Point(0, 0), 0, {}, SalLayoutFlags::GlyphItemsOnly); @@ -698,7 +699,8 @@ void VclTextTest::testImplLayoutArgs_PrepareFallback_precalculatedglyphs() SalLayoutGlyphsImpl* pGlyphsImpl = aGlyphs.Impl(1); vcl::text::ImplLayoutArgs aArgs(sTestString, 0, sTestString.getLength(), - SalLayoutFlags::BiDiRtl, LanguageTag(LANGUAGE_LATIN), nullptr); + SalLayoutFlags::BiDiRtl, LanguageTag(LANGUAGE_RUSSIAN), + nullptr); aArgs.PrepareFallback(pGlyphsImpl);