diff options
author | خالد حسني <khaled@aliftype.com> | 2022-11-21 15:01:39 +0100 |
---|---|---|
committer | خالد حسني <khaled@aliftype.com> | 2022-11-21 19:58:22 +0100 |
commit | 1ff2f5fa2d8c353b0cad28317a696c2ba9a4aab5 (patch) | |
tree | f37182e9ff97df7a0e72625e26c280003e51cc92 /vcl/qa | |
parent | 4beea25b0797fe9c9acf05e9e4ef926d0726582a (diff) |
Revert "vcl: test getting glyph boundary rect from LogicalFontInstance"
This reverts commit 0cef06f0a2c0963e8c1579b78975710e6af4471c.
Reason for revert:
https://gerrit.libreoffice.org/c/core/+/141234/comments/89325e55_2271cfe8
> Stephan Bergmann:
>
> I saw the unrelated <https://gerrit.libreoffice.org/c/core/+/143026/1> fail its Jenkins <https://ci.libreoffice.org/job/gerrit_windows/140750/> build on tb88-win with
>
> C:/cygwin64/home/tdf/jenkins/workspace/gerrit_windows/vcl/qa/cppunit/logicalfontinstance.cxx(53) : error : Assertion
> Test name: VclLogicalFontInstanceTest::testglyphboundrect
> equality assertion failed
> - Expected: 51x82@(7,-80)
> - Actual : 50x82@(7,-80)
Change-Id: Idc4132adbaf0b051dcf955f3f1e7c44841c60117
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142928
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
Diffstat (limited to 'vcl/qa')
-rw-r--r-- | vcl/qa/cppunit/logicalfontinstance.cxx | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/vcl/qa/cppunit/logicalfontinstance.cxx b/vcl/qa/cppunit/logicalfontinstance.cxx deleted file mode 100644 index 56b9897f0589..000000000000 --- a/vcl/qa/cppunit/logicalfontinstance.cxx +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include <sal/config.h> - -#include <test/bootstrapfixture.hxx> -#include <cppunit/TestAssert.h> - -#include <vcl/virdev.hxx> -#include <vcl/font.hxx> - -#include <font/LogicalFontInstance.hxx> - -#include <memory> - -class VclLogicalFontInstanceTest : public test::BootstrapFixture -{ -public: - VclLogicalFontInstanceTest() - : BootstrapFixture(true, false) - { - } - - void testglyphboundrect(); - - CPPUNIT_TEST_SUITE(VclLogicalFontInstanceTest); - CPPUNIT_TEST(testglyphboundrect); - - CPPUNIT_TEST_SUITE_END(); -}; - -void VclLogicalFontInstanceTest::testglyphboundrect() -{ - ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT); - device->SetOutputSizePixel(Size(1000, 1000)); - device->SetFont(vcl::Font("Liberation Sans", Size(0, 110))); - - const LogicalFontInstance* pFontInstance = device->GetFontInstance(); - - tools::Rectangle aBoundRect; - const auto LATIN_SMALL_LETTER_B = 0x0062; - pFontInstance->GetGlyphBoundRect(pFontInstance->GetGlyphIndex(LATIN_SMALL_LETTER_B), aBoundRect, - false); -#ifdef MACOSX - CPPUNIT_ASSERT_EQUAL(tools::Rectangle(Point(7, -80), Size(51, 83)), aBoundRect); -#else - CPPUNIT_ASSERT_EQUAL(tools::Rectangle(Point(7, -80), Size(51, 82)), aBoundRect); -#endif -} - -CPPUNIT_TEST_SUITE_REGISTRATION(VclLogicalFontInstanceTest); - -/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |