Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116410 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 94485 invoked from network); 16 Nov 2021 11:45:40 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 16 Nov 2021 11:45:40 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C37261804BC for ; Tue, 16 Nov 2021 04:40:33 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS8560 212.227.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 16 Nov 2021 04:40:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1637066431; bh=dyXTnY4eNEmRSYwAo+KeunXNOqyitBtE3jZ7kUzFPII=; h=X-UI-Sender-Class:Date:Subject:To:References:From:In-Reply-To; b=irefhnxRFWYwUAg1ALd+YOXHERK5YfzZFgk673w2a5rWAaQtgvYtHSq5fyyGPLHgR SZD0LvW00O8CCWmtOEJw6o3b58oObNkGUcIslvB4GQoGQFPGnjC1uPxGIuaQPfax3z GlTOj07FhSJJnK5kQZfHG+dq+b7/PIVyVmXBrE9o= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.2.130] ([79.222.46.182]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N63VY-1mbsyk3yfo-016NrV; Tue, 16 Nov 2021 13:40:31 +0100 Message-ID: <414d3a8a-804d-dd48-65e8-82871db38108@gmx.de> Date: Tue, 16 Nov 2021 13:40:30 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Content-Language: de-DE To: =?UTF-8?Q?C=c3=b4me_Chilliet?= , internals@lists.php.net References: <2082929.irdbgypaU6@come-prox15amd> In-Reply-To: <2082929.irdbgypaU6@come-prox15amd> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:ACErlVVYVFIp3wrbBca+yhyJPoNIocHI2fpHS59nd2NH8pQTYza hKSn9Qi0eBiGX6KTrwFQOPKXdHGc+CDFmw2XqNr0aUkiZxUkn8IYYI7BE2dV3UxZQMgyQD6 bF7v9pLM4o7fSBWziym7KETb4RnwxzZBH3RHdOhY5GsXPhRC3k0QaO5Jj2Kiphlqfhhc7W5 vFUAkwlr/+zaUG1dDHcZA== X-UI-Out-Filterresults: notjunk:1;V03:K0:zf7UkBt2POE=:2D0Bo9Tdvc2pYv4I1Zzuew NFxyiDWeqSah6ePMM9LRHeY1bW862mX98yE7XCce+8ilDIoJIcFjgLyXYL+I51vP8iwCR9NM0 saPBgpVM/rs8Exv+j8TkF2OQoFQQTz35t1QO0ZTyb2dugutniwLWD0/vYVRgWmz9fuXeTrqTb tNgtOSMlAeAdZwF2wc4fyzHDnIIZzhyE3YGixfFWt0KQO3bZz02ZisQbNTMcIHaWlwb0x4rzy Sm6DS/81bctnu4NvWrdl965iXxCmRBCWBUblNGr4Xh3QnglqqT6/99yOYwZKF/RUMWrE/Chte 1mfbwTujzBmsKygOl3fSKS7y9MCIVx3jgVYq2MgHIi+ZrRc1OAqIJF17M4ul1ZOqfekMqRU6A rqMK+L4OorUwdPoHp7kBXOOZmkGAcpDoar1jAhjHiIEJLS/ELI5sG4MqRLj2VJtIMZHCsS4TZ 4X/Km+VMTWj5mFrku07vKamHGkVnoTdAnvsvuPjZ/6jfW6wAmv045zHW5kswu8B6QqXj6pjZQ RSPONwkAVFuKLA6DIufFK/vYsklMMA3X9df51EOIrE1AmCZ9N/E32YC6q+KjZ/uPn9m83SKvF Sd3v+lNyZcs8i2QCCzGlA1yTegi3Rva83Lly8mptJXalfv1uTk6LoDY9EkLsTK5FPleI8NG92 /WTb3x5YCkT5BT9C+q9xGJ0wuGs9WZZUamfLqZIzdgz1OtslCiVBw3PAanybKoTokcjHk7m5d V3ZkaKGGHRqdGjJ4d/IZke20H1fqWArD3DjBx0vp5nJ7f6h1ARvV7CcpPnkijaJdrZOuNAWO3 FQ08I+9mw9HQvImyE8gDTmUT2m1ZC67edYUFaOhkdo2ivDJvofWUe8nInDdsLSNWbNDtyoa7h sXby4cOFnlwvTCXdGKQ4iLqgQ+NOaqex0gmFoACAsLtVc4gjGS5SdnyPQZ8Z9E/Olv6f7HmJk boc7P6ZdjDvhsRbzCR/7tFntMdIDyPOp6JpOOZG73SWHzp02LAjL8Vh0c9NwcPO478z2Cy1R/ 22HrTHykPa/lk/KCTVm8RBMWPaZIij/jazIVVyMTjcbOmuP7yFOoCSmX2cEks+juSjhmOHySR ePw+6opo0UG6tc= Subject: Re: [PHP-DEV] PHP 8.1.0RC6 available for testing From: cmbecker69@gmx.de ("Christoph M. Becker") On 16.11.2021 at 13:11, C=C3=B4me Chilliet wrote: > I have a difference in behavior between PHP 8.1 RC6 and my system PHP fo= r the function imagettfbbox. > It is hard to know if this is a problem with 8.1 really because I had to= download and build imagick through pecl to be able to run this. imagettfbbox() is part of ext/gd which is a bundled extension. It has nothing to do with imagick (besides both are for image manipulation). > $font =3D '/usr/share/fonts/truetype/noto/NotoSans-Regular.ttf'; > var_dump(imagettfbbox(12, 0, $font, 'E')); > > The result for running this is: > $ ~/dev/php-src-git/sapi/cli/php ~/dev/test-freetype.php > array(8) { > [0]=3D> > int(1) > [1]=3D> > int(0) > [2]=3D> > int(8) > [3]=3D> > int(0) > [4]=3D> > int(8) > [5]=3D> > int(-12) > [6]=3D> > int(1) > [7]=3D> > int(-12) > } > $ php ~/dev/test-freetype.php > array(8) { > [0]=3D> > int(0) > [1]=3D> > int(1) > [2]=3D> > int(10) > [3]=3D> > int(1) > [4]=3D> > int(10) > [5]=3D> > int(-12) > [6]=3D> > int(0) > [7]=3D> > int(-12) > } > > As you can see the resulting bounding box is not the same, for the same = font. This messes up our avatar generation, which ends up a few pixels wro= ng on the centering of the initial in the image. > > Does anyone knows where this can come from, and if by changing how I bui= ld/link imagick I can get the same result on both binaries? This might be due to different libfreetype, libgd or libraqm versions (or possibly libraqm wasn't enabled for one of the builds), or because one build used system libgd and the other used the bundled GD. =2D- Christoph M. Becker