diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-02-04 15:13:28 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-02-05 20:04:11 +0100 |
commit | 1a4955f2c1158197db74d7cf4f1f0c98c096224c (patch) | |
tree | fcf4253aade24813d4b5dc8fba2a2b21f1a6f234 /vcl/qa | |
parent | 5f4ebedcd010f8248d9eea93bd36142a64820fe5 (diff) |
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 <caolanm@redhat.com>
Diffstat (limited to 'vcl/qa')
-rw-r--r-- | vcl/qa/cppunit/text.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
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); |