From nobody Sun Apr 16 21:11:10 2023 X-Original-To: dev-commits-ports-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q02sp5GNcz44kCD; Sun, 16 Apr 2023 21:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q02sp20bgz4Q1f; Sun, 16 Apr 2023 21:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681679470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mSCezztE4htIEClgou5YBZHvovsnsrx0twkbRQH0hrY=; b=gT0f/LoCjOp9/mn4zk24vP0EsuIuVUUafaJzy8nE4zQCbUSsbt7Ya1+yDAv1uwYbbbv5IZ aK03WKyRHnytLJN9+8g6o+d26clocOreqTfOueqyINtz8GOgrFdwdpctw2v3oWpxJxkUSn Kr0FKtSoAvVIr1KQTvrFl/+suFUgScTfkWfDrbFEGVK+xTEpnixhs9vtlmJxp2UadYofK9 LZJ7MabwSpVF9WqGL5kIV0S7hClOvIimu/Py63YQmxYmRTdrHkCTms4HBo0gfYMb/gmSrK sbR1Pa+SL/URJAJlOC3Gkhsu3PSoSXKuNeYYFKEhouGiU8aFmVa0kM74CQ6oRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681679470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mSCezztE4htIEClgou5YBZHvovsnsrx0twkbRQH0hrY=; b=B2MMWTwuNGWqnGft1bT0Jaz38+ISrY1QbZtruhSAZX1mMm871+ADza4xO4okiho8P6P7UE jes2ImJQ/ZBcDCK6g+r9NoUHuaMU3Auj5z73uFG9sU7HB/cekN3v5INom9WzmhMq/IutlU jbqiu/LKqPMXxdMGW3k8Mj75cS3Q9iMlN1xSculRabT/1fESgi6wC1JHmQ1yvgNcv241yl tJ2wYHP/ZAk00x20UUdJXWvaOR8SwXAIAd8b/3HnjynOc9NxAPBaveDpjlHdOYOP2AuAhw E+wOQmqIM7o9t977OickEXL5j49w0pl8ugVqtQ6J5+beH+aFnYyMLs4IeRKf8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681679470; a=rsa-sha256; cv=none; b=mswccrzA30lhZg0foDd7AKSgd5FsUj8wZxUL7V9CKCjIBGA7yXOgyTsh6T8lIAylf2gcAb d8hYZcxniADY5ZtNGfx15pgYwdsxb8ZK/ux5aT5gWGJUWcVNpl8lmHU6SN1YDdYkYPZb8+ EsgOsr757EhEarYYZQDtqVRdUEMBm0aOFvu8eFnEvikl/e7gPpibWSSfVj0QtBaNBSfa1d dSc1Pjkos58Eph0qpF55JDNP4SWbEVuHVZQWVbOw/cLH4k4/KsLfLniMcgz/sb+bOexg4h aJG0EQYfu32qUkFYNtqbfLCdIKkJscpnump9oRns8c5vCe6G2DRQGMxTvY4bJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q02sp16Ssz12kS; Sun, 16 Apr 2023 21:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33GLBA5C036551; Sun, 16 Apr 2023 21:11:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33GLBA1r036550; Sun, 16 Apr 2023 21:11:10 GMT (envelope-from git) Date: Sun, 16 Apr 2023 21:11:10 GMT Message-Id: <202304162111.33GLBA1r036550@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Christoph Moench-Tegeder Subject: git: e8ff22a7cd5b - 2023Q2 - www/firefox: fix fonts becoming transparent in some configurations List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-branches@freebsd.org X-BeenThere: dev-commits-ports-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cmt X-Git-Repository: ports X-Git-Refname: refs/heads/2023Q2 X-Git-Reftype: branch X-Git-Commit: e8ff22a7cd5b92f100de73c466faf769802ff705 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch 2023Q2 has been updated by cmt: URL: https://cgit.FreeBSD.org/ports/commit/?id=e8ff22a7cd5b92f100de73c466faf769802ff705 commit e8ff22a7cd5b92f100de73c466faf769802ff705 Author: Christoph Moench-Tegeder AuthorDate: 2023-04-16 21:06:47 +0000 Commit: Christoph Moench-Tegeder CommitDate: 2023-04-16 21:10:55 +0000 www/firefox: fix fonts becoming transparent in some configurations https://bugzilla.mozilla.org/show_bug.cgi?id=1827950 PR: 270695 (cherry picked from commit 6ffeab7ede9450a397417f4ba6b878a793a47804) --- www/firefox/Makefile | 1 + www/firefox/files/patch-bug1827950 | 51 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/www/firefox/Makefile b/www/firefox/Makefile index 9d2daf8d1b2b..6cd9cd0d5570 100644 --- a/www/firefox/Makefile +++ b/www/firefox/Makefile @@ -1,5 +1,6 @@ PORTNAME= firefox DISTVERSION= 112.0.1 +PORTREVISION= 1 PORTEPOCH= 2 CATEGORIES= www wayland MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}${DISTVERSIONSUFFIX}/source \ diff --git a/www/firefox/files/patch-bug1827950 b/www/firefox/files/patch-bug1827950 new file mode 100644 index 000000000000..d00147a7380e --- /dev/null +++ b/www/firefox/files/patch-bug1827950 @@ -0,0 +1,51 @@ +diff --git gfx/thebes/gfxFont.cpp gfx/thebes/gfxFont.cpp +--- gfx/thebes/gfxFont.cpp ++++ gfx/thebes/gfxFont.cpp +@@ -2467,11 +2467,19 @@ + fontParams.extraStrikes = 0; + } + + // Figure out the maximum extents for the font, accounting for synthetic + // oblique and bold. +- fontParams.fontExtents = GetFontEntry()->GetFontExtents(mFUnitsConvFactor); ++ if (mFUnitsConvFactor > 0.0) { ++ fontParams.fontExtents = GetFontEntry()->GetFontExtents(mFUnitsConvFactor); ++ } else { ++ // Was it not an sfnt? Maybe on Linux... use arbitrary huge extents, so we ++ // don't inadvertently clip stuff. A bit less efficient than true extents, ++ // but this should be extremely rare. ++ auto size = GetAdjustedSize(); ++ fontParams.fontExtents = Rect(-2 * size, -2 * size, 5 * size, 5 * size); ++ } + if (fontParams.obliqueSkew != 0.0f) { + gfx::Point p(fontParams.fontExtents.x, fontParams.fontExtents.y); + gfx::Matrix skew(1, 0, fontParams.obliqueSkew, 1, 0, 0); + fontParams.fontExtents = skew.TransformBounds(fontParams.fontExtents); + } +diff --git gfx/thebes/gfxFontEntry.cpp gfx/thebes/gfxFontEntry.cpp +--- gfx/thebes/gfxFontEntry.cpp ++++ gfx/thebes/gfxFontEntry.cpp +@@ -282,15 +282,18 @@ + uint32_t len; + const HeadTable* head = + reinterpret_cast(hb_blob_get_data(headTable, &len)); + if (len >= sizeof(HeadTable)) { + mUnitsPerEm = head->unitsPerEm; ++ if (int16_t(head->xMax) > int16_t(head->xMin) && ++ int16_t(head->yMax) > int16_t(head->yMin)) { ++ mXMin = head->xMin; ++ mYMin = head->yMin; ++ mXMax = head->xMax; ++ mYMax = head->yMax; ++ } + } +- mXMin = head->xMin; +- mYMin = head->yMin; +- mXMax = head->xMax; +- mYMax = head->yMax; + } + + // if we didn't find a usable 'head' table, or if the value was + // outside the valid range, record it as invalid + if (mUnitsPerEm < kMinUPEM || mUnitsPerEm > kMaxUPEM) { +